srsinst.dc205


Namesrsinst.dc205 JSON
Version 0.0.5 PyPI version JSON
download
home_page
SummaryInstrument driver package for the DC205 DC Voltage Source from Stanford Research Systems (SRS)
upload_time2023-11-13 19:57:44
maintainer
docs_urlNone
authorChulhoon Kim
requires_python>=3.7
licenseMIT license
keywords dc205 voltage source srs stanford research systems
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # srsinst.dc205

`srsinst.dc205` is a Python package to control the
[DC205 Voltage source](https://thinksrs.com/products/dc205.html)
from [Stanford Research Systems (SRS)](https://thinksrs.com/).

`srsinst.dc205` is based on [srsgui](https://pypi.org/project/srsgui/),
which you do not need to install separately,
but is included with this install.

## Installation
You need a working Python 3.7 or later with `pip` (Python package installer) installed.
If you don't, [install Python](https://www.python.org/) to your system.

To install `srsinst.dc2052` as an instrument driver , use Python package installer `pip` from the command line.

    python -m pip install srsinst.dc205

To use it as a GUI application, create a virtual environment,
if necessary, and install:

    python -m pip install srsinst.dc205[full]


## Run `srsinst.dc205` as GUI application
If the Python Scripts directory is in your PATH environment variable,
start the application by typing from the command line:

    dc205

If not,

    python -m srsinst.dc205

will start the GUI application.

Once running the GUI, you can:
- Connect to an DC205 from the Instruments menu.
- Select a task from the Task menu.
- Press the green arrow to run the selected task.

You can write your own task(s) or modify an existing one and run it from the GUI application, too.

## Use `srsinst.dc205` as instrument driver
* Start a Python interpreter, a Jupyter notebook, or an editor of your choice
to write a Python script.
* Import the **DC205** class from `srsinst.dc205` package.
* Create an instance of the **DC205** and establish a remote connection.

|

    C:\>python
    Python 3.8.3 (tags/v3.8.3:6f8c832, May 13 2020, 22:37:02) [MSC v.1924 64 bit (AMD64)] on win32
    Type "help", "copyright", "credits" or "license" for more information.
    >>> from srsinst.dc205 import DC205
    >>> vs = DC205('serial','COM7',115200)
    >>> vs.check_id()
    ('DC205', 's/n20500476', 'ver1.80')


**DC205** is comprised of multiple **Component**s,
which provides groupings of related commands and class methods.
 The **Component** class has a convenience attribute `dir` to show  available attributes and methods in the Python dictionary format.

    >>> vs.dir.keys()
    dict_keys(['components', 'commands', 'methods'])

**DC205** has 5 components that contain remote commands and methods
as organized in the [Remote Operation chapter](https://www.thinksrs.com/downloads/pdfs/manuals/DC205m.pdf#page=47)
of the *DC205 Operating and Service Manual*.

    >>> vs.dir['components'].keys()
    dict_keys(['config', 'setting', 'scan', 'setup', 'interface', 'status'])

## Configure DC205 components
Let's set the DC205 Configuration.

    >>> vs.config.dir
    {'components': {},
     'commands': {'voltage_range': ('DictCommand', 'RNGE'),
                  'isolation': ('DictCommand', 'ISOL'),
                  'remote_sensing': ('DictCommand', 'SENS'),
                  'output': ('DictCommand', 'SOUT')},
                  'methods': ['set_range', 'enable_output', 'disable_output']}
>>>

If a command is a `DictCommand` instance, it uses mapped keys and values.
Use `get_command_info()` to find out the mapping dictionary information.

    >>> vs.config.get_command_info('voltage_range')
    {'command class': 'DictCommand',
     'raw remote command': 'RNGE',
     'set_dict': {'range1': 0, 'range10': 1, 'range100': 2},
     'get_dict': {'range1': 0, 'range10': 1, 'range100': 2},
     'index_dict': None
    }

The command `vs.config.voltage_range` encapsulates the raw command 'RNGE'
explained in the [Setion 4.4.4 of the manual](https://www.thinksrs.com/downloads/pdfs/manuals/DC205m.pdf#page=55).
The token integers (0, 1, and 2) are mapped to the strings (`'range1'`, `'range10'`, and `'range100'`)

    >>> vs.config.voltage_range
    'range1'
    >>> vs.config.voltage_range='range10'
    >>> print(vs.config.voltage_range)
    range10

You can configure other parameters in the similar way.

    >>> vs.setting.voltage
    0.0
    >>> vs.setting.voltage = 0.5
    >>> vs.setting.voltage
    0.5
    >>> vs.config.get_command_info('output')
    {'command class': 'DictCommand',
     'raw remote command': 'SOUT',
     'set_dict': {'off': 0, 'on': 1},
     'get_dict': {'off': 0, 'on': 1},
     'index_dict': None
    }
    >>> vs.config.output
    'off'
    >>> vs.config.output = 'on'
    >>> vs.config.output
    'on'




            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "srsinst.dc205",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "DC205,voltage source,SRS,Stanford Research Systems",
    "author": "Chulhoon Kim",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/19/fe/0210828e7bb21dcde8f03449d0a5912d6769e513fee9a5b6d59a0958af1b/srsinst.dc205-0.0.5.tar.gz",
    "platform": null,
    "description": "# srsinst.dc205\r\n\r\n`srsinst.dc205` is a Python package to control the\r\n[DC205 Voltage source](https://thinksrs.com/products/dc205.html)\r\nfrom [Stanford Research Systems (SRS)](https://thinksrs.com/).\r\n\r\n`srsinst.dc205` is based on [srsgui](https://pypi.org/project/srsgui/),\r\nwhich you do not need to install separately,\r\nbut is included with this install.\r\n\r\n## Installation\r\nYou need a working Python 3.7 or later with `pip` (Python package installer) installed.\r\nIf you don't, [install Python](https://www.python.org/) to your system.\r\n\r\nTo install `srsinst.dc2052` as an instrument driver , use Python package installer `pip` from the command line.\r\n\r\n    python -m pip install srsinst.dc205\r\n\r\nTo use it as a GUI application, create a virtual environment,\r\nif necessary, and install:\r\n\r\n    python -m pip install srsinst.dc205[full]\r\n\r\n\r\n## Run `srsinst.dc205` as GUI application\r\nIf the Python Scripts directory is in your PATH environment variable,\r\nstart the application by typing from the command line:\r\n\r\n    dc205\r\n\r\nIf not,\r\n\r\n    python -m srsinst.dc205\r\n\r\nwill start the GUI application.\r\n\r\nOnce running the GUI, you can:\r\n- Connect to an DC205 from the Instruments menu.\r\n- Select a task from the Task menu.\r\n- Press the green arrow to run the selected task.\r\n\r\nYou can write your own task(s) or modify an existing one and run it from the GUI application, too.\r\n\r\n## Use `srsinst.dc205` as instrument driver\r\n* Start a Python interpreter, a Jupyter notebook, or an editor of your choice\r\nto write a Python script.\r\n* Import the **DC205** class from `srsinst.dc205` package.\r\n* Create an instance of the **DC205** and establish a remote connection.\r\n\r\n|\r\n\r\n    C:\\>python\r\n    Python 3.8.3 (tags/v3.8.3:6f8c832, May 13 2020, 22:37:02) [MSC v.1924 64 bit (AMD64)] on win32\r\n    Type \"help\", \"copyright\", \"credits\" or \"license\" for more information.\r\n    >>> from srsinst.dc205 import DC205\r\n    >>> vs = DC205('serial','COM7',115200)\r\n    >>> vs.check_id()\r\n    ('DC205', 's/n20500476', 'ver1.80')\r\n\r\n\r\n**DC205** is comprised of multiple **Component**s,\r\nwhich provides groupings of related commands and class methods.\r\n The **Component** class has a convenience attribute `dir` to show  available attributes and methods in the Python dictionary format.\r\n\r\n    >>> vs.dir.keys()\r\n    dict_keys(['components', 'commands', 'methods'])\r\n\r\n**DC205** has 5 components that contain remote commands and methods\r\nas organized in the [Remote Operation chapter](https://www.thinksrs.com/downloads/pdfs/manuals/DC205m.pdf#page=47)\r\nof the *DC205 Operating and Service Manual*.\r\n\r\n    >>> vs.dir['components'].keys()\r\n    dict_keys(['config', 'setting', 'scan', 'setup', 'interface', 'status'])\r\n\r\n## Configure DC205 components\r\nLet's set the DC205 Configuration.\r\n\r\n    >>> vs.config.dir\r\n    {'components': {},\r\n     'commands': {'voltage_range': ('DictCommand', 'RNGE'),\r\n                  'isolation': ('DictCommand', 'ISOL'),\r\n                  'remote_sensing': ('DictCommand', 'SENS'),\r\n                  'output': ('DictCommand', 'SOUT')},\r\n                  'methods': ['set_range', 'enable_output', 'disable_output']}\r\n>>>\r\n\r\nIf a command is a `DictCommand` instance, it uses mapped keys and values.\r\nUse `get_command_info()` to find out the mapping dictionary information.\r\n\r\n    >>> vs.config.get_command_info('voltage_range')\r\n    {'command class': 'DictCommand',\r\n     'raw remote command': 'RNGE',\r\n     'set_dict': {'range1': 0, 'range10': 1, 'range100': 2},\r\n     'get_dict': {'range1': 0, 'range10': 1, 'range100': 2},\r\n     'index_dict': None\r\n    }\r\n\r\nThe command `vs.config.voltage_range` encapsulates the raw command 'RNGE'\r\nexplained in the [Setion 4.4.4 of the manual](https://www.thinksrs.com/downloads/pdfs/manuals/DC205m.pdf#page=55).\r\nThe token integers (0, 1, and 2) are mapped to the strings (`'range1'`, `'range10'`, and `'range100'`)\r\n\r\n    >>> vs.config.voltage_range\r\n    'range1'\r\n    >>> vs.config.voltage_range='range10'\r\n    >>> print(vs.config.voltage_range)\r\n    range10\r\n\r\nYou can configure other parameters in the similar way.\r\n\r\n    >>> vs.setting.voltage\r\n    0.0\r\n    >>> vs.setting.voltage = 0.5\r\n    >>> vs.setting.voltage\r\n    0.5\r\n    >>> vs.config.get_command_info('output')\r\n    {'command class': 'DictCommand',\r\n     'raw remote command': 'SOUT',\r\n     'set_dict': {'off': 0, 'on': 1},\r\n     'get_dict': {'off': 0, 'on': 1},\r\n     'index_dict': None\r\n    }\r\n    >>> vs.config.output\r\n    'off'\r\n    >>> vs.config.output = 'on'\r\n    >>> vs.config.output\r\n    'on'\r\n\r\n\r\n\r\n",
    "bugtrack_url": null,
    "license": "MIT license",
    "summary": "Instrument driver package for the DC205 DC Voltage Source from Stanford Research Systems (SRS)",
    "version": "0.0.5",
    "project_urls": null,
    "split_keywords": [
        "dc205",
        "voltage source",
        "srs",
        "stanford research systems"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "69937037e527e246da432e99b17c4234f64b9ef892abaa65313ea636e6d16d7b",
                "md5": "34926fe213861e8ab78004c330046e32",
                "sha256": "2dfc9cb301e81d90161f922da72106772ee66752058e90a7bd467ac7d1381712"
            },
            "downloads": -1,
            "filename": "srsinst.dc205-0.0.5-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "34926fe213861e8ab78004c330046e32",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 11094,
            "upload_time": "2023-11-13T19:57:43",
            "upload_time_iso_8601": "2023-11-13T19:57:43.486166Z",
            "url": "https://files.pythonhosted.org/packages/69/93/7037e527e246da432e99b17c4234f64b9ef892abaa65313ea636e6d16d7b/srsinst.dc205-0.0.5-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "19fe0210828e7bb21dcde8f03449d0a5912d6769e513fee9a5b6d59a0958af1b",
                "md5": "c426a75f884919af7af68f583fcc41ad",
                "sha256": "6d4dc3a9171caa681d51ae2ccf729a7fc52ae10f326b323064d4c8dbd4adb296"
            },
            "downloads": -1,
            "filename": "srsinst.dc205-0.0.5.tar.gz",
            "has_sig": false,
            "md5_digest": "c426a75f884919af7af68f583fcc41ad",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 11144,
            "upload_time": "2023-11-13T19:57:44",
            "upload_time_iso_8601": "2023-11-13T19:57:44.821140Z",
            "url": "https://files.pythonhosted.org/packages/19/fe/0210828e7bb21dcde8f03449d0a5912d6769e513fee9a5b6d59a0958af1b/srsinst.dc205-0.0.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-11-13 19:57:44",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "srsinst.dc205"
}
        
Elapsed time: 0.16894s