import os, sys import datetime import time from schainpy.controller import Project desc = "USRP_test" filename = "USRP_processing.xml" controllerObj = Project() controllerObj.setup(id='191', name='Test_USRP', description=desc) ############## USED TO PLOT IQ VOLTAGE, POWER AND SPECTRA ############# ######PATH DE LECTURA, ESCRITURA, GRAFICOS Y ENVIO WEB################# path = '/home/alex/Downloads/test_rawdata' figpath = '/home/alex/Downloads' ################# RANGO DE PLOTEO###################################### dBmin = '30' dBmax = '60' xmin = '0' xmax = '24' ymin = '0' ymax = '600' ########################FECHA########################################## str = datetime.date.today() today = str.strftime("%Y/%m/%d") str2 = str - datetime.timedelta(days=1) yesterday = str2.strftime("%Y/%m/%d") ######################## UNIDAD DE LECTURA############################# readUnitConfObj = controllerObj.addReadUnit( datatype='VoltageReader', path=path, startDate="2020/01/01", #"2020/01/01",#today,
import os import sys import sys from schainpy.controller import Project controllerObj = Project() desc = '' controllerObj.setup(id='191', name='test01', description=desc) readUnitConfObj = controllerObj.addReadUnit(datatype='VoltageReader', path='/home/nanosat/data/jasmet', startDate='2010/10/28', endDate='2017/10/28', startTime='00:00:00', endTime='23:59:59', walk=1, online=0) procUnitConfObj0 = controllerObj.addProcUnit(datatype='VoltageProc', inputId=readUnitConfObj.getId()) # opObj11 = procUnitConfObj0.addOperation(name='Scope', optype='external') # opObj11.addParameter(name='id', value='121', format='int') # opObj11.addParameter(name='wintitle', value='Scope', format='str') # opObj10 = procUnitConfObj0.addOperation(name='DigitalRFWriter', optype='other') # opObj10.addParameter( # name='path', value='/home/nanosat/data/digitalrf', format='str') # opObj10.addParameter( # name='fileCadence', value='1000000', format='int') # opObj10.addParameter(name='minHei', value='0', format='float')
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()
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()
import os,sys import datetime import time from schainpy.controller import Project path = '/home/alex/Downloads/NEW_WR2/spc16removeDC' figpath = path desc = "Simulator Test" controllerObj = Project() controllerObj.setup(id='10',name='Test Simulator',description=desc) readUnitConfObj = controllerObj.addReadUnit(datatype='SimulatorReader', frequency=9.345e9, FixRCP_IPP= 60, Tau_0 = 30, AcqH0_0=0, samples=330, AcqDH_0=0.15, FixRCP_TXA=0.15, FixRCP_TXB=0.15, Fdoppler=200.0, Hdoppler=36, Adoppler=300, delay=0, online=0, walk=0, nTotalReadFiles=4) opObj11 = readUnitConfObj.addOperation(name='printInfo')
import os, sys path = os.path.split(os.getcwd())[0] path = os.path.split(path)[0] sys.path.insert(0, path) from schainpy.controller import Project controllerObj = Project() controllerObj.setup(id = '005', name='script05', description="JASMET Wind Estimation") #-------------------------------------- Setup ----------------------------------------- #Verificar estas variables #Path donde estan los archivos HDF5 de meteoros path = os.path.join(os.environ['HOME'],'Pictures/JASMET30_mp/201608/meteor') #Path para los graficos pathfig = os.path.join(os.environ['HOME'],'Pictures/JASMET30_mp/201608/graphics') #Path donde se almacenaran las estimaciones de vientos pathfile = os.path.join(os.environ['HOME'],'Pictures/JASMET30_mp/201608/phase') #Fechas para busqueda de archivos startDate = '2016/08/29' endDate = '2016/09/11' #Horas para busqueda de archivos startTime = '00:00:00' endTime = '23:59:59'
import os, sys from schainpy.controller import Project controllerObj = Project() controllerObj.setup(id='002', name='script02', description="JASMET Meteor Detection") #-------------------------------------- Setup ----------------------------------------- #Verificar estas variables #Path para los archivos # path = '/mnt/jars/2016_08/NOCHE' # path = '/media/joscanoa/DATA_JASMET/JASMET/2016_08/DIA' # path = '/media/joscanoa/DATA_JASMET/JASMET/2016_08/NOCHE' path = '/home/nanosat/data/jasmet' #Path para los graficos pathfig = os.path.join(os.environ['HOME'], 'Pictures/JASMET30/201608/graphics') #Path para los archivos HDF5 de meteoros pathfile = os.path.join(os.environ['HOME'], 'Pictures/JASMET30/201608/meteor') #Fechas para busqueda de archivos startDate = '2010/08/29' endDate = '2017/09/11' #Horas para busqueda de archivos startTime = '00:00:00' endTime = '23:59:59'
#!python '''''' import os, sys from schainpy.controller import Project id = '100' filename = 'Test_COPPERBALL' desc = 'Adquisition system Copperball test' controllerObj = Project() controllerObj.setup(id=id, name=filename, description=desc) ########## NOS ENFOCAMOS PRINCIPALMENTE EN RACP Y COPPERBALL ######### ####################################################################### ################# UNIDAD ESCRITURA, CONFIGURACION ################# ####################################################################### racpfile = '/home/alex/Downloads/dia_mod.racp' acq_type = 'copperball' writeUnitConfObj = controllerObj.addWriteUnit(datatype='Hdf5Writer', racpfile=racpfile, acq_type=acq_type) ####################################################################### ######################## PARAMETERSPROC################################ ################ OPERACIONES DOMINIO DEL TIEMPO ##################### ####################################################################### procUnitConfObj0 = controllerObj.addProcUnit(datatype='ParametersProc', inputId=writeUnitConfObj.getId())
import os, sys path = os.path.split(os.getcwd())[0] path = os.path.split(path)[0] sys.path.insert(0, path) from schainpy.controller import Project controllerObj = Project() controllerObj.setup(id='004', name='script04', description="JASMET Phase Calibration") #-------------------------------------- Setup ----------------------------------------- #Verificar estas variables #Path donde estan los archivos HDF5 de meteoros path = os.path.join(os.environ['HOME'], 'Pictures/JASMET30_mp/201608/meteor') #Path para los graficos pathfig = os.path.join(os.environ['HOME'], 'Pictures/JASMET30_mp/201608/graphics') #Path donde se almacenaran las fases calculadas pathfile = os.path.join(os.environ['HOME'], 'Pictures/JASMET30_mp/201608/phase') #Fechas para busqueda de archivos startDate = '2016/08/29' endDate = '2016/09/11'