User Manual¶
Signal Chain is a radar data processing library which includes modules to read,
and write different files formats, besides modules to process and visualize the
data.
Dependencies¶
- GCC (gcc or gfortran)
- Python.h (python-dev or python-devel)
- Python-TK (python-tk)
- WxPython (MAC users)
- HDF5 libraries (libhdf5-dev)
Installation¶
To get started the easiest way to install it is through
PyPI with pip. We strongly recommend to
use a virtual environment like virtualenv, pyenv or anaconda.
pip install schainpy
From source¶
First, ensure that you have the above-listed dependencies installed, then clone
the repository and install as normal python package:
git clone https://github.com/JRO-Peru/schainpy.git
cd schain
git checkout `branch-name` (optional)
sudo pip install ./
For MAC users to run signal chain scripts, sometimes you have to use the python.framework (pythonw)
instead of python. If you are using anaconda you can install it as follow:
$ conda install python.app
Using Docker¶
Download Dockerfile from the repository, and create a docker image:
docker build -t schain .
You can run a container using an xml file or a signal chain script also you need to
mount a volume for the data input and for the output files/plots:
docker run -it --rm --volume /path/to/host/data:/data schain xml /data/test.xml
docker run -it --rm --volume /path/to/host/data:/data --entrypoint /urs/local/bin/python schain /data/test.py
CLI (command line interface)¶
Signal Chain provides the following commands:
- schainGUI: Open the GUI
- schain: Signal chain command line
Example¶
Here you can find an script to read Spectra data (.pdata), remove dc and plot
self-spectra & RTI:
#!/usr/bin/python
from schainpy import Project
prj = Project()
read_unit = prj.addReadUnit(
datatype='Spectra',
path='/path/to/pdata/',
startDate='2014/01/31',
endDate='2014/03/31',
startTime='00:00:00',
endTime='23:59:59',
online=0,
walk=0
)
proc_unit = prj.addProcUnit(
datatype='Spectra',
inputId=read_unit.getId()
)
op = proc_unit.addOperation(name='selectChannels')
op.addParameter(name='channelList', value='0,1')
op = proc_unit.addOperation(name='selectHeights')
op.addParameter(name='minHei', value='80')
op.addParameter(name='maxHei', value='200')
op = proc_unit.addOperation(name='removeDC')
op = proc_unit.addOperation(name='SpectraPlot')
op.addParameter(name='wintitle', value='Spectra', format='str')
op = proc_unit.addOperation(name='RTIPlot')
op.addParameter(name='wintitle', value='RTI', format='str')
prj.start()