- Download https://s3.amazonaws.com/ThinkRF/Support-Resources/pyrf-dependencies.zip
- Extract the contents of the zipped file
- Install Python 2.7.6 (python-2.7.6.msi)
- Add the following to the windows PATH ‘;C:Python27;C:Python27Scripts’
- Install Numpy (numpy-1.8.1-win32-superpack-python2.7)
- Install Scipy (scipy-0.14.0-win32-superpack-python2.7)
- Install Pyside (PySide-1.2.0.win32-py2.7)
- Install Pyqtgraph (pyqtgraph-0.9.8.win32)
- Install zope.interface (zope.interface-4.1.1.win32-py2.7)
- Install twisted (Twisted-14.0.0.win32-py2.7)
- Install pywin32 (pywin32-219.win32-py2.7)
- Using a command line, go to the qtreactor-qtreactor-pyrf-1.0 folder, and type ‘setup.py install’
- Obtain PyRF source code from https://github.com/pyrf/pyrf
- Go the pyrf directory and run ‘setup.py install’
Use packaged requirements:
apt-get install python-pyside python-twisted python-numpy \ python-zope.interface python-pip python-scipy pip install -e git://github.com/pyrf/qtreactor.git#egg=qtreactor pip install -e git://github.com/pyrf/pyqtgraph.git#egg=pyqtgraph
Or install GUI requirements from source:
apt-get install qt-sdk python-dev cmake \ libblas-dev libatlas-dev liblapack-dev gfortran export BLAS=/usr/lib/libblas/libblas.so export ATLAS=/usr/lib/atlas-base/libatlas.so export LAPACK=/usr/lib/lapack/liblapack.so pip install -r gui-requirements.txt
Continue from PyRF Installation below.
Download the development version:
git clone git://github.com/pyrf/pyrf.git cd pyrf python setup.py install
Or download a stable release, then from the source directory:
python setup.py install
API for WSA RF Receiver¶
pyrf.devices.thinkrf.WSA is the class that provides access to WSA4000 and WSA5000 devices. Its methods closely match the SCPI Command Set described in the Programmers Reference available in ThinkRF Resources.
There are simple examples that use this API under the “examples” directory included with the source code.
This API may be used in a blocking mode (the default) or in an asynchronous mode with using the `Twisted`_ python library.
In blocking mode all methods that read from the device will wait to receive a response before returning.
In asynchronous mode all methods will send their commands to the device and then immediately return a Twisted Deferred object. If you need to wait for the response or completion of this command you can attach a callback to the Deferred object and the Twisted reactor will call it when ready. You may choose to use Twisted’s inlineCallbacks function decorator to write Twisted code that resembles synchronous code by yielding the Deferred objects returned from the API.
To use the asynchronous when a WSA instance is created you must pass a pyrf.connectors.twisted_async.TwistedConnector instance as the connector parameter, as in show_i_q.py / twisted_show_i_q.py
rtsa-gui is a cross-platform GUI application built with the Qt toolkit and PySideProject bindings for Python.
The GUI may be launched with the command:
rtsa-gui <hostname> [--reset]
If hostname is not specified a dialog will appear asking you to enter one. If --reset is used the WSA will be reset to defaults before the GUI appears.