##// END OF EJS Templates
Review MP changes, three types of operations: self, other and external
Review MP changes, three types of operations: self, other and external

File last commit:

r1177:b013e28003fc
r1177:b013e28003fc
Show More
jroproc_voltage.py
1330 lines | 40.0 KiB | text/x-python | PythonLexer
Ivan Valdez
Bug fixed: importing sys module
r723 import sys
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 import numpy
Julio Valdez
jroproc_voltage.py: Interpolate heights operation fixed
r837 from scipy import interpolate
Juan C. Espinoza
Review MP changes, three types of operations: self, other and external
r1177 from schainpy.model.proc.jroproc_base import ProcessingUnit,, Operation
Miguel Valdez
Merge with branch schain_julia_drifts from rev. 803 to 995....
r568 from schainpy.model.data.jrodata import Voltage
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
George Yong
Multiprocessing for voltage (all operations) working
r1173 @MPDecorator
José Chávez
sumado de stride en stride. ej 96 -> 24x4 -> 1
r1116 class VoltageProc(ProcessingUnit):
George Yong
Multiprocessing for voltage (all operations) working
r1173
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
José Chávez
sumado de stride en stride. ej 96 -> 24x4 -> 1
r1116 # self.dataOut.copy(self.dataIn)
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
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
José Chávez
sumado de stride en stride. ej 96 -> 24x4 -> 1
r1116 # 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
sumado de stride en stride. ej 96 -> 24x4 -> 1
r1116 #
# pass#
#
# def init(self):
#
#
# if self.dataIn.type == 'AMISR':
# self.__updateObjFromAmisrInput()
#
# if self.dataIn.type == 'Voltage':
# self.dataOut.copy(self.dataIn)
# # No necesita copiar en cada init() los atributos de dataIn
# # la copia deberia hacerse por cada nuevo bloque de datos
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 selectChannels(self, 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 = []
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 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)
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.selectChannelsByIndex(channelIndexList)
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 print(channelIndexList)
raise ValueError("The value %d in channelIndexList is not valid" %channelIndex)
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
Bug fixed: Error found selecting Heights and Channels
r545 if self.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]
"""
data = self.dataOut.data[channelIndexList,:,:]
else:
data = self.dataOut.data[channelIndexList,:]
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.data = data
self.dataOut.channelList = [self.dataOut.channelList[i] for i in channelIndexList]
José Chávez
sumado de stride en stride. ej 96 -> 24x4 -> 1
r1116 # self.dataOut.nChannels = nChannels
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
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 selectHeights(self, minHei=None, maxHei=None):
"""
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
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 minHei == None:
minHei = self.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 maxHei == None:
maxHei = self.dataOut.heightList[-1]
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
Bug fixed:...
r624 if (minHei < self.dataOut.heightList[0]):
minHei = self.dataOut.heightList[0]
Miguel Valdez
-Using ValueError raises instead of IOError...
r684
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 (maxHei > self.dataOut.heightList[-1]):
maxHei = self.dataOut.heightList[-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 minIndex = 0
maxIndex = 0
heights = 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 inda = numpy.where(heights >= minHei)
indb = numpy.where(heights <= 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 try:
minIndex = inda[0][0]
except:
minIndex = 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 try:
maxIndex = indb[0][-1]
except:
maxIndex = len(heights)
self.selectHeightsByIndex(minIndex, 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 return 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 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
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 (minIndex < 0) or (minIndex > maxIndex):
George Yong
Python 2to3, Spectra (all operations) working
r1167 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
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 (maxIndex >= self.dataOut.nHeights):
Miguel Valdez
Affected:...
r534 maxIndex = self.dataOut.nHeights
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 #voltage
Miguel Valdez
jroproc_voltage Error importing Carbon.fonts
r532 if self.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]
"""
Miguel Valdez
Bugs fixed:...
r660 data = self.dataOut.data[:,:, minIndex:maxIndex]
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
Bugs fixed:...
r660 data = self.dataOut.data[:, 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
José Chávez
sumado de stride en stride. ej 96 -> 24x4 -> 1
r1116 # firstHeight = self.dataOut.heightList[minIndex]
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.data = data
Miguel Valdez
Affected:...
r534 self.dataOut.heightList = self.dataOut.heightList[minIndex:maxIndex]
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
Signal Chain GUI v2.1
r596 if self.dataOut.nHeights <= 1:
George Yong
Python 2to3, Spectra (all operations) working
r1167 raise ValueError("selectHeights: Too few heights. Current number of heights is %d" %(self.dataOut.nHeights))
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
Miguel Valdez
Merge with branch schain_julia_drifts from rev. 803 to 995....
r568 def filterByHeights(self, window):
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 deltaHeight = self.dataOut.heightList[1] - self.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:
window = (self.dataOut.radarControllerHeaderObj.txA/self.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
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 r = self.dataOut.nHeights % window
Miguel Valdez
Signal Chain GUI v2.1
r596 newheights = (self.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:
George Yong
Python 2to3, Spectra (all operations) working
r1167 raise ValueError("filterByHeights: Too few heights. Current number of heights is %d and window is %d" %(self.dataOut.nHeights, window))
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Miguel Valdez
Bug fixed: Error found selecting Heights and Channels
r545 if self.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]
"""
buffer = self.dataOut.data[:, :, 0:self.dataOut.nHeights-r]
Alexander Valdez
Bug fixed in reshape
r564 buffer = buffer.reshape(self.dataOut.nChannels,self.dataOut.nProfiles,self.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:
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897 buffer = self.dataOut.data[:,0:self.dataOut.nHeights-r]
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 = buffer.reshape(self.dataOut.nChannels,self.dataOut.nHeights/window,window)
buffer = numpy.sum(buffer,2)
Miguel Valdez
Signal Chain GUI v2.1
r596 self.dataOut.data = buffer
self.dataOut.heightList = self.dataOut.heightList[0] + numpy.arange( newheights )*newdelta
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.windowOfFilter = window
Miguel Valdez
Merge with branch schain_julia_drifts from rev. 803 to 995....
r568
def setH0(self, 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:
deltaHeight = self.dataOut.heightList[1] - self.dataOut.heightList[0]
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 nHeights = self.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
Miguel Valdez
Merge with branch schain_julia_drifts from rev. 803 to 995....
r568 self.dataOut.heightList = newHeiRange
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 def deFlip(self, channelList = []):
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 = self.dataOut.data.copy()
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 self.dataOut.flagDataAsBlock:
flip = self.flip
George Yong
Python 2to3, Spectra (all operations) working
r1167 profileList = list(range(self.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:
Miguel Valdez
Signal Chain GUI updated:...
r586 if thisChannel not in self.dataOut.channelList:
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:
Miguel Valdez
Signal Chain GUI updated:...
r586 if thisChannel not in self.dataOut.channelList:
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
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.dataOut.data = 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 def setRadarFrequency(self, frequency=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 frequency != None:
self.dataOut.frequency = frequency
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
Julio Valdez
-Function to interpolate corrupted profiles
r836 def interpolateHeights(self, topLim, botLim):
#69 al 72 para julia
#82-84 para meteoros
if len(numpy.shape(self.dataOut.data))==2:
sampInterp = (self.dataOut.data[:,botLim-1] + self.dataOut.data[:,topLim+1])/2
sampInterp = numpy.transpose(numpy.tile(sampInterp,(topLim-botLim + 1,1)))
Julio Valdez
jroproc_voltage.py: Interpolate heights operation fixed
r837 #self.dataOut.data[:,botLim:limSup+1] = sampInterp
self.dataOut.data[:,botLim:topLim+1] = sampInterp
Julio Valdez
-Function to interpolate corrupted profiles
r836 else:
Julio Valdez
jroproc_voltage.py: Interpolate heights operation fixed
r837 nHeights = self.dataOut.data.shape[2]
x = numpy.hstack((numpy.arange(botLim),numpy.arange(topLim+1,nHeights)))
George Yong
Python 2to3, Spectra (all operations) working
r1167 y = self.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)
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
Julio Valdez
jroproc_voltage.py: Interpolate heights operation fixed
r837 self.dataOut.data[:,:,botLim:topLim+1] = ynew
José Chávez
sumado de stride en stride. ej 96 -> 24x4 -> 1
r1116 # import collections
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 voltage (all operations) working
r1173 def __init__(self):#, **kwargs):
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
George Yong
Multiprocessing for voltage (all operations) working
r1173 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 # self.isConfig = False
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]
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
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
José Chávez
test zmq for rawdata
r975
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:
José Chávez
sumado de stride en stride. ej 96 -> 24x4 -> 1
r1116 if stride is None:
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
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
dataOut.nCohInt *= self.n
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 voltage (all operations) working
r1173 def __init__(self):#, **kwargs):
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
George Yong
Multiprocessing for voltage (all operations) working
r1173 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 voltage (all operations) working
r1173 # self.isConfig = False
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])
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 (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
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 repetitions = self.__nProfiles / self.nCode
Juan C. Espinoza
Decoder: nProfiles var updated in run
r997
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)
José Chávez
cambios xmax xmin
r1004
Juan C. Espinoza
remove profilehooks imports
r1050 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
José Chávez
cambios xmax xmin
r1004
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
Juan C. Espinoza
Decoder: nProfiles var updated in run
r997
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 voltage (all operations) working
r1173 def __init__(self):#, **kwargs):
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
George Yong
Multiprocessing for voltage (all operations) working
r1173 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):
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
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 voltage (all operations) working
r1173 def __init__(self):#, **kwargs):
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
George Yong
Multiprocessing for voltage (all operations) working
r1173 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
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 return True
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()
Miguel Valdez
Bugs fixed:...
r660 return True
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()
Miguel Valdez
Bugs fixed:...
r660 return True
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
Miguel Valdez
Bugs fixed:...
r660 return True
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
Miguel Valdez
Bugs fixed:...
r660 return True
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
George Yong
Multiprocessing for voltage (all operations) working
r1173 #return False
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 Reshaper(Operation):
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
George Yong
Multiprocessing for voltage (all operations) working
r1173 def __init__(self):#, **kwargs):
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
George Yong
Multiprocessing for voltage (all operations) working
r1173 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 voltage (all operations) working
r1173 def __init__(self):#, **kwargs):
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
George Yong
Multiprocessing for voltage (all operations) working
r1173 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]))
George Yong
Multiprocessing for voltage (all operations) working
r1173
George Yong
Python 2to3, Voltage (all operations) working
r1168 new_shape = shape[0], shape[1]*n, int(shape[2]/n)
George Yong
Multiprocessing for voltage (all operations) working
r1173
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 voltage (all operations) working
r1173 def __init__(self):#, **kwargs):
José Chávez
cambiados los kwargs para cada operacion/unidad de procesamiento
r897
George Yong
Multiprocessing for voltage (all operations) working
r1173 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
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