##// END OF EJS Templates
This is the new organization by packages and scripts for Signal Chain, this version contains new features and bugs fixed until August 2014
This is the new organization by packages and scripts for Signal Chain, this version contains new features and bugs fixed until August 2014

File last commit:

r465:ea7067c67a6d
r487:89975db10cce
Show More
isrproc.py
113 lines | 5.7 KiB | text/x-python | PythonLexer
Daniel Valdez
scripts para procesar datos de MST-ISR-EEJ
r431 import os, sys
path = os.path.split(os.getcwd())[0]
sys.path.append(path)
from controller import *
desc = "EWDrifts Experiment Test"
filename = "ewdrifts2.xml"
controllerObj = Project()
controllerObj.setup(id = '191', name='test01', description=desc)
path='/remote/ewdrifts/RAW_EXP/EW_DRIFT_FARADAY/EW_Drift'
Daniel Valdez
r465 path = '/media/New Volume/DATA/MST_ISR'
Daniel Valdez
scripts para procesar datos de MST-ISR-EEJ
r431
readUnitConfObj = controllerObj.addReadUnit(datatype='Voltage',
path=path,
Daniel Valdez
r465 startDate='2014/01/10',
endDate='2014/01/10',
Daniel Valdez
scripts para procesar datos de MST-ISR-EEJ
r431 startTime='00:00:00',
endTime='23:59:59',
Daniel Valdez
r465 online=0,
Daniel Valdez
scripts para procesar datos de MST-ISR-EEJ
r431 delay=10,
Daniel Valdez
r465 walk=1)
opObj11 = readUnitConfObj.addOperation(name='printNumberOfBlock')
Daniel Valdez
scripts para procesar datos de MST-ISR-EEJ
r431
################ ISR ####################################
procUnitConfObjISR = controllerObj.addProcUnit(datatype='Voltage', inputId=readUnitConfObj.getId())
opObj11 = procUnitConfObjISR.addOperation(name='ProfileSelector', optype='other')
profileIndex = '20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99'
opObj11.addParameter(name='profileList', value=profileIndex, format='intlist')
opObj11 = procUnitConfObjISR.addOperation(name='ProfileConcat', optype='other')
opObj11.addParameter(name='m', value='5', format='int')
opObj11 = procUnitConfObjISR.addOperation(name='filterByHeights')
opObj11.addParameter(name='window', value='20', format='int')
barker3x1 = '1,1,-1,-1,-1,1'
Daniel Valdez
r465 barker3x5 = '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,1,1'
Daniel Valdez
scripts para procesar datos de MST-ISR-EEJ
r431
opObj11 = procUnitConfObjISR.addOperation(name='Decoder', optype='other')
opObj11.addParameter(name='code', value=barker3x5, format='floatlist')
opObj11.addParameter(name='nCode', value='2', format='int')
opObj11.addParameter(name='nBaud', value='15', format='int')
Daniel Valdez
r465 # opObj11 = procUnitConfObjISR.addOperation(name='VoltageWriter', optype='other')
# opObj11.addParameter(name='path', value='/media/datos/mstisr_only_isr')
# opObj11.addParameter(name='blocksPerFile', value='600', format='int')
# opObj11.addParameter(name='profilesPerBlock', value='16', format='int')
Daniel Valdez
scripts para procesar datos de MST-ISR-EEJ
r431 procUnitConfObjISRSpectra = controllerObj.addProcUnit(datatype='Spectra', inputId=procUnitConfObjISR.getId())
procUnitConfObjISRSpectra.addParameter(name='nFFTPoints', value='16', format='int')
procUnitConfObjISRSpectra.addParameter(name='nProfiles', value='16', format='int')
Daniel Valdez
r465
Daniel Valdez
scripts para procesar datos de MST-ISR-EEJ
r431 opObj11 = procUnitConfObjISRSpectra.addOperation(name='IncohInt', optype='other')
opObj11.addParameter(name='timeInterval', value='60', format='float')
Daniel Valdez
r465 # opObj11 = procUnitConfObjISRSpectra.addOperation(name='SpectraPlot', optype='other')
# opObj11.addParameter(name='id', value='300', format='int')
# opObj11.addParameter(name='wintitle', value='ISR', format='str')
# opObj11.addParameter(name='zmin', value='30', format='int')
# opObj11.addParameter(name='zmax', value='65', format='int')
# opObj11.addParameter(name='save', value='1', format='int')
# opObj11.addParameter(name='figpath', value='/home/operaciones/Pictures/MST-ISR', format='str')
# opObj11.addParameter(name='wr_period', value='1', format='int')
Daniel Valdez
scripts para procesar datos de MST-ISR-EEJ
r431 # opObj11.addParameter(name='ftp', value='1', format='int')
# opObj11.addParameter(name='server', value='jro-app.igp.gob.pe', format='str')
# opObj11.addParameter(name='folder', value='/home/wmaster/graficos', format='str')
# opObj11.addParameter(name='username', value='wmaster', format='str')
# opObj11.addParameter(name='password', value='mst2010vhf', format='str')
# opObj11.addParameter(name='ftp_wei', value='0', format='int')
# opObj11.addParameter(name='exp_code', value='20', format='int')
# opObj11.addParameter(name='sub_exp_code', value='0', format='int')
# opObj11.addParameter(name='plot_pos', value='0', format='int')
opObj11 = procUnitConfObjISRSpectra.addOperation(name='RTIPlot', optype='other')
opObj11.addParameter(name='id', value='301', format='int')
opObj11.addParameter(name='wintitle', value='ISR', format='str')
opObj11.addParameter(name='showprofile', value='0', format='int')
opObj11.addParameter(name='xmin', value='0', format='int')
opObj11.addParameter(name='xmax', value='24', format='int')
Daniel Valdez
r465 opObj11.addParameter(name='zmin', value='30', format='int')
opObj11.addParameter(name='zmax', value='65', format='int')
Daniel Valdez
scripts para procesar datos de MST-ISR-EEJ
r431 opObj11.addParameter(name='save', value='1', format='int')
Daniel Valdez
r465 #opObj11.addParameter(name='lastone', value='1', format='int')
opObj11.addParameter(name='figpath', value='/home/dsuarez/Pictures/isr', format='str')
opObj11.addParameter(name='wr_period', value='2', format='int')
Daniel Valdez
scripts para procesar datos de MST-ISR-EEJ
r431 # opObj11.addParameter(name='ftp', value='1', format='int')
# opObj11.addParameter(name='server', value='jro-app.igp.gob.pe', format='str')
# opObj11.addParameter(name='folder', value='/home/wmaster/graficos', format='str')
# opObj11.addParameter(name='username', value='wmaster', format='str')
# opObj11.addParameter(name='password', value='mst2010vhf', format='str')
# opObj11.addParameter(name='ftp_wei', value='0', format='int')
# opObj11.addParameter(name='exp_code', value='20', format='int')
# opObj11.addParameter(name='sub_exp_code', value='0', format='int')
# opObj11.addParameter(name='plot_pos', value='0', format='int')
print "Escribiendo el archivo XML"
controllerObj.writeXml(filename)
print "Leyendo el archivo XML"
controllerObj.readXml(filename)
controllerObj.createObjects()
controllerObj.connectObjects()
controllerObj.run()