@@ -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 | #################### | |
|
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() | |||
44 |
|
56 | |||
45 | readUnitConf = controller.addReadUnit(datatype='SpectraReader', |
|
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', | |||
46 |
|
|
64 | path="{path}", | |
47 |
|
|
65 | startDate={startDate}, | |
48 |
|
|
66 | endDate={endDate}, | |
49 |
|
|
67 | startTime="{startHour}", | |
50 |
|
|
68 | endTime="{endHour}", | |
51 |
|
|
69 | online=0, | |
52 | queue=q, |
|
|||
53 | cursor=cursor, |
|
|||
54 | skip=skip, |
|
|||
55 |
|
|
70 | verbose=1, | |
56 |
|
|
71 | walk=1, | |
57 |
|
|
72 | ) | |
58 |
|
73 | |||
59 |
|
|
74 | spectra_proc = project.addProcUnit(datatype='Spectra', inputId=spectra_reader.getId()) | |
60 |
|
||||
61 | procUnitConf2 = controller.addProcUnit(datatype='ParametersProc', inputId=readUnitConf.getId()) |
|
|||
62 | opObj11 = procUnitConf2.addOperation(name='SpectralMoments', optype='other') |
|
|||
63 |
|
75 | |||
64 | opObj12 = procUnitConf2.addOperation(name='PublishData', optype='other') |
|
76 | parameters_proc = project.addProcUnit(datatype='ParametersProc', inputId=spectra_proc.getId()) | |
65 | opObj12.addParameter(name='zeromq', value=1, format='int') |
|
77 | moments = parameters_proc.addOperation(name='SpectralMoments', optype='other') | |
66 | opObj12.addParameter(name='verbose', value=0, format='bool') |
|
|||
67 |
|
||||
68 | controller.start() |
|
|||
69 |
|
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') | |||
70 |
|
82 | |||
71 | if __name__ == '__main__': |
|
83 | MPProject(project, 16) | |
72 | multiSchain(fiber, nProcess={nProcess}, startDate="{startDate}", endDate="{endDate}") |
|
|||
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,6 +17,7 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", | |
@@ -62,7 +64,6 setup(name="schainpy", | |||||
62 |
|
|
64 | "zmq", | |
63 |
|
|
65 | "fuzzywuzzy", | |
64 |
|
|
66 | "click", | |
65 | "colorama", |
|
|||
66 |
|
|
67 | "python-Levenshtein" | |
67 | ], |
|
68 | ], | |
68 | ) |
|
69 | ) |
General Comments 0
You need to be logged in to leave comments.
Login now