##// END OF EJS Templates
Add license, update setup and changelog
Juan C. Espinoza -
r1329:16056ee07511
parent child
Show More
@@ -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 # eclipse
100 # eclipse
101 .project
101 .project
102 .pydevproject
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 * Python 3.x & 2.X compatible
5 * Python 3.x & 2.X compatible
5 * New architecture with multiprocessing support
6 * New architecture with multiprocessing support
6 * Add @MPDecorator for multiprocessing Operations (Plots, Writers and Publishers)
7 * Add @MPDecorator for multiprocessing Operations (Plots, Writers and Publishers)
7 * Added new type of operation `external` for non-locking operations
8 * Added new type of operation `external` for non-locking operations
8 * New plotting architecture with buffering/throttle capabilities to speed up plots
9 * New plotting architecture with buffering/throttle capabilities to speed up plots
9 * Clean controller to optimize scripts (format & optype are no longer required)
10 * Clean controller to optimize scripts (format & optype are no longer required)
11 * Replace ParamReader and ParamWriter with new flexible HDFReader and HDFWriter
10 * New GUI with dinamic load of Units and operations (use Kivy framework)
12 * New GUI with dinamic load of Units and operations (use Kivy framework)
13 * Clean code
11
14
12 ## 2.3
15 ## 2.3
16
13 * Added support for Madrigal formats (reading/writing).
17 * Added support for Madrigal formats (reading/writing).
14 * Added support for reading BLTR parameters (*.sswma).
18 * Added support for reading BLTR parameters (*.sswma).
15 * Added support for reading Julia format (*.dat).
19 * Added support for reading Julia format (*.dat).
@@ -17,11 +21,11
17 * Added two new Processing Units `PublishData` and `ReceiverData` for receiving and sending dataOut through multiple ways (tcp, ipc, inproc).
21 * Added two new Processing Units `PublishData` and `ReceiverData` for receiving and sending dataOut through multiple ways (tcp, ipc, inproc).
18 * Added a new graphics Processing Unit `PlotterReceiver`. It is decoupled from normal processing sequence with support for data generated by multiprocessing scripts.
22 * Added a new graphics Processing Unit `PlotterReceiver`. It is decoupled from normal processing sequence with support for data generated by multiprocessing scripts.
19 * Added support for sending realtime graphic to web server.
23 * Added support for sending realtime graphic to web server.
20 * GUI command `schain` is now `schainGUI`.
24 * GUI command `schain` is now `schainGUI`.
21 * Added a CLI tool named `schain`.
25 * Added a CLI tool named `schain`.
22 * Scripts templates can be now generated with `schain generate`.
26 * Scripts templates can be now generated with `schain generate`.
23 * Now it is possible to search Processing Units and Operations with `schain search [module]` to get the right name and its allowed parameters.
27 * Now it is possible to search Processing Units and Operations with `schain search [module]` to get the right name and its allowed parameters.
24 * `schain xml` to run xml scripts.
28 * `schain xml` to run xml scripts.
25 * Added suggestions when parameters are poorly written.
29 * Added suggestions when parameters are poorly written.
26 * `Controller.start()` now runs in a different process than the process calling it.
30 * `Controller.start()` now runs in a different process than the process calling it.
27 * Added `schainpy.utils.log` for log standarization.
31 * Added `schainpy.utils.log` for log standarization.
@@ -31,6 +35,7
31 * Setup now installs numpy.
35 * Setup now installs numpy.
32
36
33 ## 2.2.6
37 ## 2.2.6
38
34 * Graphics generated by the GUI are now the same as generated by scripts. Issue #1074.
39 * Graphics generated by the GUI are now the same as generated by scripts. Issue #1074.
35 * Added support for C extensions.
40 * Added support for C extensions.
36 * Function `hildebrand_sehkon` optimized with a C wrapper.
41 * Function `hildebrand_sehkon` optimized with a C wrapper.
@@ -38,27 +43,32
38 * Migration to GIT.
43 * Migration to GIT.
39
44
40 ## 2.2.5:
45 ## 2.2.5:
46
41 * splitProfiles and combineProfiles modules were added to VoltageProc and Signal Chain GUI.
47 * splitProfiles and combineProfiles modules were added to VoltageProc and Signal Chain GUI.
42 * nProfiles of USRP data (hdf5) is the number of profiles thera are in one second.
48 * nProfiles of USRP data (hdf5) is the number of profiles thera are in one second.
43 * jroPlotter works directly with data objects instead of dictionaries
49 * jroPlotter works directly with data objects instead of dictionaries
44 * script "schain" was added to Signal Chain installer
50 * script "schain" was added to Signal Chain installer
45
51
46 ## 2.2.4.1:
52 ## 2.2.4.1:
53
47 * jroIO_usrp.py is update to read Sandra's data
54 * jroIO_usrp.py is update to read Sandra's data
48 * decimation in Spectra and RTI plots is always enabled.
55 * decimation in Spectra and RTI plots is always enabled.
49 * time* window option added to GUI
56 * time* window option added to GUI
50
57
51 ## 2.2.4:
58 ## 2.2.4:
59
52 * jroproc_spectra_lags.py added to schainpy
60 * jroproc_spectra_lags.py added to schainpy
53 * Bug fixed in schainGUI: ProcUnit was created with the same id in some cases.
61 * Bug fixed in schainGUI: ProcUnit was created with the same id in some cases.
54 * Bug fixed in jroHeaderIO: Header size validation.
62 * Bug fixed in jroHeaderIO: Header size validation.
55
63
56 ## 2.2.3.1:
64 ## 2.2.3.1:
65
57 * Filtering block by time has been added.
66 * Filtering block by time has been added.
58 * Bug fixed plotting RTI, CoherenceMap and others using xmin and xmax parameters. The first day worked
67 * Bug fixed plotting RTI, CoherenceMap and others using xmin and xmax parameters. The first day worked
59 properly but the next days did not.
68 properly but the next days did not.
60
69
61 ## 2.2.3:
70 ## 2.2.3:
71
62 * Bug fixed in GUI: Error getting(reading) Code value
72 * Bug fixed in GUI: Error getting(reading) Code value
63 * Bug fixed in GUI: Flip option always needs channelList field
73 * Bug fixed in GUI: Flip option always needs channelList field
64 * Bug fixed in jrodata: when one branch modified a value in "dataOut" (example: dataOut.code) this value
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 * Bug fixed in jroproc_voltage.profileSelector(): rangeList replaces to profileRangeList.
76 * Bug fixed in jroproc_voltage.profileSelector(): rangeList replaces to profileRangeList.
67
77
68 ## 2.2.2:
78 ## 2.2.2:
79
69 * VoltageProc: ProfileSelector, Reshape, Decoder with nTxs!=1 and getblock=True was tested
80 * VoltageProc: ProfileSelector, Reshape, Decoder with nTxs!=1 and getblock=True was tested
70 * Rawdata and testRawdata.py added to Signal Chain project
81 * Rawdata and testRawdata.py added to Signal Chain project
71
82
72 ## 2.2.1:
83 ## 2.2.1:
84
73 * Bugs fixed in GUI
85 * Bugs fixed in GUI
74 * Views were improved in GUI
86 * Views were improved in GUI
75 * Support to MST* ISR experiments
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 * handleError added to jroplotter.py
89 * handleError added to jroplotter.py
78
90
79 ## 2.2.0:
91 ## 2.2.0:
92
80 * GUI: use of external plotter
93 * GUI: use of external plotter
81 * Compatible with matplotlib 1.5.0
94 * Compatible with matplotlib 1.5.0
82
95
83 ## 2.1.5:
96 ## 2.1.5:
97
84 * serializer module added to Signal Chain
98 * serializer module added to Signal Chain
85 * jroplotter.py added to Signal Chain
99 * jroplotter.py added to Signal Chain
86
100
87 ## 2.1.4.2:
101 ## 2.1.4.2:
102
88 * A new Plotter Class was added
103 * A new Plotter Class was added
89 * Project.start() does not accept filename as a parameter anymore
104 * Project.start() does not accept filename as a parameter anymore
90
105
91 ## 2.1.4.1:
106 ## 2.1.4.1:
107
92 * Send notifications when an error different to ValueError is detected
108 * Send notifications when an error different to ValueError is detected
93
109
94 ## 2.1.4:
110 ## 2.1.4:
111
95 * Sending error notifications to signal chain administrator
112 * Sending error notifications to signal chain administrator
96 * Login to email server added
113 * Login to email server added
97
114
98 ## 2.1.3.3:
115 ## 2.1.3.3:
116
99 * Colored Button Icons were added to GUI
117 * Colored Button Icons were added to GUI
100
118
101 ## 2.1.3.2:
119 ## 2.1.3.2:
120
102 * GUI: user interaction enhanced
121 * GUI: user interaction enhanced
103 * controller_api.py: Safe access to ControllerThead
122 * controller_api.py: Safe access to ControllerThead
104
123
105 ## 2.1.3.1:
124 ## 2.1.3.1:
125
106 * GUI: every icon were resized
126 * GUI: every icon were resized
107 * jroproc_voltage.py: Print a message when "Read from code" option is selected and the code is not defined inside data file
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 ## 2.1.3:
129 ## 2.1.3:
130
110 * jroplot_heispectra.py: SpectraHeisScope was not showing the right channels
131 * jroplot_heispectra.py: SpectraHeisScope was not showing the right channels
111 * jroproc_voltage.py: Bug fixed selecting profiles (self.nProfiles took a wrong value),
132 * jroproc_voltage.py: Bug fixed selecting profiles (self.nProfiles took a wrong value),
112 Bug fixed selecting heights by block (selecting profiles instead heights)
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 * jroIO_heispectra.py: Channel index list does not exist.
136 * jroIO_heispectra.py: Channel index list does not exist.
116
137
117 ## 2.1.2:
138 ## 2.1.2:
139
118 * jroutils_ftp.py: Bug fixed, Any error sending file stopped the Server Thread
140 * jroutils_ftp.py: Bug fixed, Any error sending file stopped the Server Thread
119 Server thread opens and closes remote server each time file list is sent
141 Server thread opens and closes remote server each time file list is sent
120 * jroplot_spectra.py: Noise path was not being created when noise data is saved.
142 * jroplot_spectra.py: Noise path was not being created when noise data is saved.
@@ -1,48 +1,50
1 # Signal Chain
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 - GCC (gcc or gfortran)
9 - GCC (gcc or gfortran)
13 - Python.h (python-dev or python-devel)
10 - Python.h (python-dev or python-devel)
14 - Python-TK (python-tk)
11 - Python-TK (python-tk)
15 - HDF5 libraries (libhdf5-dev)
12 - HDF5 libraries (libhdf5-dev)
16
13
17 ### Linux based system (e.g. ubuntu)
14 ## Installation
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 ```
24
15
25 ### MAC Os
16 To get started the easiest way to install it is through [PyPI](https://pypi.org/project/schainpy/) with pip:
26 ```
17
27 $ brew install python
18 ```bash
28 $ git clone http://jro-dev.igp.gob.pe/rhodecode/schain/
19 pip install schainpy
29 $ cd schain
30 $ git checkout `schain-branch` (optional)
31 $ sudo pip install ./
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
41
45 $ docker run -it --rm --volume /path/to/host/data:/data --entrypoint /urs/local/bin/python schain /data/test.py
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 ## CLI (command line interface)
50 ## CLI (command line interface)
@@ -52,12 +54,10 Signal Chain provides the following commands:
52 - schainGUI: Open the GUI
54 - schainGUI: Open the GUI
53 - schain: Signal chain command line
55 - schain: Signal chain command line
54
56
57 ## Example
55
58
56 ## First Script
59 Here you can find an script to read Spectra data (.pdata), remove dc and plot
57
60 self-spectra & RTI:
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
61
61
62 ```python
62 ```python
63 #!/usr/bin/python
63 #!/usr/bin/python
@@ -65,16 +65,7 First import SCh and creating a project
65 from schainpy.controller import Project
65 from schainpy.controller import Project
66
66
67 prj = Project()
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 read_unit = prj.addReadUnit(
69 read_unit = prj.addReadUnit(
79 datatype='Spectra',
70 datatype='Spectra',
80 path='/path/to/pdata/',
71 path='/path/to/pdata/',
@@ -86,57 +77,10 read_unit = prj.addReadUnit(
86 walk=0
77 walk=0
87 )
78 )
88
79
89 proc_unit = prj.addProcUnit(datatype='Spectra', inputId=read_unit.getId())
80 proc_unit = prj.addProcUnit(
90
81 datatype='Spectra',
91 op = proc_unit.addOperation(name='selectChannels')
82 inputId=read_unit.getId()
92 op.addParameter(name='channelList', value='0,1')
83 )
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())
140
84
141 op = proc_unit.addOperation(name='selectChannels')
85 op = proc_unit.addOperation(name='selectChannels')
142 op.addParameter(name='channelList', value='0,1')
86 op.addParameter(name='channelList', value='0,1')
@@ -155,4 +99,4 op.addParameter(name='wintitle', value='RTI', format='str')
155
99
156 prj.start()
100 prj.start()
157
101
158 ``` No newline at end of file
102 ```
@@ -1,7 +1,5
1 '''
1 """Signal chain python package"""
2 Created on Jul 3, 2018
3
2
4 @author $Author$
3 from .controller import Project
5 @version $Id$
4
6 '''
5 __version__ = '3.0.0'
7 __version__ = '3.0'
@@ -1,6 +1,11
1 '''
1 # Copyright (c) 2012-2020 Jicamarca Radio Observatory
2 Main routines to create a Signal Chain project
2 # All rights reserved.
3 '''
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 import re
10 import re
6 import sys
11 import sys
@@ -312,13 +317,16 class ReadUnitConf(ProcUnitConf):
312
317
313
318
314 class Project(Process):
319 class Project(Process):
320 """API to create signal chain projects"""
315
321
316 ELEMENTNAME = 'Project'
322 ELEMENTNAME = 'Project'
317
323
318 def __init__(self):
324 def __init__(self):
319
325
320 Process.__init__(self)
326 Process.__init__(self, name='')
321 self.id = None
327 self.id = '1'
328 if name:
329 self.name = '{} ({})'.format(Process.__name__, name)
322 self.filename = None
330 self.filename = None
323 self.description = None
331 self.description = None
324 self.email = None
332 self.email = None
@@ -1,15 +1,21
1 '''
1 # Copyright (c) 2012-2020 Jicamarca Radio Observatory
2 Created on Jul 16, 2014
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
7 Signal Chain is a radar data processing library wich includes modules to read,
5 @author: Juan C. Espinoza
8 and write different files formats, besides modules to process and visualize the
6 '''
9 data.
10 """
7
11
8 import os
12 import os
9 from setuptools import setup, Extension
13 from setuptools import setup, Extension
10 from setuptools.command.build_ext import build_ext as _build_ext
14 from setuptools.command.build_ext import build_ext as _build_ext
11 from schainpy import __version__
15 from schainpy import __version__
12
16
17 DOCLINES = __doc__.split("\n")
18
13 class build_ext(_build_ext):
19 class build_ext(_build_ext):
14 def finalize_options(self):
20 def finalize_options(self):
15 _build_ext.finalize_options(self)
21 _build_ext.finalize_options(self)
@@ -21,10 +27,27 class build_ext(_build_ext):
21 setup(
27 setup(
22 name = "schainpy",
28 name = "schainpy",
23 version = __version__,
29 version = __version__,
24 description = "Python tools to read, write and process Jicamarca data",
30 description = DOCLINES[0],
25 author = "Miguel Urco, Juan C. Espinoza",
31 long_description = "\n".join(DOCLINES[2:]),
26 author_email = "juan.espinoza@jro.igp.gob.pe",
32 url = "https://github.com/JRO-Peru/schain",
27 url = "http://jro-dev.igp.gob.pe/rhodecode/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 packages = {
51 packages = {
29 'schainpy',
52 'schainpy',
30 'schainpy.model',
53 'schainpy.model',
General Comments 0
You need to be logged in to leave comments. Login now