Skip to main content

Overview

This package provides a library to access the Red Pitaya 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.

An 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

The process to install PyRedPitaya on the board requires the installation of Python first. See this link.

To install PyRedPitaya on the computer download the package and run the command:

python setup.py install

or use easy_install:

easy_install PyRedPitaya

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 :

from PyRedPitaya.board import RedPitaya

redpitaya = RedPitaya()

print redpitaya.ams.temp # Read property
redpitaya.hk.led = 0b10101010 # Write property

Remote access

You need to install the PyRedPitaya package on your PC as well as Rpyc:

rpyc_server

On the computer (replace REDPITAYA_IP by the string containing the IP address) :

from rpyc import connect
from PyRedPitaya.pc import RedPitaya

conn = connect(REDPITAYA_IP, port=18861)
redpitaya = RedPitaya(conn)

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()

Release files for PyRedPitaya 1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for PyRedPitaya 1.0
File Size Uploaded
PyRedPitaya-1.0.tar.gz 14.6 kB Details

Release files / PyRedPitaya-1.0.tar.gz

Download URL PyRedPitaya-1.0.tar.gz
Size 14.6 kB
Tags Source
SHA-256 checksum
How to use checksums
025f861e2afb6246dafe4dd9aa58489419163d1de5d4ac09326270fb30552386
BLAKE2b-256 checksum
How to use checksums
9d056c661df990288634d81544fb46c6ba04a52700597f6246069145e1e98e43
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

1.0 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page