##// END OF EJS Templates
Script test de pruebas actuales con el update de heading en el block 360, el parametro adicional es heading que se lee del experiment.conf
Script test de pruebas actuales con el update de heading en el block 360, el parametro adicional es heading que se lee del experiment.conf

File last commit:

r1367:42e9a23049f5
r1759:c8ee9da660f1
Show More
test_sim00010.py
93 lines | 4.2 KiB | text/x-python | PythonLexer
import os, sys
import datetime
import time
from schainpy.controller import Project
'''
NOTA:
Este script de prueba.
- Unidad del lectura 'SimulatorReader'.
- Unidad de procesamiento VoltageProc
- Unidad de procesamiento SpectraProc (profileIndex no esta en metadata porque se queda en voltage.)
- Operacion removeDC.
- Unidad de procesamiento ParametersProc
- Operacion SpectralMoments
- Operacion SpectralMomentsPlot
- Unidad de escrituda 'HDFWriter'.
'''
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/soporte/Downloads/RAWDATA'
figpath = '/home/soporte/Downloads/IMAGE'
######################## UNIDAD DE LECTURA#############################
'''
readUnitConfObj = controllerObj.addReadUnit(datatype='VoltageReader',
path=path,
startDate="2020/01/01", #"2020/01/01",#today,
endDate= "2020/12/01", #"2020/12/30",#today,
startTime='00:00:00',
endTime='23:59:59',
delay=0,
#set=0,
online=0,
walk=1)
'''
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=600.0,
Hdoppler=36,
Adoppler=300,#300
delay=0,
online=0,
walk=0,
profilesPerBlock=625,
dataBlocksPerFile=100)
#nTotalReadFiles=2)
#opObj11 = readUnitConfObj.addOperation(name='printInfo')
procUnitConfObjA = controllerObj.addProcUnit(datatype='VoltageProc', inputId=readUnitConfObj.getId())
procUnitConfObjB = controllerObj.addProcUnit(datatype='SpectraProc', inputId=procUnitConfObjA.getId())
procUnitConfObjB.addParameter(name='nFFTPoints', value=625, format='int')
procUnitConfObjB.addParameter(name='nProfiles', value=625, format='int')
opObj11 = procUnitConfObjB.addOperation(name='removeDC')
opObj11.addParameter(name='mode', value=2)
#opObj11 = procUnitConfObjB.addOperation(name='SpectraPlot')
#opObj11 = procUnitConfObjB.addOperation(name='PowerProfilePlot')
procUnitConfObjC= controllerObj.addProcUnit(datatype='ParametersProc',inputId=procUnitConfObjB.getId())
procUnitConfObjC.addOperation(name='SpectralMoments')
#opObj11 = procUnitConfObjC.addOperation(name='PowerPlot')
opObj11 = procUnitConfObjC.addOperation(name='SpectralMomentsPlot')
#opObj11.addParameter(name='xmin', value=14)
#opObj11.addParameter(name='xmax', value=15)
opObj11.addParameter(name='save', value=figpath)
opObj11.addParameter(name='showprofile', value=1)
opObj11.addParameter(name='save_period', value=10)
opObj10 = procUnitConfObjC.addOperation(name='HDFWriter')
opObj10.addParameter(name='path',value=path)
#opObj10.addParameter(name='mode',value=0)
opObj10.addParameter(name='blocksPerFile',value='100',format='int')
opObj10.addParameter(name='metadataList',value='utctimeInit,heightList,nIncohInt,nCohInt,nProfiles,channelList',format='list')#profileIndex
opObj10.addParameter(name='dataList',value='data_pow,data_dop,utctime',format='list')#,format='list'
controllerObj.start()