newportxps


Namenewportxps JSON
Version 0.9 PyPI version JSON
download
home_pageNone
SummaryPython interface to Newport XPS motion controllers
upload_time2024-08-22 21:34:02
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseBSD License
keywords motion control data collection
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # newportxps

This module provides code for using Newport XPS motor controllers from Python.

While Newport Corp. has provided a basic socket and ftp interface to the XPS
controller for a long time, this interface is very low-level. In addition,
there are some incompatibilities between the different generations of XPS
controllers (generations C, Q, D in that chronological order), and a lack of
support for Python 3 in the Newport-provided interface.  The `newportxps`
module here aims to provide a simple, user-friendly interface for the Newport
XPS that works uniformly for all three generations of XPS and for both Python
2 and 3.

As an example, connecting to and reading the status of an XPS controller may
look like this:

```python
 >>> from newportxps import NewportXPS
 >>> xps = NewportXPS('164.54.160.000', username='Administrator', password='Please.Let.Me.In')
 >>> print(xps.status_report())
 # XPS host:         164.54.160.000 (164.54.160.000)
 # Firmware:         XPS-D-N13006
 # Current Time:     Sun Sep 16 13:40:24 2018
 # Last Reboot:      Wed Sep 12 14:46:44 2018
 # Trajectory Group: None
 # Groups and Stages
 DetectorZ (SingleAxisInUse), Status: Ready state from motion
    DetectorZ.Pos (ILS@ILS150CC@XPS-DRV11)
       Hardware Status: First driver powered on - ZM low level
       Positioner Errors: OK
 SampleX (SingleAxisInUse), Status: Ready state from motion
    SampleX.Pos (UTS@UTS150PP@XPS-DRV11)
       Hardware Status: First driver powered on - ZM high level
       Positioner Errors: OK
 SampleY (SingleAxisInUse), Status: Ready state from motion
    SampleY.Pos (UTS@UTS150PP@XPS-DRV11)
       Hardware Status: First driver powered on - ZM high level
       Positioner Errors: OK
 SampleZ (SingleAxisInUse), Status: Ready state from motion
   SampleZ.Pos (UTS@UTS150PP@XPS-DRV11)
       Hardware Status: First driver powered on - ZM low level
       Positioner Errors: OK

 >>> for gname, info in xps.groups.items():
 ...     print(gname, info)
 ...
 DetectorX {'category': 'SingleAxisInUse', 'positioners': ['Pos']}
 SampleX {'category': 'SingleAxisInUse', 'positioners': ['Pos']}
 SampleY {'category': 'SingleAxisInUse', 'positioners': ['Pos']}
 SampleZ {'category': 'SingleAxisInUse', 'positioners': ['Pos']}
 >>>
 >>> for sname, info in xps.stages.items():
 ...     print(sname, xps.get_stage_position(sname), info)
 ...
 DetectorX.Pos 36.5 {'type': 'ILS@ILS150CC@XPS-DRV11', 'max_velo': 100, 'max_accel': 400, 'low_limit': -74, 'high_limit': 74}
 SampleX.Pos 1.05 {'type': 'UTS@UTS150PP@XPS-DRV11', 'max_velo': 20, 'max_accel': 80, 'low_limit': -74, 'high_limit': 74}
 SampleY.Pos 0.24 {'type': 'UTS@UTS150PP@XPS-DRV11', 'max_velo': 20, 'max_accel': 80, 'low_limit': -74, 'high_limit': 74}
 SampleZ.Pos 2.5 {'type': 'UTS@UTS150PP@XPS-DRV11', 'max_velo': 20, 'max_accel': 80, 'low_limit': -74, 'high_limit': 74}

 >>> xps.move_stage('SampleZ.Pos', 1.0)

 >>> xps.home_group('DetectorX')


```

On creation and initialization of the NewportXPS, the Groups and status of the
controller are read in and Stages defined so that they can be queried or
moved.


