@@ -0,0 +1,28 | |||
|
1 | This software, unless otherwise noted, is licensed under the BSD 3-clause. | |
|
2 | ||
|
3 | Copyright (c) 2012-2020 Jicamarca Radio Observatory | |
|
4 | ||
|
5 | Redistribution and use in source and binary forms, with or without | |
|
6 | modification, are permitted provided that the following conditions are met: | |
|
7 | ||
|
8 | * Redistributions of source code must retain the above copyright notice, this | |
|
9 | list of conditions and the following disclaimer. | |
|
10 | ||
|
11 | * Redistributions in binary form must reproduce the above copyright notice, | |
|
12 | this list of conditions and the following disclaimer in the documentation | |
|
13 | and/or other materials provided with the distribution. | |
|
14 | ||
|
15 | * Neither the name of the copyright holder nor the names of its | |
|
16 | contributors may be used to endorse or promote products derived from | |
|
17 | this software without specific prior written permission. | |
|
18 | ||
|
19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | |
|
20 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | |
|
21 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | |
|
22 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE | |
|
23 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
|
24 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | |
|
25 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | |
|
26 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, | |
|
27 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | |
|
28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
@@ -100,15 +100,3 ENV/ | |||
|
100 | 100 | # eclipse |
|
101 | 101 | .project |
|
102 | 102 | .pydevproject |
|
103 | # vscode | |
|
104 | ||
|
105 | .vscode | |
|
106 | ||
|
107 | schaingui/node_modules/ | |
|
108 | schainpy/scripts/ | |
|
109 | .svn/ | |
|
110 | *.png | |
|
111 | *.pyc | |
|
112 | .vscode | |
|
113 | trash | |
|
114 | *.log |
@@ -1,15 +1,19 | |||
|
1 |
# CHANGELOG |
|
|
1 | # CHANGELOG | |
|
2 | ||
|
3 | ## 3.0.0 | |
|
2 | 4 | |
|
3 | ## 3.0 | |
|
4 | 5 | * Python 3.x & 2.X compatible |
|
5 | 6 | * New architecture with multiprocessing support |
|
6 | 7 | * Add @MPDecorator for multiprocessing Operations (Plots, Writers and Publishers) |
|
7 | 8 | * Added new type of operation `external` for non-locking operations |
|
8 | 9 | * New plotting architecture with buffering/throttle capabilities to speed up plots |
|
9 | 10 | * Clean controller to optimize scripts (format & optype are no longer required) |
|
11 | * Replace ParamReader and ParamWriter with new flexible HDFReader and HDFWriter | |
|
10 | 12 | * New GUI with dinamic load of Units and operations (use Kivy framework) |
|
13 | * Clean code | |
|
11 | 14 | |
|
12 | 15 | ## 2.3 |
|
16 | ||
|
13 | 17 | * Added support for Madrigal formats (reading/writing). |
|
14 | 18 | * Added support for reading BLTR parameters (*.sswma). |
|
15 | 19 | * Added support for reading Julia format (*.dat). |
@@ -17,11 +21,11 | |||
|
17 | 21 | * Added two new Processing Units `PublishData` and `ReceiverData` for receiving and sending dataOut through multiple ways (tcp, ipc, inproc). |
|
18 | 22 | * Added a new graphics Processing Unit `PlotterReceiver`. It is decoupled from normal processing sequence with support for data generated by multiprocessing scripts. |
|
19 | 23 | * Added support for sending realtime graphic to web server. |
|
20 |
* GUI command `schain` is now `schainGUI`. |
|
|
21 |
* Added a CLI tool named `schain`. |
|
|
22 |
|
|
|
23 |
|
|
|
24 |
|
|
|
24 | * GUI command `schain` is now `schainGUI`. | |
|
25 | * Added a CLI tool named `schain`. | |
|
26 | * Scripts templates can be now generated with `schain generate`. | |
|
27 | * Now it is possible to search Processing Units and Operations with `schain search [module]` to get the right name and its allowed parameters. | |
|
28 | * `schain xml` to run xml scripts. | |
|
25 | 29 | * Added suggestions when parameters are poorly written. |
|
26 | 30 | * `Controller.start()` now runs in a different process than the process calling it. |
|
27 | 31 | * Added `schainpy.utils.log` for log standarization. |
@@ -31,6 +35,7 | |||
|
31 | 35 | * Setup now installs numpy. |
|
32 | 36 | |
|
33 | 37 | ## 2.2.6 |
|
38 | ||
|
34 | 39 | * Graphics generated by the GUI are now the same as generated by scripts. Issue #1074. |
|
35 | 40 | * Added support for C extensions. |
|
36 | 41 | * Function `hildebrand_sehkon` optimized with a C wrapper. |
@@ -38,27 +43,32 | |||
|
38 | 43 | * Migration to GIT. |
|
39 | 44 | |
|
40 | 45 | ## 2.2.5: |
|
46 | ||
|
41 | 47 | * splitProfiles and combineProfiles modules were added to VoltageProc and Signal Chain GUI. |
|
42 | 48 | * nProfiles of USRP data (hdf5) is the number of profiles thera are in one second. |
|
43 | 49 | * jroPlotter works directly with data objects instead of dictionaries |
|
44 | 50 | * script "schain" was added to Signal Chain installer |
|
45 | 51 | |
|
46 | 52 | ## 2.2.4.1: |
|
53 | ||
|
47 | 54 | * jroIO_usrp.py is update to read Sandra's data |
|
48 | 55 | * decimation in Spectra and RTI plots is always enabled. |
|
49 | 56 | * time* window option added to GUI |
|
50 | 57 | |
|
51 | 58 | ## 2.2.4: |
|
59 | ||
|
52 | 60 | * jroproc_spectra_lags.py added to schainpy |
|
53 | 61 | * Bug fixed in schainGUI: ProcUnit was created with the same id in some cases. |
|
54 | 62 | * Bug fixed in jroHeaderIO: Header size validation. |
|
55 | 63 | |
|
56 | 64 | ## 2.2.3.1: |
|
65 | ||
|
57 | 66 | * Filtering block by time has been added. |
|
58 | 67 | * Bug fixed plotting RTI, CoherenceMap and others using xmin and xmax parameters. The first day worked |
|
59 | 68 | properly but the next days did not. |
|
60 | 69 | |
|
61 | 70 | ## 2.2.3: |
|
71 | ||
|
62 | 72 | * Bug fixed in GUI: Error getting(reading) Code value |
|
63 | 73 | * Bug fixed in GUI: Flip option always needs channelList field |
|
64 | 74 | * Bug fixed in jrodata: when one branch modified a value in "dataOut" (example: dataOut.code) this value |
@@ -66,10 +76,12 was modified for every branch (because this was a reference). It was modified in | |||
|
66 | 76 | * Bug fixed in jroproc_voltage.profileSelector(): rangeList replaces to profileRangeList. |
|
67 | 77 | |
|
68 | 78 | ## 2.2.2: |
|
79 | ||
|
69 | 80 | * VoltageProc: ProfileSelector, Reshape, Decoder with nTxs!=1 and getblock=True was tested |
|
70 | 81 | * Rawdata and testRawdata.py added to Signal Chain project |
|
71 | 82 | |
|
72 | 83 | ## 2.2.1: |
|
84 | ||
|
73 | 85 | * Bugs fixed in GUI |
|
74 | 86 | * Views were improved in GUI |
|
75 | 87 | * Support to MST* ISR experiments |
@@ -77,36 +89,45 was modified for every branch (because this was a reference). It was modified in | |||
|
77 | 89 | * handleError added to jroplotter.py |
|
78 | 90 | |
|
79 | 91 | ## 2.2.0: |
|
92 | ||
|
80 | 93 | * GUI: use of external plotter |
|
81 | 94 | * Compatible with matplotlib 1.5.0 |
|
82 | 95 | |
|
83 | 96 | ## 2.1.5: |
|
97 | ||
|
84 | 98 | * serializer module added to Signal Chain |
|
85 | 99 | * jroplotter.py added to Signal Chain |
|
86 | 100 | |
|
87 | 101 | ## 2.1.4.2: |
|
102 | ||
|
88 | 103 | * A new Plotter Class was added |
|
89 | 104 | * Project.start() does not accept filename as a parameter anymore |
|
90 | 105 | |
|
91 | 106 | ## 2.1.4.1: |
|
107 | ||
|
92 | 108 | * Send notifications when an error different to ValueError is detected |
|
93 | 109 | |
|
94 | 110 | ## 2.1.4: |
|
111 | ||
|
95 | 112 | * Sending error notifications to signal chain administrator |
|
96 | 113 | * Login to email server added |
|
97 | 114 | |
|
98 | 115 | ## 2.1.3.3: |
|
116 | ||
|
99 | 117 | * Colored Button Icons were added to GUI |
|
100 | 118 | |
|
101 | 119 | ## 2.1.3.2: |
|
120 | ||
|
102 | 121 | * GUI: user interaction enhanced |
|
103 | 122 | * controller_api.py: Safe access to ControllerThead |
|
104 | 123 | |
|
105 | 124 | ## 2.1.3.1: |
|
125 | ||
|
106 | 126 | * GUI: every icon were resized |
|
107 | 127 | * jroproc_voltage.py: Print a message when "Read from code" option is selected and the code is not defined inside data file |
|
108 | 128 | |
|
109 | 129 | ## 2.1.3: |
|
130 | ||
|
110 | 131 | * jroplot_heispectra.py: SpectraHeisScope was not showing the right channels |
|
111 | 132 | * jroproc_voltage.py: Bug fixed selecting profiles (self.nProfiles took a wrong value), |
|
112 | 133 | Bug fixed selecting heights by block (selecting profiles instead heights) |
@@ -115,6 +136,7 was modified for every branch (because this was a reference). It was modified in | |||
|
115 | 136 | * jroIO_heispectra.py: Channel index list does not exist. |
|
116 | 137 | |
|
117 | 138 | ## 2.1.2: |
|
139 | ||
|
118 | 140 | * jroutils_ftp.py: Bug fixed, Any error sending file stopped the Server Thread |
|
119 | 141 | Server thread opens and closes remote server each time file list is sent |
|
120 | 142 | * jroplot_spectra.py: Noise path was not being created when noise data is saved. |
@@ -1,48 +1,50 | |||
|
1 | 1 | # Signal Chain |
|
2 | 2 | |
|
3 | ## Introduction | |
|
3 | Signal Chain is a radar data processing library wich includes modules to read, | |
|
4 | and write different files formats, besides modules to process and visualize the | |
|
5 | data. | |
|
4 | 6 | |
|
5 | Signal Chain (SCh) is a radar data processing library developed using [Python](www.python.org) at JRO. SCh provides modules to read, write, process and plot data. | |
|
7 | ## Dependencies | |
|
6 | 8 | |
|
7 | ## Installation | |
|
8 | ||
|
9 | Install system dependencies, clone the latest version from [here](http://jro-dev.igp.gob.pe/rhodecode/schain/) and install it as a normal python package, we strongly recommend to use Anaconda or a virtual environment for the installation. | |
|
10 | ||
|
11 | ### Dependencies | |
|
12 | 9 | - GCC (gcc or gfortran) |
|
13 | 10 | - Python.h (python-dev or python-devel) |
|
14 | 11 | - Python-TK (python-tk) |
|
15 | 12 | - HDF5 libraries (libhdf5-dev) |
|
16 | 13 | |
|
17 | ### Linux based system (e.g. ubuntu) | |
|
18 | ``` | |
|
19 | $ git clone http://jro-dev.igp.gob.pe/rhodecode/schain/ | |
|
20 | $ cd schain | |
|
21 | $ git checkout `schain-branch` (optional) | |
|
22 | $ sudo pip install ./ | |
|
23 | ``` | |
|
14 | ## Installation | |
|
24 | 15 | |
|
25 | ### MAC Os | |
|
26 | ``` | |
|
27 | $ brew install python | |
|
28 | $ git clone http://jro-dev.igp.gob.pe/rhodecode/schain/ | |
|
29 | $ cd schain | |
|
30 | $ git checkout `schain-branch` (optional) | |
|
31 | $ sudo pip install ./ | |
|
16 | To get started the easiest way to install it is through [PyPI](https://pypi.org/project/schainpy/) with pip: | |
|
17 | ||
|
18 | ```bash | |
|
19 | pip install schainpy | |
|
32 | 20 | ``` |
|
33 | 21 | |
|
34 | ### Docker | |
|
22 | ### From source | |
|
35 | 23 | |
|
36 | Download Dockerfile from the repository, and create a docker image | |
|
24 | First, ensure that you have the above-listed dependencies installed, then clone | |
|
25 | the repository and install as normal python package: | |
|
37 | 26 | |
|
27 | ```bash | |
|
28 | git clone https://github.com/JRO-Peru/schain.git | |
|
29 | cd schain | |
|
30 | git checkout `branch-name` (optional) | |
|
31 | sudo pip install ./ | |
|
38 | 32 | ``` |
|
39 | $ docker build -t schain . | |
|
40 | ``` | |
|
41 | 33 | |
|
42 | You can run a container using an xml file or a schain script also you need to mount a volume for the data input and for the output files/plots | |
|
34 | ### Using Docker | |
|
35 | ||
|
36 | Download Dockerfile from the repository, and create a docker image: | |
|
37 | ||
|
38 | ```bash | |
|
39 | docker build -t schain . | |
|
43 | 40 | ``` |
|
44 | $ docker run -it --rm --volume /path/to/host/data:/data schain xml /data/test.xml | |
|
45 | $ docker run -it --rm --volume /path/to/host/data:/data --entrypoint /urs/local/bin/python schain /data/test.py | |
|
41 | ||
|
42 | You can run a container using an xml file or a schain script also you need to | |
|
43 | mount a volume for the data input and for the output files/plots: | |
|
44 | ||
|
45 | ```bash | |
|
46 | docker run -it --rm --volume /path/to/host/data:/data schain xml /data/test.xml | |
|
47 | docker run -it --rm --volume /path/to/host/data:/data --entrypoint /urs/local/bin/python schain /data/test.py | |
|
46 | 48 | ``` |
|
47 | 49 | |
|
48 | 50 | ## CLI (command line interface) |
@@ -52,12 +54,10 Signal Chain provides the following commands: | |||
|
52 | 54 | - schainGUI: Open the GUI |
|
53 | 55 | - schain: Signal chain command line |
|
54 | 56 | |
|
57 | ## Example | |
|
55 | 58 | |
|
56 | ## First Script | |
|
57 | ||
|
58 | Here you can find an script to read Spectra data (.pdata), remove dc and plot spectra & RTI | |
|
59 | ||
|
60 | First import SCh and creating a project | |
|
59 | Here you can find an script to read Spectra data (.pdata), remove dc and plot | |
|
60 | self-spectra & RTI: | |
|
61 | 61 | |
|
62 | 62 | ```python |
|
63 | 63 | #!/usr/bin/python |
@@ -65,16 +65,7 First import SCh and creating a project | |||
|
65 | 65 | from schainpy.controller import Project |
|
66 | 66 | |
|
67 | 67 | prj = Project() |
|
68 | prj.setup( | |
|
69 | id = '100', | |
|
70 | name='test', | |
|
71 | description='Basic experiment' | |
|
72 | ) | |
|
73 | ``` | |
|
74 | 68 | |
|
75 | Add read unit and operations | |
|
76 | ||
|
77 | ```python | |
|
78 | 69 | read_unit = prj.addReadUnit( |
|
79 | 70 | datatype='Spectra', |
|
80 | 71 | path='/path/to/pdata/', |
@@ -86,57 +77,10 read_unit = prj.addReadUnit( | |||
|
86 | 77 | walk=0 |
|
87 | 78 | ) |
|
88 | 79 | |
|
89 | proc_unit = prj.addProcUnit(datatype='Spectra', inputId=read_unit.getId()) | |
|
90 | ||
|
91 | op = proc_unit.addOperation(name='selectChannels') | |
|
92 | op.addParameter(name='channelList', value='0,1') | |
|
93 | ||
|
94 | op = proc_unit.addOperation(name='selectHeights') | |
|
95 | op.addParameter(name='minHei', value='80') | |
|
96 | op.addParameter(name='maxHei', value='200') | |
|
97 | ||
|
98 | op = proc_unit.addOperation(name='removeDC') | |
|
99 | ||
|
100 | ``` | |
|
101 | ||
|
102 | Plot data & start project | |
|
103 | ||
|
104 | ```python | |
|
105 | op = proc_unit.addOperation(name='SpectraPlot') | |
|
106 | op.addParameter(name='id', value='1') | |
|
107 | op.addParameter(name='wintitle', value='Spectra') | |
|
108 | ||
|
109 | op = procUnitConfObj1.addOperation(name='RTIPlot') | |
|
110 | op.addParameter(name='id', value='2') | |
|
111 | op.addParameter(name='wintitle', value='RTI') | |
|
112 | ||
|
113 | prj.start() | |
|
114 | ||
|
115 | ``` | |
|
116 | ||
|
117 | Full script | |
|
118 | ||
|
119 | ||
|
120 | ```python | |
|
121 | #!/usr/bin/python | |
|
122 | ||
|
123 | from schainpy.prj import Project | |
|
124 | ||
|
125 | prj = Project() | |
|
126 | prj.setup(id = '100', | |
|
127 | name='test', | |
|
128 | description='Basic experiment') | |
|
129 | read_unit = prj.addReadUnit(datatype='Spectra', | |
|
130 | path='/path/to/pdata/', | |
|
131 | startDate='2014/01/31', | |
|
132 | endDate='2014/03/31', | |
|
133 | startTime='00:00:00', | |
|
134 | endTime='23:59:59', | |
|
135 | online=0, | |
|
136 | walk=0) | |
|
137 | ||
|
138 | proc_unit = prj.addProcUnit(datatype='Spectra', | |
|
139 | inputId=read_unit.getId()) | |
|
80 | proc_unit = prj.addProcUnit( | |
|
81 | datatype='Spectra', | |
|
82 | inputId=read_unit.getId() | |
|
83 | ) | |
|
140 | 84 | |
|
141 | 85 | op = proc_unit.addOperation(name='selectChannels') |
|
142 | 86 | op.addParameter(name='channelList', value='0,1') |
@@ -155,4 +99,4 op.addParameter(name='wintitle', value='RTI', format='str') | |||
|
155 | 99 | |
|
156 | 100 | prj.start() |
|
157 | 101 | |
|
158 | ``` No newline at end of file | |
|
102 | ``` |
@@ -1,7 +1,5 | |||
|
1 | ''' | |
|
2 | Created on Jul 3, 2018 | |
|
1 | """Signal chain python package""" | |
|
3 | 2 | |
|
4 | @author $Author$ | |
|
5 | @version $Id$ | |
|
6 | ''' | |
|
7 | __version__ = '3.0' | |
|
3 | from .controller import Project | |
|
4 | ||
|
5 | __version__ = '3.0.0' |
@@ -1,6 +1,11 | |||
|
1 | ''' | |
|
2 | Main routines to create a Signal Chain project | |
|
3 | ''' | |
|
1 | # Copyright (c) 2012-2020 Jicamarca Radio Observatory | |
|
2 | # All rights reserved. | |
|
3 | # | |
|
4 | # Distributed under the terms of the BSD 3-clause license. | |
|
5 | """API to create signal chain projects | |
|
6 | ||
|
7 | The API is provide through class: Project | |
|
8 | """ | |
|
4 | 9 | |
|
5 | 10 | import re |
|
6 | 11 | import sys |
@@ -312,13 +317,16 class ReadUnitConf(ProcUnitConf): | |||
|
312 | 317 | |
|
313 | 318 | |
|
314 | 319 | class Project(Process): |
|
320 | """API to create signal chain projects""" | |
|
315 | 321 | |
|
316 | 322 | ELEMENTNAME = 'Project' |
|
317 | 323 | |
|
318 | 324 | def __init__(self): |
|
319 | 325 | |
|
320 | Process.__init__(self) | |
|
321 |
self.id = |
|
|
326 | Process.__init__(self, name='') | |
|
327 | self.id = '1' | |
|
328 | if name: | |
|
329 | self.name = '{} ({})'.format(Process.__name__, name) | |
|
322 | 330 | self.filename = None |
|
323 | 331 | self.description = None |
|
324 | 332 | self.email = None |
@@ -1,15 +1,21 | |||
|
1 | ''' | |
|
2 | Created on Jul 16, 2014 | |
|
1 | # Copyright (c) 2012-2020 Jicamarca Radio Observatory | |
|
2 | # All rights reserved. | |
|
3 | # | |
|
4 | # Distributed under the terms of the BSD 3-clause license. | |
|
5 | """schainpy is an open source library to read, write and process radar data | |
|
3 | 6 | |
|
4 | @author: Miguel Urco | |
|
5 | @author: Juan C. Espinoza | |
|
6 | ''' | |
|
7 | Signal Chain is a radar data processing library wich includes modules to read, | |
|
8 | and write different files formats, besides modules to process and visualize the | |
|
9 | data. | |
|
10 | """ | |
|
7 | 11 | |
|
8 | 12 | import os |
|
9 | 13 | from setuptools import setup, Extension |
|
10 | 14 | from setuptools.command.build_ext import build_ext as _build_ext |
|
11 | 15 | from schainpy import __version__ |
|
12 | 16 | |
|
17 | DOCLINES = __doc__.split("\n") | |
|
18 | ||
|
13 | 19 | class build_ext(_build_ext): |
|
14 | 20 | def finalize_options(self): |
|
15 | 21 | _build_ext.finalize_options(self) |
@@ -21,10 +27,27 class build_ext(_build_ext): | |||
|
21 | 27 | setup( |
|
22 | 28 | name = "schainpy", |
|
23 | 29 | version = __version__, |
|
24 | description = "Python tools to read, write and process Jicamarca data", | |
|
25 | author = "Miguel Urco, Juan C. Espinoza", | |
|
26 | author_email = "juan.espinoza@jro.igp.gob.pe", | |
|
27 | url = "http://jro-dev.igp.gob.pe/rhodecode/schain", | |
|
30 | description = DOCLINES[0], | |
|
31 | long_description = "\n".join(DOCLINES[2:]), | |
|
32 | url = "https://github.com/JRO-Peru/schain", | |
|
33 | author = "Jicamarca Radio Observatory", | |
|
34 | author_email = "jro-developers@igp.gob.pe", | |
|
35 | license="BSD-3-Clause", | |
|
36 | classifiers=[ | |
|
37 | "Development Status :: 4 - Beta", | |
|
38 | "Environment :: Console", | |
|
39 | "Intended Audience :: Science/Research", | |
|
40 | "License :: OSI Approved :: BSD License", | |
|
41 | "Operating System :: MacOS :: MacOS X", | |
|
42 | "Operating System :: POSIX :: Linux", | |
|
43 | "Programming Language :: Python :: 2", | |
|
44 | "Programming Language :: Python :: 2.7", | |
|
45 | "Programming Language :: Python :: 3", | |
|
46 | "Programming Language :: Python :: 3.5", | |
|
47 | "Programming Language :: Python :: 3.6", | |
|
48 | "Programming Language :: Python :: 3.7", | |
|
49 | "Topic :: Scientific/Engineering", | |
|
50 | ], | |
|
28 | 51 | packages = { |
|
29 | 52 | 'schainpy', |
|
30 | 53 | 'schainpy.model', |
General Comments 0
You need to be logged in to leave comments.
Login now