|
|
from schainpy.controller import Project
|
|
|
|
|
|
path ='/home/soporte/Data/SpectraPlot'
|
|
|
xmin = '07'
|
|
|
xmax = '17' #-> el plot genera +1 en la hora, es decir aparece 18 como máximo
|
|
|
ymin = '0'
|
|
|
ymax = '300'
|
|
|
dbmin = '45' #'60'#'55' #'40' #noise esf eej
|
|
|
dbmax = '65' #'70' #'55'
|
|
|
showSPC = '1' #view plot Spectra
|
|
|
showRTI = '1' #view plot RTI
|
|
|
showNOISE = '0' #view plot NOISE
|
|
|
localtime='0' #para ajustar el horario en las gráficas '0' para dejar en utc
|
|
|
figpath = '/home/soporte/Data/EEJ'
|
|
|
|
|
|
def main():
|
|
|
controller = Project()
|
|
|
controller.setup(id = '100',
|
|
|
name='test',
|
|
|
description='Basic experiment')
|
|
|
read_unit = controller.addReadUnit(datatype='Spectra',
|
|
|
path=path,
|
|
|
startDate='2019/12/16',
|
|
|
endDate='2019/12/16',
|
|
|
startTime='00:00:00',
|
|
|
endTime='23:59:59',
|
|
|
online=0,
|
|
|
timezone='ut',
|
|
|
walk=1)
|
|
|
|
|
|
proc_unit = controller.addProcUnit(datatype='Spectra',
|
|
|
inputId=read_unit.getId())
|
|
|
|
|
|
# op = proc_unit.addOperation(name='selectChannels')
|
|
|
# op.addParameter(name='channelList', value='0,1', format='intlist')
|
|
|
|
|
|
op = proc_unit.addOperation(name='selectHeights')
|
|
|
op.addParameter(name='minHei', value='50', format='float')
|
|
|
op.addParameter(name='maxHei', value='300', format='float')
|
|
|
|
|
|
#op = proc_unit.addOperation(name='removeDC')
|
|
|
|
|
|
|
|
|
spcPlot = proc_unit.addOperation(name='SpectraPlot', optype='external')
|
|
|
spcPlot.addParameter(name='id', value='21', format='int')
|
|
|
spcPlot.addParameter(name= 'xaxis', value='velocity')
|
|
|
spcPlot.addParameter(name='ymax', value=ymax, format='int')
|
|
|
spcPlot.addParameter(name='showprofile', value='1', format='int')
|
|
|
spcPlot.addParameter(name='wintitle', value='AMISR Beam 0', format='str')
|
|
|
spcPlot.addParameter(name='zmin', value=dbmin, format='int')
|
|
|
spcPlot.addParameter(name='zmax', value=dbmax, format='int')
|
|
|
spcPlot.addParameter(name='save', value=figpath, format='str')
|
|
|
spcPlot.addParameter(name='colormap', value='jet', format='str')
|
|
|
spcPlot.addParameter(name='localtime', value=localtime,format='int')
|
|
|
spcPlot.addParameter(name='show', value = showSPC, format='int')
|
|
|
|
|
|
rtiPlot = proc_unit.addOperation(name='RTIPlot', optype='external')
|
|
|
rtiPlot.addParameter(name='id', value='2', format='int')
|
|
|
rtiPlot.addParameter(name='localtime', value=localtime,format='int')
|
|
|
rtiPlot.addParameter(name='wintitle', value='RTI', format='str')
|
|
|
#rtiPlot.addParameter(name='xmin', value=xmin, format='int')
|
|
|
rtiPlot.addParameter(name='xmax', value=xmax, format='int') #max value =23
|
|
|
rtiPlot.addParameter(name='ymin', value=ymin, format='int')
|
|
|
rtiPlot.addParameter(name='zmin', value=dbmin, format='int')
|
|
|
rtiPlot.addParameter(name='zmax', value=dbmax, format='int')
|
|
|
rtiPlot.addParameter(name='showprofile', value='0', format='int')
|
|
|
rtiPlot.addParameter(name='show', value = showRTI, format='int') #
|
|
|
rtiPlot.addParameter(name='save', value=figpath+'/plots', format='str')
|
|
|
rtiPlot.addParameter(name='colormap', value='jet', format='str')
|
|
|
|
|
|
|
|
|
controller.start()
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
import time
|
|
|
start_time = time.time()
|
|
|
main()
|
|
|
print("--- %s seconds ---" % (time.time() - start_time))
|
|
|
|