@@ -116,7 +116,7 class AMISRReader(ProcessingUnit): | |||||
116 |
|
116 | |||
117 | if not(self.filenameList): |
|
117 | if not(self.filenameList): | |
118 | print("There is no files into the folder: %s"%(path)) |
|
118 | print("There is no files into the folder: %s"%(path)) | |
119 |
sys.exit( |
|
119 | sys.exit() | |
120 |
|
120 | |||
121 | self.fileIndex = 0 |
|
121 | self.fileIndex = 0 | |
122 |
|
122 | |||
@@ -294,11 +294,10 class AMISRReader(ProcessingUnit): | |||||
294 | if self.timezone == 'lt': |
|
294 | if self.timezone == 'lt': | |
295 | startDateTime_File = startDateTime_File - datetime.timedelta(minutes = 300) |
|
295 | startDateTime_File = startDateTime_File - datetime.timedelta(minutes = 300) | |
296 | endDateTime_File = endDateTime_File - datetime.timedelta(minutes = 300) |
|
296 | endDateTime_File = endDateTime_File - datetime.timedelta(minutes = 300) | |
297 | if (endDateTime_File>=startDateTime_Reader and endDateTime_File<endDateTime_Reader): |
|
297 | if (endDateTime_File>=startDateTime_Reader and endDateTime_File<=endDateTime_Reader): | |
298 | #self.filenameList.remove(filename) |
|
|||
299 | filter_filenameList.append(filename) |
|
298 | filter_filenameList.append(filename) | |
300 |
|
299 | |||
301 |
if (endDateTime_File> |
|
300 | if (endDateTime_File>endDateTime_Reader): | |
302 | break |
|
301 | break | |
303 |
|
302 | |||
304 |
|
303 | |||
@@ -346,7 +345,7 class AMISRReader(ProcessingUnit): | |||||
346 |
|
345 | |||
347 | else: |
|
346 | else: | |
348 | #get the last file - 1 |
|
347 | #get the last file - 1 | |
349 |
self.filenameList = [self.filenameList[- |
|
348 | self.filenameList = [self.filenameList[-1]] | |
350 | new_dirnameList = [] |
|
349 | new_dirnameList = [] | |
351 | for dirname in self.dirnameList: |
|
350 | for dirname in self.dirnameList: | |
352 | junk = numpy.array([dirname in x for x in self.filenameList]) |
|
351 | junk = numpy.array([dirname in x for x in self.filenameList]) | |
@@ -420,7 +419,7 class AMISRReader(ProcessingUnit): | |||||
420 | self.__selectDataForTimes(online=True) |
|
419 | self.__selectDataForTimes(online=True) | |
421 | filename = self.filenameList[0] |
|
420 | filename = self.filenameList[0] | |
422 | wait = 0 |
|
421 | wait = 0 | |
423 |
|
|
422 | self.__waitForNewFile=180 ## DEBUG: | |
424 | while self.__filename_online == filename: |
|
423 | while self.__filename_online == filename: | |
425 | print('waiting %d seconds to get a new file...'%(self.__waitForNewFile)) |
|
424 | print('waiting %d seconds to get a new file...'%(self.__waitForNewFile)) | |
426 | if wait == 5: |
|
425 | if wait == 5: |
@@ -2,24 +2,23 | |||||
2 | #source ~/virtuals/virtual_schain3x/bin/activate |
|
2 | #source ~/virtuals/virtual_schain3x/bin/activate | |
3 | echo "Amisr EEJ Online simulation" |
|
3 | echo "Amisr EEJ Online simulation" | |
4 |
|
4 | |||
5 |
PATH_IN=/ |
|
5 | PATH_IN=/media/soporte/DATA/dataAMISR/20210717.001/ | |
6 |
PATH_OUT=/home/soporte/ |
|
6 | PATH_OUT=/home/soporte/Data/OutTest/ONLINE/20210717.001/ | |
7 | count=0 |
|
7 | count=0 | |
8 | for f in $PATH_IN* |
|
8 | for f in $PATH_IN* | |
9 | do |
|
9 | do | |
10 | if [ ${f: -3} == ".h5" ] |
|
10 | if [ ${f: -3} == ".h5" ] | |
11 | then |
|
11 | then | |
12 | echo "coping $f" |
|
12 | echo "copying $f" | |
13 | cp ${f} $PATH_OUT |
|
13 | cp ${f} $PATH_OUT | |
14 | sleep 5m #it takes about 5 minutes to generate new data in AMISR radar |
|
14 | echo "waiting new file..." | |
|
15 | sleep 1m #it takes about 5 minutes to generate new data in AMISR radar | |||
15 | fi |
|
16 | fi | |
16 | ((count=count+1)) |
|
17 | ((count=count+1)) | |
17 |
|
18 | |||
18 |
if [ $count -eq |
|
19 | if [ $count -eq 10 ] #only transfer 20 files | |
19 | then |
|
20 | then | |
20 | echo " finish simulation" |
|
21 | echo " finish simulation" | |
21 | break |
|
22 | break | |
22 | fi |
|
23 | fi | |
23 | done |
|
24 | done | |
24 |
|
||||
25 |
|
@@ -2,24 +2,23 | |||||
2 |
|
2 | |||
3 | echo "Amisr ESF Online simulation" |
|
3 | echo "Amisr ESF Online simulation" | |
4 |
|
4 | |||
5 |
PATH_IN=/ |
|
5 | PATH_IN=/media/soporte/DATA/dataAMISR/20210716.003/ | |
6 |
PATH_OUT=/home/soporte/ |
|
6 | PATH_OUT=/home/soporte/Data/OutTest/ONLINE/20210716.003/ | |
7 | count=0 |
|
7 | count=0 | |
8 | for f in $PATH_IN* |
|
8 | for f in $PATH_IN* | |
9 | do |
|
9 | do | |
10 | if [ ${f: -3} == ".h5" ] |
|
10 | if [ ${f: -3} == ".h5" ] | |
11 | then |
|
11 | then | |
12 | echo "coping $f" |
|
12 | echo "copying $f" | |
13 | cp ${f} $PATH_OUT |
|
13 | cp ${f} $PATH_OUT | |
14 | sleep 5m #it takes about 5 minutes to generate new data in AMISR radar |
|
14 | echo "waiting new file..." | |
|
15 | sleep 3m #it takes about 5 minutes to generate new data in AMISR radar | |||
15 | fi |
|
16 | fi | |
16 | ((count=count+1)) |
|
17 | ((count=count+1)) | |
17 |
|
18 | |||
18 |
if [ $count -eq |
|
19 | if [ $count -eq 10 ] #only transfer 20 files | |
19 | then |
|
20 | then | |
20 | echo " finish simulation" |
|
21 | echo " finish simulation" | |
21 | break |
|
22 | break | |
22 | fi |
|
23 | fi | |
23 | done |
|
24 | done | |
24 |
|
||||
25 |
|
@@ -17,8 +17,7 def main(): | |||||
17 | xmin = '07' |
|
17 | xmin = '07' | |
18 | xmax = '18' |
|
18 | xmax = '18' | |
19 | xrange = int(xmax)-int(xmin) |
|
19 | xrange = int(xmax)-int(xmin) | |
20 | ymin = '0' |
|
20 | ||
21 | ymax = '300' |
|
|||
22 | dbmin = '45' #'60'#'55' #'40' #noise esf eej |
|
21 | dbmin = '45' #'60'#'55' #'40' #noise esf eej | |
23 | dbmax = '65' #'70' #'55' |
|
22 | dbmax = '65' #'70' #'55' | |
24 | showSPC = '0' #view plot Spectra |
|
23 | showSPC = '0' #view plot Spectra | |
@@ -32,11 +31,11 def main(): | |||||
32 | today = time.strftime("%Y/%m/%d") |
|
31 | today = time.strftime("%Y/%m/%d") | |
33 | startDate=today |
|
32 | startDate=today | |
34 | endDate=today |
|
33 | endDate=today | |
35 |
#startDate='2021/07/1 |
|
34 | #startDate='2021/07/17' | |
36 |
#endDate='2021/07/1 |
|
35 | #endDate='2021/07/17' | |
37 | #inPath= '/home/soporte/dataAMISR_test/' |
|
36 | #inPath= '/home/soporte/dataAMISR_test/' | |
38 | inPath= '/home/soporte/dataAMISR/' |
|
37 | inPath= '/home/soporte/dataAMISR/' | |
39 | inPath= '/media/soporte/UARS_4T_D02/AMISR_DATA/2021/' |
|
38 | #inPath= '/media/soporte/UARS_4T_D02/AMISR_DATA/2021/' | |
40 | #inPath = '/home/soporte/' |
|
39 | #inPath = '/home/soporte/' | |
41 | outPath = '/home/soporte/Data/EEJ' |
|
40 | outPath = '/home/soporte/Data/EEJ' | |
42 |
|
41 | |||
@@ -64,8 +63,8 def main(): | |||||
64 | path=inPath, |
|
63 | path=inPath, | |
65 | startDate=startDate,#startDate, #'2014/10/07', |
|
64 | startDate=startDate,#startDate, #'2014/10/07', | |
66 | endDate=endDate, #endDate '2014/10/07', |
|
65 | endDate=endDate, #endDate '2014/10/07', | |
67 |
startTime='07:00: |
|
66 | startTime='07:00:30',#'07:00:00', | |
68 |
endTime='18:00: |
|
67 | endTime='18:00:10',#'15:00:00', | |
69 | walk=1, |
|
68 | walk=1, | |
70 | code = code, |
|
69 | code = code, | |
71 | nCode = nCode, |
|
70 | nCode = nCode, | |
@@ -107,7 +106,7 def main(): | |||||
107 | opObj11.addParameter(name='n', value='150', format='int') #300? |
|
106 | opObj11.addParameter(name='n', value='150', format='int') #300? | |
108 |
|
107 | |||
109 | ## Remove DC signal |
|
108 | ## Remove DC signal | |
110 | opObj11 = procUnitConfObj1.addOperation(name='removeDC') |
|
109 | ##opObj11 = procUnitConfObj1.addOperation(name='removeDC') | |
111 | ##....................................................................................... |
|
110 | ##....................................................................................... | |
112 | ##....................................................................................... |
|
111 | ##....................................................................................... | |
113 |
|
112 | |||
@@ -120,7 +119,6 def main(): | |||||
120 | opObj12 = procUnitConfObj1.addOperation(name='SpectraPlot', optype='external') |
|
119 | opObj12 = procUnitConfObj1.addOperation(name='SpectraPlot', optype='external') | |
121 | opObj12.addParameter(name='id', value='21', format='int') |
|
120 | opObj12.addParameter(name='id', value='21', format='int') | |
122 | opObj12.addParameter(name= 'xaxis', value='velocity') |
|
121 | opObj12.addParameter(name= 'xaxis', value='velocity') | |
123 | opObj12.addParameter(name='ymax', value=ymax, format='int') |
|
|||
124 | opObj12.addParameter(name='showprofile', value='1', format='int') |
|
122 | opObj12.addParameter(name='showprofile', value='1', format='int') | |
125 | opObj12.addParameter(name='wintitle', value='AMISR Beam 0', format='str') |
|
123 | opObj12.addParameter(name='wintitle', value='AMISR Beam 0', format='str') | |
126 | opObj12.addParameter(name='zmin', value=dbmin, format='int') |
|
124 | opObj12.addParameter(name='zmin', value=dbmin, format='int') |
@@ -20,9 +20,9 def main(): | |||||
20 |
|
20 | |||
21 | dbmin = '45' #'60'#'55' #'40' #noise esf eej |
|
21 | dbmin = '45' #'60'#'55' #'40' #noise esf eej | |
22 | dbmax = '65' #'70' #'55' |
|
22 | dbmax = '65' #'70' #'55' | |
23 |
showSPC = ' |
|
23 | showSPC = '0' #view plot Spectra | |
24 |
showRTI = ' |
|
24 | showRTI = '0' #view plot RTI | |
25 |
showNOISE = ' |
|
25 | showNOISE = '0' #view plot NOISE | |
26 | localtime='1' #para ajustar el horario en las gráficas '0' para dejar en utc |
|
26 | localtime='1' #para ajustar el horario en las gráficas '0' para dejar en utc | |
27 | code = '1,-1,-1,-1,1,1,1,1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,1,-1,1,1,-1,1' |
|
27 | code = '1,-1,-1,-1,1,1,1,1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,1,-1,1,1,-1,1' | |
28 | nCode = '1' |
|
28 | nCode = '1' | |
@@ -32,9 +32,9 def main(): | |||||
32 | today = str0.strftime("%Y/%m/%d") |
|
32 | today = str0.strftime("%Y/%m/%d") | |
33 | startDate=today |
|
33 | startDate=today | |
34 | endDate=today |
|
34 | endDate=today | |
35 |
#startDate='20 |
|
35 | #startDate='2021/07/17' | |
36 |
#endDate='20 |
|
36 | #endDate='2021/07/17' | |
37 |
#inPath= '/home/soporte/ |
|
37 | #inPath= '/home/soporte/Data/OutTest/ONLINE/' | |
38 | #inPath= '/home/soporte/dataAMISR/' |
|
38 | #inPath= '/home/soporte/dataAMISR/' | |
39 | inPath = '/mnt/data_amisr' |
|
39 | inPath = '/mnt/data_amisr' | |
40 | outPath = '/home/soporte/Data/EEJ' |
|
40 | outPath = '/home/soporte/Data/EEJ' | |
@@ -61,7 +61,7 def main(): | |||||
61 | path=inPath, |
|
61 | path=inPath, | |
62 | startDate=startDate, |
|
62 | startDate=startDate, | |
63 | endDate=endDate, |
|
63 | endDate=endDate, | |
64 |
startTime='07:01: |
|
64 | startTime='07:01:00',#'07:00:00', | |
65 | endTime='17:55:00',#'15:00:00', |
|
65 | endTime='17:55:00',#'15:00:00', | |
66 | walk=0, |
|
66 | walk=0, | |
67 | code = code, |
|
67 | code = code, | |
@@ -106,7 +106,6 def main(): | |||||
106 | opObj12 = procUnitConfObj1.addOperation(name='SpectraPlot', optype='external') |
|
106 | opObj12 = procUnitConfObj1.addOperation(name='SpectraPlot', optype='external') | |
107 | opObj12.addParameter(name='id', value='21', format='int') |
|
107 | opObj12.addParameter(name='id', value='21', format='int') | |
108 | opObj12.addParameter(name= 'xaxis', value='velocity') |
|
108 | opObj12.addParameter(name= 'xaxis', value='velocity') | |
109 | opObj12.addParameter(name='ymax', value=ymax, format='int') |
|
|||
110 | opObj12.addParameter(name='showprofile', value='1', format='int') |
|
109 | opObj12.addParameter(name='showprofile', value='1', format='int') | |
111 | opObj12.addParameter(name='wintitle', value='AMISR Beam 0', format='str') |
|
110 | opObj12.addParameter(name='wintitle', value='AMISR Beam 0', format='str') | |
112 | opObj12.addParameter(name='zmin', value=dbmin, format='int') |
|
111 | opObj12.addParameter(name='zmin', value=dbmin, format='int') | |
@@ -115,7 +114,10 def main(): | |||||
115 | opObj12.addParameter(name='colormap', value='jet', format='str') |
|
114 | opObj12.addParameter(name='colormap', value='jet', format='str') | |
116 | opObj12.addParameter(name='localtime', value=localtime,format='int') |
|
115 | opObj12.addParameter(name='localtime', value=localtime,format='int') | |
117 | opObj12.addParameter(name='show', value = showSPC, format='int') |
|
116 | opObj12.addParameter(name='show', value = showSPC, format='int') | |
118 |
|
117 | opObj12.addParameter(name='exp_code', value='206', format='int') | ||
|
118 | opObj12.addParameter(name='server', value='jro-realtime.igp.gob.pe:4444') | |||
|
119 | opObj12.addParameter(name='sender_period', value='120') | |||
|
120 | opObj12.addParameter(name='tag', value='AMISR') | |||
119 |
|
121 | |||
120 | opObj14 = procUnitConfObj1.addOperation(name='NoisePlot', optype='external') |
|
122 | opObj14 = procUnitConfObj1.addOperation(name='NoisePlot', optype='external') | |
121 | opObj14.addParameter(name='id', value='3', format='int') |
|
123 | opObj14.addParameter(name='id', value='3', format='int') | |
@@ -128,7 +130,10 def main(): | |||||
128 | opObj14.addParameter(name='save', value=outPath+'/plots', format='str') |
|
130 | opObj14.addParameter(name='save', value=outPath+'/plots', format='str') | |
129 | opObj14.addParameter(name='localtime', value=localtime,format='int') |
|
131 | opObj14.addParameter(name='localtime', value=localtime,format='int') | |
130 | opObj14.addParameter(name='show', value = showNOISE, format='int') |
|
132 | opObj14.addParameter(name='show', value = showNOISE, format='int') | |
131 |
|
133 | opObj14.addParameter(name='exp_code', value='206', format='int') | ||
|
134 | opObj14.addParameter(name='server', value='jro-realtime.igp.gob.pe:4444') | |||
|
135 | opObj14.addParameter(name='sender_period', value='120') | |||
|
136 | opObj14.addParameter(name='tag', value='AMISR') | |||
132 |
|
137 | |||
133 | opObj15 = procUnitConfObj1.addOperation(name='RTIPlot', optype='external') |
|
138 | opObj15 = procUnitConfObj1.addOperation(name='RTIPlot', optype='external') | |
134 | opObj15.addParameter(name='id', value='2', format='int') |
|
139 | opObj15.addParameter(name='id', value='2', format='int') | |
@@ -142,7 +147,10 def main(): | |||||
142 | opObj15.addParameter(name='save', value=outPath+'/plots', format='str') |
|
147 | opObj15.addParameter(name='save', value=outPath+'/plots', format='str') | |
143 | opObj15.addParameter(name='colormap', value='jet', format='str') |
|
148 | opObj15.addParameter(name='colormap', value='jet', format='str') | |
144 | opObj15.addParameter(name='show', value = showRTI, format='int') |
|
149 | opObj15.addParameter(name='show', value = showRTI, format='int') | |
145 |
|
150 | opObj15.addParameter(name='exp_code', value='206', format='int') | ||
|
151 | opObj15.addParameter(name='server', value='jro-realtime.igp.gob.pe:4444') | |||
|
152 | opObj15.addParameter(name='sender_period', value='120') | |||
|
153 | opObj15.addParameter(name='tag', value='AMISR') | |||
146 |
|
154 | |||
147 |
|
155 | |||
148 | ##....................................................................................... |
|
156 | ##....................................................................................... |
@@ -1,4 +1,4 | |||||
1 | #!/usr/bin/env python |
|
1 | ||
2 | import os, sys |
|
2 | import os, sys | |
3 | import time |
|
3 | import time | |
4 | import datetime |
|
4 | import datetime | |
@@ -32,9 +32,9 def main(): | |||||
32 | xrange = int(xmax)-int(xmin) |
|
32 | xrange = int(xmax)-int(xmin) | |
33 | dbmin = '60' #'60'#'55' #'40' #noise esf eej |
|
33 | dbmin = '60' #'60'#'55' #'40' #noise esf eej | |
34 | dbmax = '75' #'70' #'55' |
|
34 | dbmax = '75' #'70' #'55' | |
35 |
showSPC = ' |
|
35 | showSPC = '0' #view plot Spectra | |
36 | showRTI = '0' #view plot RTI |
|
36 | showRTI = '0' #view plot RTI | |
37 |
showNOISE = ' |
|
37 | showNOISE = '0' #view plot NOISE | |
38 | # # code = '1,1,-1,1,1,-1,1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,1,1,1,1,-1,-1,-1' |
|
38 | # # code = '1,1,-1,1,1,-1,1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,1,1,1,1,-1,-1,-1' | |
39 | # # code = '1,1,0,1,1,0,1,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,1,1,1,0,0,0' |
|
39 | # # code = '1,1,0,1,1,0,1,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,1,1,1,0,0,0' | |
40 | code = '1,-1,-1,-1,1,1,1,1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,1,-1,1,1,-1,1' |
|
40 | code = '1,-1,-1,-1,1,1,1,1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,1,-1,1,1,-1,1' | |
@@ -53,8 +53,8 def main(): | |||||
53 | startDate=yesterday |
|
53 | startDate=yesterday | |
54 | endDate=today |
|
54 | endDate=today | |
55 |
|
55 | |||
56 |
startDate='20 |
|
56 | #startDate='2021/07/16' | |
57 |
endDate='20 |
|
57 | #endDate='2021/07/17' | |
58 | ##....................................................................................... |
|
58 | ##....................................................................................... | |
59 | ##....................................................................................... |
|
59 | ##....................................................................................... | |
60 | l = startDate.split('/') #adding day of the year to outPath |
|
60 | l = startDate.split('/') #adding day of the year to outPath | |
@@ -78,8 +78,8 def main(): | |||||
78 | path=inPath, |
|
78 | path=inPath, | |
79 | startDate=startDate,#startDate,#'2016/07/12', |
|
79 | startDate=startDate,#startDate,#'2016/07/12', | |
80 | endDate=endDate,#endDate,#'2016/07/13', |
|
80 | endDate=endDate,#endDate,#'2016/07/13', | |
81 |
startTime=' |
|
81 | startTime='18:00:10',#'07:00:00', | |
82 |
endTime='07:00: |
|
82 | endTime='07:00:10',#'15:00:00', | |
83 | walk=0, |
|
83 | walk=0, | |
84 | code = code, |
|
84 | code = code, | |
85 | nCode = nCode, |
|
85 | nCode = nCode, | |
@@ -96,7 +96,7 def main(): | |||||
96 | opObj10 = procUnitConfObjBeam0.addOperation(name='setAttribute') |
|
96 | opObj10 = procUnitConfObjBeam0.addOperation(name='setAttribute') | |
97 | opObj10.addParameter(name='frequency', value='445.09e6') |
|
97 | opObj10.addParameter(name='frequency', value='445.09e6') | |
98 |
|
98 | |||
99 | ''' |
|
99 | ||
100 | #Noise--> no code |
|
100 | #Noise--> no code | |
101 |
|
101 | |||
102 | opObj11 = procUnitConfObjBeam0.addOperation(name='Decoder', optype='other') |
|
102 | opObj11 = procUnitConfObjBeam0.addOperation(name='Decoder', optype='other') | |
@@ -122,7 +122,7 def main(): | |||||
122 | procUnitConfObjSpectraBeam0.addParameter(name='nFFTPoints', value=16, format='int') |
|
122 | procUnitConfObjSpectraBeam0.addParameter(name='nFFTPoints', value=16, format='int') | |
123 | # |
|
123 | # | |
124 | opObj11 = procUnitConfObjSpectraBeam0.addOperation(name='IncohInt', optype='other') |
|
124 | opObj11 = procUnitConfObjSpectraBeam0.addOperation(name='IncohInt', optype='other') | |
125 |
opObj11.addParameter(name='n', value=' |
|
125 | opObj11.addParameter(name='n', value='60', format='int') | |
126 | #opObj11.addParameter(name='timeInterval', value='30', format='int') |
|
126 | #opObj11.addParameter(name='timeInterval', value='30', format='int') | |
127 | # |
|
127 | # | |
128 | # |
|
128 | # | |
@@ -130,11 +130,11 def main(): | |||||
130 | #opObj11 = procUnitConfObjSpectraBeam0.addOperation(name='removeDC') |
|
130 | #opObj11 = procUnitConfObjSpectraBeam0.addOperation(name='removeDC') | |
131 | # |
|
131 | # | |
132 | # ##Noise Estimation #so reconoce nueva version |
|
132 | # ##Noise Estimation #so reconoce nueva version | |
133 | # opObj11 = procUnitConfObjSpectraBeam0.addOperation(name='getNoise', optype='self') |
|
133 | ## opObj11 = procUnitConfObjSpectraBeam0.addOperation(name='getNoise', optype='self') | |
134 | # opObj11.addParameter(name='minHei', value='100', format='int') |
|
134 | ## opObj11.addParameter(name='minHei', value='100', format='int') | |
135 | # opObj11.addParameter(name='maxHei', value='280', format='int') |
|
135 | ## opObj11.addParameter(name='maxHei', value='280', format='int') | |
136 | # #opObj11.addParameter(name='minHei', value='15', format='int') |
|
136 | ## #opObj11.addParameter(name='minHei', value='15', format='int') | |
137 | # #opObj11.addParameter(name='maxHei', value='20', format='int') |
|
137 | ## #opObj11.addParameter(name='maxHei', value='20', format='int') | |
138 |
|
138 | |||
139 | #--- |
|
139 | #--- | |
140 | # opObj11 = procUnitConfObjSpectraBeam0.addOperation(name='selectChannels') |
|
140 | # opObj11 = procUnitConfObjSpectraBeam0.addOperation(name='selectChannels') | |
@@ -152,11 +152,7 def main(): | |||||
152 | opObj11.addParameter(name='zmax', value=dbmax, format='int') |
|
152 | opObj11.addParameter(name='zmax', value=dbmax, format='int') | |
153 | opObj11.addParameter(name='save', value=outPath+'/plots', format='str') |
|
153 | opObj11.addParameter(name='save', value=outPath+'/plots', format='str') | |
154 | opObj11.addParameter(name='ftp', value='1', format='int') |
|
154 | opObj11.addParameter(name='ftp', value='1', format='int') | |
155 | # opObj11.addParameter(name='wr_period', value='2', format='int') |
|
155 | ||
156 | # opObj11.addParameter(name='exp_code', value='21', format='int') |
|
|||
157 | # opObj11.addParameter(name='sub_exp_code', value='4', format='int') |
|
|||
158 | # opObj11.addParameter(name='ftp_wei', value='0', format='int') |
|
|||
159 | # opObj11.addParameter(name='plot_pos', value='0', format='int') |
|
|||
160 | opObj11.addParameter(name='localtime', value=localtime,format='int') |
|
156 | opObj11.addParameter(name='localtime', value=localtime,format='int') | |
161 | opObj11.addParameter(name='show', value = showSPC, format='int') |
|
157 | opObj11.addParameter(name='show', value = showSPC, format='int') | |
162 |
|
158 | |||
@@ -173,10 +169,6 def main(): | |||||
173 | opObj11.addParameter(name='save', value=outPath+'/plots', format='str') |
|
169 | opObj11.addParameter(name='save', value=outPath+'/plots', format='str') | |
174 | opObj11.addParameter(name='ftp', value='1', format='int') |
|
170 | opObj11.addParameter(name='ftp', value='1', format='int') | |
175 | opObj11.addParameter(name='wr_period', value='2', format='int') |
|
171 | opObj11.addParameter(name='wr_period', value='2', format='int') | |
176 | # opObj11.addParameter(name='exp_code', value='21', format='int') |
|
|||
177 | # opObj11.addParameter(name='sub_exp_code', value='4', format='int') |
|
|||
178 | # opObj11.addParameter(name='ftp_wei', value='0', format='int') |
|
|||
179 | # opObj11.addParameter(name='plot_pos', value='0', format='int') |
|
|||
180 | opObj11.addParameter(name='localtime', value=localtime,format='int') |
|
172 | opObj11.addParameter(name='localtime', value=localtime,format='int') | |
181 | opObj11.addParameter(name='show', value = showRTI, format='int') |
|
173 | opObj11.addParameter(name='show', value = showRTI, format='int') | |
182 |
|
174 | |||
@@ -200,7 +192,7 def main(): | |||||
200 | opObj11 = procUnitConfObjSpectraBeam0.addOperation(name='SpectraWriter', optype='external') |
|
192 | opObj11 = procUnitConfObjSpectraBeam0.addOperation(name='SpectraWriter', optype='external') | |
201 | opObj11.addParameter(name='path', value=outPath) |
|
193 | opObj11.addParameter(name='path', value=outPath) | |
202 | opObj11.addParameter(name='blocksPerFile', value='10', format='int') |
|
194 | opObj11.addParameter(name='blocksPerFile', value='10', format='int') | |
203 | ''' |
|
195 | ||
204 | ##....................................................................................... |
|
196 | ##....................................................................................... | |
205 | ##....................................................................................... |
|
197 | ##....................................................................................... | |
206 |
|
198 |
@@ -1,10 +1,10 | |||||
1 | #!/usr/bin/env python |
|
1 | ||
2 | import os, sys |
|
2 | import os, sys | |
3 | import time |
|
3 | import time | |
4 | import datetime |
|
4 | import datetime | |
5 |
|
5 | |||
6 | ''' |
|
6 | ''' | |
7 | ESF 10 BEAM ONLINE |
|
7 | ESF EW 10 BEAM ONLINE | |
8 | ''' |
|
8 | ''' | |
9 | path = os.path.dirname(os.getcwd()) |
|
9 | path = os.path.dirname(os.getcwd()) | |
10 | path = os.path.dirname(path) |
|
10 | path = os.path.dirname(path) | |
@@ -21,25 +21,27 def main(): | |||||
21 |
|
21 | |||
22 |
|
22 | |||
23 | #path = os.path.join(os.environ['HOME'],'amisr') |
|
23 | #path = os.path.join(os.environ['HOME'],'amisr') | |
24 | inPath = '/mnt/data_amisr' |
|
24 | inPath= '/home/soporte/Data/OutTest/ONLINE/' | |
|
25 | #inPath = '/mnt/data_amisr' | |||
25 | #path= '/home/soporte/dataAMISR/' |
|
26 | #path= '/home/soporte/dataAMISR/' | |
26 | #inPath= '/home/soporte/dataAMISR_test/' |
|
27 | #inPath= '/home/soporte/dataAMISR_test/' | |
27 | outPath = '/home/soporte/Data/ESF' |
|
28 | outPath = '/home/soporte/Data/ESF' | |
28 | remotefolder = "/home/wmaster/graficos" |
|
29 | remotefolder = "/home/wmaster/test/graficos" | |
29 | xmin = '18' |
|
30 | xmin = '18' | |
30 |
xmax = ' |
|
31 | xmax = '31' | |
|
32 | xrange = int(xmax)-int(xmin) | |||
31 | dbmin = '60' #'60'#'55' #'40' #noise esf eej |
|
33 | dbmin = '60' #'60'#'55' #'40' #noise esf eej | |
32 | dbmax = '75' #'70' #'55' |
|
34 | dbmax = '75' #'70' #'55' | |
33 |
showSPC = ' |
|
35 | showSPC = '0' #view plot Spectra | |
34 |
showRTI = ' |
|
36 | showRTI = '0' #view plot RTI | |
35 |
showNOISE = ' |
|
37 | showNOISE = '0' #view plot NOISE | |
36 | # # code = '1,1,-1,1,1,-1,1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,1,1,1,1,-1,-1,-1' |
|
38 | # # code = '1,1,-1,1,1,-1,1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,1,1,1,1,-1,-1,-1' | |
37 | # # code = '1,1,0,1,1,0,1,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,1,1,1,0,0,0' |
|
39 | # # code = '1,1,0,1,1,0,1,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,1,1,1,0,0,0' | |
38 | code = '1,-1,-1,-1,1,1,1,1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,1,-1,1,1,-1,1' |
|
40 | code = '1,-1,-1,-1,1,1,1,1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,1,-1,1,1,-1,1' | |
39 | nCode = '1' |
|
41 | nCode = '1' | |
40 | nBaud = '28' |
|
42 | nBaud = '28' | |
41 | nosamp = '2' # oversample |
|
43 | nosamp = '2' # oversample | |
42 |
localtime=' |
|
44 | localtime='1' #para ajustar el horario en las gráficas '0' para dejar en utc | |
43 |
|
45 | |||
44 | dty = datetime.date.today() #ONLINE |
|
46 | dty = datetime.date.today() #ONLINE | |
45 | str1 = dty + datetime.timedelta(days=1) |
|
47 | str1 = dty + datetime.timedelta(days=1) | |
@@ -49,8 +51,8 def main(): | |||||
49 | yesterday = str2.strftime("%Y/%m/%d") |
|
51 | yesterday = str2.strftime("%Y/%m/%d") | |
50 | startDate=today |
|
52 | startDate=today | |
51 | endDate=tomorrow |
|
53 | endDate=tomorrow | |
52 |
#startDate='20 |
|
54 | #startDate='2021/07/16' | |
53 |
#endDate='20 |
|
55 | #endDate='2021/07/17' | |
54 | ##....................................................................................... |
|
56 | ##....................................................................................... | |
55 | ##....................................................................................... |
|
57 | ##....................................................................................... | |
56 | l = startDate.split('/') #adding day of the year to outPath |
|
58 | l = startDate.split('/') #adding day of the year to outPath | |
@@ -74,8 +76,8 def main(): | |||||
74 | path=inPath, |
|
76 | path=inPath, | |
75 | startDate=startDate,#'2016/07/12', |
|
77 | startDate=startDate,#'2016/07/12', | |
76 | endDate=endDate,#'2016/07/13', |
|
78 | endDate=endDate,#'2016/07/13', | |
77 |
startTime='1 |
|
79 | startTime='18:01:00',#'07:00:00', | |
78 |
endTime='0 |
|
80 | endTime='06:55:00',#'15:00:00', | |
79 | walk=0, |
|
81 | walk=0, | |
80 | code = code, |
|
82 | code = code, | |
81 | nCode = nCode, |
|
83 | nCode = nCode, | |
@@ -89,7 +91,9 def main(): | |||||
89 |
|
91 | |||
90 | #Voltage Processing Unit |
|
92 | #Voltage Processing Unit | |
91 | procUnitConfObjBeam0 = controllerObj.addProcUnit(datatype='VoltageProc', inputId=readUnitConfObj.getId()) |
|
93 | procUnitConfObjBeam0 = controllerObj.addProcUnit(datatype='VoltageProc', inputId=readUnitConfObj.getId()) | |
92 |
opObj10 = procUnitConfObjBeam0.addOperation(name='set |
|
94 | opObj10 = procUnitConfObjBeam0.addOperation(name='setAttribute') | |
|
95 | opObj10.addParameter(name='frequency', value='445.0e6') | |||
|
96 | ||||
93 | #opObj10.addParameter(name='frequency', value='445e6', format='int') #changed on Dec 3, 15:40h |
|
97 | #opObj10.addParameter(name='frequency', value='445e6', format='int') #changed on Dec 3, 15:40h | |
94 |
|
98 | |||
95 |
|
99 | |||
@@ -127,67 +131,80 def main(): | |||||
127 |
|
131 | |||
128 |
|
132 | |||
129 | #--- |
|
133 | #--- | |
130 | opObj11 = procUnitConfObjSpectraBeam0.addOperation(name='selectChannels') |
|
134 | #opObj11 = procUnitConfObjSpectraBeam0.addOperation(name='selectChannels') | |
131 | opObj11.addParameter(name='channelList', value='0,2,4,6,8', format='intlist') |
|
135 | #opObj11.addParameter(name='channelList', value='0,2,4,6,8', format='intlist') | |
132 |
|
136 | |||
133 | ##....................................................................................... |
|
137 | ##....................................................................................... | |
134 | ##....................................................................................... |
|
138 | ##....................................................................................... | |
135 |
|
139 | |||
136 | #SpectraPlot |
|
140 | #SpectraPlot | |
137 |
opObj1 |
|
141 | opObj12 = procUnitConfObjSpectraBeam0.addOperation(name='SpectraPlot', optype='external') | |
138 |
opObj1 |
|
142 | opObj12.addParameter(name='id', value='1', format='int') | |
139 |
opObj1 |
|
143 | opObj12.addParameter(name='wintitle', value='ESF AMISR', format='str') | |
140 |
opObj1 |
|
144 | opObj12.addParameter(name='showprofile', value='1', format='int') | |
141 |
opObj1 |
|
145 | opObj12.addParameter(name='zmin', value=dbmin, format='int') | |
142 |
opObj1 |
|
146 | opObj12.addParameter(name='zmax', value=dbmax, format='int') | |
143 |
opObj1 |
|
147 | opObj12.addParameter(name='save', value=outPath+'/plots', format='str') | |
144 |
|
|
148 | opObj12.addParameter(name='localtime', value=localtime,format='int') | |
145 |
|
|
149 | opObj12.addParameter(name='show', value = showSPC, format='int') | |
146 |
|
|
150 | opObj12.addParameter(name='colormap', value='jet', format='str') | |
147 |
|
|
151 | opObj12.addParameter(name='exp_code', value='207', format='int') | |
148 |
|
|
152 | opObj12.addParameter(name='server', value='jro-realtime.igp.gob.pe:4444') | |
149 |
|
|
153 | opObj12.addParameter(name='sender_period', value='120') | |
150 |
opObj1 |
|
154 | opObj12.addParameter(name='tag', value='AMISR') | |
151 | opObj11.addParameter(name='show', value = showSPC, format='int') |
|
|||
152 | opObj11.addParameter(name='colormap', value='jet', format='str') |
|
|||
153 |
|
||||
154 |
|
155 | |||
155 | #RTIPlot |
|
156 | #RTIPlot | |
156 | #title0 = 'RTI AMISR Beam 0' |
|
157 | #title0 = 'RTI AMISR Beam 0' | |
157 |
opObj1 |
|
158 | opObj13 = procUnitConfObjSpectraBeam0.addOperation(name='RTIPlot', optype='external') | |
158 |
opObj1 |
|
159 | opObj13.addParameter(name='id', value='2', format='int') | |
159 |
opObj1 |
|
160 | opObj13.addParameter(name='wintitle', value='ESF AMISR', format='str') | |
160 |
opObj1 |
|
161 | opObj13.addParameter(name='showprofile', value='0', format='int') | |
161 |
opObj1 |
|
162 | opObj13.addParameter(name='tmin', value=xmin, format='int') | |
162 |
opObj1 |
|
163 | opObj13.addParameter(name='xrange', value=xrange,format='int') | |
163 |
opObj1 |
|
164 | opObj13.addParameter(name='zmin', value=dbmin, format='int') | |
164 |
opObj1 |
|
165 | opObj13.addParameter(name='zmax', value=dbmax, format='int') | |
165 |
opObj1 |
|
166 | opObj13.addParameter(name='save', value=outPath+'/plots', format='str') | |
166 |
|
|
167 | opObj13.addParameter(name='localtime', value=localtime,format='int') | |
167 |
|
|
168 | opObj13.addParameter(name='show', value = showRTI, format='int') | |
168 |
|
|
169 | opObj13.addParameter(name='colormap', value='jet', format='str') | |
169 |
|
|
170 | opObj13.addParameter(name='exp_code', value='207', format='int') | |
170 |
|
|
171 | opObj13.addParameter(name='server', value='jro-realtime.igp.gob.pe:4444') | |
171 |
|
|
172 | opObj13.addParameter(name='sender_period', value='120') | |
172 |
opObj1 |
|
173 | opObj13.addParameter(name='tag', value='AMISR') | |
173 | opObj11.addParameter(name='show', value = showRTI, format='int') |
|
|||
174 | opObj11.addParameter(name='colormap', value='jet', format='str') |
|
|||
175 |
|
174 | |||
176 | # # # |
|
175 | # # # | |
177 | # #Noise |
|
176 | # #Noise | |
178 | #title0 = 'RTI AMISR Beam 0' |
|
177 | #title0 = 'RTI AMISR Beam 0' | |
179 |
opObj1 |
|
178 | opObj14 = procUnitConfObjSpectraBeam0.addOperation(name='NoisePlot', optype='external') | |
180 |
opObj1 |
|
179 | opObj14.addParameter(name='id', value='3', format='int') | |
181 |
opObj1 |
|
180 | opObj14.addParameter(name='wintitle', value='ESF AMISR', format='str') | |
182 |
opObj1 |
|
181 | opObj14.addParameter(name='showprofile', value='0', format='int') | |
183 |
opObj1 |
|
182 | opObj14.addParameter(name='tmin', value=xmin, format='int') | |
184 |
opObj1 |
|
183 | opObj14.addParameter(name='tmax', value=xmax, format='int') | |
185 | ##opObj11.addParameter(name='ymin', value=dbmin, format='int') |
|
184 | ##opObj11.addParameter(name='ymin', value=dbmin, format='int') | |
186 | ##opObj11.addParameter(name='ymax', value=dbmax, format='int') |
|
185 | ##opObj11.addParameter(name='ymax', value=dbmax, format='int') | |
187 |
opObj1 |
|
186 | opObj14.addParameter(name='save', value=outPath+'/plots', format='str') | |
188 |
opObj1 |
|
187 | opObj14.addParameter(name='show', value = showNOISE, format='int') | |
189 |
opObj1 |
|
188 | opObj14.addParameter(name='localtime', value=localtime,format='int') | |
190 |
|
189 | opObj14.addParameter(name='exp_code', value='207', format='int') | ||
|
190 | opObj14.addParameter(name='server', value='jro-realtime.igp.gob.pe:4444') | |||
|
191 | opObj14.addParameter(name='sender_period', value='120') | |||
|
192 | opObj14.addParameter(name='tag', value='AMISR') | |||
|
193 | ''' | |||
|
194 | patternX : list | |||
|
195 | detail of files to be send must have the following order: local, remote | |||
|
196 | ext, period, exp_code, sub_exp_code | |||
|
197 | ''' | |||
|
198 | # ftp = procUnitConfObjSpectraBeam0.addOperation(name='SendToFTP', optype='external') | |||
|
199 | # ftp.addParameter(name='server', value='jro-app.igp.gob.pe') | |||
|
200 | # ftp.addParameter(name='username', value='wmaster') | |||
|
201 | # ftp.addParameter(name='password', value='mst2010vhf') | |||
|
202 | # ftp.addParameter(name='pattern1', | |||
|
203 | # value=outPath+'/plots/rti,/home/wmaster/graficos,png,60,1,1', | |||
|
204 | # format='list') | |||
|
205 | # ftp.addParameter(name='pattern2', | |||
|
206 | # value=outPath+'/plots/rti,/home/wmaster/graficos,png,300,1,1', | |||
|
207 | # format='list') | |||
191 |
|
208 | |||
192 |
|
209 | |||
193 | # print "Escribiendo el archivo XML" |
|
210 | # print "Escribiendo el archivo XML" |
1 | NO CONTENT: file was removed, binary diff hidden |
|
NO CONTENT: file was removed, binary diff hidden |
General Comments 0
You need to be logged in to leave comments.
Login now