# Using external methods (new modules) # Using external methods (new modules) # #schainpy.model.proc.jroproc_spectra.IncohInt.setup() # Using external methods (new modules) # schainpy.model.graphics.jroplot_spectra.SpectraPlot.setup() # Using external methods (new modules) # schainpy.model.graphics.jroplot_spectra.SpectraPlot.setup() # opObj11 = procUnitConfObj1.addOperation(name='SpectraPlot', optype='external') # opObj11.addParameter(name='id', value='11', format='int') # opObj11.addParameter(name='wintitle', value='SpectraPlot', format='str') # opObj11.addParameter(name='zmin', value='-60', format='int') # opObj11.addParameter(name='save', value='1', format='int') # #Using external methods (new modules) # #schainpy.model.graphics.jroplot_spectra.RTIPlot.setup() # opObj11 = procUnitConfObj1.addOperation(name='RTIPlot', optype='other') # opObj11.addParameter(name='id', value='30', format='int') # opObj11.addParameter(name='wintitle', value='RTI', format='str') # opObj11.addParameter(name='zmin', value='-60', format='int') # opObj11.addParameter(name='zmax', value='-10', format='int') # opObj11.addParameter(name='showprofile', value='1', format='int') # opObj11.addParameter(name='xmax', value='23.9', format='float') # opObj11.addParameter(name='xmin', value='14', format='float') # opObj11.addParameter(name='save', value='1', format='int') controllerObj.start()
def runFromXML(filename): controller = Project() if not controller.readXml(filename): return controller.start() return
def fiber(cursor, skip, q, dt): controllerObj = Project() controllerObj.setup(id='191', name='test01', description=desc) readUnitConfObj = controllerObj.addReadUnit( datatype='SpectraReader', path='/home/nanosat/data/julia', startDate=dt, endDate=dt, startTime="00:00:00", endTime="23:59:59", online=0, #set=1426485881, delay=10, walk=1, queue=q, cursor=cursor, skip=skip, #timezone=-5*3600 ) # #opObj11 = readUnitConfObj.addOperation(name='printNumberOfBlock') # procUnitConfObj2 = controllerObj.addProcUnit( datatype='Spectra', inputId=readUnitConfObj.getId()) # procUnitConfObj2.addParameter(name='nipp', value='5', format='int') # procUnitConfObj3 = controllerObj.addProcUnit(datatype='ParametersProc', inputId=readUnitConfObj.getId()) # opObj11 = procUnitConfObj3.addOperation(name='SpectralMoments', optype='other') # opObj11 = procUnitConfObj2.addOperation(name='RTIPlot', optype='other') opObj11.addParameter(name='id', value='1000', format='int') opObj11.addParameter(name='wintitle', value='HF_Jicamarca_Spc', format='str') opObj11.addParameter(name='xmin', value='0', format='int') opObj11.addParameter(name='xmax', value='24', format='int') # opObj11 = procUnitConfObj3.addOperation(name='Parameters1Plot', optype='other') # opObj11.addParameter(name='channelList', value='0', format='intList') # # opObj11.addParameter(name='id', value='2000', format='int') # # opObj11.addParameter(name='colormap', value='0', format='bool') # opObj11.addParameter(name='onlySNR', value='1', format='bool') # opObj11.addParameter(name='DOP', value='0', format='bool') # opObj11.addParameter(name='showSNR', value='1', format='bool') # opObj11.addParameter(name='SNRthresh', value='0', format='int') # opObj11.addParameter(name='SNRmin', value='-10', format='int') # opObj11.addParameter(name='SNRmax', value='30', format='int') # opObj11.addParameter(name='showSNR', value='1', format='int') # # opObj11.addParameter(name='channelList', value='0', format='intlist') # # opObj11.addParameter(name='xmin', value='0', format='float') # opObj11.addParameter(name='xmin', value='0', format='float') # opObj11.addParameter(name='xmax', value='24', format='float') # opObj11.addParameter(name='zmin', value='-110', format='float') # opObj11.addParameter(name='zmax', value='-70', format='float') # opObj11.addParameter(name='save', value='0', format='int') # # opObj11.addParameter(name='figpath', value='/tmp/', format='str') # # opObj12 = procUnitConfObj2.addOperation(name='PublishData', optype='other') # opObj12.addParameter(name='zeromq', value=1, format='int') # opObj12.addParameter(name='server', value='tcp://10.10.10.82:7000', format='str') # opObj13 = procUnitConfObj3.addOperation(name='PublishData', optype='other') # opObj13.addParameter(name='zeromq', value=1, format='int') # opObj13.addParameter(name='server', value="juanca", format='str') # opObj12.addParameter(name='delay', value=1, format='int') # print "Escribiendo el archivo XML" # controllerObj.writeXml(filename) # print "Leyendo el archivo XML" # controllerObj.readXml(filename) # timeit.timeit('controllerObj.run()', number=2) controllerObj.start()
def main(): desc = "Testing USRP data reader" filename = "schain.xml" figpath = "./" remotefolder = "/home/wmaster/graficos" # this controller object save all user configuration and then execute each module # with their parameters. controllerObj = Project() controllerObj.setup(id='191', name='test01', description=desc) # Creating a reader object with its parameters # schainpy.model.io.jroIO_usrp.USRPReader.setup() readUnitConfObj = controllerObj.addReadUnit(datatype='DigitalRF', path='/home/nanosat/data', startDate='2000/07/03', endDate='2017/07/03', startTime='00:00:00', endTime='23:59:59', online=0) # procUnitConfObj0 = controllerObj.addProcUnit(datatype='Voltage', # inputId=readUnitConfObj.getId()) # opObj10 = procUnitConfObj0.addOperation(name='selectHeights') # opObj10.addParameter(name='minHei', value='0', format='float') # opObj10.addParameter(name='maxHei', value='8', format='float') # opObj10 = procUnitConfObj0.addOperation(name='setH0') # opObj10.addParameter(name='h0', value='5.4', format='float') # opObj10 = procUnitConfObj0.addOperation(name='Decoder', optype='external') # opObj10.addParameter(name='code', value='1,-1', format='intlist') # opObj10.addParameter(name='nCode', value='2', format='float') # opObj10.addParameter(name='nBaud', value='1', format='float') # opObj10 = procUnitConfObj0.addOperation(name='CohInt', optype='external') # opObj10.addParameter(name='n', value='128', format='float') # opObj11 = procUnitConfObj0.addOperation(name='Scope', optype='external') # opObj11.addParameter(name='id', value='121', format='int') # opObj11.addParameter(name='wintitle', value='Scope', format='str') # procUnitConfObj1 = controllerObj.addProcUnit(datatype='Spectra', # inputId=procUnitConfObj0.getId()) # #Creating a processing object with its parameters # #schainpy.model.proc.jroproc_spectra.SpectraProc.run() # #If you need to add more parameters can use the "addParameter method" # procUnitConfObj1.addParameter(name='nFFTPoints', value='8', format='int') # procUnitConfObj1.addParameter(name='pairsList', value='(0,1)', format='pairslist') # opObj10 = procUnitConfObj1.addOperation(name='IncohInt', optype='external') # opObj10.addParameter(name='n', value='2', format='float') # # Using internal methods # schainpy.model.proc.jroproc_spectra.SpectraProc.selectChannels() # opObj10 = procUnitConfObj1.addOperation(name='selectChannels') # opObj10.addParameter(name='channelList', value='0,1', format='intlist') # Using internal methods # schainpy.model.proc.jroproc_spectra.SpectraProc.selectHeights() # opObj10 = procUnitConfObj1.addOperation(name='selectHeights') # opObj10.addParameter(name='minHei', value='90', format='float') # opObj10.addParameter(name='maxHei', value='180', format='float') # Using external methods (new modules) # #schainpy.model.proc.jroproc_spectra.IncohInt.setup() # opObj12 = procUnitConfObj1.addOperation(name='IncohInt', optype='other') # opObj12.addParameter(name='n', value='1', format='int') # Using external methods (new modules) # schainpy.model.graphics.jroplot_spectra.SpectraPlot.setup() # opObj11 = procUnitConfObj1.addOperation(name='SpectraPlot', optype='external') # opObj11.addParameter(name='id', value='11', format='int') # opObj11.addParameter(name='wintitle', value='SpectraPlot', format='str') # opObj11.addParameter(name='zmin', value='0', format='int') # opObj11.addParameter(name='zmax', value='90', format='int') # opObj11.addParameter(name='save', value='1', format='int') # opObj11.addParameter(name='xmin', value='-20', format='float') # opObj11.addParameter(name='xmax', value='20', format='float') # Using external methods (new modules) # schainpy.model.graphics.jroplot_spectra.RTIPlot.setup() # opObj11 = procUnitConfObj1.addOperation(name='RTIPlot', optype='other') # opObj11.addParameter(name='id', value='30', format='int') # opObj11.addParameter(name='wintitle', value='RTI', format='str') # # opObj11.addParameter(name='zmin', value='0', format='int') # # opObj11.addParameter(name='zmax', value='90', format='int') # opObj11.addParameter(name='showprofile', value='1', format='int') # opObj11.addParameter(name='timerange', value=str(2*60*60), format='int') # opObj11.addParameter(name='xmin', value='19.5', format='float') # opObj11.addParameter(name='xmax', value='20', format='float') # opObj11 = procUnitConfObj1.addOperation(name='CrossSpectraPlot', optype='other') # opObj11.addParameter(name='id', value='3', format='int') # opObj11.addParameter(name='wintitle', value='CrossSpectraPlot', format='str') # opObj11.addParameter(name='zmin', value='30', format='int') # opObj11.addParameter(name='zmax', value='120', format='int') # opObj11.addParameter(name='pairsList', value='(0,1)', format='pairslist') controllerObj.start()