@@ -1,108 +1,109 | |||||
1 | # Byte-compiled / optimized / DLL files |
|
1 | # Byte-compiled / optimized / DLL files | |
2 | __pycache__/ |
|
2 | __pycache__/ | |
3 | *.py[cod] |
|
3 | *.py[cod] | |
4 | *$py.class |
|
4 | *$py.class | |
5 |
|
5 | |||
6 | # C extensions |
|
6 | # C extensions | |
7 | *.so |
|
7 | *.so | |
8 |
|
8 | |||
9 | # Distribution / packaging |
|
9 | # Distribution / packaging | |
10 | .Python |
|
10 | .Python | |
11 | env/ |
|
11 | env/ | |
12 | build/ |
|
12 | build/ | |
13 | develop-eggs/ |
|
13 | develop-eggs/ | |
14 | dist/ |
|
14 | dist/ | |
15 | downloads/ |
|
15 | downloads/ | |
16 | eggs/ |
|
16 | eggs/ | |
17 | .eggs/ |
|
17 | .eggs/ | |
18 | lib/ |
|
18 | lib/ | |
19 | lib64/ |
|
19 | lib64/ | |
20 | parts/ |
|
20 | parts/ | |
21 | sdist/ |
|
21 | sdist/ | |
22 | var/ |
|
22 | var/ | |
23 | wheels/ |
|
23 | wheels/ | |
24 | *.egg-info/ |
|
24 | *.egg-info/ | |
25 | .installed.cfg |
|
25 | .installed.cfg | |
26 | *.egg |
|
26 | *.egg | |
27 |
|
27 | |||
28 | # PyInstaller |
|
28 | # PyInstaller | |
29 | # Usually these files are written by a python script from a template |
|
29 | # Usually these files are written by a python script from a template | |
30 | # before PyInstaller builds the exe, so as to inject date/other infos into it. |
|
30 | # before PyInstaller builds the exe, so as to inject date/other infos into it. | |
31 | *.manifest |
|
31 | *.manifest | |
32 | *.spec |
|
32 | *.spec | |
33 |
|
33 | |||
34 | # Installer logs |
|
34 | # Installer logs | |
35 | pip-log.txt |
|
35 | pip-log.txt | |
36 | pip-delete-this-directory.txt |
|
36 | pip-delete-this-directory.txt | |
37 |
|
37 | |||
38 | # Unit test / coverage reports |
|
38 | # Unit test / coverage reports | |
39 | htmlcov/ |
|
39 | htmlcov/ | |
40 | .tox/ |
|
40 | .tox/ | |
41 | .coverage |
|
41 | .coverage | |
42 | .coverage.* |
|
42 | .coverage.* | |
43 | .cache |
|
43 | .cache | |
44 | nosetests.xml |
|
44 | nosetests.xml | |
45 | coverage.xml |
|
45 | coverage.xml | |
46 | *,cover |
|
46 | *,cover | |
47 | .hypothesis/ |
|
47 | .hypothesis/ | |
48 |
|
48 | |||
49 | # Translations |
|
49 | # Translations | |
50 | *.mo |
|
50 | *.mo | |
51 | *.pot |
|
51 | *.pot | |
52 |
|
52 | |||
53 | # Django stuff: |
|
53 | # Django stuff: | |
54 | *.log |
|
54 | *.log | |
55 | local_settings.py |
|
55 | local_settings.py | |
56 |
|
56 | |||
57 | # Flask stuff: |
|
57 | # Flask stuff: | |
58 | instance/ |
|
58 | instance/ | |
59 | .webassets-cache |
|
59 | .webassets-cache | |
60 |
|
60 | |||
61 | # Scrapy stuff: |
|
61 | # Scrapy stuff: | |
62 | .scrapy |
|
62 | .scrapy | |
63 |
|
63 | |||
64 | # Sphinx documentation |
|
64 | # Sphinx documentation | |
65 | docs/_build/ |
|
65 | docs/_build/ | |
66 |
|
66 | |||
67 | # PyBuilder |
|
67 | # PyBuilder | |
68 | target/ |
|
68 | target/ | |
69 |
|
69 | |||
70 | # Jupyter Notebook |
|
70 | # Jupyter Notebook | |
71 | .ipynb_checkpoints |
|
71 | .ipynb_checkpoints | |
72 |
|
72 | |||
73 | # pyenv |
|
73 | # pyenv | |
74 | .python-version |
|
74 | .python-version | |
75 |
|
75 | |||
76 | # celery beat schedule file |
|
76 | # celery beat schedule file | |
77 | celerybeat-schedule |
|
77 | celerybeat-schedule | |
78 |
|
78 | |||
79 | # SageMath parsed files |
|
79 | # SageMath parsed files | |
80 | *.sage.py |
|
80 | *.sage.py | |
81 |
|
81 | |||
82 | # dotenv |
|
82 | # dotenv | |
83 | .env |
|
83 | .env | |
84 |
|
84 | |||
85 | # virtualenv |
|
85 | # virtualenv | |
86 | .venv |
|
86 | .venv | |
87 | venv/ |
|
87 | venv/ | |
88 | ENV/ |
|
88 | ENV/ | |
89 |
|
89 | |||
90 | # Spyder project settings |
|
90 | # Spyder project settings | |
91 | .spyderproject |
|
91 | .spyderproject | |
92 | .spyproject |
|
92 | .spyproject | |
93 |
|
93 | |||
94 | # Rope project settings |
|
94 | # Rope project settings | |
95 | .ropeproject |
|
95 | .ropeproject | |
96 |
|
96 | |||
97 | # mkdocs documentation |
|
97 | # mkdocs documentation | |
98 | /site |
|
98 | /site | |
99 |
|
99 | |||
100 | # eclipse |
|
100 | # eclipse | |
101 | .project |
|
101 | .project | |
102 | .pydevproject |
|
102 | .pydevproject | |
103 |
|
103 | |||
104 | # vscode |
|
104 | # vscode | |
105 |
|
105 | |||
106 | .vscode |
|
106 | .vscode | |
107 |
|
107 | |||
108 | schainpy/scripts/ No newline at end of file |
|
108 | schainpy/scripts/ | |
|
109 | schaingui/node_modules/ No newline at end of file |
@@ -1,97 +1,85 | |||||
1 |
|
1 | |||
2 | import os, sys |
|
2 | import os, sys | |
3 |
|
3 | |||
4 | path = os.path.split(os.getcwd())[0] |
|
|||
5 | path = os.path.split(path)[0] |
|
|||
6 |
|
||||
7 | sys.path.insert(0, path) |
|
|||
8 |
|
||||
9 | from schainpy.controller import Project |
|
4 | from schainpy.controller import Project | |
10 |
|
5 | |||
11 | controllerObj = Project() |
|
6 | controllerObj = Project() | |
12 | controllerObj.setup(id = '002', name='script02', description="JASMET Meteor Detection") |
|
7 | controllerObj.setup(id = '002', name='script02', description="JASMET Meteor Detection") | |
13 |
|
8 | |||
14 | #-------------------------------------- Setup ----------------------------------------- |
|
9 | #-------------------------------------- Setup ----------------------------------------- | |
15 | #Verificar estas variables |
|
10 | #Verificar estas variables | |
16 |
|
11 | |||
17 | #Path para los archivos |
|
12 | #Path para los archivos | |
18 | # path = '/mnt/jars/2016_08/NOCHE' |
|
13 | # path = '/mnt/jars/2016_08/NOCHE' | |
19 | # path = '/media/joscanoa/DATA_JASMET/JASMET/2016_08/DIA' |
|
14 | # path = '/media/joscanoa/DATA_JASMET/JASMET/2016_08/DIA' | |
20 | # path = '/media/joscanoa/DATA_JASMET/JASMET/2016_08/NOCHE' |
|
15 | # path = '/media/joscanoa/DATA_JASMET/JASMET/2016_08/NOCHE' | |
21 |
path = '/media/ |
|
16 | path = '/media/nanosat/NewVolumen/JASMET/2016_08/DIA' | |
22 |
|
17 | |||
23 | #Path para los graficos |
|
18 | #Path para los graficos | |
24 | pathfig = os.path.join(os.environ['HOME'],'Pictures/JASMET30/201608/graphics') |
|
19 | pathfig = os.path.join(os.environ['HOME'],'Pictures/JASMET30/201608/graphics') | |
25 |
|
20 | |||
26 | #Path para los archivos HDF5 de meteoros |
|
21 | #Path para los archivos HDF5 de meteoros | |
27 | pathfile = os.path.join(os.environ['HOME'],'Pictures/JASMET30/201608/meteor') |
|
22 | pathfile = os.path.join(os.environ['HOME'],'Pictures/JASMET30/201608/meteor') | |
28 |
|
23 | |||
29 | #Fechas para busqueda de archivos |
|
24 | #Fechas para busqueda de archivos | |
30 | startDate = '2016/08/29' |
|
25 | startDate = '2016/08/29' | |
31 | endDate = '2016/09/11' |
|
26 | endDate = '2016/09/11' | |
32 | #Horas para busqueda de archivos |
|
27 | #Horas para busqueda de archivos | |
33 | startTime = '00:00:00' |
|
28 | startTime = '00:00:00' | |
34 | endTime = '23:59:59' |
|
29 | endTime = '23:59:59' | |
35 |
|
30 | |||
36 |
|
31 | |||
37 | #------------------------------ Voltage Reading Unit ---------------------------------- |
|
32 | #------------------------------ Voltage Reading Unit ---------------------------------- | |
38 |
|
33 | |||
39 | readUnitConfObj = controllerObj.addReadUnit(datatype='VoltageReader', |
|
34 | readUnitConfObj = controllerObj.addReadUnit(datatype='VoltageReader', | |
40 | path=path, |
|
35 | path=path, | |
41 | startDate=startDate, |
|
36 | startDate=startDate, | |
42 | endDate=endDate, |
|
37 | endDate=endDate, | |
43 | startTime=startTime, |
|
38 | startTime=startTime, | |
44 | endTime=endTime, |
|
39 | endTime=endTime, | |
45 | online=0, |
|
40 | online=0, | |
46 | delay=30, |
|
41 | delay=30, | |
47 | walk=1, |
|
42 | walk=1, | |
48 | getblock=1, |
|
43 | getblock=1, | |
49 | blocktime=100) |
|
44 | blocktime=100) | |
50 |
|
45 | |||
51 | opObj11 = readUnitConfObj.addOperation(name='printNumberOfBlock') |
|
46 | opObj11 = readUnitConfObj.addOperation(name='printNumberOfBlock') | |
52 |
|
47 | |||
53 | #-------------------------- Voltage Processing Unit ------------------------------------ |
|
48 | #-------------------------- Voltage Processing Unit ------------------------------------ | |
54 |
|
49 | |||
55 | procUnitConfObj0 = controllerObj.addProcUnit(datatype='VoltageProc', inputId=readUnitConfObj.getId()) |
|
50 | procUnitConfObj0 = controllerObj.addProcUnit(datatype='VoltageProc', inputId=readUnitConfObj.getId()) | |
56 |
|
51 | |||
57 | opObj00 = procUnitConfObj0.addOperation(name='selectChannels') |
|
52 | opObj00 = procUnitConfObj0.addOperation(name='selectChannels') | |
58 | opObj00.addParameter(name='channelList', value='0,1,2,3,4', format='intlist') |
|
53 | opObj00.addParameter(name='channelList', value='0,1,2,3,4', format='intlist') | |
59 |
|
54 | |||
60 | opObj01 = procUnitConfObj0.addOperation(name='setRadarFrequency') |
|
55 | opObj01 = procUnitConfObj0.addOperation(name='setRadarFrequency') | |
61 | opObj01.addParameter(name='frequency', value='30.e6', format='float') |
|
56 | opObj01.addParameter(name='frequency', value='30.e6', format='float') | |
62 |
|
57 | |||
63 | opObj01 = procUnitConfObj0.addOperation(name='interpolateHeights') |
|
58 | opObj01 = procUnitConfObj0.addOperation(name='interpolateHeights') | |
64 | opObj01.addParameter(name='topLim', value='73', format='int') |
|
59 | opObj01.addParameter(name='topLim', value='73', format='int') | |
65 | opObj01.addParameter(name='botLim', value='71', format='int') |
|
60 | opObj01.addParameter(name='botLim', value='71', format='int') | |
66 |
|
61 | |||
67 | opObj02 = procUnitConfObj0.addOperation(name='Decoder', optype='other') |
|
62 | opObj02 = procUnitConfObj0.addOperation(name='Decoder', optype='other') | |
68 |
|
63 | |||
69 | opObj03 = procUnitConfObj0.addOperation(name='CohInt', optype='other') |
|
64 | opObj03 = procUnitConfObj0.addOperation(name='CohInt', optype='other') | |
70 | opObj03.addParameter(name='n', value='2', format='int') |
|
65 | opObj03.addParameter(name='n', value='2', format='int') | |
71 |
|
66 | |||
72 | #--------------------------- Parameters Processing Unit ------------------------------------ |
|
67 | #--------------------------- Parameters Processing Unit ------------------------------------ | |
73 |
|
68 | |||
74 | procUnitConfObj1 = controllerObj.addProcUnit(datatype='ParametersProc', inputId=procUnitConfObj0.getId()) |
|
69 | procUnitConfObj1 = controllerObj.addProcUnit(datatype='ParametersProc', inputId=procUnitConfObj0.getId()) | |
75 | # |
|
70 | # | |
76 | opObj10 = procUnitConfObj1.addOperation(name='SMDetection', optype='other') |
|
71 | opObj10 = procUnitConfObj1.addOperation(name='SMDetection', optype='other') | |
77 | opObj10.addParameter(name='azimuth', value='45', format='float') |
|
72 | opObj10.addParameter(name='azimuth', value='45', format='float') | |
78 | opObj10.addParameter(name='hmin', value='60', format='float') |
|
73 | opObj10.addParameter(name='hmin', value='60', format='float') | |
79 | opObj10.addParameter(name='hmax', value='120', format='float') |
|
74 | opObj10.addParameter(name='hmax', value='120', format='float') | |
80 |
|
75 | |||
81 | opObj12 = procUnitConfObj1.addOperation(name='ParamWriter', optype='other') |
|
76 | opObj12 = procUnitConfObj1.addOperation(name='ParamWriter', optype='other') | |
82 | opObj12.addParameter(name='path', value=pathfile) |
|
77 | opObj12.addParameter(name='path', value=pathfile) | |
83 | opObj12.addParameter(name='blocksPerFile', value='1000', format='int') |
|
78 | opObj12.addParameter(name='blocksPerFile', value='1000', format='int') | |
84 | opObj12.addParameter(name='metadataList',value='type,heightList,paramInterval,timeZone',format='list') |
|
79 | opObj12.addParameter(name='metadataList',value='type,heightList,paramInterval,timeZone',format='list') | |
85 | opObj12.addParameter(name='dataList',value='data_param,utctime',format='list') |
|
80 | opObj12.addParameter(name='dataList',value='data_param,utctime',format='list') | |
86 | opObj12.addParameter(name='mode',value='2',format='int') |
|
81 | opObj12.addParameter(name='mode',value='2',format='int') | |
87 |
|
||||
88 | #-------------------------------------------------------------------------------------------------- |
|
|||
89 |
|
82 | |||
90 | print "Escribiendo el archivo XML" |
|
83 | #-------------------------------------------------------------------------------------------------- | |
91 | controllerObj.writeXml("JASMET02.xml") |
|
|||
92 | print "Leyendo el archivo XML" |
|
|||
93 | controllerObj.readXml("JASMET02.xml") |
|
|||
94 |
|
84 | |||
95 |
controllerObj. |
|
85 | controllerObj.start() | |
96 | controllerObj.connectObjects() |
|
|||
97 | controllerObj.run() No newline at end of file |
|
@@ -1,77 +1,68 | |||||
1 | import os, sys |
|
1 | import os, sys | |
2 |
|
2 | |||
3 | path = os.path.split(os.getcwd())[0] |
|
3 | path = os.path.split(os.getcwd())[0] | |
4 | path = os.path.split(path)[0] |
|
4 | path = os.path.split(path)[0] | |
5 |
|
5 | |||
6 | sys.path.insert(0, path) |
|
6 | sys.path.insert(0, path) | |
7 |
|
7 | |||
8 | from schainpy.controller import Project |
|
8 | from schainpy.controller import Project | |
9 |
|
9 | |||
10 | controllerObj = Project() |
|
10 | controllerObj = Project() | |
11 | controllerObj.setup(id = '004', name='script04', description="JASMET Phase Calibration") |
|
11 | controllerObj.setup(id = '004', name='script04', description="JASMET Phase Calibration") | |
12 |
|
12 | |||
13 | #-------------------------------------- Setup ----------------------------------------- |
|
13 | #-------------------------------------- Setup ----------------------------------------- | |
14 | #Verificar estas variables |
|
14 | #Verificar estas variables | |
15 |
|
15 | |||
16 | #Path donde estan los archivos HDF5 de meteoros |
|
16 | #Path donde estan los archivos HDF5 de meteoros | |
17 | path = os.path.join(os.environ['HOME'],'Pictures/JASMET30/201608/meteor') |
|
17 | path = os.path.join(os.environ['HOME'],'Pictures/JASMET30_mp/201608/meteor') | |
18 |
|
18 | |||
19 | #Path para los graficos |
|
19 | #Path para los graficos | |
20 | pathfig = os.path.join(os.environ['HOME'],'Pictures/JASMET30/201608/graphics') |
|
20 | pathfig = os.path.join(os.environ['HOME'],'Pictures/JASMET30_mp/201608/graphics') | |
21 |
|
21 | |||
22 | #Path donde se almacenaran las fases calculadas |
|
22 | #Path donde se almacenaran las fases calculadas | |
23 | pathfile = os.path.join(os.environ['HOME'],'Pictures/JASMET30/201608/phase') |
|
23 | pathfile = os.path.join(os.environ['HOME'],'Pictures/JASMET30_mp/201608/phase') | |
24 |
|
24 | |||
25 | #Fechas para busqueda de archivos |
|
25 | #Fechas para busqueda de archivos | |
26 |
startDate = '2016/08/2 |
|
26 | startDate = '2016/08/29' | |
27 |
endDate = '2016/0 |
|
27 | endDate = '2016/09/11' | |
28 | #Horas para busqueda de archivos |
|
28 | #Horas para busqueda de archivos | |
29 | startTime = '00:00:00' |
|
29 | startTime = '00:00:00' | |
30 | endTime = '23:59:59' |
|
30 | endTime = '23:59:59' | |
31 |
|
31 | |||
32 | #------------------------------------------------------------------------------------------------ |
|
32 | #------------------------------------------------------------------------------------------------ | |
33 | readUnitConfObj = controllerObj.addReadUnit(datatype='ParamReader', |
|
33 | readUnitConfObj = controllerObj.addReadUnit(datatype='ParamReader', | |
34 | path=path, |
|
34 | path=path, | |
35 |
startDate= |
|
35 | startDate=startDate, | |
36 |
endDate= |
|
36 | endDate=endDate, | |
37 | startTime=startTime, |
|
37 | startTime=startTime, | |
38 | endTime=endTime, |
|
38 | endTime=endTime, | |
39 | walk=1) |
|
39 | walk=1) | |
40 |
|
40 | |||
41 | #-------------------------------------------------------------------------------------------------- |
|
41 | #-------------------------------------------------------------------------------------------------- | |
42 |
|
42 | |||
43 | procUnitConfObj1 = controllerObj.addProcUnit(datatype='ParametersProc', inputId=readUnitConfObj.getId()) |
|
43 | procUnitConfObj1 = controllerObj.addProcUnit(datatype='ParametersProc', inputId=readUnitConfObj.getId()) | |
44 | # # |
|
44 | # # | |
45 | opObj31 = procUnitConfObj1.addOperation(name='SMPhaseCalibration', optype='other') |
|
45 | opObj31 = procUnitConfObj1.addOperation(name='SMPhaseCalibration', optype='other') | |
46 | opObj31.addParameter(name='nHours', value='1', format='float') |
|
46 | opObj31.addParameter(name='nHours', value='1', format='float') | |
47 | opObj31.addParameter(name='hmin', value='60', format='float') |
|
47 | opObj31.addParameter(name='hmin', value='60', format='float') | |
48 | opObj31.addParameter(name='hmax', value='120', format='float') |
|
48 | opObj31.addParameter(name='hmax', value='120', format='float') | |
49 | # opObj31.addParameter(name='channelPositions', value='(2.5,0),(0,2.5),(0,0),(0,4.5),(-2,0)', format='pairslist') |
|
49 | # opObj31.addParameter(name='channelPositions', value='(2.5,0),(0,2.5),(0,0),(0,4.5),(-2,0)', format='pairslist') | |
50 |
|
50 | |||
51 | opObj32 = procUnitConfObj1.addOperation(name='PhasePlot', optype='other') |
|
51 | opObj32 = procUnitConfObj1.addOperation(name='PhasePlot', optype='other') | |
52 | opObj32.addParameter(name='id', value='201', format='int') |
|
52 | opObj32.addParameter(name='id', value='201', format='int') | |
53 | opObj32.addParameter(name='wintitle', value='PhaseCalibration', format='str') |
|
53 | opObj32.addParameter(name='wintitle', value='PhaseCalibration', format='str') | |
54 | opObj32.addParameter(name='save', value='1', format='bool') |
|
54 | opObj32.addParameter(name='save', value='1', format='bool') | |
55 | opObj32.addParameter(name='xmin', value='0', format='float') |
|
55 | opObj32.addParameter(name='xmin', value='0', format='float') | |
56 | opObj32.addParameter(name='xmax', value='24', format='float') |
|
56 | opObj32.addParameter(name='xmax', value='24', format='float') | |
57 | opObj32.addParameter(name='ymin', value='-180', format='float') |
|
57 | opObj32.addParameter(name='ymin', value='-180', format='float') | |
58 | opObj32.addParameter(name='ymax', value='180', format='float') |
|
58 | opObj32.addParameter(name='ymax', value='180', format='float') | |
59 | opObj32.addParameter(name='figpath', value=pathfig, format='str') |
|
59 | opObj32.addParameter(name='figpath', value=pathfig, format='str') | |
60 | # # |
|
60 | # # | |
61 | opObj33 = procUnitConfObj1.addOperation(name='ParamWriter', optype='other') |
|
61 | opObj33 = procUnitConfObj1.addOperation(name='ParamWriter', optype='other') | |
62 | opObj33.addParameter(name='path', value=pathfile) |
|
62 | opObj33.addParameter(name='path', value=pathfile) | |
63 | opObj33.addParameter(name='blocksPerFile', value='1000', format='int') |
|
63 | opObj33.addParameter(name='blocksPerFile', value='1000', format='int') | |
64 | opObj33.addParameter(name='metadataList',value='type,outputInterval,timeZone',format='list') |
|
64 | opObj33.addParameter(name='metadataList',value='type,outputInterval,timeZone',format='list') | |
65 | opObj33.addParameter(name='dataList',value='data_output,utctime',format='list') |
|
65 | opObj33.addParameter(name='dataList',value='data_output,utctime',format='list') | |
66 | # # opObj25.addParameter(name='mode',value='1,0,0',format='intlist') |
|
66 | # # opObj25.addParameter(name='mode',value='1,0,0',format='intlist') | |
67 |
|
67 | |||
68 | #-------------------------------------------------------------------------------------------------- |
|
68 | controllerObj.start() No newline at end of file | |
69 |
|
||||
70 | print "Escribiendo el archivo XML" |
|
|||
71 | controllerObj.writeXml("JASMET04.xml") |
|
|||
72 | print "Leyendo el archivo XML" |
|
|||
73 | controllerObj.readXml("JASMET04.xml") |
|
|||
74 |
|
||||
75 | controllerObj.createObjects() |
|
|||
76 | controllerObj.connectObjects() |
|
|||
77 | controllerObj.run() No newline at end of file |
|
@@ -1,91 +1,85 | |||||
1 | import os, sys |
|
1 | import os, sys | |
2 |
|
2 | |||
3 | path = os.path.split(os.getcwd())[0] |
|
3 | path = os.path.split(os.getcwd())[0] | |
4 | path = os.path.split(path)[0] |
|
4 | path = os.path.split(path)[0] | |
5 |
|
5 | |||
6 | sys.path.insert(0, path) |
|
6 | sys.path.insert(0, path) | |
7 |
|
7 | |||
8 | from schainpy.controller import Project |
|
8 | from schainpy.controller import Project | |
9 |
|
9 | |||
10 | controllerObj = Project() |
|
10 | controllerObj = Project() | |
11 | controllerObj.setup(id = '005', name='script05', description="JASMET Wind Estimation") |
|
11 | controllerObj.setup(id = '005', name='script05', description="JASMET Wind Estimation") | |
12 |
|
12 | |||
13 | #-------------------------------------- Setup ----------------------------------------- |
|
13 | #-------------------------------------- Setup ----------------------------------------- | |
14 | #Verificar estas variables |
|
14 | #Verificar estas variables | |
15 |
|
15 | |||
16 | #Path donde estan los archivos HDF5 de meteoros |
|
16 | #Path donde estan los archivos HDF5 de meteoros | |
17 | path = os.path.join(os.environ['HOME'],'Pictures/JASMET30/201608/meteor') |
|
17 | path = os.path.join(os.environ['HOME'],'Pictures/JASMET30_mp/201608/meteor') | |
18 |
|
18 | |||
19 | #Path para los graficos |
|
19 | #Path para los graficos | |
20 | pathfig = os.path.join(os.environ['HOME'],'Pictures/JASMET30/201608/graphics') |
|
20 | pathfig = os.path.join(os.environ['HOME'],'Pictures/JASMET30_mp/201608/graphics') | |
21 |
|
21 | |||
22 | #Path donde se almacenaran las estimaciones de vientos |
|
22 | #Path donde se almacenaran las estimaciones de vientos | |
23 | pathfile = os.path.join(os.environ['HOME'],'Pictures/JASMET30/201608/phase') |
|
23 | pathfile = os.path.join(os.environ['HOME'],'Pictures/JASMET30_mp/201608/phase') | |
24 |
|
24 | |||
25 | #Fechas para busqueda de archivos |
|
25 | #Fechas para busqueda de archivos | |
26 |
startDate = '2016/08/2 |
|
26 | startDate = '2016/08/29' | |
27 |
endDate = '2016/0 |
|
27 | endDate = '2016/09/11' | |
28 | #Horas para busqueda de archivos |
|
28 | #Horas para busqueda de archivos | |
29 | startTime = '00:00:00' |
|
29 | startTime = '00:00:00' | |
30 | endTime = '23:59:59' |
|
30 | endTime = '23:59:59' | |
31 |
|
31 | |||
32 | #Offsets optimos obtenidos con OptimumOffset.py |
|
32 | #Offsets optimos obtenidos con OptimumOffset.py | |
33 | phaseOffsets = '-2.84, -1.77, 11.94, 9.71' |
|
33 | phaseOffsets = '-2.84, -1.77, 11.94, 9.71' | |
|
34 | phaseOffsets = '-5.86, -0.93, -7.29, 23.35' | |||
34 | #------------------------------------------------------------------------------------------------ |
|
35 | #------------------------------------------------------------------------------------------------ | |
35 | readUnitConfObj = controllerObj.addReadUnit(datatype='ParamReader', |
|
36 | readUnitConfObj = controllerObj.addReadUnit(datatype='ParamReader', | |
36 | path=path, |
|
37 | path=path, | |
37 | startDate=startDate, |
|
38 | startDate=startDate, | |
38 | endDate=endDate, |
|
39 | endDate=endDate, | |
39 | startTime=startTime, |
|
40 | startTime=startTime, | |
40 | endTime=endTime, |
|
41 | endTime=endTime, | |
41 | walk=1) |
|
42 | walk=1) | |
42 | #-------------------------------------------------------------------------------------------------- |
|
43 | #-------------------------------------------------------------------------------------------------- | |
43 |
|
44 | |||
44 | procUnitConfObj1 = controllerObj.addProcUnit(datatype='ParametersProc', inputId=readUnitConfObj.getId()) |
|
45 | procUnitConfObj1 = controllerObj.addProcUnit(datatype='ParametersProc', inputId=readUnitConfObj.getId()) | |
45 | opObj10 = procUnitConfObj1.addOperation(name='CorrectSMPhases',optype='other') |
|
46 | opObj10 = procUnitConfObj1.addOperation(name='CorrectSMPhases',optype='other') | |
46 | opObj10.addParameter(name='phaseOffsets', value=phaseOffsets, format='floatlist') |
|
47 | opObj10.addParameter(name='phaseOffsets', value=phaseOffsets, format='floatlist') | |
47 |
|
48 | |||
48 | opObj13 = procUnitConfObj1.addOperation(name='SkyMapPlot', optype='other') |
|
49 | opObj13 = procUnitConfObj1.addOperation(name='SkyMapPlot', optype='other') | |
49 | opObj13.addParameter(name='id', value='1', format='int') |
|
50 | opObj13.addParameter(name='id', value='1', format='int') | |
50 | opObj13.addParameter(name='wintitle', value='Sky Map', format='str') |
|
51 | opObj13.addParameter(name='wintitle', value='Sky Map', format='str') | |
51 | opObj13.addParameter(name='save', value='1', format='bool') |
|
52 | opObj13.addParameter(name='save', value='1', format='bool') | |
52 | opObj13.addParameter(name='figpath', value=pathfig, format='str') |
|
53 | opObj13.addParameter(name='figpath', value=pathfig, format='str') | |
53 | opObj13.addParameter(name='ftp', value='1', format='int') |
|
54 | opObj13.addParameter(name='ftp', value='1', format='int') | |
54 | opObj13.addParameter(name='exp_code', value='15', format='int') |
|
55 | opObj13.addParameter(name='exp_code', value='15', format='int') | |
55 | opObj13.addParameter(name='sub_exp_code', value='1', format='int') |
|
56 | opObj13.addParameter(name='sub_exp_code', value='1', format='int') | |
56 | opObj13.addParameter(name='tmin', value='0', format='int') |
|
57 | opObj13.addParameter(name='tmin', value='0', format='int') | |
57 | opObj13.addParameter(name='tmax', value='24', format='int') |
|
58 | opObj13.addParameter(name='tmax', value='24', format='int') | |
58 |
|
59 | |||
59 | opObj22 = procUnitConfObj1.addOperation(name='WindProfiler', optype='other') |
|
60 | opObj22 = procUnitConfObj1.addOperation(name='WindProfiler', optype='other') | |
60 | opObj22.addParameter(name='technique', value='Meteors', format='str') |
|
61 | opObj22.addParameter(name='technique', value='Meteors', format='str') | |
61 | opObj22.addParameter(name='nHours', value='1', format='float') |
|
62 | opObj22.addParameter(name='nHours', value='1', format='float') | |
62 | opObj22.addParameter(name='hmin', value='70', format='float') |
|
63 | opObj22.addParameter(name='hmin', value='70', format='float') | |
63 | opObj22.addParameter(name='hmax', value='120', format='float') |
|
64 | opObj22.addParameter(name='hmax', value='120', format='float') | |
64 |
|
65 | |||
65 | opObj23 = procUnitConfObj1.addOperation(name='WindProfilerPlot', optype='other') |
|
66 | opObj23 = procUnitConfObj1.addOperation(name='WindProfilerPlot', optype='other') | |
66 | opObj23.addParameter(name='id', value='2', format='int') |
|
67 | opObj23.addParameter(name='id', value='2', format='int') | |
67 | opObj23.addParameter(name='wintitle', value='Wind Profiler', format='str') |
|
68 | opObj23.addParameter(name='wintitle', value='Wind Profiler', format='str') | |
68 | opObj23.addParameter(name='save', value='1', format='bool') |
|
69 | opObj23.addParameter(name='save', value='1', format='bool') | |
69 | opObj23.addParameter(name='figpath', value = pathfig, format='str') |
|
70 | opObj23.addParameter(name='figpath', value = pathfig, format='str') | |
70 | opObj23.addParameter(name='zmin', value='-140', format='int') |
|
71 | opObj23.addParameter(name='zmin', value='-140', format='int') | |
71 | opObj23.addParameter(name='zmax', value='140', format='int') |
|
72 | opObj23.addParameter(name='zmax', value='140', format='int') | |
72 | opObj23.addParameter(name='xmin', value='0', format='float') |
|
73 | opObj23.addParameter(name='xmin', value='0', format='float') | |
73 | opObj23.addParameter(name='xmax', value='24', format='float') |
|
74 | opObj23.addParameter(name='xmax', value='24', format='float') | |
74 | opObj23.addParameter(name='ymin', value='70', format='float') |
|
75 | opObj23.addParameter(name='ymin', value='70', format='float') | |
75 | opObj23.addParameter(name='ymax', value='110', format='float') |
|
76 | opObj23.addParameter(name='ymax', value='110', format='float') | |
76 |
|
77 | |||
77 | opObj33 = procUnitConfObj1.addOperation(name='ParamWriter', optype='other') |
|
78 | opObj33 = procUnitConfObj1.addOperation(name='ParamWriter', optype='other') | |
78 | opObj33.addParameter(name='path', value=pathfile) |
|
79 | opObj33.addParameter(name='path', value=pathfile) | |
79 | opObj33.addParameter(name='blocksPerFile', value='1000', format='int') |
|
80 | opObj33.addParameter(name='blocksPerFile', value='1000', format='int') | |
80 | opObj33.addParameter(name='metadataList',value='type,outputInterval,timeZone',format='list') |
|
81 | opObj33.addParameter(name='metadataList',value='type,outputInterval,timeZone',format='list') | |
81 | opObj33.addParameter(name='dataList',value='data_output,utctime',format='list') |
|
82 | opObj33.addParameter(name='dataList',value='data_output,utctime',format='list') | |
82 | #-------------------------------------------------------------------------------------------------- |
|
83 | #-------------------------------------------------------------------------------------------------- | |
83 |
|
84 | |||
84 | print "Escribiendo el archivo XML" |
|
85 | controllerObj.start() No newline at end of file | |
85 | controllerObj.writeXml("JASMET05.xml") |
|
|||
86 | print "Leyendo el archivo XML" |
|
|||
87 | controllerObj.readXml("JASMET05.xml") |
|
|||
88 |
|
||||
89 | controllerObj.createObjects() |
|
|||
90 | controllerObj.connectObjects() |
|
|||
91 | controllerObj.run() No newline at end of file |
|
@@ -1,97 +1,97 | |||||
1 | import argparse |
|
1 | import argparse | |
2 |
|
2 | |||
3 | from schainpy.controller import Project, multiSchain |
|
3 | from schainpy.controller import Project, multiSchain | |
4 |
|
4 | |||
5 | desc = "HF_EXAMPLE" |
|
5 | desc = "HF_EXAMPLE" | |
6 |
|
6 | |||
7 | def fiber(cursor, skip, q, dt): |
|
7 | def fiber(cursor, skip, q, dt): | |
8 |
|
8 | |||
9 | controllerObj = Project() |
|
9 | controllerObj = Project() | |
10 |
|
10 | |||
11 | controllerObj.setup(id='191', name='test01', description=desc) |
|
11 | controllerObj.setup(id='191', name='test01', description=desc) | |
12 |
|
12 | |||
13 | readUnitConfObj = controllerObj.addReadUnit(datatype='SpectraReader', |
|
13 | readUnitConfObj = controllerObj.addReadUnit(datatype='SpectraReader', | |
14 |
|
|
14 | path='/home/nanosat/data/sp1_f0', | |
15 |
|
|
15 | startDate=dt, | |
16 |
|
|
16 | endDate=dt, | |
17 |
|
|
17 | startTime="00:00:00", | |
18 |
|
|
18 | endTime="23:59:59", | |
19 |
|
|
19 | online=0, | |
20 |
|
|
20 | #set=1426485881, | |
21 |
|
|
21 | walk=1, | |
22 |
|
|
22 | queue=q, | |
23 |
|
|
23 | cursor=cursor, | |
24 |
|
|
24 | skip=skip, | |
25 |
|
|
25 | verbose=1 | |
26 |
|
|
26 | #timezone=-5*3600 | |
27 |
|
|
27 | ) | |
28 |
|
28 | |||
29 | # #opObj11 = readUnitConfObj.addOperation(name='printNumberOfBlock') |
|
29 | # #opObj11 = readUnitConfObj.addOperation(name='printNumberOfBlock') | |
30 | # |
|
30 | # | |
31 | procUnitConfObj2 = controllerObj.addProcUnit(datatype='Spectra', inputId=readUnitConfObj.getId()) |
|
31 | procUnitConfObj2 = controllerObj.addProcUnit(datatype='Spectra', inputId=readUnitConfObj.getId()) | |
32 | # procUnitConfObj2.addParameter(name='nipp', value='5', format='int') |
|
32 | # procUnitConfObj2.addParameter(name='nipp', value='5', format='int') | |
33 |
|
33 | |||
34 | procUnitConfObj3 = controllerObj.addProcUnit(datatype='ParametersProc', inputId=readUnitConfObj.getId()) |
|
34 | procUnitConfObj3 = controllerObj.addProcUnit(datatype='ParametersProc', inputId=readUnitConfObj.getId()) | |
35 | opObj11 = procUnitConfObj3.addOperation(name='SpectralMoments', optype='other') |
|
35 | opObj11 = procUnitConfObj3.addOperation(name='SpectralMoments', optype='other') | |
36 |
|
36 | |||
37 | # |
|
37 | # | |
38 | # opObj11 = procUnitConfObj1.addOperation(name='SpectraPlot', optype='other') |
|
38 | # opObj11 = procUnitConfObj1.addOperation(name='SpectraPlot', optype='other') | |
39 | # opObj11.addParameter(name='id', value='1000', format='int') |
|
39 | # opObj11.addParameter(name='id', value='1000', format='int') | |
40 | # opObj11.addParameter(name='wintitle', value='HF_Jicamarca_Spc', format='str') |
|
40 | # opObj11.addParameter(name='wintitle', value='HF_Jicamarca_Spc', format='str') | |
41 | # opObj11.addParameter(name='channelList', value='0', format='intlist') |
|
41 | # opObj11.addParameter(name='channelList', value='0', format='intlist') | |
42 | # opObj11.addParameter(name='zmin', value='-120', format='float') |
|
42 | # opObj11.addParameter(name='zmin', value='-120', format='float') | |
43 | # opObj11.addParameter(name='zmax', value='-70', format='float') |
|
43 | # opObj11.addParameter(name='zmax', value='-70', format='float') | |
44 | # opObj11.addParameter(name='save', value='1', format='int') |
|
44 | # opObj11.addParameter(name='save', value='1', format='int') | |
45 | # opObj11.addParameter(name='figpath', value=figpath, format='str') |
|
45 | # opObj11.addParameter(name='figpath', value=figpath, format='str') | |
46 |
|
46 | |||
47 | # opObj11 = procUnitConfObj3.addOperation(name='Parameters1Plot', optype='other') |
|
47 | # opObj11 = procUnitConfObj3.addOperation(name='Parameters1Plot', optype='other') | |
48 | # opObj11.addParameter(name='channelList', value='0', format='intList') |
|
48 | # opObj11.addParameter(name='channelList', value='0', format='intList') | |
49 |
|
49 | |||
50 | # opObj11.addParameter(name='id', value='2000', format='int') |
|
50 | # opObj11.addParameter(name='id', value='2000', format='int') | |
51 | # # opObj11.addParameter(name='colormap', value='0', format='bool') |
|
51 | # # opObj11.addParameter(name='colormap', value='0', format='bool') | |
52 | # opObj11.addParameter(name='onlySNR', value='1', format='bool') |
|
52 | # opObj11.addParameter(name='onlySNR', value='1', format='bool') | |
53 | # opObj11.addParameter(name='DOP', value='0', format='bool') |
|
53 | # opObj11.addParameter(name='DOP', value='0', format='bool') | |
54 | # # opObj11.addParameter(name='showSNR', value='1', format='bool') |
|
54 | # # opObj11.addParameter(name='showSNR', value='1', format='bool') | |
55 | # # opObj11.addParameter(name='SNRthresh', value='0', format='int') |
|
55 | # # opObj11.addParameter(name='SNRthresh', value='0', format='int') | |
56 | # opObj11.addParameter(name='SNRmin', value='-10', format='int') |
|
56 | # opObj11.addParameter(name='SNRmin', value='-10', format='int') | |
57 | # opObj11.addParameter(name='SNRmax', value='30', format='int') |
|
57 | # opObj11.addParameter(name='SNRmax', value='30', format='int') | |
58 |
|
58 | |||
59 | # opObj11.addParameter(name='showSNR', value='1', format='int') |
|
59 | # opObj11.addParameter(name='showSNR', value='1', format='int') | |
60 | # # opObj11.addParameter(name='channelList', value='0', format='intlist') |
|
60 | # # opObj11.addParameter(name='channelList', value='0', format='intlist') | |
61 | # # opObj11.addParameter(name='xmin', value='0', format='float') |
|
61 | # # opObj11.addParameter(name='xmin', value='0', format='float') | |
62 | # opObj11.addParameter(name='xmin', value='0', format='float') |
|
62 | # opObj11.addParameter(name='xmin', value='0', format='float') | |
63 | # opObj11.addParameter(name='xmax', value='24', format='float') |
|
63 | # opObj11.addParameter(name='xmax', value='24', format='float') | |
64 |
|
64 | |||
65 | # opObj11.addParameter(name='zmin', value='-110', format='float') |
|
65 | # opObj11.addParameter(name='zmin', value='-110', format='float') | |
66 | # opObj11.addParameter(name='zmax', value='-70', format='float') |
|
66 | # opObj11.addParameter(name='zmax', value='-70', format='float') | |
67 | # opObj11.addParameter(name='save', value='0', format='int') |
|
67 | # opObj11.addParameter(name='save', value='0', format='int') | |
68 | # # opObj11.addParameter(name='figpath', value='/tmp/', format='str') |
|
68 | # # opObj11.addParameter(name='figpath', value='/tmp/', format='str') | |
69 | # |
|
69 | # | |
70 | opObj12 = procUnitConfObj3.addOperation(name='PublishData', optype='other') |
|
70 | opObj12 = procUnitConfObj3.addOperation(name='PublishData', optype='other') | |
71 | opObj12.addParameter(name='zeromq', value=1, format='int') |
|
71 | opObj12.addParameter(name='zeromq', value=1, format='int') | |
72 | opObj12.addParameter(name='verbose', value=0, format='bool') |
|
72 | opObj12.addParameter(name='verbose', value=0, format='bool') | |
73 |
|
73 | |||
74 |
|
74 | |||
75 | # opObj13 = procUnitConfObj3.addOperation(name='PublishData', optype='other') |
|
75 | # opObj13 = procUnitConfObj3.addOperation(name='PublishData', optype='other') | |
76 | # opObj13.addParameter(name='zeromq', value=1, format='int') |
|
76 | # opObj13.addParameter(name='zeromq', value=1, format='int') | |
77 | # opObj13.addParameter(name='server', value="juanca", format='str') |
|
77 | # opObj13.addParameter(name='server', value="juanca", format='str') | |
78 |
|
78 | |||
79 | opObj12.addParameter(name='delay', value=0, format='int') |
|
79 | opObj12.addParameter(name='delay', value=0, format='int') | |
80 |
|
80 | |||
81 |
|
81 | |||
82 | # print "Escribiendo el archivo XML" |
|
82 | # print "Escribiendo el archivo XML" | |
83 | # controllerObj.writeXml(filename) |
|
83 | # controllerObj.writeXml(filename) | |
84 | # print "Leyendo el archivo XML" |
|
84 | # print "Leyendo el archivo XML" | |
85 | # controllerObj.readXml(filename) |
|
85 | # controllerObj.readXml(filename) | |
86 |
|
86 | |||
87 |
|
87 | |||
88 | # timeit.timeit('controllerObj.run()', number=2) |
|
88 | # timeit.timeit('controllerObj.run()', number=2) | |
89 |
|
89 | |||
90 | controllerObj.start() |
|
90 | controllerObj.start() | |
91 |
|
91 | |||
92 |
|
92 | |||
93 | if __name__ == '__main__': |
|
93 | if __name__ == '__main__': | |
94 | parser = argparse.ArgumentParser(description='Set number of parallel processes') |
|
94 | parser = argparse.ArgumentParser(description='Set number of parallel processes') | |
95 | parser.add_argument('--nProcess', default=1, type=int) |
|
95 | parser.add_argument('--nProcess', default=1, type=int) | |
96 | args = parser.parse_args() |
|
96 | args = parser.parse_args() | |
97 | multiSchain(fiber, nProcess=args.nProcess, startDate='2017/01/26', endDate='2017/01/26') |
|
97 | multiSchain(fiber, nProcess=args.nProcess, startDate='2017/01/26', endDate='2017/01/26') |
@@ -1,113 +1,113 | |||||
1 | import h5py |
|
1 | import h5py | |
2 | import numpy |
|
2 | import numpy | |
3 | import matplotlib.pyplot as plt |
|
3 | import matplotlib.pyplot as plt | |
4 | import glob |
|
4 | import glob | |
5 | import os |
|
5 | import os | |
6 |
|
6 | |||
7 | #---------------------- Functions --------------------- |
|
7 | #---------------------- Functions --------------------- | |
8 |
|
8 | |||
9 | def findFiles(path): |
|
9 | def findFiles(path): | |
10 |
|
10 | |||
11 | dirList = [] |
|
11 | dirList = [] | |
12 | fileList = [] |
|
12 | fileList = [] | |
13 |
|
13 | |||
14 | for thisPath in os.listdir(path): |
|
14 | for thisPath in os.listdir(path): | |
15 | dirList.append(os.path.join(path,thisPath)) |
|
15 | dirList.append(os.path.join(path,thisPath)) | |
16 | dirList.sort() |
|
16 | dirList.sort() | |
17 |
|
17 | |||
18 | for thisDirectory in dirList: |
|
18 | for thisDirectory in dirList: | |
19 | files = glob.glob1(thisDirectory, "*.hdf5") |
|
19 | files = glob.glob1(thisDirectory, "*.hdf5") | |
20 | files.sort() |
|
20 | files.sort() | |
21 | for thisFile in files: |
|
21 | for thisFile in files: | |
22 | fileList.append(os.path.join(thisDirectory,thisFile)) |
|
22 | fileList.append(os.path.join(thisDirectory,thisFile)) | |
23 |
|
23 | |||
24 | return fileList |
|
24 | return fileList | |
25 |
|
25 | |||
26 | def readFiles(fileList): |
|
26 | def readFiles(fileList): | |
27 |
|
27 | |||
28 | meteors_array = numpy.zeros((1,4)) |
|
28 | meteors_array = numpy.zeros((1,4)) | |
29 |
|
29 | |||
30 | for thisFile in fileList: |
|
30 | for thisFile in fileList: | |
31 |
|
31 | |||
32 | #Leer |
|
32 | #Leer | |
33 | f1 = h5py.File(thisFile,'r') |
|
33 | f1 = h5py.File(thisFile,'r') | |
34 | grp1 = f1['Data'] |
|
34 | grp1 = f1['Data'] | |
35 | grp2 = grp1['data_output'] |
|
35 | grp2 = grp1['data_output'] | |
36 | meteors1 = grp2['table0'][:] |
|
36 | meteors1 = grp2['table0'][:] | |
37 | meteors_array = numpy.vstack((meteors_array,meteors1)) |
|
37 | meteors_array = numpy.vstack((meteors_array,meteors1)) | |
38 | #cerrar |
|
38 | #cerrar | |
39 | f1.close() |
|
39 | f1.close() | |
40 |
|
40 | |||
41 | meteors_array = numpy.delete(meteors_array, 0, axis=0) |
|
41 | meteors_array = numpy.delete(meteors_array, 0, axis=0) | |
42 | meteors_list = [meteors_array[:,0],meteors_array[:,1],meteors_array[:,2],meteors_array[:,3]] |
|
42 | meteors_list = [meteors_array[:,0],meteors_array[:,1],meteors_array[:,2],meteors_array[:,3]] | |
43 | return meteors_list |
|
43 | return meteors_list | |
44 |
|
44 | |||
45 | def estimateMean(offset_list): |
|
45 | def estimateMean(offset_list): | |
46 |
|
46 | |||
47 | mean_off = [] |
|
47 | mean_off = [] | |
48 | axisY_off = [] |
|
48 | axisY_off = [] | |
49 | axisX_off = [] |
|
49 | axisX_off = [] | |
50 |
|
50 | |||
51 | for thisOffset in offset_list: |
|
51 | for thisOffset in offset_list: | |
52 | mean_aux = numpy.mean(thisOffset, axis = 0) |
|
52 | mean_aux = numpy.mean(thisOffset, axis = 0) | |
53 | mean_off.append(mean_aux) |
|
53 | mean_off.append(mean_aux) | |
54 | axisX_off.append(numpy.array([0,numpy.size(thisOffset)])) |
|
54 | axisX_off.append(numpy.array([0,numpy.size(thisOffset)])) | |
55 | axisY_off.append(numpy.array([mean_aux,mean_aux])) |
|
55 | axisY_off.append(numpy.array([mean_aux,mean_aux])) | |
56 |
|
56 | |||
57 | return mean_off, axisY_off, axisX_off |
|
57 | return mean_off, axisY_off, axisX_off | |
58 |
|
58 | |||
59 | def plotPhases(offset0, axisY0, axisX0, title): |
|
59 | def plotPhases(offset0, axisY0, axisX0, title): | |
60 | f, axarr = plt.subplots(4, sharey=True) |
|
60 | f, axarr = plt.subplots(4, sharey=True) | |
61 | color = ['b','g','r','c'] |
|
61 | color = ['b','g','r','c'] | |
62 | # plt.grid() |
|
62 | # plt.grid() | |
63 | for i in range(len(offset0)): |
|
63 | for i in range(len(offset0)): | |
64 | thisMeteor = offset0[i] |
|
64 | thisMeteor = offset0[i] | |
65 | thisY = axisY0[i] |
|
65 | thisY = axisY0[i] | |
66 | thisX = axisX0[i] |
|
66 | thisX = axisX0[i] | |
67 | thisColor = color[i] |
|
67 | thisColor = color[i] | |
68 |
|
68 | |||
69 | opt = thisColor + 'o' |
|
69 | opt = thisColor + 'o' | |
70 | axarr[i].plot(thisMeteor,opt) |
|
70 | axarr[i].plot(thisMeteor,opt) | |
71 | axarr[i].plot(thisX, thisY, thisColor) |
|
71 | axarr[i].plot(thisX, thisY, thisColor) | |
72 | axarr[i].set_ylabel('Offset ' + str(i)) |
|
72 | axarr[i].set_ylabel('Offset ' + str(i)) | |
73 |
|
73 | |||
74 | plt.ylim((-180,180)) |
|
74 | plt.ylim((-180,180)) | |
75 | axarr[0].set_title(title + ' Offsets') |
|
75 | axarr[0].set_title(title + ' Offsets') | |
76 | axarr[3].set_xlabel('Number of estimations') |
|
76 | axarr[3].set_xlabel('Number of estimations') | |
77 |
|
77 | |||
78 | return |
|
78 | return | |
79 |
|
79 | |||
80 | def filterOffsets(offsets0, stdvLimit): |
|
80 | def filterOffsets(offsets0, stdvLimit): | |
81 | offsets1 = [] |
|
81 | offsets1 = [] | |
82 |
|
82 | |||
83 | for thisOffset in offsets0: |
|
83 | for thisOffset in offsets0: | |
84 | pstd = numpy.std(thisOffset)*stdvLimit |
|
84 | pstd = numpy.std(thisOffset)*stdvLimit | |
85 | pmean = numpy.mean(thisOffset) |
|
85 | pmean = numpy.mean(thisOffset) | |
86 | outlier1 = thisOffset > pmean - pstd |
|
86 | outlier1 = thisOffset > pmean - pstd | |
87 | outlier2 = thisOffset < pmean + pstd |
|
87 | outlier2 = thisOffset < pmean + pstd | |
88 | not_outlier = numpy.logical_and(outlier1,outlier2) |
|
88 | not_outlier = numpy.logical_and(outlier1,outlier2) | |
89 | thisOffset1 = thisOffset[not_outlier] |
|
89 | thisOffset1 = thisOffset[not_outlier] | |
90 | offsets1.append(thisOffset1) |
|
90 | offsets1.append(thisOffset1) | |
91 |
|
91 | |||
92 | return offsets1 |
|
92 | return offsets1 | |
93 |
|
93 | |||
94 | #---------------------- Setup --------------------------- |
|
94 | #---------------------- Setup --------------------------- | |
95 |
|
95 | |||
96 |
path = '/home/ |
|
96 | path = '/home/nanosat/Pictures/JASMET30_mp/201608/phase' | |
97 | stdvLimit = 0.5 |
|
97 | stdvLimit = 0.5 | |
98 |
|
98 | |||
99 | #---------------------- Script --------------------------- |
|
99 | #---------------------- Script --------------------------- | |
100 |
|
100 | |||
101 | fileList = findFiles(path) |
|
101 | fileList = findFiles(path) | |
102 | offsets0 = readFiles(fileList) |
|
102 | offsets0 = readFiles(fileList) | |
103 | mean0, axisY0, axisX0 = estimateMean(offsets0) |
|
103 | mean0, axisY0, axisX0 = estimateMean(offsets0) | |
104 | plotPhases(offsets0, axisY0, axisX0, 'Original') |
|
104 | plotPhases(offsets0, axisY0, axisX0, 'Original') | |
105 |
|
105 | |||
106 | offsets1 = filterOffsets(offsets0, stdvLimit) |
|
106 | offsets1 = filterOffsets(offsets0, stdvLimit) | |
107 | mean1, axisY1, axisX1 = estimateMean(offsets1) |
|
107 | mean1, axisY1, axisX1 = estimateMean(offsets1) | |
108 | plotPhases(offsets1, axisY1, axisX1, 'Filtered') |
|
108 | plotPhases(offsets1, axisY1, axisX1, 'Filtered') | |
109 |
|
109 | |||
110 | print "Original Offsets: %.2f, %.2f, %.2f, %.2f" % (mean0[0],mean0[1],mean0[2],mean0[3]) |
|
110 | print "Original Offsets: %.2f, %.2f, %.2f, %.2f" % (mean0[0],mean0[1],mean0[2],mean0[3]) | |
111 | print "Filtered Offsets: %.2f, %.2f, %.2f, %.2f" % (mean1[0],mean1[1],mean1[2],mean1[3]) |
|
111 | print "Filtered Offsets: %.2f, %.2f, %.2f, %.2f" % (mean1[0],mean1[1],mean1[2],mean1[3]) | |
112 |
|
112 | |||
113 | plt.show() |
|
113 | plt.show() |
@@ -1,1 +1,1 | |||||
1 | <Project description="test" id="191" name="john"><ReadUnit datatype="VoltageReader" id="1911" inputId="0" name="VoltageReader"><Operation id="19111" name="run" priority="1" type="self"><Parameter format="str" id="191111" name="server" value="tcp://10.10.10.121:5555" /></Operation></ReadUnit><ProcUnit datatype="VoltageProc" id="1912" inputId="1911" name="VoltageProc"><Operation id="19121" name="run" priority="1" type="self" /></ProcUnit></Project> No newline at end of file |
|
1 | <Project description="JASMET Wind Estimation" id="005" name="script05"><ReadUnit datatype="ParamReader" id="51" inputId="0" name="ParamReader"><Operation id="511" name="run" priority="1" type="self"><Parameter format="str" id="5111" name="datatype" value="ParamReader" /><Parameter format="str" id="5112" name="path" value="/home/nanosat/Pictures/JASMET30_mp/201608/meteor" /><Parameter format="date" id="5113" name="startDate" value="2016/08/29" /><Parameter format="date" id="5114" name="endDate" value="2016/09/11" /><Parameter format="time" id="5115" name="startTime" value="00:00:00" /><Parameter format="time" id="5116" name="endTime" value="23:59:59" /><Parameter format="int" id="5118" name="walk" value="1" /></Operation></ReadUnit><ProcUnit datatype="ParametersProc" id="52" inputId="51" name="ParametersProc"><Operation id="521" name="run" priority="1" type="self" /><Operation id="522" name="CorrectSMPhases" priority="2" type="other"><Parameter format="floatlist" id="5221" name="phaseOffsets" value="-5.86, -0.93, -7.29, 23.35" /></Operation><Operation id="523" name="SkyMapPlot" priority="3" type="other"><Parameter format="int" id="5231" name="id" value="1" /><Parameter format="str" id="5232" name="wintitle" value="Sky Map" /><Parameter format="bool" id="5233" name="save" value="1" /><Parameter format="str" id="5234" name="figpath" value="/home/nanosat/Pictures/JASMET30_mp/201608/graphics" /><Parameter format="int" id="5235" name="ftp" value="1" /><Parameter format="int" id="5236" name="exp_code" value="15" /><Parameter format="int" id="5237" name="sub_exp_code" value="1" /><Parameter format="int" id="5238" name="tmin" value="0" /><Parameter format="int" id="5239" name="tmax" value="24" /></Operation><Operation id="524" name="WindProfiler" priority="4" type="other"><Parameter format="str" id="5241" name="technique" value="Meteors" /><Parameter format="float" id="5242" name="nHours" value="1" /><Parameter format="float" id="5243" name="hmin" value="70" /><Parameter format="float" id="5244" name="hmax" value="120" /></Operation><Operation id="525" name="WindProfilerPlot" priority="5" type="other"><Parameter format="int" id="5251" name="id" value="2" /><Parameter format="str" id="5252" name="wintitle" value="Wind Profiler" /><Parameter format="bool" id="5253" name="save" value="1" /><Parameter format="str" id="5254" name="figpath" value="/home/nanosat/Pictures/JASMET30_mp/201608/graphics" /><Parameter format="int" id="5255" name="zmin" value="-140" /><Parameter format="int" id="5256" name="zmax" value="140" /><Parameter format="float" id="5257" name="xmin" value="0" /><Parameter format="float" id="5258" name="xmax" value="24" /><Parameter format="float" id="5259" name="ymin" value="70" /><Parameter format="float" id="5260" name="ymax" value="110" /></Operation><Operation id="526" name="ParamWriter" priority="6" type="other"><Parameter format="str" id="5261" name="path" value="/home/nanosat/Pictures/JASMET30_mp/201608/phase" /><Parameter format="int" id="5262" name="blocksPerFile" value="1000" /><Parameter format="list" id="5263" name="metadataList" value="type,outputInterval,timeZone" /><Parameter format="list" id="5264" name="dataList" value="data_output,utctime" /></Operation></ProcUnit></Project> No newline at end of file |
General Comments 0
You need to be logged in to leave comments.
Login now