@@ -1,11 +1,10 | |||||
1 | basic = '''from schainpy.controller import Project |
|
1 | basic = '''from schainpy.controller import Project | |
2 |
|
2 | |||
3 | desc = "{desc}" |
|
3 | desc = "{desc}" | |
|
4 | project = Project() | |||
|
5 | project.setup(id='200', name="{name}", description=desc) | |||
4 |
|
6 | |||
5 | controller = Project() |
|
7 | voltage_reader = project.addReadUnit(datatype='VoltageReader', | |
6 | controller.setup(id='191', name="{name}", description=desc) |
|
|||
7 |
|
||||
8 | readUnitConf = controller.addReadUnit(datatype='VoltageReader', |
|
|||
9 | path="{path}", |
|
8 | path="{path}", | |
10 | startDate="{startDate}", |
|
9 | startDate="{startDate}", | |
11 | endDate="{endDate}", |
|
10 | endDate="{endDate}", | |
@@ -16,60 +15,72 readUnitConf = controller.addReadUnit(datatype='VoltageReader', | |||||
16 | walk=1, |
|
15 | walk=1, | |
17 | ) |
|
16 | ) | |
18 |
|
17 | |||
19 |
|
|
18 | voltage_proc = project.addProcUnit(datatype='VoltageProc', inputId=voltage_reader.getId()) | |
20 |
|
19 | |||
21 |
|
|
20 | profile = voltage_proc.addOperation(name='ProfileSelector', optype='other') | |
22 |
|
|
21 | profile.addParameter(name='profileRangeList', value='120,183', format='intlist') | |
23 |
|
22 | |||
24 |
|
|
23 | rti = voltage_proc.addOperation(name='RTIPlot', optype='other') | |
25 |
|
|
24 | rti.addParameter(name='wintitle', value='Jicamarca Radio Observatory', format='str') | |
26 |
|
|
25 | rti.addParameter(name='showprofile', value='0', format='int') | |
27 |
|
|
26 | rti.addParameter(name='xmin', value='0', format='int') | |
28 |
|
|
27 | rti.addParameter(name='xmax', value='24', format='int') | |
29 |
|
|
28 | rti.addParameter(name='figpath', value="{figpath}", format='str') | |
30 |
|
|
29 | rti.addParameter(name='wr_period', value='5', format='int') | |
31 |
|
|
30 | rti.addParameter(name='exp_code', value='22', format='int') | |
32 |
|
31 | |||
33 |
|
32 | |||
34 | controller.start() |
|
33 | controller.start() | |
35 | ''' |
|
34 | ''' | |
36 |
|
35 | |||
37 |
multiprocess = '''from schainpy.controller import Project, |
|
36 | multiprocess = '''from schainpy.controller import Project, MPProject | |
38 |
|
37 | |||
39 | desc = "{desc}" |
|
38 | desc = "{desc}" | |
40 |
|
39 | |||
41 | def fiber(cursor, skip, q, day): |
|
40 | #################### | |
42 | controller = Project() |
|
41 | # PLOTTER RECEIVER # | |
43 | controller.setup(id='191', name="{name}", description=desc) |
|
42 | #################### | |
44 |
|
43 | plotter = Project() | ||
45 | readUnitConf = controller.addReadUnit(datatype='SpectraReader', |
|
44 | plotter.setup(id='100', name='receiver', description=desc) | |
46 | path="{path}", |
|
45 | ||
47 | startDate=day, |
|
46 | receiver_proc = plotter.addProcUnit(name='PlotterReceiver') | |
48 | endDate=day, |
|
47 | receiver_proc.addParameter(name='throttle', value=20, format='int') | |
49 | startTime="{startHour}", |
|
48 | ||
50 | endTime="{endHour}", |
|
49 | rti = receiver_proc.addOperation(name='PlotRTIData', optype='other') | |
51 | online=0, |
|
50 | rti.addParameter(name='zmin', value='-40.0', format='float') | |
52 | queue=q, |
|
51 | rti.addParameter(name='zmax', value='100.0', format='float') | |
53 | cursor=cursor, |
|
52 | rti.addParameter(name='xmin', value='0.0', format='int') | |
54 | skip=skip, |
|
53 | rti.addParameter(name='colormap', value='jet', format='str') | |
55 | verbose=1, |
|
54 | ||
56 | walk=1, |
|
55 | plotter.start() | |
57 | ) |
|
56 | ||
58 |
|
57 | ################ | ||
59 | procUnitConf1 = controller.addProcUnit(datatype='Spectra', inputId=readUnitConf.getId()) |
|
58 | # DATA EMITTER # | |
60 |
|
59 | ################ | ||
61 | procUnitConf2 = controller.addProcUnit(datatype='ParametersProc', inputId=readUnitConf.getId()) |
|
60 | project = Project() | |
62 | opObj11 = procUnitConf2.addOperation(name='SpectralMoments', optype='other') |
|
61 | project.setup(id='200', name="{name}", description=desc) | |
63 |
|
62 | |||
64 | opObj12 = procUnitConf2.addOperation(name='PublishData', optype='other') |
|
63 | spectra_reader = project.addReadUnit(datatype='SpectraReader', | |
65 | opObj12.addParameter(name='zeromq', value=1, format='int') |
|
64 | path="{path}", | |
66 | opObj12.addParameter(name='verbose', value=0, format='bool') |
|
65 | startDate={startDate}, | |
67 |
|
66 | endDate={endDate}, | ||
68 | controller.start() |
|
67 | startTime="{startHour}", | |
69 |
|
68 | endTime="{endHour}", | ||
70 |
|
69 | online=0, | ||
71 | if __name__ == '__main__': |
|
70 | verbose=1, | |
72 | multiSchain(fiber, nProcess={nProcess}, startDate="{startDate}", endDate="{endDate}") |
|
71 | walk=1, | |
|
72 | ) | |||
|
73 | ||||
|
74 | spectra_proc = project.addProcUnit(datatype='Spectra', inputId=spectra_reader.getId()) | |||
|
75 | ||||
|
76 | parameters_proc = project.addProcUnit(datatype='ParametersProc', inputId=spectra_proc.getId()) | |||
|
77 | moments = parameters_proc.addOperation(name='SpectralMoments', optype='other') | |||
|
78 | ||||
|
79 | publish = parameters_proc.addOperation(name='PublishData', optype='other') | |||
|
80 | publish.addParameter(name='zeromq', value=1, format='int') | |||
|
81 | publish.addParameter(name='verbose', value=0, format='bool') | |||
|
82 | ||||
|
83 | MPProject(project, 16) | |||
73 |
|
84 | |||
74 |
|
85 | |||
75 | ''' |
|
86 | ''' |
@@ -8,6 +8,7 from setuptools import setup, Extension | |||||
8 | from setuptools.command.build_ext import build_ext as _build_ext |
|
8 | from setuptools.command.build_ext import build_ext as _build_ext | |
9 | from schainpy import __version__ |
|
9 | from schainpy import __version__ | |
10 |
|
10 | |||
|
11 | ||||
11 | class build_ext(_build_ext): |
|
12 | class build_ext(_build_ext): | |
12 | def finalize_options(self): |
|
13 | def finalize_options(self): | |
13 | _build_ext.finalize_options(self) |
|
14 | _build_ext.finalize_options(self) | |
@@ -16,13 +17,14 class build_ext(_build_ext): | |||||
16 | import numpy |
|
17 | import numpy | |
17 | self.include_dirs.append(numpy.get_include()) |
|
18 | self.include_dirs.append(numpy.get_include()) | |
18 |
|
19 | |||
|
20 | ||||
19 | setup(name="schainpy", |
|
21 | setup(name="schainpy", | |
20 | version=__version__, |
|
22 | version=__version__, | |
21 | description="Python tools to read, write and process Jicamarca data", |
|
23 | description="Python tools to read, write and process Jicamarca data", | |
22 | author="Miguel Urco", |
|
24 | author="Miguel Urco", | |
23 | author_email="miguel.urco@jro.igp.gob.pe", |
|
25 | author_email="miguel.urco@jro.igp.gob.pe", | |
24 | url="http://jro.igp.gob.pe", |
|
26 | url="http://jro.igp.gob.pe", | |
25 |
packages |
|
27 | packages={'schainpy', | |
26 | 'schainpy.model', |
|
28 | 'schainpy.model', | |
27 | 'schainpy.model.data', |
|
29 | 'schainpy.model.data', | |
28 | 'schainpy.model.graphics', |
|
30 | 'schainpy.model.graphics', | |
@@ -38,31 +40,30 setup(name="schainpy", | |||||
38 | ext_package='schainpy', |
|
40 | ext_package='schainpy', | |
39 | py_modules=[''], |
|
41 | py_modules=[''], | |
40 | package_data={'': ['schain.conf.template'], |
|
42 | package_data={'': ['schain.conf.template'], | |
41 | 'schainpy.gui.figures': ['*.png','*.jpg'], |
|
43 | 'schainpy.gui.figures': ['*.png', '*.jpg'], | |
42 | }, |
|
44 | }, | |
43 | include_package_data=False, |
|
45 | include_package_data=False, | |
44 |
scripts |
|
46 | scripts=['schainpy/gui/schainGUI'], | |
45 | ext_modules=[ |
|
47 | ext_modules=[ | |
46 | Extension("cSchain", ["schainpy/model/proc/extensions.c"] |
|
48 | Extension("cSchain", ["schainpy/model/proc/extensions.c"] | |
47 | )], |
|
49 | )], | |
48 | entry_points={ |
|
50 | entry_points={ | |
49 | 'console_scripts': [ |
|
51 | 'console_scripts': [ | |
50 | 'schain = schaincli.cli:main', |
|
52 | 'schain = schaincli.cli:main', | |
51 | ], |
|
53 | ], | |
52 | }, |
|
54 | }, | |
53 | cmdclass={'build_ext':build_ext}, |
|
55 | cmdclass={'build_ext': build_ext}, | |
54 | setup_requires=["numpy >= 1.11.2"], |
|
56 | setup_requires=["numpy >= 1.11.2"], | |
55 | install_requires=[ |
|
57 | install_requires=[ | |
56 |
|
|
58 | "scipy >= 0.14.0", | |
57 |
|
|
59 | "h5py >= 2.2.1", | |
58 |
|
|
60 | "matplotlib >= 1.4.2", | |
59 | "pyfits >= 3.4", |
|
61 | "pyfits >= 3.4", | |
60 |
|
|
62 | "paramiko >= 2.1.2", | |
61 |
|
|
63 | "paho-mqtt >= 1.2", | |
62 |
|
|
64 | "zmq", | |
63 |
|
|
65 | "fuzzywuzzy", | |
64 |
|
|
66 | "click", | |
65 | "colorama", |
|
67 | "python-Levenshtein" | |
66 | "python-Levenshtein" |
|
68 | ], | |
67 | ], |
|
69 | ) | |
68 | ) |
|
General Comments 0
You need to be logged in to leave comments.
Login now