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