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