c11204ps


Namec11204ps JSON
Version 0.2.1 PyPI version JSON
download
home_page
SummaryPython package for controlling a Hamamatsu c11204-01/02 power supply.
upload_time2023-12-08 18:22:23
maintainer
docs_urlNone
author
requires_python>=3.7
license
keywords c11204 c11204-01 c11204-02 hamamatsu power supply
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # c11204ps
[![PyPI - Version](https://img.shields.io/pypi/v/c11204ps.svg)](https://pypi.org/project/c11204ps)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/c11204ps.svg)](https://pypi.org/project/c11204ps)

Python package for controlling a Hamamatsu c11204-01/02 power supply.
This is essentially a re-write of [`pyCLAWSps`](https://github.com/malindasds/pyCLAWSps).
While the `pyCLAWSps` was fine for basic control of a c11204 power supply, this
package aims to provide a more general, streamlined python interface.

For the reason of this being based on `pyCLAWSps`, the version count for this
package starts at `0.2.0`.

## Installation
This package should be in the package index and installable with pip.
```console
pip install c11204ps
```

Alternatively build with `hatch` and install from `.whl`.
Run from the root of this repository
```console
hatch build
pip install ./dist/c11204ps-0.2.0-py3-none-any.whl
```
Adjust filename for current verison if neccessary.

## Compatibility
The code was developed for a power supply board for the CLAWS scintillation
detectors and was only ever tested in this context. However, technically pretty
much all functionality should be general, making this package usable as long as
the c11204-01/02 serial UART interface can be accessed.

## Using the package
Simply instantiate a `C11204PS` object and call any of the implemented functions.
The functions themselves should be documented with docstrings in the code.
An example to set and check the voltage is the following:
```py
from c11204ps import C11204PS
# Call with no arguments initializes with first serial port with name
# containing 'CP210' or 'Q_MPPC_CTL'.
ps = C11204PS()  
ps.hv_disable()  # Disable voltage supply
print(ps.get_voltage())  # Should read close to zero

ps.set_voltage(56.7)  # Set the voltage (choose appropriate value)

ps.hv_enable()
print(ps.get_voltage())  # Should read close to set voltage

print(ps.get_status())  # Print dict of status flags for the power supply
```

## License
c11204ps is distributed under the terms of the [GPL-3.0-only](https://spdx.org/licenses/GPL-3.0-only.html) license.

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "c11204ps",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "c11204,c11204-01,c11204-02,hamamatsu,power supply",
    "author": "",
    "author_email": "burbschat <b.urbschat@tum.de>",
    "download_url": "https://files.pythonhosted.org/packages/0b/a2/ad9637b6ecfb16476abc0590970615e0486044629ca0abd1512fbb28cd09/c11204ps-0.2.1.tar.gz",
    "platform": null,
    "description": "# c11204ps\n[![PyPI - Version](https://img.shields.io/pypi/v/c11204ps.svg)](https://pypi.org/project/c11204ps)\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/c11204ps.svg)](https://pypi.org/project/c11204ps)\n\nPython package for controlling a Hamamatsu c11204-01/02 power supply.\nThis is essentially a re-write of [`pyCLAWSps`](https://github.com/malindasds/pyCLAWSps).\nWhile the `pyCLAWSps` was fine for basic control of a c11204 power supply, this\npackage aims to provide a more general, streamlined python interface.\n\nFor the reason of this being based on `pyCLAWSps`, the version count for this\npackage starts at `0.2.0`.\n\n## Installation\nThis package should be in the package index and installable with pip.\n```console\npip install c11204ps\n```\n\nAlternatively build with `hatch` and install from `.whl`.\nRun from the root of this repository\n```console\nhatch build\npip install ./dist/c11204ps-0.2.0-py3-none-any.whl\n```\nAdjust filename for current verison if neccessary.\n\n## Compatibility\nThe code was developed for a power supply board for the CLAWS scintillation\ndetectors and was only ever tested in this context. However, technically pretty\nmuch all functionality should be general, making this package usable as long as\nthe c11204-01/02 serial UART interface can be accessed.\n\n## Using the package\nSimply instantiate a `C11204PS` object and call any of the implemented functions.\nThe functions themselves should be documented with docstrings in the code.\nAn example to set and check the voltage is the following:\n```py\nfrom c11204ps import C11204PS\n# Call with no arguments initializes with first serial port with name\n# containing 'CP210' or 'Q_MPPC_CTL'.\nps = C11204PS()  \nps.hv_disable()  # Disable voltage supply\nprint(ps.get_voltage())  # Should read close to zero\n\nps.set_voltage(56.7)  # Set the voltage (choose appropriate value)\n\nps.hv_enable()\nprint(ps.get_voltage())  # Should read close to set voltage\n\nprint(ps.get_status())  # Print dict of status flags for the power supply\n```\n\n## License\nc11204ps is distributed under the terms of the [GPL-3.0-only](https://spdx.org/licenses/GPL-3.0-only.html) license.\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Python package for controlling a Hamamatsu c11204-01/02 power supply.",
    "version": "0.2.1",
    "project_urls": {
        "Documentation": "https://github.com/burbschat/c11204ps#readme",
        "Issues": "https://github.com/burbschat/c11204ps/issues",
        "Source": "https://github.com/burbschat/c11204ps"
    },
    "split_keywords": [
        "c11204",
        "c11204-01",
        "c11204-02",
        "hamamatsu",
        "power supply"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "68e0160f16759cd3db88b873584eba243260f71a5ee9803ccc59c7dfe18c4e1d",
                "md5": "b8453b1fe7da745f09b7ce9aef929a89",
                "sha256": "228e5221da12d4a936429d001ad7acdf81ecca80995ffd328c51a941b86f25da"
            },
            "downloads": -1,
            "filename": "c11204ps-0.2.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "b8453b1fe7da745f09b7ce9aef929a89",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 19781,
            "upload_time": "2023-12-08T18:22:21",
            "upload_time_iso_8601": "2023-12-08T18:22:21.696673Z",
            "url": "https://files.pythonhosted.org/packages/68/e0/160f16759cd3db88b873584eba243260f71a5ee9803ccc59c7dfe18c4e1d/c11204ps-0.2.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0ba2ad9637b6ecfb16476abc0590970615e0486044629ca0abd1512fbb28cd09",
                "md5": "4af05373d2d596972513560bcb91f23b",
                "sha256": "3b3c6bfbaab44601598f16b5ed505ba9d4ad4ff594c121b0915db1383677cba0"
            },
            "downloads": -1,
            "filename": "c11204ps-0.2.1.tar.gz",
            "has_sig": false,
            "md5_digest": "4af05373d2d596972513560bcb91f23b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 19462,
            "upload_time": "2023-12-08T18:22:23",
            "upload_time_iso_8601": "2023-12-08T18:22:23.655468Z",
            "url": "https://files.pythonhosted.org/packages/0b/a2/ad9637b6ecfb16476abc0590970615e0486044629ca0abd1512fbb28cd09/c11204ps-0.2.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-12-08 18:22:23",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "burbschat",
    "github_project": "c11204ps#readme",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "c11204ps"
}
        
Elapsed time: 0.17661s