##// END OF EJS Templates
agregado update_list en PlotRTI, nuevo parámetro t_units para uso de enteros en las horas del RTI en plot_base
agregado update_list en PlotRTI, nuevo parámetro t_units para uso de enteros en las horas del RTI en plot_base

File last commit:

r1397:9109c52a497c
r1398:957121df3325
Show More
jroproc_voltage.py
1622 lines | 50.5 KiB | text/x-python | PythonLexer
Ivan Valdez
Bug fixed: importing sys module
r723 import sys
update for weather radar options
r1296 import numpy,math
Julio Valdez
jroproc_voltage.py: Interpolate heights operation fixed
r837 from scipy import interpolate
Juan C. Espinoza
fix typo :(
r1178 from schainpy.model.proc.jroproc_base import ProcessingUnit, Operation, MPDecorator
modifiacion de la clase pulse pair, correcion de errores del Noise con removeDC y los 4 momentos
r1314 from schainpy.model.data.jrodata import Voltage,hildebrand_sekhon
George Yong
Python 2to3, Voltage (all operations) working
r1168 from schainpy.utils import log
George Yong
Multiprocessing for voltage (all operations) working
r1173 from time import time
George Yong
Python 2to3, Voltage (all operations) working
r1168
Daniel Valdez
This is the new organization by packages and scripts for Signal Chain, this version contains new features and bugs fixed until August 2014
r487
Juan C. Espinoza
Rewrite controller, remove MPDecorator to units (keep for plots an writers) use of queues for interproc comm instead of zmq, self operations are no longer supported
r1287
Modificación a kmamisr para ejecutarse en la versión 3, creación de scripts con terminación v3 para difereciarlos, se comentó la linea #720 de JroIO_param.py debido a que reiniciaba la lista de archivos, ocasionando la reescritura del archivo hdf5. Alguna otra modificación aparente es producto de algunas variaciones en espacios al usar la función print()
r1279 class VoltageProc(ProcessingUnit):
Juan C. Espinoza
Review MP changes, three types of operations: self, other and external
r1177 def __init__(self):
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Juan C. Espinoza
Review MP changes, three types of operations: self, other and external
r1177 ProcessingUnit.__init__(self)
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Daniel Valdez
This is the new organization by packages and scripts for Signal Chain, this version contains new features and bugs fixed until August 2014
r487 self.dataOut = Voltage()
self.flip = 1
Juan C. Espinoza
Review MP changes, three types of operations: self, other and external
r1177 self.setupReq = False
Daniel Valdez
This is the new organization by packages and scripts for Signal Chain, this version contains new features and bugs fixed until August 2014
r487
def run(self):
George Yong
Multiprocessing for voltage (all operations) working
r1173
Daniel Valdez
AMISR modules to read hdf5 files and link to SignalChain Objects...
r491 if self.dataIn.type == 'AMISR':
self.__updateObjFromAmisrInput()
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Daniel Valdez
AMISR modules to read hdf5 files and link to SignalChain Objects...
r491 if self.dataIn.type == 'Voltage':
self.dataOut.copy(self.dataIn)
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Daniel Valdez
AMISR modules to read hdf5 files and link to SignalChain Objects...
r491 def __updateObjFromAmisrInput(self):
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Daniel Valdez
AMISR modules to read hdf5 files and link to SignalChain Objects...
r491 self.dataOut.timeZone = self.dataIn.timeZone
self.dataOut.dstFlag = self.dataIn.dstFlag
self.dataOut.errorCount = self.dataIn.errorCount
self.dataOut.useLocalTime = self.dataIn.useLocalTime
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Daniel Valdez
AMISR modules to read hdf5 files and link to SignalChain Objects...
r491 self.dataOut.flagNoData = self.dataIn.flagNoData
self.dataOut.data = self.dataIn.data
self.dataOut.utctime = self.dataIn.utctime
self.dataOut.channelList = self.dataIn.channelList
George Yong
Multiprocessing for writing Units(Spectral, Voltage and Parameters)
r1179 #self.dataOut.timeInterval = self.dataIn.timeInterval
Daniel Valdez
AMISR modules to read hdf5 files and link to SignalChain Objects...
r491 self.dataOut.heightList = self.dataIn.heightList
self.dataOut.nProfiles = self.dataIn.nProfiles
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Daniel Valdez
AMISR modules to read hdf5 files and link to SignalChain Objects...
r491 self.dataOut.nCohInt = self.dataIn.nCohInt
self.dataOut.ippSeconds = self.dataIn.ippSeconds
self.dataOut.frequency = self.dataIn.frequency
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Daniel Valdez
Filtering AMISR files for Datetime Range...
r499 self.dataOut.azimuth = self.dataIn.azimuth
self.dataOut.zenith = self.dataIn.zenith
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Daniel Valdez
ProfileToChannels this is a new Operation to get data with dimensions [nchannels,nsamples]
r501 self.dataOut.beam.codeList = self.dataIn.beam.codeList
self.dataOut.beam.azimuthList = self.dataIn.beam.azimuthList
self.dataOut.beam.zenithList = self.dataIn.beam.zenithList
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Juan C. Espinoza
Rewrite controller, remove MPDecorator to units (keep for plots an writers) use of queues for interproc comm instead of zmq, self operations are no longer supported
r1287 class selectChannels(Operation):
update for weather radar options
r1296
Juan C. Espinoza
Rewrite controller, remove MPDecorator to units (keep for plots an writers) use of queues for interproc comm instead of zmq, self operations are no longer supported
r1287 def run(self, dataOut, channelList):
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Daniel Valdez
This is the new organization by packages and scripts for Signal Chain, this version contains new features and bugs fixed until August 2014
r487 channelIndexList = []
Juan C. Espinoza
Rewrite controller, remove MPDecorator to units (keep for plots an writers) use of queues for interproc comm instead of zmq, self operations are no longer supported
r1287 self.dataOut = dataOut
Daniel Valdez
This is the new organization by packages and scripts for Signal Chain, this version contains new features and bugs fixed until August 2014
r487 for channel in channelList:
Miguel Valdez
Signal Chain GUI updated:...
r586 if channel not in self.dataOut.channelList:
George Yong
Python 2to3, Spectra (all operations) working
r1167 raise ValueError("Channel %d is not in %s" %(channel, str(self.dataOut.channelList)))
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Daniel Valdez
This is the new organization by packages and scripts for Signal Chain, this version contains new features and bugs fixed until August 2014
r487 index = self.dataOut.channelList.index(channel)
channelIndexList.append(index)
self.selectChannelsByIndex(channelIndexList)
Juan C. Espinoza
Rewrite controller, remove MPDecorator to units (keep for plots an writers) use of queues for interproc comm instead of zmq, self operations are no longer supported
r1287 return self.dataOut
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Daniel Valdez
This is the new organization by packages and scripts for Signal Chain, this version contains new features and bugs fixed until August 2014
r487 def selectChannelsByIndex(self, channelIndexList):
"""
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897 Selecciona un bloque de datos en base a canales segun el channelIndexList
Daniel Valdez
This is the new organization by packages and scripts for Signal Chain, this version contains new features and bugs fixed until August 2014
r487 Input:
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897 channelIndexList : lista sencilla de canales a seleccionar por ej. [2,3,7]
Daniel Valdez
This is the new organization by packages and scripts for Signal Chain, this version contains new features and bugs fixed until August 2014
r487 Affected:
self.dataOut.data
self.dataOut.channelIndexList
self.dataOut.nChannels
self.dataOut.m_ProcessingHeader.totalSpectra
self.dataOut.systemHeaderObj.numChannels
self.dataOut.m_ProcessingHeader.blockSize
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Daniel Valdez
This is the new organization by packages and scripts for Signal Chain, this version contains new features and bugs fixed until August 2014
r487 Return:
None
"""
for channelIndex in channelIndexList:
if channelIndex not in self.dataOut.channelIndexList:
George Yong
Python 2to3, Spectra (all operations) working
r1167 raise ValueError("The value %d in channelIndexList is not valid" %channelIndex)
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Juan C. Espinoza
Rewrite controller, remove MPDecorator to units (keep for plots an writers) use of queues for interproc comm instead of zmq, self operations are no longer supported
r1287 if self.dataOut.type == 'Voltage':
if self.dataOut.flagDataAsBlock:
"""
Si la data es obtenida por bloques, dimension = [nChannels, nProfiles, nHeis]
"""
data = self.dataOut.data[channelIndexList,:,:]
else:
data = self.dataOut.data[channelIndexList,:]
self.dataOut.data = data
# self.dataOut.channelList = [self.dataOut.channelList[i] for i in channelIndexList]
self.dataOut.channelList = range(len(channelIndexList))
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Juan C. Espinoza
Rewrite controller, remove MPDecorator to units (keep for plots an writers) use of queues for interproc comm instead of zmq, self operations are no longer supported
r1287 elif self.dataOut.type == 'Spectra':
data_spc = self.dataOut.data_spc[channelIndexList, :]
data_dc = self.dataOut.data_dc[channelIndexList, :]
self.dataOut.data_spc = data_spc
self.dataOut.data_dc = data_dc
# self.dataOut.channelList = [self.dataOut.channelList[i] for i in channelIndexList]
Se cambió los títulos en SpectraPlot y RTIPlot para que muestre los canales reales luego de la operación selectChannels
r1386 self.dataOut.channelList = channelIndexList
Juan C. Espinoza
Rewrite controller, remove MPDecorator to units (keep for plots an writers) use of queues for interproc comm instead of zmq, self operations are no longer supported
r1287 self.__selectPairsByChannel(channelIndexList)
Modificación a kmamisr para ejecutarse en la versión 3, creación de scripts con terminación v3 para difereciarlos, se comentó la linea #720 de JroIO_param.py debido a que reiniciaba la lista de archivos, ocasionando la reescritura del archivo hdf5. Alguna otra modificación aparente es producto de algunas variaciones en espacios al usar la función print()
r1279
Daniel Valdez
This is the new organization by packages and scripts for Signal Chain, this version contains new features and bugs fixed until August 2014
r487 return 1
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Juan C. Espinoza
Rewrite controller, remove MPDecorator to units (keep for plots an writers) use of queues for interproc comm instead of zmq, self operations are no longer supported
r1287 def __selectPairsByChannel(self, channelList=None):
if channelList == None:
return
pairsIndexListSelected = []
for pairIndex in self.dataOut.pairsIndexList:
# First pair
if self.dataOut.pairsList[pairIndex][0] not in channelList:
continue
# Second pair
if self.dataOut.pairsList[pairIndex][1] not in channelList:
continue
pairsIndexListSelected.append(pairIndex)
if not pairsIndexListSelected:
self.dataOut.data_cspc = None
self.dataOut.pairsList = []
return
self.dataOut.data_cspc = self.dataOut.data_cspc[pairsIndexListSelected]
self.dataOut.pairsList = [self.dataOut.pairsList[i]
for i in pairsIndexListSelected]
return
class selectHeights(Operation):
update for weather radar options
r1296
Beta 6, add dopplerFlip operation, fix selectHeights
r1344 def run(self, dataOut, minHei=None, maxHei=None, minIndex=None, maxIndex=None):
Daniel Valdez
This is the new organization by packages and scripts for Signal Chain, this version contains new features and bugs fixed until August 2014
r487 """
Selecciona un bloque de datos en base a un grupo de valores de alturas segun el rango
minHei <= height <= maxHei
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Daniel Valdez
This is the new organization by packages and scripts for Signal Chain, this version contains new features and bugs fixed until August 2014
r487 Input:
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897 minHei : valor minimo de altura a considerar
Daniel Valdez
This is the new organization by packages and scripts for Signal Chain, this version contains new features and bugs fixed until August 2014
r487 maxHei : valor maximo de altura a considerar
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Daniel Valdez
This is the new organization by packages and scripts for Signal Chain, this version contains new features and bugs fixed until August 2014
r487 Affected:
Indirectamente son cambiados varios valores a travez del metodo selectHeightsByIndex
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Daniel Valdez
This is the new organization by packages and scripts for Signal Chain, this version contains new features and bugs fixed until August 2014
r487 Return:
1 si el metodo se ejecuto con exito caso contrario devuelve 0
"""
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Juan C. Espinoza
Rewrite controller, remove MPDecorator to units (keep for plots an writers) use of queues for interproc comm instead of zmq, self operations are no longer supported
r1287 self.dataOut = dataOut
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Beta 6, add dopplerFlip operation, fix selectHeights
r1344 if minHei and maxHei:
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Beta 6, add dopplerFlip operation, fix selectHeights
r1344 if (minHei < self.dataOut.heightList[0]):
minHei = self.dataOut.heightList[0]
Miguel Valdez
-Using ValueError raises instead of IOError...
r684
Beta 6, add dopplerFlip operation, fix selectHeights
r1344 if (maxHei > self.dataOut.heightList[-1]):
maxHei = self.dataOut.heightList[-1]
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Beta 6, add dopplerFlip operation, fix selectHeights
r1344 minIndex = 0
maxIndex = 0
heights = self.dataOut.heightList
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Beta 6, add dopplerFlip operation, fix selectHeights
r1344 inda = numpy.where(heights >= minHei)
indb = numpy.where(heights <= maxHei)
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Beta 6, add dopplerFlip operation, fix selectHeights
r1344 try:
minIndex = inda[0][0]
except:
minIndex = 0
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Beta 6, add dopplerFlip operation, fix selectHeights
r1344 try:
maxIndex = indb[0][-1]
except:
maxIndex = len(heights)
Daniel Valdez
This is the new organization by packages and scripts for Signal Chain, this version contains new features and bugs fixed until August 2014
r487
self.selectHeightsByIndex(minIndex, maxIndex)
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Juan C. Espinoza
Rewrite controller, remove MPDecorator to units (keep for plots an writers) use of queues for interproc comm instead of zmq, self operations are no longer supported
r1287 return self.dataOut
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Daniel Valdez
This is the new organization by packages and scripts for Signal Chain, this version contains new features and bugs fixed until August 2014
r487 def selectHeightsByIndex(self, minIndex, maxIndex):
"""
Selecciona un bloque de datos en base a un grupo indices de alturas segun el rango
minIndex <= index <= maxIndex
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Daniel Valdez
This is the new organization by packages and scripts for Signal Chain, this version contains new features and bugs fixed until August 2014
r487 Input:
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897 minIndex : valor de indice minimo de altura a considerar
Daniel Valdez
This is the new organization by packages and scripts for Signal Chain, this version contains new features and bugs fixed until August 2014
r487 maxIndex : valor de indice maximo de altura a considerar
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Daniel Valdez
This is the new organization by packages and scripts for Signal Chain, this version contains new features and bugs fixed until August 2014
r487 Affected:
self.dataOut.data
self.dataOut.heightList
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Daniel Valdez
This is the new organization by packages and scripts for Signal Chain, this version contains new features and bugs fixed until August 2014
r487 Return:
1 si el metodo se ejecuto con exito caso contrario devuelve 0
"""
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Juan C. Espinoza
Rewrite controller, remove MPDecorator to units (keep for plots an writers) use of queues for interproc comm instead of zmq, self operations are no longer supported
r1287 if self.dataOut.type == 'Voltage':
if (minIndex < 0) or (minIndex > maxIndex):
raise ValueError("Height index range (%d,%d) is not valid" % (minIndex, maxIndex))
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Juan C. Espinoza
Rewrite controller, remove MPDecorator to units (keep for plots an writers) use of queues for interproc comm instead of zmq, self operations are no longer supported
r1287 if (maxIndex >= self.dataOut.nHeights):
maxIndex = self.dataOut.nHeights
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Juan C. Espinoza
Rewrite controller, remove MPDecorator to units (keep for plots an writers) use of queues for interproc comm instead of zmq, self operations are no longer supported
r1287 #voltage
if self.dataOut.flagDataAsBlock:
"""
Si la data es obtenida por bloques, dimension = [nChannels, nProfiles, nHeis]
"""
data = self.dataOut.data[:,:, minIndex:maxIndex]
else:
data = self.dataOut.data[:, minIndex:maxIndex]
# firstHeight = self.dataOut.heightList[minIndex]
self.dataOut.data = data
self.dataOut.heightList = self.dataOut.heightList[minIndex:maxIndex]
if self.dataOut.nHeights <= 1:
raise ValueError("selectHeights: Too few heights. Current number of heights is %d" %(self.dataOut.nHeights))
elif self.dataOut.type == 'Spectra':
if (minIndex < 0) or (minIndex > maxIndex):
raise ValueError("Error selecting heights: Index range (%d,%d) is not valid" % (
minIndex, maxIndex))
Daniel Valdez
This is the new organization by packages and scripts for Signal Chain, this version contains new features and bugs fixed until August 2014
r487
Juan C. Espinoza
Rewrite controller, remove MPDecorator to units (keep for plots an writers) use of queues for interproc comm instead of zmq, self operations are no longer supported
r1287 if (maxIndex >= self.dataOut.nHeights):
maxIndex = self.dataOut.nHeights - 1
Daniel Valdez
This is the new organization by packages and scripts for Signal Chain, this version contains new features and bugs fixed until August 2014
r487
Juan C. Espinoza
Rewrite controller, remove MPDecorator to units (keep for plots an writers) use of queues for interproc comm instead of zmq, self operations are no longer supported
r1287 # Spectra
data_spc = self.dataOut.data_spc[:, :, minIndex:maxIndex + 1]
Daniel Valdez
This is the new organization by packages and scripts for Signal Chain, this version contains new features and bugs fixed until August 2014
r487
Juan C. Espinoza
Rewrite controller, remove MPDecorator to units (keep for plots an writers) use of queues for interproc comm instead of zmq, self operations are no longer supported
r1287 data_cspc = None
if self.dataOut.data_cspc is not None:
data_cspc = self.dataOut.data_cspc[:, :, minIndex:maxIndex + 1]
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Juan C. Espinoza
Rewrite controller, remove MPDecorator to units (keep for plots an writers) use of queues for interproc comm instead of zmq, self operations are no longer supported
r1287 data_dc = None
if self.dataOut.data_dc is not None:
data_dc = self.dataOut.data_dc[:, minIndex:maxIndex + 1]
self.dataOut.data_spc = data_spc
self.dataOut.data_cspc = data_cspc
self.dataOut.data_dc = data_dc
self.dataOut.heightList = self.dataOut.heightList[minIndex:maxIndex + 1]
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Daniel Valdez
This is the new organization by packages and scripts for Signal Chain, this version contains new features and bugs fixed until August 2014
r487 return 1
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Juan C. Espinoza
Rewrite controller, remove MPDecorator to units (keep for plots an writers) use of queues for interproc comm instead of zmq, self operations are no longer supported
r1287 class filterByHeights(Operation):
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Juan C. Espinoza
Rewrite controller, remove MPDecorator to units (keep for plots an writers) use of queues for interproc comm instead of zmq, self operations are no longer supported
r1287 def run(self, dataOut, window):
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Juan C. Espinoza
Rewrite controller, remove MPDecorator to units (keep for plots an writers) use of queues for interproc comm instead of zmq, self operations are no longer supported
r1287 deltaHeight = dataOut.heightList[1] - dataOut.heightList[0]
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Daniel Valdez
This is the new organization by packages and scripts for Signal Chain, this version contains new features and bugs fixed until August 2014
r487 if window == None:
Juan C. Espinoza
Rewrite controller, remove MPDecorator to units (keep for plots an writers) use of queues for interproc comm instead of zmq, self operations are no longer supported
r1287 window = (dataOut.radarControllerHeaderObj.txA/dataOut.radarControllerHeaderObj.nBaud) / deltaHeight
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Daniel Valdez
This is the new organization by packages and scripts for Signal Chain, this version contains new features and bugs fixed until August 2014
r487 newdelta = deltaHeight * window
Juan C. Espinoza
Rewrite controller, remove MPDecorator to units (keep for plots an writers) use of queues for interproc comm instead of zmq, self operations are no longer supported
r1287 r = dataOut.nHeights % window
newheights = (dataOut.nHeights-r)/window
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
Signal Chain GUI v2.1
r596 if newheights <= 1:
Juan C. Espinoza
Rewrite controller, remove MPDecorator to units (keep for plots an writers) use of queues for interproc comm instead of zmq, self operations are no longer supported
r1287 raise ValueError("filterByHeights: Too few heights. Current number of heights is %d and window is %d" %(dataOut.nHeights, window))
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Juan C. Espinoza
Rewrite controller, remove MPDecorator to units (keep for plots an writers) use of queues for interproc comm instead of zmq, self operations are no longer supported
r1287 if dataOut.flagDataAsBlock:
Miguel Valdez
jroproc_voltage.py: Many methods were changed when flagDataAsBlock is set. Different process when data is read as block or profile by profile
r530 """
Si la data es obtenida por bloques, dimension = [nChannels, nProfiles, nHeis]
"""
update for weather radar options
r1296 buffer = dataOut.data[:, :, 0:int(dataOut.nHeights-r)]
Juan C. Espinoza
Rewrite controller, remove MPDecorator to units (keep for plots an writers) use of queues for interproc comm instead of zmq, self operations are no longer supported
r1287 buffer = buffer.reshape(dataOut.nChannels, dataOut.nProfiles, int(dataOut.nHeights/window), window)
Miguel Valdez
jroproc_voltage.py: Many methods were changed when flagDataAsBlock is set. Different process when data is read as block or profile by profile
r530 buffer = numpy.sum(buffer,3)
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
jroproc_voltage.py: Many methods were changed when flagDataAsBlock is set. Different process when data is read as block or profile by profile
r530 else:
Juan C. Espinoza
Rewrite controller, remove MPDecorator to units (keep for plots an writers) use of queues for interproc comm instead of zmq, self operations are no longer supported
r1287 buffer = dataOut.data[:,0:int(dataOut.nHeights-r)]
buffer = buffer.reshape(dataOut.nChannels,int(dataOut.nHeights/window),int(window))
Miguel Valdez
jroproc_voltage.py: Many methods were changed when flagDataAsBlock is set. Different process when data is read as block or profile by profile
r530 buffer = numpy.sum(buffer,2)
Juan C. Espinoza
Rewrite controller, remove MPDecorator to units (keep for plots an writers) use of queues for interproc comm instead of zmq, self operations are no longer supported
r1287 dataOut.data = buffer
dataOut.heightList = dataOut.heightList[0] + numpy.arange( newheights )*newdelta
dataOut.windowOfFilter = window
return dataOut
Miguel Valdez
Merge with branch schain_julia_drifts from rev. 803 to 995....
r568
Juan C. Espinoza
Rewrite controller, remove MPDecorator to units (keep for plots an writers) use of queues for interproc comm instead of zmq, self operations are no longer supported
r1287 class setH0(Operation):
def run(self, dataOut, h0, deltaHeight = None):
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
Merge with branch schain_julia_drifts from rev. 803 to 995....
r568 if not deltaHeight:
Juan C. Espinoza
Rewrite controller, remove MPDecorator to units (keep for plots an writers) use of queues for interproc comm instead of zmq, self operations are no longer supported
r1287 deltaHeight = dataOut.heightList[1] - dataOut.heightList[0]
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Juan C. Espinoza
Rewrite controller, remove MPDecorator to units (keep for plots an writers) use of queues for interproc comm instead of zmq, self operations are no longer supported
r1287 nHeights = dataOut.nHeights
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
Merge with branch schain_julia_drifts from rev. 803 to 995....
r568 newHeiRange = h0 + numpy.arange(nHeights)*deltaHeight
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Juan C. Espinoza
Rewrite controller, remove MPDecorator to units (keep for plots an writers) use of queues for interproc comm instead of zmq, self operations are no longer supported
r1287 dataOut.heightList = newHeiRange
return dataOut
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Juan C. Espinoza
Rewrite controller, remove MPDecorator to units (keep for plots an writers) use of queues for interproc comm instead of zmq, self operations are no longer supported
r1287 class deFlip(Operation):
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Juan C. Espinoza
Rewrite controller, remove MPDecorator to units (keep for plots an writers) use of queues for interproc comm instead of zmq, self operations are no longer supported
r1287 def run(self, dataOut, channelList = []):
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Juan C. Espinoza
Rewrite controller, remove MPDecorator to units (keep for plots an writers) use of queues for interproc comm instead of zmq, self operations are no longer supported
r1287 data = dataOut.data.copy()
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Juan C. Espinoza
Rewrite controller, remove MPDecorator to units (keep for plots an writers) use of queues for interproc comm instead of zmq, self operations are no longer supported
r1287 if dataOut.flagDataAsBlock:
Miguel Valdez
jroproc_voltage.py: Many methods were changed when flagDataAsBlock is set. Different process when data is read as block or profile by profile
r530 flip = self.flip
Juan C. Espinoza
Rewrite controller, remove MPDecorator to units (keep for plots an writers) use of queues for interproc comm instead of zmq, self operations are no longer supported
r1287 profileList = list(range(dataOut.nProfiles))
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
Signal Chain GUI updated:...
r587 if not channelList:
Miguel Valdez
jroproc_voltage.py: Many methods were changed when flagDataAsBlock is set. Different process when data is read as block or profile by profile
r530 for thisProfile in profileList:
data[:,thisProfile,:] = data[:,thisProfile,:]*flip
flip *= -1.0
else:
for thisChannel in channelList:
Juan C. Espinoza
Rewrite controller, remove MPDecorator to units (keep for plots an writers) use of queues for interproc comm instead of zmq, self operations are no longer supported
r1287 if thisChannel not in dataOut.channelList:
Miguel Valdez
Signal Chain GUI updated:...
r586 continue
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
jroproc_voltage.py: Many methods were changed when flagDataAsBlock is set. Different process when data is read as block or profile by profile
r530 for thisProfile in profileList:
data[thisChannel,thisProfile,:] = data[thisChannel,thisProfile,:]*flip
flip *= -1.0
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
jroproc_voltage.py: Many methods were changed when flagDataAsBlock is set. Different process when data is read as block or profile by profile
r530 self.flip = flip
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
jroproc_voltage.py: Many methods were changed when flagDataAsBlock is set. Different process when data is read as block or profile by profile
r530 else:
Miguel Valdez
Signal Chain GUI updated:...
r587 if not channelList:
Miguel Valdez
jroproc_voltage.py: Many methods were changed when flagDataAsBlock is set. Different process when data is read as block or profile by profile
r530 data[:,:] = data[:,:]*self.flip
else:
for thisChannel in channelList:
Juan C. Espinoza
Rewrite controller, remove MPDecorator to units (keep for plots an writers) use of queues for interproc comm instead of zmq, self operations are no longer supported
r1287 if thisChannel not in dataOut.channelList:
Miguel Valdez
Signal Chain GUI updated:...
r586 continue
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
jroproc_voltage.py: Many methods were changed when flagDataAsBlock is set. Different process when data is read as block or profile by profile
r530 data[thisChannel,:] = data[thisChannel,:]*self.flip
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
jroproc_voltage.py: Many methods were changed when flagDataAsBlock is set. Different process when data is read as block or profile by profile
r530 self.flip *= -1.
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Juan C. Espinoza
Rewrite controller, remove MPDecorator to units (keep for plots an writers) use of queues for interproc comm instead of zmq, self operations are no longer supported
r1287 dataOut.data = data
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Juan C. Espinoza
Rewrite controller, remove MPDecorator to units (keep for plots an writers) use of queues for interproc comm instead of zmq, self operations are no longer supported
r1287 return dataOut
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Juan C. Espinoza
Rewrite controller, remove MPDecorator to units (keep for plots an writers) use of queues for interproc comm instead of zmq, self operations are no longer supported
r1287 class setAttribute(Operation):
'''
Juan C. Espinoza
New GUI added (kivy framework), clean code, delete unused files
r1288 Set an arbitrary attribute(s) to dataOut
Juan C. Espinoza
Rewrite controller, remove MPDecorator to units (keep for plots an writers) use of queues for interproc comm instead of zmq, self operations are no longer supported
r1287 '''
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Juan C. Espinoza
Rewrite controller, remove MPDecorator to units (keep for plots an writers) use of queues for interproc comm instead of zmq, self operations are no longer supported
r1287 def __init__(self):
Operation.__init__(self)
self._ready = False
def run(self, dataOut, **kwargs):
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Juan C. Espinoza
Rewrite controller, remove MPDecorator to units (keep for plots an writers) use of queues for interproc comm instead of zmq, self operations are no longer supported
r1287 for key, value in kwargs.items():
setattr(dataOut, key, value)
return dataOut
Juan C. Espinoza
Update plots modules
r1308 @MPDecorator
class printAttribute(Operation):
'''
Print an arbitrary attribute of dataOut
'''
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Juan C. Espinoza
Update plots modules
r1308 def __init__(self):
Operation.__init__(self)
def run(self, dataOut, attributes):
Add metadata attribute to data types
r1338 if isinstance(attributes, str):
attributes = [attributes]
Juan C. Espinoza
Update plots modules
r1308 for attr in attributes:
if hasattr(dataOut, attr):
log.log(getattr(dataOut, attr), attr)
Juan C. Espinoza
Rewrite controller, remove MPDecorator to units (keep for plots an writers) use of queues for interproc comm instead of zmq, self operations are no longer supported
r1287 class interpolateHeights(Operation):
def run(self, dataOut, topLim, botLim):
Julio Valdez
-Function to interpolate corrupted profiles
r836 #69 al 72 para julia
#82-84 para meteoros
Juan C. Espinoza
Rewrite controller, remove MPDecorator to units (keep for plots an writers) use of queues for interproc comm instead of zmq, self operations are no longer supported
r1287 if len(numpy.shape(dataOut.data))==2:
sampInterp = (dataOut.data[:,botLim-1] + dataOut.data[:,topLim+1])/2
Julio Valdez
-Function to interpolate corrupted profiles
r836 sampInterp = numpy.transpose(numpy.tile(sampInterp,(topLim-botLim + 1,1)))
Juan C. Espinoza
Rewrite controller, remove MPDecorator to units (keep for plots an writers) use of queues for interproc comm instead of zmq, self operations are no longer supported
r1287 #dataOut.data[:,botLim:limSup+1] = sampInterp
dataOut.data[:,botLim:topLim+1] = sampInterp
Julio Valdez
-Function to interpolate corrupted profiles
r836 else:
Juan C. Espinoza
Rewrite controller, remove MPDecorator to units (keep for plots an writers) use of queues for interproc comm instead of zmq, self operations are no longer supported
r1287 nHeights = dataOut.data.shape[2]
Julio Valdez
jroproc_voltage.py: Interpolate heights operation fixed
r837 x = numpy.hstack((numpy.arange(botLim),numpy.arange(topLim+1,nHeights)))
Juan C. Espinoza
Rewrite controller, remove MPDecorator to units (keep for plots an writers) use of queues for interproc comm instead of zmq, self operations are no longer supported
r1287 y = dataOut.data[:,:,list(range(botLim))+list(range(topLim+1,nHeights))]
Julio Valdez
jroproc_voltage.py: Interpolate heights operation fixed
r837 f = interpolate.interp1d(x, y, axis = 2)
xnew = numpy.arange(botLim,topLim+1)
ynew = f(xnew)
Juan C. Espinoza
Rewrite controller, remove MPDecorator to units (keep for plots an writers) use of queues for interproc comm instead of zmq, self operations are no longer supported
r1287 dataOut.data[:,:,botLim:topLim+1] = ynew
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Juan C. Espinoza
Rewrite controller, remove MPDecorator to units (keep for plots an writers) use of queues for interproc comm instead of zmq, self operations are no longer supported
r1287 return dataOut
Julio Valdez
jroproc_voltage.py: Interpolate heights operation fixed
r837
Juan C. Espinoza
Review MP changes, three types of operations: self, other and external
r1177
Daniel Valdez
This is the new organization by packages and scripts for Signal Chain, this version contains new features and bugs fixed until August 2014
r487 class CohInt(Operation):
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Daniel Valdez
This is the new organization by packages and scripts for Signal Chain, this version contains new features and bugs fixed until August 2014
r487 isConfig = False
__profIndex = 0
__byTime = False
__initime = None
__lastdatatime = None
__integrationtime = None
__buffer = None
José Chávez
sumado de stride en stride. ej 96 -> 24x4 -> 1
r1116 __bufferStride = []
Daniel Valdez
This is the new organization by packages and scripts for Signal Chain, this version contains new features and bugs fixed until August 2014
r487 __dataReady = False
José Chávez
sumado de stride en stride. ej 96 -> 24x4 -> 1
r1116 __profIndexStride = 0
__dataToPutStride = False
Daniel Valdez
This is the new organization by packages and scripts for Signal Chain, this version contains new features and bugs fixed until August 2014
r487 n = None
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
George Yong
Multiprocessing for writing Units(Spectral, Voltage and Parameters)
r1179 def __init__(self, **kwargs):
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
George Yong
Multiprocessing for writing Units(Spectral, Voltage and Parameters)
r1179 Operation.__init__(self, **kwargs)
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
José Chávez
sumado de stride en stride. ej 96 -> 24x4 -> 1
r1116 def setup(self, n=None, timeInterval=None, stride=None, overlapping=False, byblock=False):
Daniel Valdez
This is the new organization by packages and scripts for Signal Chain, this version contains new features and bugs fixed until August 2014
r487 """
Set the parameters of the integration class.
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Daniel Valdez
This is the new organization by packages and scripts for Signal Chain, this version contains new features and bugs fixed until August 2014
r487 Inputs:
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
José Chávez
algunos cambios en roj
r953 n : Number of coherent integrations
timeInterval : Time of integration. If the parameter "n" is selected this one does not work
overlapping :
Daniel Valdez
This is the new organization by packages and scripts for Signal Chain, this version contains new features and bugs fixed until August 2014
r487 """
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Daniel Valdez
This is the new organization by packages and scripts for Signal Chain, this version contains new features and bugs fixed until August 2014
r487 self.__initime = None
self.__lastdatatime = 0
self.__buffer = None
self.__dataReady = False
Daniel Valdez
Reading and doing Operation in Blocks to processing radar data from MST_ISR_EEJ Experiment
r495 self.byblock = byblock
José Chávez
sumado de stride en stride. ej 96 -> 24x4 -> 1
r1116 self.stride = stride
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Daniel Valdez
This is the new organization by packages and scripts for Signal Chain, this version contains new features and bugs fixed until August 2014
r487 if n == None and timeInterval == None:
George Yong
Python 2to3, Spectra (all operations) working
r1167 raise ValueError("n or timeInterval should be specified ...")
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Daniel Valdez
This is the new organization by packages and scripts for Signal Chain, this version contains new features and bugs fixed until August 2014
r487 if n != None:
self.n = n
self.__byTime = False
else:
Daniel Valdez
Bug Fixed: AMISR Setup File does not correspond with the experiment range dates...
r510 self.__integrationtime = timeInterval #* 60. #if (type(timeInterval)!=integer) -> change this line
Daniel Valdez
This is the new organization by packages and scripts for Signal Chain, this version contains new features and bugs fixed until August 2014
r487 self.n = 9999
self.__byTime = True
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Daniel Valdez
This is the new organization by packages and scripts for Signal Chain, this version contains new features and bugs fixed until August 2014
r487 if overlapping:
José Chávez
sumado de stride en stride. ej 96 -> 24x4 -> 1
r1116 self.__withOverlapping = True
Daniel Valdez
This is the new organization by packages and scripts for Signal Chain, this version contains new features and bugs fixed until August 2014
r487 self.__buffer = None
else:
José Chávez
sumado de stride en stride. ej 96 -> 24x4 -> 1
r1116 self.__withOverlapping = False
Daniel Valdez
This is the new organization by packages and scripts for Signal Chain, this version contains new features and bugs fixed until August 2014
r487 self.__buffer = 0
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Daniel Valdez
This is the new organization by packages and scripts for Signal Chain, this version contains new features and bugs fixed until August 2014
r487 self.__profIndex = 0
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Daniel Valdez
This is the new organization by packages and scripts for Signal Chain, this version contains new features and bugs fixed until August 2014
r487 def putData(self, data):
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Daniel Valdez
This is the new organization by packages and scripts for Signal Chain, this version contains new features and bugs fixed until August 2014
r487 """
Add a profile to the __buffer and increase in one the __profileIndex
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Daniel Valdez
This is the new organization by packages and scripts for Signal Chain, this version contains new features and bugs fixed until August 2014
r487 """
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
José Chávez
sumado de stride en stride. ej 96 -> 24x4 -> 1
r1116 if not self.__withOverlapping:
Daniel Valdez
This is the new organization by packages and scripts for Signal Chain, this version contains new features and bugs fixed until August 2014
r487 self.__buffer += data.copy()
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897 self.__profIndex += 1
Daniel Valdez
This is the new organization by packages and scripts for Signal Chain, this version contains new features and bugs fixed until August 2014
r487 return
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Daniel Valdez
This is the new organization by packages and scripts for Signal Chain, this version contains new features and bugs fixed until August 2014
r487 #Overlapping data
nChannels, nHeis = data.shape
data = numpy.reshape(data, (1, nChannels, nHeis))
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Daniel Valdez
This is the new organization by packages and scripts for Signal Chain, this version contains new features and bugs fixed until August 2014
r487 #If the buffer is empty then it takes the data value
Miguel Valdez
Bug fixed: Padding decode data with zeros at the first heights was eliminated.
r611 if self.__buffer is None:
Daniel Valdez
This is the new organization by packages and scripts for Signal Chain, this version contains new features and bugs fixed until August 2014
r487 self.__buffer = data
self.__profIndex += 1
return
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Daniel Valdez
This is the new organization by packages and scripts for Signal Chain, this version contains new features and bugs fixed until August 2014
r487 #If the buffer length is lower than n then stakcing the data value
if self.__profIndex < self.n:
self.__buffer = numpy.vstack((self.__buffer, data))
self.__profIndex += 1
return
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
#If the buffer length is equal to n then replacing the last buffer value with the data value
Daniel Valdez
This is the new organization by packages and scripts for Signal Chain, this version contains new features and bugs fixed until August 2014
r487 self.__buffer = numpy.roll(self.__buffer, -1, axis=0)
self.__buffer[self.n-1] = data
self.__profIndex = self.n
return
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Daniel Valdez
This is the new organization by packages and scripts for Signal Chain, this version contains new features and bugs fixed until August 2014
r487 def pushData(self):
"""
Return the sum of the last profiles and the profiles used in the sum.
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Daniel Valdez
This is the new organization by packages and scripts for Signal Chain, this version contains new features and bugs fixed until August 2014
r487 Affected:
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Daniel Valdez
This is the new organization by packages and scripts for Signal Chain, this version contains new features and bugs fixed until August 2014
r487 self.__profileIndex
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Daniel Valdez
This is the new organization by packages and scripts for Signal Chain, this version contains new features and bugs fixed until August 2014
r487 """
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
José Chávez
sumado de stride en stride. ej 96 -> 24x4 -> 1
r1116 if not self.__withOverlapping:
Daniel Valdez
This is the new organization by packages and scripts for Signal Chain, this version contains new features and bugs fixed until August 2014
r487 data = self.__buffer
n = self.__profIndex
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Daniel Valdez
This is the new organization by packages and scripts for Signal Chain, this version contains new features and bugs fixed until August 2014
r487 self.__buffer = 0
self.__profIndex = 0
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Daniel Valdez
This is the new organization by packages and scripts for Signal Chain, this version contains new features and bugs fixed until August 2014
r487 return data, n
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Daniel Valdez
This is the new organization by packages and scripts for Signal Chain, this version contains new features and bugs fixed until August 2014
r487 #Integration with Overlapping
data = numpy.sum(self.__buffer, axis=0)
José Chávez
sumado de stride en stride. ej 96 -> 24x4 -> 1
r1116 # print data
# raise
Daniel Valdez
This is the new organization by packages and scripts for Signal Chain, this version contains new features and bugs fixed until August 2014
r487 n = self.__profIndex
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Daniel Valdez
This is the new organization by packages and scripts for Signal Chain, this version contains new features and bugs fixed until August 2014
r487 return data, n
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Daniel Valdez
This is the new organization by packages and scripts for Signal Chain, this version contains new features and bugs fixed until August 2014
r487 def byProfiles(self, data):
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Daniel Valdez
This is the new organization by packages and scripts for Signal Chain, this version contains new features and bugs fixed until August 2014
r487 self.__dataReady = False
avgdata = None
José Chávez
sumado de stride en stride. ej 96 -> 24x4 -> 1
r1116 # n = None
# print data
# raise
Daniel Valdez
This is the new organization by packages and scripts for Signal Chain, this version contains new features and bugs fixed until August 2014
r487 self.putData(data)
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Daniel Valdez
This is the new organization by packages and scripts for Signal Chain, this version contains new features and bugs fixed until August 2014
r487 if self.__profIndex == self.n:
avgdata, n = self.pushData()
self.__dataReady = True
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Daniel Valdez
This is the new organization by packages and scripts for Signal Chain, this version contains new features and bugs fixed until August 2014
r487 return avgdata
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Daniel Valdez
This is the new organization by packages and scripts for Signal Chain, this version contains new features and bugs fixed until August 2014
r487 def byTime(self, data, datatime):
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Daniel Valdez
This is the new organization by packages and scripts for Signal Chain, this version contains new features and bugs fixed until August 2014
r487 self.__dataReady = False
avgdata = None
n = None
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Daniel Valdez
This is the new organization by packages and scripts for Signal Chain, this version contains new features and bugs fixed until August 2014
r487 self.putData(data)
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Daniel Valdez
This is the new organization by packages and scripts for Signal Chain, this version contains new features and bugs fixed until August 2014
r487 if (datatime - self.__initime) >= self.__integrationtime:
avgdata, n = self.pushData()
self.n = n
self.__dataReady = True
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Daniel Valdez
This is the new organization by packages and scripts for Signal Chain, this version contains new features and bugs fixed until August 2014
r487 return avgdata
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
José Chávez
sumado de stride en stride. ej 96 -> 24x4 -> 1
r1116 def integrateByStride(self, data, datatime):
# print data
if self.__profIndex == 0:
self.__buffer = [[data.copy(), datatime]]
else:
José Chávez
antiguo comportamiento de cohint. Ej: 96 -> 24x4
r1117 self.__buffer.append([data.copy(),datatime])
José Chávez
sumado de stride en stride. ej 96 -> 24x4 -> 1
r1116 self.__profIndex += 1
self.__dataReady = False
if self.__profIndex == self.n * self.stride :
self.__dataToPutStride = True
self.__profIndexStride = 0
self.__profIndex = 0
self.__bufferStride = []
for i in range(self.stride):
current = self.__buffer[i::self.stride]
data = numpy.sum([t[0] for t in current], axis=0)
avgdatatime = numpy.average([t[1] for t in current])
# print data
self.__bufferStride.append((data, avgdatatime))
if self.__dataToPutStride:
José Chávez
antiguo comportamiento de cohint. Ej: 96 -> 24x4
r1117 self.__dataReady = True
José Chávez
sumado de stride en stride. ej 96 -> 24x4 -> 1
r1116 self.__profIndexStride += 1
if self.__profIndexStride == self.stride:
self.__dataToPutStride = False
# print self.__bufferStride[self.__profIndexStride - 1]
# raise
José Chávez
antiguo comportamiento de cohint. Ej: 96 -> 24x4
r1117 return self.__bufferStride[self.__profIndexStride - 1]
Modificación a kmamisr para ejecutarse en la versión 3, creación de scripts con terminación v3 para difereciarlos, se comentó la linea #720 de JroIO_param.py debido a que reiniciaba la lista de archivos, ocasionando la reescritura del archivo hdf5. Alguna otra modificación aparente es producto de algunas variaciones en espacios al usar la función print()
r1279
José Chávez
sumado de stride en stride. ej 96 -> 24x4 -> 1
r1116 return None, None
Daniel Valdez
This is the new organization by packages and scripts for Signal Chain, this version contains new features and bugs fixed until August 2014
r487 def integrate(self, data, datatime=None):
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Daniel Valdez
This is the new organization by packages and scripts for Signal Chain, this version contains new features and bugs fixed until August 2014
r487 if self.__initime == None:
self.__initime = datatime
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Daniel Valdez
This is the new organization by packages and scripts for Signal Chain, this version contains new features and bugs fixed until August 2014
r487 if self.__byTime:
avgdata = self.byTime(data, datatime)
else:
avgdata = self.byProfiles(data)
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Daniel Valdez
This is the new organization by packages and scripts for Signal Chain, this version contains new features and bugs fixed until August 2014
r487 self.__lastdatatime = datatime
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
Bug fixed: Padding decode data with zeros at the first heights was eliminated.
r611 if avgdata is None:
Daniel Valdez
This is the new organization by packages and scripts for Signal Chain, this version contains new features and bugs fixed until August 2014
r487 return None, None
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Daniel Valdez
This is the new organization by packages and scripts for Signal Chain, this version contains new features and bugs fixed until August 2014
r487 avgdatatime = self.__initime
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
José Chávez
sumado de stride en stride. ej 96 -> 24x4 -> 1
r1116 deltatime = datatime - self.__lastdatatime
Modificación a kmamisr para ejecutarse en la versión 3, creación de scripts con terminación v3 para difereciarlos, se comentó la linea #720 de JroIO_param.py debido a que reiniciaba la lista de archivos, ocasionando la reescritura del archivo hdf5. Alguna otra modificación aparente es producto de algunas variaciones en espacios al usar la función print()
r1279
José Chávez
sumado de stride en stride. ej 96 -> 24x4 -> 1
r1116 if not self.__withOverlapping:
Daniel Valdez
This is the new organization by packages and scripts for Signal Chain, this version contains new features and bugs fixed until August 2014
r487 self.__initime = datatime
else:
self.__initime += deltatime
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Daniel Valdez
This is the new organization by packages and scripts for Signal Chain, this version contains new features and bugs fixed until August 2014
r487 return avgdata, avgdatatime
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Daniel Valdez
Reading and doing Operation in Blocks to processing radar data from MST_ISR_EEJ Experiment
r495 def integrateByBlock(self, dataOut):
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Daniel Valdez
Reading and doing Operation in Blocks to processing radar data from MST_ISR_EEJ Experiment
r495 times = int(dataOut.data.shape[1]/self.n)
avgdata = numpy.zeros((dataOut.nChannels, times, dataOut.nHeights), dtype=numpy.complex)
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Daniel Valdez
Reading and doing Operation in Blocks to processing radar data from MST_ISR_EEJ Experiment
r495 id_min = 0
id_max = self.n
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Daniel Valdez
Reading and doing Operation in Blocks to processing radar data from MST_ISR_EEJ Experiment
r495 for i in range(times):
junk = dataOut.data[:,id_min:id_max,:]
avgdata[:,i,:] = junk.sum(axis=1)
id_min += self.n
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897 id_max += self.n
Daniel Valdez
Reading and doing Operation in Blocks to processing radar data from MST_ISR_EEJ Experiment
r495 timeInterval = dataOut.ippSeconds*self.n
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897 avgdatatime = (times - 1) * timeInterval + dataOut.utctime
Daniel Valdez
Reading and doing Operation in Blocks to processing radar data from MST_ISR_EEJ Experiment
r495 self.__dataReady = True
return avgdata, avgdatatime
Modificación a kmamisr para ejecutarse en la versión 3, creación de scripts con terminación v3 para difereciarlos, se comentó la linea #720 de JroIO_param.py debido a que reiniciaba la lista de archivos, ocasionando la reescritura del archivo hdf5. Alguna otra modificación aparente es producto de algunas variaciones en espacios al usar la función print()
r1279
José Chávez
sumado de stride en stride. ej 96 -> 24x4 -> 1
r1116 def run(self, dataOut, n=None, timeInterval=None, stride=None, overlapping=False, byblock=False, **kwargs):
George Yong
Multiprocessing for voltage (all operations) working
r1173
Daniel Valdez
This is the new organization by packages and scripts for Signal Chain, this version contains new features and bugs fixed until August 2014
r487 if not self.isConfig:
José Chávez
sumado de stride en stride. ej 96 -> 24x4 -> 1
r1116 self.setup(n=n, stride=stride, timeInterval=timeInterval, overlapping=overlapping, byblock=byblock, **kwargs)
Daniel Valdez
This is the new organization by packages and scripts for Signal Chain, this version contains new features and bugs fixed until August 2014
r487 self.isConfig = True
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
jroproc_voltage.py: Many methods were changed when flagDataAsBlock is set. Different process when data is read as block or profile by profile
r530 if dataOut.flagDataAsBlock:
"""
Si la data es leida por bloques, dimension = [nChannels, nProfiles, nHeis]
"""
Daniel Valdez
Reading and doing Operation in Blocks to processing radar data from MST_ISR_EEJ Experiment
r495 avgdata, avgdatatime = self.integrateByBlock(dataOut)
Miguel Valdez
Coherent Integration by Blocks: Bug fixed, nProfiles is divided by number of integrations
r720 dataOut.nProfiles /= self.n
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897 else:
Modificación a kmamisr para ejecutarse en la versión 3, creación de scripts con terminación v3 para difereciarlos, se comentó la linea #720 de JroIO_param.py debido a que reiniciaba la lista de archivos, ocasionando la reescritura del archivo hdf5. Alguna otra modificación aparente es producto de algunas variaciones en espacios al usar la función print()
r1279 if stride is None:
José Chávez
sumado de stride en stride. ej 96 -> 24x4 -> 1
r1116 avgdata, avgdatatime = self.integrate(dataOut.data, dataOut.utctime)
else:
avgdata, avgdatatime = self.integrateByStride(dataOut.data, dataOut.utctime)
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Modificación a kmamisr para ejecutarse en la versión 3, creación de scripts con terminación v3 para difereciarlos, se comentó la linea #720 de JroIO_param.py debido a que reiniciaba la lista de archivos, ocasionando la reescritura del archivo hdf5. Alguna otra modificación aparente es producto de algunas variaciones en espacios al usar la función print()
r1279
José Chávez
sumado de stride en stride. ej 96 -> 24x4 -> 1
r1116 # dataOut.timeInterval *= n
Daniel Valdez
This is the new organization by packages and scripts for Signal Chain, this version contains new features and bugs fixed until August 2014
r487 dataOut.flagNoData = True
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Daniel Valdez
This is the new organization by packages and scripts for Signal Chain, this version contains new features and bugs fixed until August 2014
r487 if self.__dataReady:
dataOut.data = avgdata
Juan C. Espinoza
Fix ScpecraWriter and CohInt attribute
r1310 if not dataOut.flagCohInt:
dataOut.nCohInt *= self.n
dataOut.flagCohInt = True
Daniel Valdez
This is the new organization by packages and scripts for Signal Chain, this version contains new features and bugs fixed until August 2014
r487 dataOut.utctime = avgdatatime
José Chávez
sumado de stride en stride. ej 96 -> 24x4 -> 1
r1116 # print avgdata, avgdatatime
# raise
# dataOut.timeInterval = dataOut.ippSeconds * dataOut.nCohInt
Daniel Valdez
This is the new organization by packages and scripts for Signal Chain, this version contains new features and bugs fixed until August 2014
r487 dataOut.flagNoData = False
George Yong
Multiprocessing for voltage (all operations) working
r1173 return dataOut
Juan C. Espinoza
Review MP changes, three types of operations: self, other and external
r1177
Daniel Valdez
This is the new organization by packages and scripts for Signal Chain, this version contains new features and bugs fixed until August 2014
r487 class Decoder(Operation):
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Daniel Valdez
This is the new organization by packages and scripts for Signal Chain, this version contains new features and bugs fixed until August 2014
r487 isConfig = False
__profIndex = 0
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Daniel Valdez
This is the new organization by packages and scripts for Signal Chain, this version contains new features and bugs fixed until August 2014
r487 code = None
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
nCode = None
Daniel Valdez
This is the new organization by packages and scripts for Signal Chain, this version contains new features and bugs fixed until August 2014
r487 nBaud = None
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
George Yong
Multiprocessing for writing Units(Spectral, Voltage and Parameters)
r1179 def __init__(self, **kwargs):
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
George Yong
Multiprocessing for writing Units(Spectral, Voltage and Parameters)
r1179 Operation.__init__(self, **kwargs)
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Daniel Valdez
Reading and doing Operation in Blocks to processing radar data from MST_ISR_EEJ Experiment
r495 self.times = None
self.osamp = None
José Chávez
cambios xmax xmin
r1004 # self.__setValues = False
George Yong
Multiprocessing for writing Units(Spectral, Voltage and Parameters)
r1179 self.isConfig = False
George Yong
Multiprocessing for voltage (all operations) working
r1173 self.setupReq = False
Miguel Valdez
jroproc_voltage.py: Many methods were changed when flagDataAsBlock is set. Different process when data is read as block or profile by profile
r530 def setup(self, code, osamp, dataOut):
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Daniel Valdez
This is the new organization by packages and scripts for Signal Chain, this version contains new features and bugs fixed until August 2014
r487 self.__profIndex = 0
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Daniel Valdez
This is the new organization by packages and scripts for Signal Chain, this version contains new features and bugs fixed until August 2014
r487 self.code = code
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
self.nCode = len(code)
Daniel Valdez
This is the new organization by packages and scripts for Signal Chain, this version contains new features and bugs fixed until August 2014
r487 self.nBaud = len(code[0])
Miguel Valdez
jroproc_voltage.py: Many methods were changed when flagDataAsBlock is set. Different process when data is read as block or profile by profile
r530 if (osamp != None) and (osamp >1):
Daniel Valdez
Reading and doing Operation in Blocks to processing radar data from MST_ISR_EEJ Experiment
r495 self.osamp = osamp
Miguel Valdez
jroproc_voltage.py: Many methods were changed when flagDataAsBlock is set. Different process when data is read as block or profile by profile
r530 self.code = numpy.repeat(code, repeats=self.osamp, axis=1)
Daniel Valdez
Reading and doing Operation in Blocks to processing radar data from MST_ISR_EEJ Experiment
r495 self.nBaud = self.nBaud*self.osamp
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
jroproc_voltage.py: Many methods were changed when flagDataAsBlock is set. Different process when data is read as block or profile by profile
r530 self.__nChannels = dataOut.nChannels
self.__nProfiles = dataOut.nProfiles
self.__nHeis = dataOut.nHeights
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
GUI: Bug fixed when *Read from header* is selected...
r655 if self.__nHeis < self.nBaud:
George Yong
Python 2to3, Spectra (all operations) working
r1167 raise ValueError('Number of heights (%d) should be greater than number of bauds (%d)' %(self.__nHeis, self.nBaud))
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
Bugs fixed:...
r660 #Frequency
__codeBuffer = numpy.zeros((self.nCode, self.__nHeis), dtype=numpy.complex)
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
Bugs fixed:...
r660 __codeBuffer[:,0:self.nBaud] = self.code
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
Bugs fixed:...
r660 self.fft_code = numpy.conj(numpy.fft.fft(__codeBuffer, axis=1))
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
jroproc_voltage.py: Many methods were changed when flagDataAsBlock is set. Different process when data is read as block or profile by profile
r530 if dataOut.flagDataAsBlock:
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
Affected:...
r534 self.ndatadec = self.__nHeis #- self.nBaud + 1
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
jroproc_voltage.py: Many methods were changed when flagDataAsBlock is set. Different process when data is read as block or profile by profile
r530 self.datadecTime = numpy.zeros((self.__nChannels, self.__nProfiles, self.ndatadec), dtype=numpy.complex)
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
jroproc_voltage.py: Many methods were changed when flagDataAsBlock is set. Different process when data is read as block or profile by profile
r530 else:
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
Bugs fixed:...
r660 #Time
Miguel Valdez
Affected:...
r534 self.ndatadec = self.__nHeis #- self.nBaud + 1
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
self.datadecTime = numpy.zeros((self.__nChannels, self.ndatadec), dtype=numpy.complex)
Miguel Valdez
Bugs fixed:...
r660 def __convolutionInFreq(self, data):
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Daniel Valdez
This is the new organization by packages and scripts for Signal Chain, this version contains new features and bugs fixed until August 2014
r487 fft_code = self.fft_code[self.__profIndex].reshape(1,-1)
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Daniel Valdez
This is the new organization by packages and scripts for Signal Chain, this version contains new features and bugs fixed until August 2014
r487 fft_data = numpy.fft.fft(data, axis=1)
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Daniel Valdez
This is the new organization by packages and scripts for Signal Chain, this version contains new features and bugs fixed until August 2014
r487 conv = fft_data*fft_code
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Daniel Valdez
This is the new organization by packages and scripts for Signal Chain, this version contains new features and bugs fixed until August 2014
r487 data = numpy.fft.ifft(conv,axis=1)
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
Bugs fixed:...
r660 return data
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
Bugs fixed:...
r660 def __convolutionInFreqOpt(self, data):
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
Merge with branch schain_julia_drifts from rev. 803 to 995....
r568 raise NotImplementedError
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
Bugs fixed:...
r660 def __convolutionInTime(self, data):
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Daniel Valdez
This is the new organization by packages and scripts for Signal Chain, this version contains new features and bugs fixed until August 2014
r487 code = self.code[self.__profIndex]
for i in range(self.__nChannels):
Miguel Valdez
Bug fixed: Padding decode data with zeros at the first heights was eliminated.
r611 self.datadecTime[i,:] = numpy.correlate(data[i,:], code, mode='full')[self.nBaud-1:]
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Daniel Valdez
This is the new organization by packages and scripts for Signal Chain, this version contains new features and bugs fixed until August 2014
r487 return self.datadecTime
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
Bugs fixed:...
r660 def __convolutionByBlockInTime(self, data):
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Correcting floats slicing bug
r1236 repetitions = int(self.__nProfiles / self.nCode)
Miguel Valdez
jroproc_voltage.py: Many methods were changed when flagDataAsBlock is set. Different process when data is read as block or profile by profile
r530 junk = numpy.lib.stride_tricks.as_strided(self.code, (repetitions, self.code.size), (0, self.code.itemsize))
Daniel Valdez
Reading and doing Operation in Blocks to processing radar data from MST_ISR_EEJ Experiment
r495 junk = junk.flatten()
Miguel Valdez
jroproc_voltage.py: Many methods were changed when flagDataAsBlock is set. Different process when data is read as block or profile by profile
r530 code_block = numpy.reshape(junk, (self.nCode*repetitions, self.nBaud))
George Yong
Python 2to3, Spectra (all operations) working
r1167 profilesList = range(self.__nProfiles)
Modificación a kmamisr para ejecutarse en la versión 3, creación de scripts con terminación v3 para difereciarlos, se comentó la linea #720 de JroIO_param.py debido a que reiniciaba la lista de archivos, ocasionando la reescritura del archivo hdf5. Alguna otra modificación aparente es producto de algunas variaciones en espacios al usar la función print()
r1279
for i in range(self.__nChannels):
for j in profilesList:
self.datadecTime[i,j,:] = numpy.correlate(data[i,j,:], code_block[j,:], mode='full')[self.nBaud-1:]
return self.datadecTime
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
Bugs fixed:...
r660 def __convolutionByBlockInFreq(self, data):
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
George Yong
Python 2to3, Spectra (all operations) working
r1167 raise NotImplementedError("Decoder by frequency fro Blocks not implemented")
Miguel Valdez
jroproc_voltage.py: ProfileSelector, Decoder, Reshape was tested with nTxs != 1 and getblock = True
r749
Miguel Valdez
Bugs fixed:...
r660 fft_code = self.fft_code[self.__profIndex].reshape(1,-1)
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
Bugs fixed:...
r660 fft_data = numpy.fft.fft(data, axis=2)
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
Bugs fixed:...
r660 conv = fft_data*fft_code
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
Bugs fixed:...
r660 data = numpy.fft.ifft(conv,axis=2)
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
Bugs fixed:...
r660 return data
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Modificación a kmamisr para ejecutarse en la versión 3, creación de scripts con terminación v3 para difereciarlos, se comentó la linea #720 de JroIO_param.py debido a que reiniciaba la lista de archivos, ocasionando la reescritura del archivo hdf5. Alguna otra modificación aparente es producto de algunas variaciones en espacios al usar la función print()
r1279
Miguel Valdez
Bug fixed reading voltage data by block....
r605 def run(self, dataOut, code=None, nCode=None, nBaud=None, mode = 0, osamp=None, times=None):
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
Bug fixed:...
r624 if dataOut.flagDecodeData:
George Yong
Python 2to3, Spectra (all operations) working
r1167 print("This data is already decoded, recoding again ...")
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Daniel Valdez
Reading and doing Operation in Blocks to processing radar data from MST_ISR_EEJ Experiment
r495 if not self.isConfig:
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
Bug fixed: Padding decode data with zeros at the first heights was eliminated.
r611 if code is None:
Miguel Valdez
Error comparing "code == None", it was replaced by "code is None:"
r674 if dataOut.code is None:
George Yong
Python 2to3, Spectra (all operations) working
r1167 raise ValueError("Code could not be read from %s instance. Enter a value in Code parameter" %dataOut.type)
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
jroproc_voltage.py: Many methods were changed when flagDataAsBlock is set. Different process when data is read as block or profile by profile
r530 code = dataOut.code
else:
code = numpy.array(code).reshape(nCode,nBaud)
self.setup(code, osamp, dataOut)
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Daniel Valdez
This is the new organization by packages and scripts for Signal Chain, this version contains new features and bugs fixed until August 2014
r487 self.isConfig = True
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Ivan Valdez
Bug fixed: importing sys module
r723 if mode == 3:
sys.stderr.write("Decoder Warning: mode=%d is not valid, using mode=0\n" %mode)
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
jroproc_voltage.py: ProfileSelector, Decoder, Reshape was tested with nTxs != 1 and getblock = True
r749 if times != None:
sys.stderr.write("Decoder Warning: Argument 'times' in not used anymore\n")
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
Bug fixed:...
r624 if self.code is None:
George Yong
Python 2to3, Spectra (all operations) working
r1167 print("Fail decoding: Code is not defined.")
Miguel Valdez
Bug fixed:...
r624 return
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Juan C. Espinoza
Decoder: nProfiles var updated in run
r997 self.__nProfiles = dataOut.nProfiles
Miguel Valdez
Bugs fixed:...
r660 datadec = None
Modificación a kmamisr para ejecutarse en la versión 3, creación de scripts con terminación v3 para difereciarlos, se comentó la linea #720 de JroIO_param.py debido a que reiniciaba la lista de archivos, ocasionando la reescritura del archivo hdf5. Alguna otra modificación aparente es producto de algunas variaciones en espacios al usar la función print()
r1279
Miguel Valdez
jroproc_voltage.py: ProfileSelector, Decoder, Reshape was tested with nTxs != 1 and getblock = True
r749 if mode == 3:
mode = 0
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
jroproc_voltage.py: Many methods were changed when flagDataAsBlock is set. Different process when data is read as block or profile by profile
r530 if dataOut.flagDataAsBlock:
"""
Decoding when data have been read as block,
"""
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
Bugs fixed:...
r660 if mode == 0:
datadec = self.__convolutionByBlockInTime(dataOut.data)
if mode == 1:
datadec = self.__convolutionByBlockInFreq(dataOut.data)
Miguel Valdez
jroproc_voltage.py: Many methods were changed when flagDataAsBlock is set. Different process when data is read as block or profile by profile
r530 else:
"""
Decoding when data have been read profile by profile
"""
if mode == 0:
Miguel Valdez
Bugs fixed:...
r660 datadec = self.__convolutionInTime(dataOut.data)
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
jroproc_voltage.py: Many methods were changed when flagDataAsBlock is set. Different process when data is read as block or profile by profile
r530 if mode == 1:
Miguel Valdez
Bugs fixed:...
r660 datadec = self.__convolutionInFreq(dataOut.data)
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
jroproc_voltage.py: Many methods were changed when flagDataAsBlock is set. Different process when data is read as block or profile by profile
r530 if mode == 2:
Miguel Valdez
Bugs fixed:...
r660 datadec = self.__convolutionInFreqOpt(dataOut.data)
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
Bugs fixed:...
r660 if datadec is None:
George Yong
Python 2to3, Spectra (all operations) working
r1167 raise ValueError("Codification mode selected is not valid: mode=%d. Try selecting 0 or 1" %mode)
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
Bug fixed: Error decoding data
r544 dataOut.code = self.code
dataOut.nCode = self.nCode
dataOut.nBaud = self.nBaud
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Daniel Valdez
This is the new organization by packages and scripts for Signal Chain, this version contains new features and bugs fixed until August 2014
r487 dataOut.data = datadec
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
Bugs fixed:...
r660 dataOut.heightList = dataOut.heightList[0:datadec.shape[-1]]
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
jroproc_voltage.py: Many methods were changed when flagDataAsBlock is set. Different process when data is read as block or profile by profile
r530 dataOut.flagDecodeData = True #asumo q la data esta decodificada
Daniel Valdez
This is the new organization by packages and scripts for Signal Chain, this version contains new features and bugs fixed until August 2014
r487
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897 if self.__profIndex == self.nCode-1:
self.__profIndex = 0
George Yong
Multiprocessing for voltage (all operations) working
r1173 return dataOut
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Daniel Valdez
This is the new organization by packages and scripts for Signal Chain, this version contains new features and bugs fixed until August 2014
r487 self.__profIndex += 1
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
George Yong
Multiprocessing for voltage (all operations) working
r1173 return dataOut
José Chávez
formatting y int()
r1124 # dataOut.flagDeflipData = True #asumo q la data no esta sin flip
Daniel Valdez
Reading and doing Operation in Blocks to processing radar data from MST_ISR_EEJ Experiment
r495
Juan C. Espinoza
Review MP changes, three types of operations: self, other and external
r1177
Daniel Valdez
Reading and doing Operation in Blocks to processing radar data from MST_ISR_EEJ Experiment
r495 class ProfileConcat(Operation):
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Daniel Valdez
Reading and doing Operation in Blocks to processing radar data from MST_ISR_EEJ Experiment
r495 isConfig = False
buffer = None
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
George Yong
Multiprocessing for writing Units(Spectral, Voltage and Parameters)
r1179 def __init__(self, **kwargs):
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
George Yong
Multiprocessing for writing Units(Spectral, Voltage and Parameters)
r1179 Operation.__init__(self, **kwargs)
Daniel Valdez
Reading and doing Operation in Blocks to processing radar data from MST_ISR_EEJ Experiment
r495 self.profileIndex = 0
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Daniel Valdez
Reading and doing Operation in Blocks to processing radar data from MST_ISR_EEJ Experiment
r495 def reset(self):
self.buffer = numpy.zeros_like(self.buffer)
self.start_index = 0
self.times = 1
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Daniel Valdez
Reading and doing Operation in Blocks to processing radar data from MST_ISR_EEJ Experiment
r495 def setup(self, data, m, n=1):
self.buffer = numpy.zeros((data.shape[0],data.shape[1]*m),dtype=type(data[0,0]))
Ivan Valdez
r808 self.nHeights = data.shape[1]#.nHeights
Daniel Valdez
Reading and doing Operation in Blocks to processing radar data from MST_ISR_EEJ Experiment
r495 self.start_index = 0
self.times = 1
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Daniel Valdez
Reading and doing Operation in Blocks to processing radar data from MST_ISR_EEJ Experiment
r495 def concat(self, data):
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Ivan Valdez
r808 self.buffer[:,self.start_index:self.nHeights*self.times] = data.copy()
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897 self.start_index = self.start_index + self.nHeights
Daniel Valdez
Reading and doing Operation in Blocks to processing radar data from MST_ISR_EEJ Experiment
r495 def run(self, dataOut, m):
dataOut.flagNoData = True
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Daniel Valdez
Reading and doing Operation in Blocks to processing radar data from MST_ISR_EEJ Experiment
r495 if not self.isConfig:
self.setup(dataOut.data, m, 1)
self.isConfig = True
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
jroproc_voltage.py: Many methods were changed when flagDataAsBlock is set. Different process when data is read as block or profile by profile
r530 if dataOut.flagDataAsBlock:
George Yong
Python 2to3, Spectra (all operations) working
r1167 raise ValueError("ProfileConcat can only be used when voltage have been read profile by profile, getBlock = False")
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
jroproc_voltage.py: Many methods were changed when flagDataAsBlock is set. Different process when data is read as block or profile by profile
r530 else:
self.concat(dataOut.data)
self.times += 1
if self.times > m:
dataOut.data = self.buffer
self.reset()
dataOut.flagNoData = False
# se deben actualizar mas propiedades del header y del objeto dataOut, por ejemplo, las alturas
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897 deltaHeight = dataOut.heightList[1] - dataOut.heightList[0]
Miguel Valdez
Affected:...
r534 xf = dataOut.heightList[0] + dataOut.nHeights * deltaHeight * m
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897 dataOut.heightList = numpy.arange(dataOut.heightList[0], xf, deltaHeight)
Miguel Valdez
Affected:...
r534 dataOut.ippSeconds *= m
George Yong
Multiprocessing for voltage (all operations) working
r1173 return dataOut
Juan C. Espinoza
Review MP changes, three types of operations: self, other and external
r1177
Daniel Valdez
Reading and doing Operation in Blocks to processing radar data from MST_ISR_EEJ Experiment
r495 class ProfileSelector(Operation):
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Daniel Valdez
Reading and doing Operation in Blocks to processing radar data from MST_ISR_EEJ Experiment
r495 profileIndex = None
# Tamanho total de los perfiles
nProfiles = None
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
George Yong
Multiprocessing for writing Units(Spectral, Voltage and Parameters)
r1179 def __init__(self, **kwargs):
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
George Yong
Multiprocessing for writing Units(Spectral, Voltage and Parameters)
r1179 Operation.__init__(self, **kwargs)
Daniel Valdez
Reading and doing Operation in Blocks to processing radar data from MST_ISR_EEJ Experiment
r495 self.profileIndex = 0
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
Minor changes
r754 def incProfileIndex(self):
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Daniel Valdez
Reading and doing Operation in Blocks to processing radar data from MST_ISR_EEJ Experiment
r495 self.profileIndex += 1
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Daniel Valdez
Reading and doing Operation in Blocks to processing radar data from MST_ISR_EEJ Experiment
r495 if self.profileIndex >= self.nProfiles:
self.profileIndex = 0
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
Affected:...
r534 def isThisProfileInRange(self, profileIndex, minIndex, maxIndex):
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
Affected:...
r534 if profileIndex < minIndex:
Daniel Valdez
Reading and doing Operation in Blocks to processing radar data from MST_ISR_EEJ Experiment
r495 return False
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
Affected:...
r534 if profileIndex > maxIndex:
Daniel Valdez
Reading and doing Operation in Blocks to processing radar data from MST_ISR_EEJ Experiment
r495 return False
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Daniel Valdez
Reading and doing Operation in Blocks to processing radar data from MST_ISR_EEJ Experiment
r495 return True
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
Affected:...
r534 def isThisProfileInList(self, profileIndex, profileList):
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
Affected:...
r534 if profileIndex not in profileList:
Daniel Valdez
Reading and doing Operation in Blocks to processing radar data from MST_ISR_EEJ Experiment
r495 return False
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Daniel Valdez
Reading and doing Operation in Blocks to processing radar data from MST_ISR_EEJ Experiment
r495 return True
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
Signal Chain GUI...
r600 def run(self, dataOut, profileList=None, profileRangeList=None, beam=None, byblock=False, rangeList = None, nProfiles=None):
Miguel Valdez
jroproc_voltage.py: Many methods were changed when flagDataAsBlock is set. Different process when data is read as block or profile by profile
r530
"""
ProfileSelector:
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
Affected:...
r534 Inputs:
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897 profileList : Index of profiles selected. Example: profileList = (0,1,2,7,8)
Miguel Valdez
Affected:...
r534 profileRangeList : Minimum and maximum profile indexes. Example: profileRangeList = (4, 30)
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
Affected:...
r534 rangeList : List of profile ranges. Example: rangeList = ((4, 30), (32, 64), (128, 256))
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
jroproc_voltage.py: Many methods were changed when flagDataAsBlock is set. Different process when data is read as block or profile by profile
r530 """
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
Feature added to jroproc_voltage.ProfileSelector(): rangeList replaces to profileRangeList. This parameter will be eliminated in future versions.
r756 if rangeList is not None:
if type(rangeList[0]) not in (tuple, list):
rangeList = [rangeList]
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Daniel Valdez
Reading and doing Operation in Blocks to processing radar data from MST_ISR_EEJ Experiment
r495 dataOut.flagNoData = True
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
jroproc_voltage.py: Many methods were changed when flagDataAsBlock is set. Different process when data is read as block or profile by profile
r530 if dataOut.flagDataAsBlock:
"""
data dimension = [nChannels, nProfiles, nHeis]
"""
Daniel Valdez
Reading and doing Operation in Blocks to processing radar data from MST_ISR_EEJ Experiment
r495 if profileList != None:
dataOut.data = dataOut.data[:,profileList,:]
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
Signal Chain GUI v2.1
r596 if profileRangeList != None:
Miguel Valdez
Affected:...
r534 minIndex = profileRangeList[0]
maxIndex = profileRangeList[1]
George Yong
Python 2to3, Spectra (all operations) working
r1167 profileList = list(range(minIndex, maxIndex+1))
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
Affected:...
r534 dataOut.data = dataOut.data[:,minIndex:maxIndex+1,:]
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
Signal Chain GUI v2.1
r596 if rangeList != None:
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
jroproc_voltage.py: ProfileSelector, Decoder, Reshape was tested with nTxs != 1 and getblock = True
r749 profileList = []
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
jroproc_voltage.py: ProfileSelector, Decoder, Reshape was tested with nTxs != 1 and getblock = True
r749 for thisRange in rangeList:
minIndex = thisRange[0]
maxIndex = thisRange[1]
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
George Yong
Python 2to3, Spectra (all operations) working
r1167 profileList.extend(list(range(minIndex, maxIndex+1)))
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
jroproc_voltage.py: ProfileSelector, Decoder, Reshape was tested with nTxs != 1 and getblock = True
r749 dataOut.data = dataOut.data[:,profileList,:]
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
jroproc_voltage.py: ProfileSelector, Decoder, Reshape was tested with nTxs != 1 and getblock = True
r749 dataOut.nProfiles = len(profileList)
dataOut.profileIndex = dataOut.nProfiles - 1
Daniel Valdez
Reading and doing Operation in Blocks to processing radar data from MST_ISR_EEJ Experiment
r495 dataOut.flagNoData = False
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
George Yong
Changes of voltageProc 2to3
r1183 return dataOut
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
Bugs fixed:...
r660 """
data dimension = [nChannels, nHeis]
"""
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
Bugs fixed:...
r660 if profileList != None:
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
Bugs fixed:...
r660 if self.isThisProfileInList(dataOut.profileIndex, profileList):
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
jroproc_voltage.py: ProfileSelector, Decoder, Reshape was tested with nTxs != 1 and getblock = True
r749 self.nProfiles = len(profileList)
dataOut.nProfiles = self.nProfiles
Miguel Valdez
Bugs fixed:...
r660 dataOut.profileIndex = self.profileIndex
Miguel Valdez
jroproc_voltage.py: ProfileSelector, Decoder, Reshape was tested with nTxs != 1 and getblock = True
r749 dataOut.flagNoData = False
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
Minor changes
r754 self.incProfileIndex()
George Yong
Changes of voltageProc 2to3
r1183 return dataOut
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
Bugs fixed:...
r660 if profileRangeList != None:
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
Bugs fixed:...
r660 minIndex = profileRangeList[0]
maxIndex = profileRangeList[1]
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
Bugs fixed:...
r660 if self.isThisProfileInRange(dataOut.profileIndex, minIndex, maxIndex):
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
jroproc_voltage.py: ProfileSelector, Decoder, Reshape was tested with nTxs != 1 and getblock = True
r749 self.nProfiles = maxIndex - minIndex + 1
dataOut.nProfiles = self.nProfiles
Miguel Valdez
Bugs fixed:...
r660 dataOut.profileIndex = self.profileIndex
Miguel Valdez
jroproc_voltage.py: ProfileSelector, Decoder, Reshape was tested with nTxs != 1 and getblock = True
r749 dataOut.flagNoData = False
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
Minor changes
r754 self.incProfileIndex()
George Yong
Changes of voltageProc 2to3
r1183 return dataOut
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
Bugs fixed:...
r660 if rangeList != None:
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
Bugs fixed:...
r660 nProfiles = 0
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
Bugs fixed:...
r660 for thisRange in rangeList:
minIndex = thisRange[0]
maxIndex = thisRange[1]
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
Bugs fixed:...
r660 nProfiles += maxIndex - minIndex + 1
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
Bugs fixed:...
r660 for thisRange in rangeList:
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
Bugs fixed:...
r660 minIndex = thisRange[0]
maxIndex = thisRange[1]
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
Bugs fixed:...
r660 if self.isThisProfileInRange(dataOut.profileIndex, minIndex, maxIndex):
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
jroproc_voltage.py: ProfileSelector, Decoder, Reshape was tested with nTxs != 1 and getblock = True
r749 self.nProfiles = nProfiles
dataOut.nProfiles = self.nProfiles
Miguel Valdez
Affected:...
r534 dataOut.profileIndex = self.profileIndex
Miguel Valdez
jroproc_voltage.py: ProfileSelector, Decoder, Reshape was tested with nTxs != 1 and getblock = True
r749 dataOut.flagNoData = False
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
Minor changes
r754 self.incProfileIndex()
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
Bugs fixed:...
r660 break
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
George Yong
Changes of voltageProc 2to3
r1183 return dataOut
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
Bugs fixed:...
r660 if beam != None: #beam is only for AMISR data
if self.isThisProfileInList(dataOut.profileIndex, dataOut.beamRangeDict[beam]):
dataOut.flagNoData = False
dataOut.profileIndex = self.profileIndex
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
Minor changes
r754 self.incProfileIndex()
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
George Yong
Changes of voltageProc 2to3
r1183 return dataOut
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
George Yong
Python 2to3, Spectra (all operations) working
r1167 raise ValueError("ProfileSelector needs profileList, profileRangeList or rangeList parameter")
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Juan C. Espinoza
Review MP changes, three types of operations: self, other and external
r1177
Daniel Valdez
Reading and doing Operation in Blocks to processing radar data from MST_ISR_EEJ Experiment
r495 class Reshaper(Operation):
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
George Yong
Multiprocessing for writing Units(Spectral, Voltage and Parameters)
r1179 def __init__(self, **kwargs):
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
George Yong
Multiprocessing for writing Units(Spectral, Voltage and Parameters)
r1179 Operation.__init__(self, **kwargs)
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
jroproc_voltage.py: ProfileSelector, Decoder, Reshape was tested with nTxs != 1 and getblock = True
r749 self.__buffer = None
self.__nitems = 0
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
jroproc_voltage.py: ProfileSelector, Decoder, Reshape was tested with nTxs != 1 and getblock = True
r749 def __appendProfile(self, dataOut, nTxs):
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
jroproc_voltage.py: ProfileSelector, Decoder, Reshape was tested with nTxs != 1 and getblock = True
r749 if self.__buffer is None:
shape = (dataOut.nChannels, int(dataOut.nHeights/nTxs) )
self.__buffer = numpy.empty(shape, dtype = dataOut.data.dtype)
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
jroproc_voltage.py: ProfileSelector, Decoder, Reshape was tested with nTxs != 1 and getblock = True
r749 ini = dataOut.nHeights * self.__nitems
end = ini + dataOut.nHeights
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
jroproc_voltage.py: ProfileSelector, Decoder, Reshape was tested with nTxs != 1 and getblock = True
r749 self.__buffer[:, ini:end] = dataOut.data
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
jroproc_voltage.py: ProfileSelector, Decoder, Reshape was tested with nTxs != 1 and getblock = True
r749 self.__nitems += 1
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
jroproc_voltage.py: ProfileSelector, Decoder, Reshape was tested with nTxs != 1 and getblock = True
r749 return int(self.__nitems*nTxs)
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
jroproc_voltage.py: ProfileSelector, Decoder, Reshape was tested with nTxs != 1 and getblock = True
r749 def __getBuffer(self):
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
jroproc_voltage.py: ProfileSelector, Decoder, Reshape was tested with nTxs != 1 and getblock = True
r749 if self.__nitems == int(1./self.__nTxs):
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
jroproc_voltage.py: ProfileSelector, Decoder, Reshape was tested with nTxs != 1 and getblock = True
r749 self.__nitems = 0
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
jroproc_voltage.py: ProfileSelector, Decoder, Reshape was tested with nTxs != 1 and getblock = True
r749 return self.__buffer.copy()
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
jroproc_voltage.py: ProfileSelector, Decoder, Reshape was tested with nTxs != 1 and getblock = True
r749 return None
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
jroproc_voltage.py: ProfileSelector, Decoder, Reshape was tested with nTxs != 1 and getblock = True
r749 def __checkInputs(self, dataOut, shape, nTxs):
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
jroproc_voltage.py: ProfileSelector, Decoder, Reshape was tested with nTxs != 1 and getblock = True
r749 if shape is None and nTxs is None:
George Yong
Python 2to3, Spectra (all operations) working
r1167 raise ValueError("Reshaper: shape of factor should be defined")
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
jroproc_voltage.py: ProfileSelector, Decoder, Reshape was tested with nTxs != 1 and getblock = True
r749 if nTxs:
if nTxs < 0:
George Yong
Python 2to3, Spectra (all operations) working
r1167 raise ValueError("nTxs should be greater than 0")
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
jroproc_voltage.py: ProfileSelector, Decoder, Reshape was tested with nTxs != 1 and getblock = True
r749 if nTxs < 1 and dataOut.nProfiles % (1./nTxs) != 0:
George Yong
Python 2to3, Spectra (all operations) working
r1167 raise ValueError("nProfiles= %d is not divisibled by (1./nTxs) = %f" %(dataOut.nProfiles, (1./nTxs)))
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
jroproc_voltage.py: ProfileSelector, Decoder, Reshape was tested with nTxs != 1 and getblock = True
r749 shape = [dataOut.nChannels, dataOut.nProfiles*nTxs, dataOut.nHeights/nTxs]
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Ivan Valdez
Reshape for nTx > 1
r790 return shape, nTxs
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
jroproc_voltage.py: ProfileSelector, Decoder, Reshape was tested with nTxs != 1 and getblock = True
r749 if len(shape) != 2 and len(shape) != 3:
George Yong
Python 2to3, Spectra (all operations) working
r1167 raise ValueError("shape dimension should be equal to 2 or 3. shape = (nProfiles, nHeis) or (nChannels, nProfiles, nHeis). Actually shape = (%d, %d, %d)" %(dataOut.nChannels, dataOut.nProfiles, dataOut.nHeights))
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
jroproc_voltage.py: ProfileSelector, Decoder, Reshape was tested with nTxs != 1 and getblock = True
r749 if len(shape) == 2:
shape_tuple = [dataOut.nChannels]
shape_tuple.extend(shape)
else:
shape_tuple = list(shape)
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Ivan Valdez
Reshape for nTx > 1
r790 nTxs = 1.0*shape_tuple[1]/dataOut.nProfiles
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
jroproc_voltage.py: ProfileSelector, Decoder, Reshape was tested with nTxs != 1 and getblock = True
r749 return shape_tuple, nTxs
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
jroproc_voltage.py: ProfileSelector, Decoder, Reshape was tested with nTxs != 1 and getblock = True
r749 def run(self, dataOut, shape=None, nTxs=None):
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
jroproc_voltage.py: ProfileSelector, Decoder, Reshape was tested with nTxs != 1 and getblock = True
r749 shape_tuple, self.__nTxs = self.__checkInputs(dataOut, shape, nTxs)
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
jroproc_voltage.py: ProfileSelector, Decoder, Reshape was tested with nTxs != 1 and getblock = True
r749 dataOut.flagNoData = True
profileIndex = None
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
jroproc_voltage.py: ProfileSelector, Decoder, Reshape was tested with nTxs != 1 and getblock = True
r749 if dataOut.flagDataAsBlock:
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
jroproc_voltage.py: ProfileSelector, Decoder, Reshape was tested with nTxs != 1 and getblock = True
r749 dataOut.data = numpy.reshape(dataOut.data, shape_tuple)
dataOut.flagNoData = False
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Ivan Valdez
Reshape for nTx > 1
r790 profileIndex = int(dataOut.nProfiles*self.__nTxs) - 1
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
jroproc_voltage.py: ProfileSelector, Decoder, Reshape was tested with nTxs != 1 and getblock = True
r749 else:
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
jroproc_voltage.py: ProfileSelector, Decoder, Reshape was tested with nTxs != 1 and getblock = True
r749 if self.__nTxs < 1:
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
jroproc_voltage.py: ProfileSelector, Decoder, Reshape was tested with nTxs != 1 and getblock = True
r749 self.__appendProfile(dataOut, self.__nTxs)
new_data = self.__getBuffer()
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
jroproc_voltage.py: ProfileSelector, Decoder, Reshape was tested with nTxs != 1 and getblock = True
r749 if new_data is not None:
dataOut.data = new_data
dataOut.flagNoData = False
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
jroproc_voltage.py: ProfileSelector, Decoder, Reshape was tested with nTxs != 1 and getblock = True
r749 profileIndex = dataOut.profileIndex*nTxs
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
jroproc_voltage.py: ProfileSelector, Decoder, Reshape was tested with nTxs != 1 and getblock = True
r749 else:
George Yong
Python 2to3, Spectra (all operations) working
r1167 raise ValueError("nTxs should be greater than 0 and lower than 1, or use VoltageReader(..., getblock=True)")
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
jroproc_voltage.py: ProfileSelector, Decoder, Reshape was tested with nTxs != 1 and getblock = True
r749 deltaHeight = dataOut.heightList[1] - dataOut.heightList[0]
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
jroproc_voltage.py: ProfileSelector, Decoder, Reshape was tested with nTxs != 1 and getblock = True
r749 dataOut.heightList = numpy.arange(dataOut.nHeights/self.__nTxs) * deltaHeight + dataOut.heightList[0]
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
jroproc_voltage.py: ProfileSelector, Decoder, Reshape was tested with nTxs != 1 and getblock = True
r749 dataOut.nProfiles = int(dataOut.nProfiles*self.__nTxs)
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
jroproc_voltage.py: ProfileSelector, Decoder, Reshape was tested with nTxs != 1 and getblock = True
r749 dataOut.profileIndex = profileIndex
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
jroproc_voltage.py: ProfileSelector, Decoder, Reshape was tested with nTxs != 1 and getblock = True
r749 dataOut.ippSeconds /= self.__nTxs
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
George Yong
Multiprocessing for voltage (all operations) working
r1173 return dataOut
Juan C. Espinoza
Review MP changes, three types of operations: self, other and external
r1177
Miguel Valdez
Bug fixed in jroIO_usrp: nProfiles and profileIndex values were defined. (nProfiles = number of profiles in one second)
r823 class SplitProfiles(Operation):
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
George Yong
Multiprocessing for writing Units(Spectral, Voltage and Parameters)
r1179 def __init__(self, **kwargs):
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
George Yong
Multiprocessing for writing Units(Spectral, Voltage and Parameters)
r1179 Operation.__init__(self, **kwargs)
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
Bug fixed in jroIO_usrp: nProfiles and profileIndex values were defined. (nProfiles = number of profiles in one second)
r823 def run(self, dataOut, n):
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
Bug fixed in jroIO_usrp: nProfiles and profileIndex values were defined. (nProfiles = number of profiles in one second)
r823 dataOut.flagNoData = True
profileIndex = None
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
Bug fixed in jroIO_usrp: nProfiles and profileIndex values were defined. (nProfiles = number of profiles in one second)
r823 if dataOut.flagDataAsBlock:
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
Bug fixed in jroIO_usrp: nProfiles and profileIndex values were defined. (nProfiles = number of profiles in one second)
r823 #nchannels, nprofiles, nsamples
shape = dataOut.data.shape
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
Bug fixed in jroIO_usrp: nProfiles and profileIndex values were defined. (nProfiles = number of profiles in one second)
r823 if shape[2] % n != 0:
George Yong
Python 2to3, Spectra (all operations) working
r1167 raise ValueError("Could not split the data, n=%d has to be multiple of %d" %(n, shape[2]))
Modificación a kmamisr para ejecutarse en la versión 3, creación de scripts con terminación v3 para difereciarlos, se comentó la linea #720 de JroIO_param.py debido a que reiniciaba la lista de archivos, ocasionando la reescritura del archivo hdf5. Alguna otra modificación aparente es producto de algunas variaciones en espacios al usar la función print()
r1279
George Yong
Python 2to3, Voltage (all operations) working
r1168 new_shape = shape[0], shape[1]*n, int(shape[2]/n)
Modificación a kmamisr para ejecutarse en la versión 3, creación de scripts con terminación v3 para difereciarlos, se comentó la linea #720 de JroIO_param.py debido a que reiniciaba la lista de archivos, ocasionando la reescritura del archivo hdf5. Alguna otra modificación aparente es producto de algunas variaciones en espacios al usar la función print()
r1279
Miguel Valdez
Bug fixed in jroIO_usrp: nProfiles and profileIndex values were defined. (nProfiles = number of profiles in one second)
r823 dataOut.data = numpy.reshape(dataOut.data, new_shape)
dataOut.flagNoData = False
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
Bug fixed in jroIO_usrp: nProfiles and profileIndex values were defined. (nProfiles = number of profiles in one second)
r823 profileIndex = int(dataOut.nProfiles/n) - 1
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
Bug fixed in jroIO_usrp: nProfiles and profileIndex values were defined. (nProfiles = number of profiles in one second)
r823 else:
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
George Yong
Python 2to3, Spectra (all operations) working
r1167 raise ValueError("Could not split the data when is read Profile by Profile. Use VoltageReader(..., getblock=True)")
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
Bug fixed in jroIO_usrp: nProfiles and profileIndex values were defined. (nProfiles = number of profiles in one second)
r823 deltaHeight = dataOut.heightList[1] - dataOut.heightList[0]
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
Bug fixed in jroIO_usrp: nProfiles and profileIndex values were defined. (nProfiles = number of profiles in one second)
r823 dataOut.heightList = numpy.arange(dataOut.nHeights/n) * deltaHeight + dataOut.heightList[0]
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
Bug fixed in jroIO_usrp: nProfiles and profileIndex values were defined. (nProfiles = number of profiles in one second)
r823 dataOut.nProfiles = int(dataOut.nProfiles*n)
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
Bug fixed in jroIO_usrp: nProfiles and profileIndex values were defined. (nProfiles = number of profiles in one second)
r823 dataOut.profileIndex = profileIndex
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
Bug fixed in jroIO_usrp: nProfiles and profileIndex values were defined. (nProfiles = number of profiles in one second)
r823 dataOut.ippSeconds /= n
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
George Yong
Multiprocessing for voltage (all operations) working
r1173 return dataOut
Juan C. Espinoza
Review MP changes, three types of operations: self, other and external
r1177
Miguel Valdez
Bug fixed in jroIO_usrp: nProfiles and profileIndex values were defined. (nProfiles = number of profiles in one second)
r823 class CombineProfiles(Operation):
George Yong
Multiprocessing for writing Units(Spectral, Voltage and Parameters)
r1179 def __init__(self, **kwargs):
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
George Yong
Multiprocessing for writing Units(Spectral, Voltage and Parameters)
r1179 Operation.__init__(self, **kwargs)
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
Bug fixed in jroIO_usrp: nProfiles and profileIndex values were defined. (nProfiles = number of profiles in one second)
r823 self.__remData = None
self.__profileIndex = 0
def run(self, dataOut, n):
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
Bug fixed in jroIO_usrp: nProfiles and profileIndex values were defined. (nProfiles = number of profiles in one second)
r823 dataOut.flagNoData = True
profileIndex = None
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
Bug fixed in jroIO_usrp: nProfiles and profileIndex values were defined. (nProfiles = number of profiles in one second)
r823 if dataOut.flagDataAsBlock:
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
Bug fixed in jroIO_usrp: nProfiles and profileIndex values were defined. (nProfiles = number of profiles in one second)
r823 #nchannels, nprofiles, nsamples
shape = dataOut.data.shape
new_shape = shape[0], shape[1]/n, shape[2]*n
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
Bug fixed in jroIO_usrp: nProfiles and profileIndex values were defined. (nProfiles = number of profiles in one second)
r823 if shape[1] % n != 0:
George Yong
Python 2to3, Spectra (all operations) working
r1167 raise ValueError("Could not split the data, n=%d has to be multiple of %d" %(n, shape[1]))
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
Bug fixed in jroIO_usrp: nProfiles and profileIndex values were defined. (nProfiles = number of profiles in one second)
r823 dataOut.data = numpy.reshape(dataOut.data, new_shape)
dataOut.flagNoData = False
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
Bug fixed in jroIO_usrp: nProfiles and profileIndex values were defined. (nProfiles = number of profiles in one second)
r823 profileIndex = int(dataOut.nProfiles*n) - 1
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
Bug fixed in jroIO_usrp: nProfiles and profileIndex values were defined. (nProfiles = number of profiles in one second)
r823 else:
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
Bug fixed in jroIO_usrp: nProfiles and profileIndex values were defined. (nProfiles = number of profiles in one second)
r823 #nchannels, nsamples
if self.__remData is None:
newData = dataOut.data
else:
newData = numpy.concatenate((self.__remData, dataOut.data), axis=1)
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
Bug fixed in jroIO_usrp: nProfiles and profileIndex values were defined. (nProfiles = number of profiles in one second)
r823 self.__profileIndex += 1
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
Bug fixed in jroIO_usrp: nProfiles and profileIndex values were defined. (nProfiles = number of profiles in one second)
r823 if self.__profileIndex < n:
self.__remData = newData
#continue
return
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
Bug fixed in jroIO_usrp: nProfiles and profileIndex values were defined. (nProfiles = number of profiles in one second)
r823 self.__profileIndex = 0
self.__remData = None
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
Bug fixed in jroIO_usrp: nProfiles and profileIndex values were defined. (nProfiles = number of profiles in one second)
r823 dataOut.data = newData
dataOut.flagNoData = False
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
Bug fixed in jroIO_usrp: nProfiles and profileIndex values were defined. (nProfiles = number of profiles in one second)
r823 profileIndex = dataOut.profileIndex/n
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
Bug fixed in jroIO_usrp: nProfiles and profileIndex values were defined. (nProfiles = number of profiles in one second)
r823 deltaHeight = dataOut.heightList[1] - dataOut.heightList[0]
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
Bug fixed in jroIO_usrp: nProfiles and profileIndex values were defined. (nProfiles = number of profiles in one second)
r823 dataOut.heightList = numpy.arange(dataOut.nHeights*n) * deltaHeight + dataOut.heightList[0]
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
Bug fixed in jroIO_usrp: nProfiles and profileIndex values were defined. (nProfiles = number of profiles in one second)
r823 dataOut.nProfiles = int(dataOut.nProfiles/n)
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
Bug fixed in jroIO_usrp: nProfiles and profileIndex values were defined. (nProfiles = number of profiles in one second)
r823 dataOut.profileIndex = profileIndex
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
Bug fixed in jroIO_usrp: nProfiles and profileIndex values were defined. (nProfiles = number of profiles in one second)
r823 dataOut.ippSeconds *= n
Julio Valdez
-Function to interpolate corrupted profiles
r836
George Yong
Multiprocessing for voltage (all operations) working
r1173 return dataOut
update for weather radar options
r1296
class PulsePairVoltage(Operation):
'''
Function PulsePair(Signal Power, Velocity)
The real component of Lag[0] provides Intensity Information
The imag component of Lag[1] Phase provides Velocity Information
Configuration Parameters:
nPRF = Number of Several PRF
theta = Degree Azimuth angel Boundaries
Input:
self.dataOut
lag[N]
Affected:
self.dataOut.spc
'''
isConfig = False
__profIndex = 0
__initime = None
__lastdatatime = None
__buffer = None
adicion de escritura de datos, calculo de ancho espectral y graficos pulsepair
r1303 noise = None
update for weather radar options
r1296 __dataReady = False
n = None
__nch = 0
__nHeis = 0
removeDC = False
ipp = None
lambda_ = 0
def __init__(self,**kwargs):
Operation.__init__(self,**kwargs)
def setup(self, dataOut, n = None, removeDC=False):
'''
n= Numero de PRF's de entrada
'''
self.__initime = None
self.__lastdatatime = 0
self.__dataReady = False
self.__buffer = 0
self.__profIndex = 0
adicion de escritura de datos, calculo de ancho espectral y graficos pulsepair
r1303 self.noise = None
update for weather radar options
r1296 self.__nch = dataOut.nChannels
self.__nHeis = dataOut.nHeights
self.removeDC = removeDC
self.lambda_ = 3.0e8/(9345.0e6)
self.ippSec = dataOut.ippSeconds
self.nCohInt = dataOut.nCohInt
completado op clean Rayleigh, modificada la escritura y lectura de hdf5 para potencia, cambio en gráficos para uso del ChannelList, añadir en otros pendiente
r1397
update for weather radar options
r1296 if n == None:
raise ValueError("n should be specified.")
if n != None:
if n<2:
raise ValueError("n should be greater than 2")
self.n = n
self.__nProf = n
self.__buffer = numpy.zeros((dataOut.nChannels,
n,
dataOut.nHeights),
dtype='complex')
def putData(self,data):
'''
Add a profile to he __buffer and increase in one the __profiel Index
'''
self.__buffer[:,self.__profIndex,:]= data
self.__profIndex += 1
return
prueba de con ancho espectral y adicion de snr
r1307 def pushData(self,dataOut):
update for weather radar options
r1296 '''
Return the PULSEPAIR and the profiles used in the operation
Affected : self.__profileIndex
'''
Add metadata attribute to data types
r1338 #----------------- Remove DC-----------------------------------
update for weather radar options
r1296 if self.removeDC==True:
mean = numpy.mean(self.__buffer,1)
tmp = mean.reshape(self.__nch,1,self.__nHeis)
dc= numpy.tile(tmp,[1,self.__nProf,1])
self.__buffer = self.__buffer - dc
Add metadata attribute to data types
r1338 #------------------Calculo de Potencia ------------------------
modifiacion de la clase pulse pair, correcion de errores del Noise con removeDC y los 4 momentos
r1314 pair0 = self.__buffer*numpy.conj(self.__buffer)
pair0 = pair0.real
lag_0 = numpy.sum(pair0,1)
Add metadata attribute to data types
r1338 #------------------Calculo de Ruido x canal--------------------
modifiacion de la clase pulse pair, correcion de errores del Noise con removeDC y los 4 momentos
r1314 self.noise = numpy.zeros(self.__nch)
for i in range(self.__nch):
daux = numpy.sort(pair0[i,:,:],axis= None)
self.noise[i]=hildebrand_sekhon( daux ,self.nCohInt)
self.noise = self.noise.reshape(self.__nch,1)
self.noise = numpy.tile(self.noise,[1,self.__nHeis])
noise_buffer = self.noise.reshape(self.__nch,1,self.__nHeis)
noise_buffer = numpy.tile(noise_buffer,[1,self.__nProf,1])
Add metadata attribute to data types
r1338 #------------------ Potencia recibida= P , Potencia senal = S , Ruido= N--
#------------------ P= S+N ,P=lag_0/N ---------------------------------
#-------------------- Power --------------------------------------------------
modifiacion de la clase pulse pair, correcion de errores del Noise con removeDC y los 4 momentos
r1314 data_power = lag_0/(self.n*self.nCohInt)
Add metadata attribute to data types
r1338 #------------------ Senal ---------------------------------------------------
modifiacion de la clase pulse pair, correcion de errores del Noise con removeDC y los 4 momentos
r1314 data_intensity = pair0 - noise_buffer
data_intensity = numpy.sum(data_intensity,axis=1)*(self.n*self.nCohInt)#*self.nCohInt)
#data_intensity = (lag_0-self.noise*self.n)*(self.n*self.nCohInt)
for i in range(self.__nch):
for j in range(self.__nHeis):
if data_intensity[i][j] < 0:
data_intensity[i][j] = numpy.min(numpy.absolute(data_intensity[i][j]))
update for weather radar options
r1296
Add metadata attribute to data types
r1338 #----------------- Calculo de Frecuencia y Velocidad doppler--------
adicion de escritura de datos, calculo de ancho espectral y graficos pulsepair
r1303 pair1 = self.__buffer[:,:-1,:]*numpy.conjugate(self.__buffer[:,1:,:])
lag_1 = numpy.sum(pair1,1)
modifiacion de la clase pulse pair, correcion de errores del Noise con removeDC y los 4 momentos
r1314 data_freq = (-1/(2.0*math.pi*self.ippSec*self.nCohInt))*numpy.angle(lag_1)
data_velocity = (self.lambda_/2.0)*data_freq
adicion de escritura de datos, calculo de ancho espectral y graficos pulsepair
r1303
Add metadata attribute to data types
r1338 #---------------- Potencia promedio estimada de la Senal-----------
modifiacion de la clase pulse pair, correcion de errores del Noise con removeDC y los 4 momentos
r1314 lag_0 = lag_0/self.n
S = lag_0-self.noise
prueba de con ancho espectral y adicion de snr
r1307
Add metadata attribute to data types
r1338 #---------------- Frecuencia Doppler promedio ---------------------
adicion de escritura de datos, calculo de ancho espectral y graficos pulsepair
r1303 lag_1 = lag_1/(self.n-1)
R1 = numpy.abs(lag_1)
prueba de con ancho espectral y adicion de snr
r1307
Add metadata attribute to data types
r1338 #---------------- Calculo del SNR----------------------------------
prueba de con ancho espectral y adicion de snr
r1307 data_snrPP = S/self.noise
modifiacion de la clase pulse pair, correcion de errores del Noise con removeDC y los 4 momentos
r1314 for i in range(self.__nch):
for j in range(self.__nHeis):
if data_snrPP[i][j] < 1.e-20:
data_snrPP[i][j] = 1.e-20
prueba de con ancho espectral y adicion de snr
r1307
Add metadata attribute to data types
r1338 #----------------- Calculo del ancho espectral ----------------------
adicion de escritura de datos, calculo de ancho espectral y graficos pulsepair
r1303 L = S/R1
L = numpy.where(L<0,1,L)
L = numpy.log(L)
tmp = numpy.sqrt(numpy.absolute(L))
modifiacion de la clase pulse pair, correcion de errores del Noise con removeDC y los 4 momentos
r1314 data_specwidth = (self.lambda_/(2*math.sqrt(2)*math.pi*self.ippSec*self.nCohInt))*tmp*numpy.sign(L)
update for weather radar options
r1296 n = self.__profIndex
self.__buffer = numpy.zeros((self.__nch, self.__nProf,self.__nHeis), dtype='complex')
self.__profIndex = 0
modifiacion de la clase pulse pair, correcion de errores del Noise con removeDC y los 4 momentos
r1314 return data_power,data_intensity,data_velocity,data_snrPP,data_specwidth,n
update for weather radar options
r1296
prueba de con ancho espectral y adicion de snr
r1307 def pulsePairbyProfiles(self,dataOut):
update for weather radar options
r1296
self.__dataReady = False
modifiacion de la clase pulse pair, correcion de errores del Noise con removeDC y los 4 momentos
r1314 data_power = None
update for weather radar options
r1296 data_intensity = None
data_velocity = None
adicion de escritura de datos, calculo de ancho espectral y graficos pulsepair
r1303 data_specwidth = None
prueba de con ancho espectral y adicion de snr
r1307 data_snrPP = None
self.putData(data=dataOut.data)
update for weather radar options
r1296 if self.__profIndex == self.n:
modifiacion de la clase pulse pair, correcion de errores del Noise con removeDC y los 4 momentos
r1314 data_power,data_intensity, data_velocity,data_snrPP,data_specwidth, n = self.pushData(dataOut=dataOut)
update for weather radar options
r1296 self.__dataReady = True
modifiacion de la clase pulse pair, correcion de errores del Noise con removeDC y los 4 momentos
r1314 return data_power, data_intensity, data_velocity, data_snrPP, data_specwidth
update for weather radar options
r1296
prueba de con ancho espectral y adicion de snr
r1307 def pulsePairOp(self, dataOut, datatime= None):
update for weather radar options
r1296
if self.__initime == None:
self.__initime = datatime
modifiacion de la clase pulse pair, correcion de errores del Noise con removeDC y los 4 momentos
r1314 data_power, data_intensity, data_velocity, data_snrPP, data_specwidth = self.pulsePairbyProfiles(dataOut)
update for weather radar options
r1296 self.__lastdatatime = datatime
modifiacion de la clase pulse pair, correcion de errores del Noise con removeDC y los 4 momentos
r1314 if data_power is None:
return None, None, None,None,None,None
update for weather radar options
r1296
avgdatatime = self.__initime
deltatime = datatime - self.__lastdatatime
self.__initime = datatime
modifiacion de la clase pulse pair, correcion de errores del Noise con removeDC y los 4 momentos
r1314 return data_power, data_intensity, data_velocity, data_snrPP, data_specwidth, avgdatatime
update for weather radar options
r1296
def run(self, dataOut,n = None,removeDC= False, overlapping= False,**kwargs):
if not self.isConfig:
self.setup(dataOut = dataOut, n = n , removeDC=removeDC , **kwargs)
self.isConfig = True
modifiacion de la clase pulse pair, correcion de errores del Noise con removeDC y los 4 momentos
r1314 data_power, data_intensity, data_velocity,data_snrPP,data_specwidth, avgdatatime = self.pulsePairOp(dataOut, dataOut.utctime)
update for weather radar options
r1296 dataOut.flagNoData = True
if self.__dataReady:
dataOut.nCohInt *= self.n
modifiacion de la clase pulse pair, correcion de errores del Noise con removeDC y los 4 momentos
r1314 dataOut.dataPP_POW = data_intensity # S
dataOut.dataPP_POWER = data_power # P
dataOut.dataPP_DOP = data_velocity
dataOut.dataPP_SNR = data_snrPP
dataOut.dataPP_WIDTH = data_specwidth
update for weather radar options
r1296 dataOut.PRFbyAngle = self.n #numero de PRF*cada angulo rotado que equivale a un tiempo.
dataOut.utctime = avgdatatime
dataOut.flagNoData = False
return dataOut
modifiacion de la clase pulse pair, correcion de errores del Noise con removeDC y los 4 momentos
r1314
Miguel Valdez
Bug fixed:...
r624 # import collections
# from scipy.stats import mode
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897 #
Miguel Valdez
Bug fixed:...
r624 # class Synchronize(Operation):
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897 #
Miguel Valdez
Bug fixed:...
r624 # isConfig = False
# __profIndex = 0
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897 #
# def __init__(self, **kwargs):
#
# Operation.__init__(self, **kwargs)
Miguel Valdez
Bug fixed:...
r624 # # self.isConfig = False
# self.__powBuffer = None
# self.__startIndex = 0
# self.__pulseFound = False
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897 #
Miguel Valdez
Bug fixed:...
r624 # def __findTxPulse(self, dataOut, channel=0, pulse_with = None):
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897 #
Miguel Valdez
Bug fixed:...
r624 # #Read data
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897 #
Miguel Valdez
Bug fixed:...
r624 # powerdB = dataOut.getPower(channel = channel)
# noisedB = dataOut.getNoise(channel = channel)[0]
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897 #
Miguel Valdez
Bug fixed:...
r624 # self.__powBuffer.extend(powerdB.flatten())
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897 #
Miguel Valdez
Bug fixed:...
r624 # dataArray = numpy.array(self.__powBuffer)
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897 #
Miguel Valdez
Bug fixed:...
r624 # filteredPower = numpy.correlate(dataArray, dataArray[0:self.__nSamples], "same")
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897 #
Miguel Valdez
Bug fixed:...
r624 # maxValue = numpy.nanmax(filteredPower)
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897 #
Miguel Valdez
Bug fixed:...
r624 # if maxValue < noisedB + 10:
# #No se encuentra ningun pulso de transmision
# return None
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897 #
Miguel Valdez
Bug fixed:...
r624 # maxValuesIndex = numpy.where(filteredPower > maxValue - 0.1*abs(maxValue))[0]
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897 #
Miguel Valdez
Bug fixed:...
r624 # if len(maxValuesIndex) < 2:
# #Solo se encontro un solo pulso de transmision de un baudio, esperando por el siguiente TX
# return None
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897 #
Miguel Valdez
Bug fixed:...
r624 # phasedMaxValuesIndex = maxValuesIndex - self.__nSamples
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897 #
Miguel Valdez
Bug fixed:...
r624 # #Seleccionar solo valores con un espaciamiento de nSamples
# pulseIndex = numpy.intersect1d(maxValuesIndex, phasedMaxValuesIndex)
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897 #
Miguel Valdez
Bug fixed:...
r624 # if len(pulseIndex) < 2:
# #Solo se encontro un pulso de transmision con ancho mayor a 1
# return None
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897 #
Miguel Valdez
Bug fixed:...
r624 # spacing = pulseIndex[1:] - pulseIndex[:-1]
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897 #
Miguel Valdez
Bug fixed:...
r624 # #remover senales que se distancien menos de 10 unidades o muestras
# #(No deberian existir IPP menor a 10 unidades)
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897 #
Miguel Valdez
Bug fixed:...
r624 # realIndex = numpy.where(spacing > 10 )[0]
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897 #
Miguel Valdez
Bug fixed:...
r624 # if len(realIndex) < 2:
# #Solo se encontro un pulso de transmision con ancho mayor a 1
# return None
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897 #
Miguel Valdez
Bug fixed:...
r624 # #Eliminar pulsos anchos (deja solo la diferencia entre IPPs)
# realPulseIndex = pulseIndex[realIndex]
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897 #
Miguel Valdez
Bug fixed:...
r624 # period = mode(realPulseIndex[1:] - realPulseIndex[:-1])[0][0]
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897 #
Miguel Valdez
Bug fixed:...
r624 # print "IPP = %d samples" %period
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897 #
Miguel Valdez
Bug fixed:...
r624 # self.__newNSamples = dataOut.nHeights #int(period)
# self.__startIndex = int(realPulseIndex[0])
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897 #
Miguel Valdez
Bug fixed:...
r624 # return 1
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897 #
#
Miguel Valdez
Bug fixed:...
r624 # def setup(self, nSamples, nChannels, buffer_size = 4):
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897 #
Miguel Valdez
Bug fixed:...
r624 # self.__powBuffer = collections.deque(numpy.zeros( buffer_size*nSamples,dtype=numpy.float),
# maxlen = buffer_size*nSamples)
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897 #
Miguel Valdez
Bug fixed:...
r624 # bufferList = []
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897 #
Miguel Valdez
Bug fixed:...
r624 # for i in range(nChannels):
# bufferByChannel = collections.deque(numpy.zeros( buffer_size*nSamples, dtype=numpy.complex) + numpy.NAN,
# maxlen = buffer_size*nSamples)
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897 #
Miguel Valdez
Bug fixed:...
r624 # bufferList.append(bufferByChannel)
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897 #
Miguel Valdez
Bug fixed:...
r624 # self.__nSamples = nSamples
# self.__nChannels = nChannels
# self.__bufferList = bufferList
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897 #
Miguel Valdez
Bug fixed:...
r624 # def run(self, dataOut, channel = 0):
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897 #
Miguel Valdez
Bug fixed:...
r624 # if not self.isConfig:
# nSamples = dataOut.nHeights
# nChannels = dataOut.nChannels
# self.setup(nSamples, nChannels)
# self.isConfig = True
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897 #
Miguel Valdez
Bug fixed:...
r624 # #Append new data to internal buffer
# for thisChannel in range(self.__nChannels):
# bufferByChannel = self.__bufferList[thisChannel]
# bufferByChannel.extend(dataOut.data[thisChannel])
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897 #
Miguel Valdez
Bug fixed:...
r624 # if self.__pulseFound:
# self.__startIndex -= self.__nSamples
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897 #
Miguel Valdez
Bug fixed:...
r624 # #Finding Tx Pulse
# if not self.__pulseFound:
# indexFound = self.__findTxPulse(dataOut, channel)
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897 #
Miguel Valdez
Bug fixed:...
r624 # if indexFound == None:
# dataOut.flagNoData = True
# return
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897 #
Miguel Valdez
Bug fixed:...
r624 # self.__arrayBuffer = numpy.zeros((self.__nChannels, self.__newNSamples), dtype = numpy.complex)
# self.__pulseFound = True
# self.__startIndex = indexFound
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897 #
Miguel Valdez
Bug fixed:...
r624 # #If pulse was found ...
# for thisChannel in range(self.__nChannels):
# bufferByChannel = self.__bufferList[thisChannel]
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897 # #print self.__startIndex
Miguel Valdez
Bug fixed:...
r624 # x = numpy.array(bufferByChannel)
# self.__arrayBuffer[thisChannel] = x[self.__startIndex:self.__startIndex+self.__newNSamples]
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897 #
Miguel Valdez
Bug fixed:...
r624 # deltaHeight = dataOut.heightList[1] - dataOut.heightList[0]
# dataOut.heightList = numpy.arange(self.__newNSamples)*deltaHeight
# # dataOut.ippSeconds = (self.__newNSamples / deltaHeight)/1e6
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897 #
Miguel Valdez
Bug fixed:...
r624 # dataOut.data = self.__arrayBuffer
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897 #
Miguel Valdez
Bug fixed:...
r624 # self.__startIndex += self.__newNSamples
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897 #
George Yong
Multiprocessing for voltage (all operations) working
r1173 # return