Name | pyrp3 JSON |
Version |
2.0.1
JSON |
| download |
home_page | None |
Summary | Python utilities for RedPitaya |
upload_time | 2024-04-05 12:52:02 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.10 |
license | BSD 3-Clause License Copyright (c) 2016, Pierre Cladé All rights reserved. Copyright (c) 2018-2019, Benjamin Wiegand All rights reserved. Copyright (c) 2022, Bastian Leykauf All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
keywords |
redpitaya
fpga
zynq
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# pyrp3
Python 3 port (using [`2to3`](https://docs.python.org/3/library/2to3.html)) of
[PyRedPitaya](https://github.com/clade/PyRedPitaya>) library in the `pyrp3` namespace.
Note: The following is a copy of the Readme from the original repo and might not work
with this version of the library.
## Overview
This package provides a library to access the [Red Pitaya](http://redpitaya.com/) registers.
This library consist of a C library (`libmonitor.c`) and a `ctypes` interface on the Python side.
An object-oriented interface to the different application (scope, generator, PID, AMS, ...) is
provided. This interface is implemented using Python properties (see usage below) and can quickly be
extended to your own application.
A `rpyc` server is used in order to communicate with your computer. The interface is the same on the
computer as the one on the board.
## Installation
To install `pyrp3`` on any machine, run the command:
```bash
pip3 install pyrp3
```
## Usage
You need to have Python installed on you Red Pitaya.
### Interactive Python
Logging onto the redpitaya using ssh, one can start the ipython shell and run :
```python
from pyrp3.board import RedPitaya
redpitaya = RedPitaya()
print(redpitaya.ams.temp) # Read property
redpitaya.hk.led = 0b10101010 # Write property
```
### Remote access
You need to install the `pyrp3` package on your PC as well as `rpyc`:
```bash
rpyc_server
```
On the computer (replace `REDPITAYA_IP` by the string containing the IP address) :
```python
from rpyc import connect
from pyrp3.pc import RedPitaya
conn = connect(REDPITAYA_IP, port=18861)
redpitaya = RedPitaya(conn)
print(redpitaya.read(0x40000000)) # Direct access
print(redpitaya.ams.temp) # Read property
redpitaya.hk.led = 0b10101010 # Write property
from time import sleep
from pylab import *
redpitaya.scope.setup(frequency = 100, trigger_source=1)
sleep(100E-3)
plot(redpitaya.scope.times, redpitaya.scope.data_ch1)
show()
```
Raw data
{
"_id": null,
"home_page": null,
"name": "pyrp3",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": "Bastian Leykauf <leykauf@physik.hu-berlin.de>",
"keywords": "RedPitaya, FPGA, zynq",
"author": null,
"author_email": "Pierre Clad\u00e9 <pierre.clade@upmc.fr>, Benjamin Wiegand <benjamin.wiegand@physik.hu-berlin.de>, Bastian Leykauf <leykauf@physik.hu-berlin.de>, Doron Behar <doron.behar@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/52/6e/7abd054394d9df993d9069fda5ebb53f80f41f983873b80b83dcecee00f8/pyrp3-2.0.1.tar.gz",
"platform": null,
"description": "# pyrp3\n\nPython 3 port (using [`2to3`](https://docs.python.org/3/library/2to3.html)) of\n[PyRedPitaya](https://github.com/clade/PyRedPitaya>) library in the `pyrp3` namespace.\n\nNote: The following is a copy of the Readme from the original repo and might not work \nwith this version of the library.\n\n## Overview\n\nThis package provides a library to access the [Red Pitaya](http://redpitaya.com/) registers.\nThis library consist of a C library (`libmonitor.c`) and a `ctypes` interface on the Python side. \n\nAn object-oriented interface to the different application (scope, generator, PID, AMS, ...) is \nprovided. This interface is implemented using Python properties (see usage below) and can quickly be\nextended to your own application. \n\nA `rpyc` server is used in order to communicate with your computer. The interface is the same on the\ncomputer as the one on the board.\n\n## Installation\n\nTo install `pyrp3`` on any machine, run the command:\n\n```bash\n pip3 install pyrp3\n```\n\n## Usage\n\nYou need to have Python installed on you Red Pitaya. \n\n### Interactive Python\n\nLogging onto the redpitaya using ssh, one can start the ipython shell and run :\n\n```python\n\n from pyrp3.board import RedPitaya\n\n redpitaya = RedPitaya()\n\n print(redpitaya.ams.temp) # Read property\n redpitaya.hk.led = 0b10101010 # Write property\n```\n\n### Remote access\n\nYou need to install the `pyrp3` package on your PC as well as `rpyc`: \n\n```bash\n rpyc_server\n```\n\nOn the computer (replace `REDPITAYA_IP` by the string containing the IP address) : \n\n```python\n from rpyc import connect\n from pyrp3.pc import RedPitaya\n\n conn = connect(REDPITAYA_IP, port=18861)\n redpitaya = RedPitaya(conn)\n\n print(redpitaya.read(0x40000000)) # Direct access\n\n print(redpitaya.ams.temp) # Read property\n redpitaya.hk.led = 0b10101010 # Write property\n\n from time import sleep\n from pylab import *\n\n redpitaya.scope.setup(frequency = 100, trigger_source=1)\n sleep(100E-3)\n plot(redpitaya.scope.times, redpitaya.scope.data_ch1)\n show()\n```\n",
"bugtrack_url": null,
"license": "BSD 3-Clause License Copyright (c) 2016, Pierre Clad\u00e9 All rights reserved. Copyright (c) 2018-2019, Benjamin Wiegand All rights reserved. Copyright (c) 2022, Bastian Leykauf All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ",
"summary": "Python utilities for RedPitaya",
"version": "2.0.1",
"project_urls": {
"homepage": "https://github.com/linien-org/pyrp3/",
"repository": "https://github.com/linien-org/pyrp3/"
},
"split_keywords": [
"redpitaya",
" fpga",
" zynq"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "526e7abd054394d9df993d9069fda5ebb53f80f41f983873b80b83dcecee00f8",
"md5": "fdb3684880d5db78e8f9bb22cd5934a9",
"sha256": "73805c86874bc34cd00163939a4ddb45df904b9857945c12109b962aaa6fb0c5"
},
"downloads": -1,
"filename": "pyrp3-2.0.1.tar.gz",
"has_sig": false,
"md5_digest": "fdb3684880d5db78e8f9bb22cd5934a9",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 16710,
"upload_time": "2024-04-05T12:52:02",
"upload_time_iso_8601": "2024-04-05T12:52:02.415392Z",
"url": "https://files.pythonhosted.org/packages/52/6e/7abd054394d9df993d9069fda5ebb53f80f41f983873b80b83dcecee00f8/pyrp3-2.0.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-04-05 12:52:02",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "linien-org",
"github_project": "pyrp3",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "pyrp3"
}