The `NewportXPS` class has a number of methods to interact with the controller including:

   * reboot controller
   * get status, hardware errors, etc.
   * save and upload new `system.ini` and `stages.ini` files.
   * enable and disable Groups.
   * initialize and home Stages and Groups of Stages.
   * read Stage positions.
   * move Stages and Groups to new positions.
   * set Stage velocity.
   * define simple linear trajectories (using PVT mode), both 'forward' and 'backward'.
   * upload any PVT trajectory.
   * arm PVT trajectory.
   * run PVT trajectory.
   * read and save Gathering file for a trajectory.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "newportxps",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "motion control, data collection",
    "author": null,
    "author_email": "Matthew Newville <newville@cars.uchicago.edu>",
    "download_url": "https://files.pythonhosted.org/packages/93/64/6e7e4513f1da1b4d47078a85adfa537655ebf90a0c26630beac4da3f2361/newportxps-0.9.tar.gz",
    "platform": null,
    "description": "# newportxps\n\nThis module provides code for using Newport XPS motor controllers from Python.\n\nWhile Newport Corp. has provided a basic socket and ftp interface to the XPS\ncontroller for a long time, this interface is very low-level. In addition,\nthere are some incompatibilities between the different generations of XPS\ncontrollers (generations C, Q, D in that chronological order), and a lack of\nsupport for Python 3 in the Newport-provided interface.  The `newportxps`\nmodule here aims to provide a simple, user-friendly interface for the Newport\nXPS that works uniformly for all three generations of XPS and for both Python\n2 and 3.\n\nAs an example, connecting to and reading the status of an XPS controller may\nlook like this:\n\n```python\n >>> from newportxps import NewportXPS\n >>> xps = NewportXPS('164.54.160.000', username='Administrator', password='Please.Let.Me.In')\n >>> print(xps.status_report())\n # XPS host:         164.54.160.000 (164.54.160.000)\n # Firmware:         XPS-D-N13006\n # Current Time:     Sun Sep 16 13:40:24 2018\n # Last Reboot:      Wed Sep 12 14:46:44 2018\n # Trajectory Group: None\n # Groups and Stages\n DetectorZ (SingleAxisInUse), Status: Ready state from motion\n    DetectorZ.Pos (ILS@ILS150CC@XPS-DRV11)\n       Hardware Status: First driver powered on - ZM low level\n       Positioner Errors: OK\n SampleX (SingleAxisInUse), Status: Ready state from motion\n    SampleX.Pos (UTS@UTS150PP@XPS-DRV11)\n       Hardware Status: First driver powered on - ZM high level\n       Positioner Errors: OK\n SampleY (SingleAxisInUse), Status: Ready state from motion\n    SampleY.Pos (UTS@UTS150PP@XPS-DRV11)\n       Hardware Status: First driver powered on - ZM high level\n       Positioner Errors: OK\n SampleZ (SingleAxisInUse), Status: Ready state from motion\n   SampleZ.Pos (UTS@UTS150PP@XPS-DRV11)\n       Hardware Status: First driver powered on - ZM low level\n       Positioner Errors: OK\n\n >>> for gname, info in xps.groups.items():\n ...     print(gname, info)\n ...\n DetectorX {'category': 'SingleAxisInUse', 'positioners': ['Pos']}\n SampleX {'category': 'SingleAxisInUse', 'positioners': ['Pos']}\n SampleY {'category': 'SingleAxisInUse', 'positioners': ['Pos']}\n SampleZ {'category': 'SingleAxisInUse', 'positioners': ['Pos']}\n >>>\n >>> for sname, info in xps.stages.items():\n ...     print(sname, xps.get_stage_position(sname), info)\n ...\n DetectorX.Pos 36.5 {'type': 'ILS@ILS150CC@XPS-DRV11', 'max_velo': 100, 'max_accel': 400, 'low_limit': -74, 'high_limit': 74}\n SampleX.Pos 1.05 {'type': 'UTS@UTS150PP@XPS-DRV11', 'max_velo': 20, 'max_accel': 80, 'low_limit': -74, 'high_limit': 74}\n SampleY.Pos 0.24 {'type': 'UTS@UTS150PP@XPS-DRV11', 'max_velo': 20, 'max_accel': 80, 'low_limit': -74, 'high_limit': 74}\n SampleZ.Pos 2.5 {'type': 'UTS@UTS150PP@XPS-DRV11', 'max_velo': 20, 'max_accel': 80, 'low_limit': -74, 'high_limit': 74}\n\n >>> xps.move_stage('SampleZ.Pos', 1.0)\n\n >>> xps.home_group('DetectorX')\n\n\n```\n\nOn creation and initialization of the NewportXPS, the Groups and status of the\ncontroller are read in and Stages defined so that they can be queried or\nmoved.\n\n\nThe `NewportXPS` class has a number of methods to interact with the controller including:\n\n   * reboot controller\n   * get status, hardware errors, etc.\n   * save and upload new `system.ini` and `stages.ini` files.\n   * enable and disable Groups.\n   * initialize and home Stages and Groups of Stages.\n   * read Stage positions.\n   * move Stages and Groups to new positions.\n   * set Stage velocity.\n   * define simple linear trajectories (using PVT mode), both 'forward' and 'backward'.\n   * upload any PVT trajectory.\n   * arm PVT trajectory.\n   * run PVT trajectory.\n   * read and save Gathering file for a trajectory.\n",
    "bugtrack_url": null,
    "license": "BSD License",
    "summary": "Python interface to Newport XPS motion controllers",
    "version": "0.9",
    "project_urls": {
        "Homepage": "https://github.com/pyepics/newportxps/"
    },
    "split_keywords": [
        "motion control",
        " data collection"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4923023e2d3e6ea838ef058d3e51dd53c1acb76f77f4028f4d66640b65d70bf1",
                "md5": "68590c822a7fc2a1c9f681fbd273a8e5",
                "sha256": "7cd1f879d0aba956a088e95fbd4f23c5d096e4ef42c2f1329e76a08a07c23537"
            },
            "downloads": -1,
            "filename": "newportxps-0.9-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "68590c822a7fc2a1c9f681fbd273a8e5",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 29281,
            "upload_time": "2024-08-22T21:34:01",
            "upload_time_iso_8601": "2024-08-22T21:34:01.309832Z",
            "url": "https://files.pythonhosted.org/packages/49/23/023e2d3e6ea838ef058d3e51dd53c1acb76f77f4028f4d66640b65d70bf1/newportxps-0.9-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "93646e7e4513f1da1b4d47078a85adfa537655ebf90a0c26630beac4da3f2361",
                "md5": "3a5a99878a96db3b7d58bca3cda0c5ec",
                "sha256": "04dcc74728e0eade3e72f972652d95a4bf419321060ce58efc9ebeb0942411b1"
            },
            "downloads": -1,
            "filename": "newportxps-0.9.tar.gz",
            "has_sig": false,
            "md5_digest": "3a5a99878a96db3b7d58bca3cda0c5ec",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 35962,
            "upload_time": "2024-08-22T21:34:02",
            "upload_time_iso_8601": "2024-08-22T21:34:02.416040Z",
            "url": "https://files.pythonhosted.org/packages/93/64/6e7e4513f1da1b4d47078a85adfa537655ebf90a0c26630beac4da3f2361/newportxps-0.9.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-22 21:34:02",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "pyepics",
    "github_project": "newportxps",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "newportxps"
}
        
Elapsed time: 9.69931s