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

File last commit:

r1396:f39ad5b721a3
r1396:f39ad5b721a3
Show More
test_002.py
87 lines | 3.2 KiB | text/x-python | PythonLexer
test de pruebas
r1306 #!python
'''
'''
import os, sys
import datetime
import time
Merge EW-Drifts
r1396 # path = os.path.dirname(os.getcwd())
# path = os.path.dirname(path)
# sys.path.insert(0, path)
test de pruebas
r1306
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 = '/media/data/data/vientos/57.2063km/echoes/NCO_Woodman'
test de pruebas
r1306
Merge EW-Drifts
r1396 # path = '/home/soporte/data_hdf5' #### with clock 35.16 db noise
path = '/home/alex/Downloads'
test de pruebas
r1306 figpath = '/home/alex/Downloads'
Merge EW-Drifts
r1396 pathfile = '/home/alex/Downloads/test_rawdata2'
test de pruebas
r1306
Merge EW-Drifts
r1396 # figpath = '/home/soporte/data_hdf5_imag'
# remotefolder = "/home/wmaster/graficos"
test de pruebas
r1306 #######################################################################
################# RANGO DE PLOTEO######################################
#######################################################################
dBmin = '30'
dBmax = '60'
xmin = '0'
Merge EW-Drifts
r1396 xmax = '24'
test de pruebas
r1306 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,
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')
Merge EW-Drifts
r1396 # opObj11 = readUnitConfObj.addOperation(name='printNumberOfBlock')
test de pruebas
r1306 #######################################################################
################ OPERACIONES DOMINIO DEL TIEMPO########################
#######################################################################
procUnitConfObjA = controllerObj.addProcUnit(datatype='VoltageProc', inputId=readUnitConfObj.getId())
opObj12 = procUnitConfObjA.addOperation(name='VoltageWriter', optype='other')
opObj12.addParameter(name='path', value=pathfile)
opObj12.addParameter(name='blocksPerFile', value='120', format='int')
opObj12.addParameter(name='profilesPerBlock', value='300', format='int')
print ("Escribiendo el archivo XML")
print ("Leyendo el archivo XML")
controllerObj.start()