##// END OF EJS Templates
Merge EW-Drifts
Merge EW-Drifts

File last commit:

r1396:f39ad5b721a3
r1396:f39ad5b721a3
Show More
test_sim0007.py
53 lines | 2.3 KiB | text/x-python | PythonLexer
test de pruebas
r1306 import os, sys
import datetime
import time
from schainpy.controller import Project
desc = "USRP_test"
filename = "USRP_processing.xml"
controllerObj = Project()
Merge EW-Drifts
r1396 controllerObj.setup(id='191', name='Test_USRP', description=desc)
test de pruebas
r1306
############## USED TO PLOT IQ VOLTAGE, POWER AND SPECTRA #############
######PATH DE LECTURA, ESCRITURA, GRAFICOS Y ENVIO WEB#################
Merge EW-Drifts
r1396 path = '/home/alex/Downloads/test_rawdata'
test de pruebas
r1306 figpath = '/home/alex/Downloads'
######################## UNIDAD DE LECTURA#############################
readUnitConfObj = controllerObj.addReadUnit(datatype='VoltageReader',
path=path,
Merge EW-Drifts
r1396 startDate="2020/01/01", # "2020/01/01",#today,
endDate="2020/12/01", # "2020/12/30",#today,
test de pruebas
r1306 startTime='00:00:00',
endTime='23:59:59',
delay=0,
Merge EW-Drifts
r1396 # set=0,
test de pruebas
r1306 online=0,
walk=1)
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=64, format='int')
procUnitConfObjB.addParameter(name='nProfiles', value=64, format='int')
'''
32 99.96 113.11 529.94s
64 97.3 122.96 326.26
128 96.29 100.23 230 894
256 98.65 102.83 182 640
'''
opObj11 = procUnitConfObjB.addOperation(name='removeDC')
opObj11.addParameter(name='mode', value=2)
Merge EW-Drifts
r1396 # opObj11 = procUnitConfObjB.addOperation(name='IncohInt', optype='other')
# opObj11.addParameter(name='n', value='20', format='int')
test de pruebas
r1306
procUnitConfObjC = controllerObj.addProcUnit(datatype='ParametersProc', inputId=procUnitConfObjB.getId())
procUnitConfObjC.addOperation(name='SpectralMoments')
opObj11 = procUnitConfObjC.addOperation(name='SpectralMomentsPlot')
Merge EW-Drifts
r1396 # opObj11.addParameter(name='xmin', value=14)
test de pruebas
r1306 opObj11.addParameter(name='xmax', value=6)
Merge EW-Drifts
r1396 # opObj11.addParameter(name='save', value=figpath)
test de pruebas
r1306 opObj11.addParameter(name='showprofile', value=1)
controllerObj.start()