@@ -1,74 +1,79 | |||||
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 | sys.path.append(path) |
|
4 | sys.path.append(path) | |
5 |
|
5 | |||
6 | from controller import * |
|
6 | from controller import * | |
7 |
|
7 | |||
8 | desc = "AMISR Experiment" |
|
8 | desc = "AMISR Experiment" | |
9 |
|
9 | |||
10 | filename = "amisr_reader.xml" |
|
10 | filename = "amisr_reader.xml" | |
11 |
|
11 | |||
12 | controllerObj = Project() |
|
12 | controllerObj = Project() | |
13 |
|
13 | |||
14 | controllerObj.setup(id = '191', name='test01', description=desc) |
|
14 | controllerObj.setup(id = '191', name='test01', description=desc) | |
15 |
|
15 | |||
16 |
path = ' |
|
16 | path = os.path.join(os.environ['HOME'],'Documents/amisr') | |
17 |
|
17 | |||
18 |
figpath = ' |
|
18 | figpath = os.path.join(os.environ['HOME'],'Pictures/amisr') | |
19 |
|
19 | |||
20 | readUnitConfObj = controllerObj.addReadUnit(datatype='AMISR', |
|
20 | readUnitConfObj = controllerObj.addReadUnit(datatype='AMISR', | |
21 | path=path, |
|
21 | path=path, | |
22 | startDate='2014/08/18', |
|
22 | startDate='2014/08/18', | |
23 | endDate='2014/08/18', |
|
23 | endDate='2014/08/18', | |
24 | startTime='00:00:00', |
|
24 | startTime='00:00:00', | |
25 | endTime='23:59:59', |
|
25 | endTime='23:59:59', | |
26 | walk=1) |
|
26 | walk=1) | |
27 |
|
27 | |||
28 | #AMISR Processing Unit |
|
28 | #AMISR Processing Unit | |
29 | procUnitAMISRBeam0 = controllerObj.addProcUnit(datatype='AMISR', inputId=readUnitConfObj.getId()) |
|
29 | procUnitAMISRBeam0 = controllerObj.addProcUnit(datatype='AMISR', inputId=readUnitConfObj.getId()) | |
30 |
|
30 | |||
31 | #Beam Selector |
|
31 | #Beam Selector | |
32 | opObj11 = procUnitAMISRBeam0.addOperation(name='BeamSelector', optype='other') |
|
32 | opObj11 = procUnitAMISRBeam0.addOperation(name='BeamSelector', optype='other') | |
33 | opObj11.addParameter(name='beam', value='0', format='int') |
|
33 | opObj11.addParameter(name='beam', value='0', format='int') | |
34 |
|
34 | |||
35 | #Voltage Processing Unit |
|
35 | #Voltage Processing Unit | |
36 | procUnitConfObjBeam0 = controllerObj.addProcUnit(datatype='Voltage', inputId=procUnitAMISRBeam0.getId()) |
|
36 | procUnitConfObjBeam0 = controllerObj.addProcUnit(datatype='Voltage', inputId=procUnitAMISRBeam0.getId()) | |
37 | #Coherent Integration |
|
37 | #Coherent Integration | |
38 | opObj11 = procUnitConfObjBeam0.addOperation(name='CohInt', optype='other') |
|
38 | opObj11 = procUnitConfObjBeam0.addOperation(name='CohInt', optype='other') | |
39 | opObj11.addParameter(name='n', value='128', format='int') |
|
39 | opObj11.addParameter(name='n', value='128', format='int') | |
40 |
#Spectra Unit Processing, getting spectras with nProfiles |
|
40 | #Spectra Unit Processing, getting spectras with nProfiles and nFFTPoints | |
41 | procUnitConfObjSpectraBeam0 = controllerObj.addProcUnit(datatype='Spectra', inputId=procUnitConfObjBeam0.getId()) |
|
41 | procUnitConfObjSpectraBeam0 = controllerObj.addProcUnit(datatype='Spectra', inputId=procUnitConfObjBeam0.getId()) | |
42 | procUnitConfObjSpectraBeam0.addParameter(name='nFFTPoints', value=32, format='int') |
|
42 | procUnitConfObjSpectraBeam0.addParameter(name='nFFTPoints', value=32, format='int') | |
43 | procUnitConfObjSpectraBeam0.addParameter(name='nProfiles', value=32, format='int') |
|
43 | procUnitConfObjSpectraBeam0.addParameter(name='nProfiles', value=32, format='int') | |
44 | #Noise Estimation |
|
44 | #Noise Estimation | |
45 | opObj11 = procUnitConfObjSpectraBeam0.addOperation(name='getNoise') |
|
45 | opObj11 = procUnitConfObjSpectraBeam0.addOperation(name='getNoise') | |
46 | opObj11.addParameter(name='minHei', value='100', format='float') |
|
46 | opObj11.addParameter(name='minHei', value='100', format='float') | |
47 | opObj11.addParameter(name='maxHei', value='450', format='float') |
|
47 | opObj11.addParameter(name='maxHei', value='450', format='float') | |
|
48 | ||||
48 | #SpectraPlot |
|
49 | #SpectraPlot | |
49 | opObj11 = procUnitConfObjSpectraBeam0.addOperation(name='SpectraPlot', optype='other') |
|
50 | opObj11 = procUnitConfObjSpectraBeam0.addOperation(name='SpectraPlot', optype='other') | |
50 | opObj11.addParameter(name='id', value='100', format='int') |
|
51 | opObj11.addParameter(name='id', value='100', format='int') | |
51 | opObj11.addParameter(name='wintitle', value='AMISR Beam 0', format='str') |
|
52 | opObj11.addParameter(name='wintitle', value='AMISR Beam 0', format='str') | |
|
53 | ||||
52 | #RTIPlot |
|
54 | #RTIPlot | |
|
55 | title0 = 'RTI AMISR Beam 0' | |||
53 | opObj11 = procUnitConfObjSpectraBeam0.addOperation(name='RTIPlot', optype='other') |
|
56 | opObj11 = procUnitConfObjSpectraBeam0.addOperation(name='RTIPlot', optype='other') | |
54 | opObj11.addParameter(name='id', value='200', format='int') |
|
57 | opObj11.addParameter(name='id', value='200', format='int') | |
55 |
opObj11.addParameter(name='wintitle', value=title |
|
58 | opObj11.addParameter(name='wintitle', value=title0, format='str') | |
|
59 | opObj11.addParameter(name='showprofile', value='0', format='int') | |||
56 | #Setting RTI time using xmin,xmax |
|
60 | #Setting RTI time using xmin,xmax | |
57 | opObj11.addParameter(name='xmin', value='0', format='int') |
|
61 | opObj11.addParameter(name='xmin', value='0', format='int') | |
58 | opObj11.addParameter(name='xmax', value='18', format='int') |
|
62 | opObj11.addParameter(name='xmax', value='18', format='int') | |
59 | #Setting dB range with zmin, zmax |
|
63 | #Setting dB range with zmin, zmax | |
60 | opObj11.addParameter(name='zmin', value='45', format='int') |
|
64 | opObj11.addParameter(name='zmin', value='45', format='int') | |
61 | opObj11.addParameter(name='zmax', value='70', format='int') |
|
65 | opObj11.addParameter(name='zmax', value='70', format='int') | |
62 | opObj11.addParameter(name='showprofile', value='0', format='int') |
|
66 | #Save RTI | |
|
67 | figfile0 = 'amisr_rti_beam0.png' | |||
63 | opObj11.addParameter(name='figpath', value=figpath, format='str') |
|
68 | opObj11.addParameter(name='figpath', value=figpath, format='str') | |
64 |
opObj11.addParameter(name='figfile', value=figfile |
|
69 | opObj11.addParameter(name='figfile', value=figfile0, format='str') | |
65 |
|
70 | |||
66 |
|
71 | |||
67 | print "Escribiendo el archivo XML" |
|
72 | print "Escribiendo el archivo XML" | |
68 | controllerObj.writeXml(filename) |
|
73 | controllerObj.writeXml(filename) | |
69 | print "Leyendo el archivo XML" |
|
74 | print "Leyendo el archivo XML" | |
70 | controllerObj.readXml(filename) |
|
75 | controllerObj.readXml(filename) | |
71 |
|
76 | |||
72 | controllerObj.createObjects() |
|
77 | controllerObj.createObjects() | |
73 | controllerObj.connectObjects() |
|
78 | controllerObj.connectObjects() | |
74 | controllerObj.run() |
|
79 | controllerObj.run() |
@@ -1,39 +1,39 | |||||
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 | sys.path.append(path) |
|
4 | sys.path.append(path) | |
5 |
|
5 | |||
6 | from controller import * |
|
6 | from controller import * | |
7 |
|
7 | |||
8 | desc = "AMISR Experiment" |
|
8 | desc = "AMISR Experiment" | |
9 |
|
9 | |||
10 | filename = "amisr_reader.xml" |
|
10 | filename = "amisr_reader.xml" | |
11 |
|
11 | |||
12 | controllerObj = Project() |
|
12 | controllerObj = Project() | |
13 |
|
13 | |||
14 | controllerObj.setup(id = '191', name='test01', description=desc) |
|
14 | controllerObj.setup(id = '191', name='test01', description=desc) | |
15 |
|
15 | |||
16 | path = '$HOME/Documents/amisr' |
|
16 | path = os.path.join(os.environ['HOME'],'Documents/amisr') #'/home/signalchain/Documents/amisr' | |
17 |
|
17 | |||
18 |
figpath = ' |
|
18 | figpath = os.path.join(os.environ['HOME'],'Pictures/amisr') | |
19 |
|
19 | |||
20 | readUnitConfObj = controllerObj.addReadUnit(datatype='AMISR', |
|
20 | readUnitConfObj = controllerObj.addReadUnit(datatype='AMISR', | |
21 | path=path, |
|
21 | path=path, | |
22 | startDate='2014/08/18', |
|
22 | startDate='2014/08/18', | |
23 | endDate='2014/08/18', |
|
23 | endDate='2014/08/18', | |
24 | startTime='00:00:00', |
|
24 | startTime='00:00:00', | |
25 | endTime='23:59:59', |
|
25 | endTime='23:59:59', | |
26 | walk=1) |
|
26 | walk=1) | |
27 |
|
27 | |||
28 | procUnitAMISR = controllerObj.addProcUnit(datatype='AMISR', inputId=readUnitConfObj.getId()) |
|
28 | procUnitAMISR = controllerObj.addProcUnit(datatype='AMISR', inputId=readUnitConfObj.getId()) | |
29 |
|
29 | |||
30 | opObj11 = procUnitAMISR.addOperation(name='PrintInfo', optype='other') |
|
30 | opObj11 = procUnitAMISR.addOperation(name='PrintInfo', optype='other') | |
31 |
|
31 | |||
32 | print "Escribiendo el archivo XML" |
|
32 | print "Escribiendo el archivo XML" | |
33 | controllerObj.writeXml(filename) |
|
33 | controllerObj.writeXml(filename) | |
34 | print "Leyendo el archivo XML" |
|
34 | print "Leyendo el archivo XML" | |
35 | controllerObj.readXml(filename) |
|
35 | controllerObj.readXml(filename) | |
36 |
|
36 | |||
37 | controllerObj.createObjects() |
|
37 | controllerObj.createObjects() | |
38 | controllerObj.connectObjects() |
|
38 | controllerObj.connectObjects() | |
39 | controllerObj.run() |
|
39 | controllerObj.run() |
General Comments 0
You need to be logged in to leave comments.
Login now