##// END OF EJS Templates
Merge branch 'v3.0-devel' of http://jro-dev.igp.gob.pe/rhodecode/schain into v3.0-devel
Merge branch 'v3.0-devel' of http://jro-dev.igp.gob.pe/rhodecode/schain into v3.0-devel

File last commit:

r1167:1f521b07c958
r1175:7e36d2e90f1d merge
Show More
jrodata.py
1250 lines | 29.0 KiB | text/x-python | PythonLexer
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 '''
$Author: murco $
$Id: JROData.py 173 2012-11-20 15:06:21Z murco $
'''
import copy
import numpy
import datetime
George Yong
Python 2to3, Spectra (all operations) working
r1167 from .jroheaderIO import SystemHeader, RadarControllerHeader
# from schainpy import cSchain
Juan C. Valdez
Add C extension for hildebrand_sekhon noise estimation and update requirements versions in setup
r878
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 getNumpyDtype(dataTypeCode):
ReceiverData Operation, test PlotData
r889
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 dataTypeCode == 0:
José Chávez
formatting, template actualizado, decimation a 300
r1092 numpyDtype = numpy.dtype([('real', '<i1'), ('imag', '<i1')])
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 elif dataTypeCode == 1:
José Chávez
formatting, template actualizado, decimation a 300
r1092 numpyDtype = numpy.dtype([('real', '<i2'), ('imag', '<i2')])
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 elif dataTypeCode == 2:
José Chávez
formatting, template actualizado, decimation a 300
r1092 numpyDtype = numpy.dtype([('real', '<i4'), ('imag', '<i4')])
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 elif dataTypeCode == 3:
José Chávez
formatting, template actualizado, decimation a 300
r1092 numpyDtype = numpy.dtype([('real', '<i8'), ('imag', '<i8')])
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 elif dataTypeCode == 4:
José Chávez
formatting, template actualizado, decimation a 300
r1092 numpyDtype = numpy.dtype([('real', '<f4'), ('imag', '<f4')])
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 elif dataTypeCode == 5:
José Chávez
formatting, template actualizado, decimation a 300
r1092 numpyDtype = numpy.dtype([('real', '<f8'), ('imag', '<f8')])
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 else:
George Yong
Python 2to3, Spectra (all operations) working
r1167 raise ValueError('dataTypeCode was not defined')
ReceiverData Operation, test PlotData
r889
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 numpyDtype
José Chávez
formatting, template actualizado, decimation a 300
r1092
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 getDataTypeCode(numpyDtype):
ReceiverData Operation, test PlotData
r889
José Chávez
formatting, template actualizado, decimation a 300
r1092 if numpyDtype == numpy.dtype([('real', '<i1'), ('imag', '<i1')]):
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 datatype = 0
José Chávez
formatting, template actualizado, decimation a 300
r1092 elif numpyDtype == numpy.dtype([('real', '<i2'), ('imag', '<i2')]):
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 datatype = 1
José Chávez
formatting, template actualizado, decimation a 300
r1092 elif numpyDtype == numpy.dtype([('real', '<i4'), ('imag', '<i4')]):
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 datatype = 2
José Chávez
formatting, template actualizado, decimation a 300
r1092 elif numpyDtype == numpy.dtype([('real', '<i8'), ('imag', '<i8')]):
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 datatype = 3
José Chávez
formatting, template actualizado, decimation a 300
r1092 elif numpyDtype == numpy.dtype([('real', '<f4'), ('imag', '<f4')]):
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 datatype = 4
José Chávez
formatting, template actualizado, decimation a 300
r1092 elif numpyDtype == numpy.dtype([('real', '<f8'), ('imag', '<f8')]):
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 datatype = 5
else:
datatype = None
ReceiverData Operation, test PlotData
r889
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 datatype
José Chávez
formatting, template actualizado, decimation a 300
r1092
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 hildebrand_sekhon(data, navg):
Miguel Valdez
Merge with branch schain_julia_drifts from rev. 803 to 995....
r568 """
ReceiverData Operation, test PlotData
r889 This method is for the objective determination of the noise level in Doppler spectra. This
implementation technique is based on the fact that the standard deviation of the spectral
Miguel Valdez
Merge with branch schain_julia_drifts from rev. 803 to 995....
r568 densities is equal to the mean spectral density for white Gaussian noise
ReceiverData Operation, test PlotData
r889
Miguel Valdez
Merge with branch schain_julia_drifts from rev. 803 to 995....
r568 Inputs:
Data : heights
navg : numbers of averages
ReceiverData Operation, test PlotData
r889
Miguel Valdez
Merge with branch schain_julia_drifts from rev. 803 to 995....
r568 Return:
-1 : any error
anoise : noise's level
"""
ReceiverData Operation, test PlotData
r889
José Chávez
finishing day, need testing
r931 sortdata = numpy.sort(data, axis=None)
George Yong
Python 2to3, Spectra (all operations) working
r1167 lenOfData = len(sortdata)
nums_min = lenOfData*0.2
if nums_min <= 5:
nums_min = 5
sump = 0.
sumq = 0.
j = 0
cont = 1
while((cont==1)and(j<lenOfData)):
sump += sortdata[j]
sumq += sortdata[j]**2
if j > nums_min:
rtest = float(j)/(j-1) + 1.0/navg
if ((sumq*j) > (rtest*sump**2)):
j = j - 1
sump = sump - sortdata[j]
sumq = sumq - sortdata[j]**2
cont = 0
j += 1
lnoise = sump /j
return lnoise
Juan C. Valdez
Add C extension for hildebrand_sekhon noise estimation and update requirements versions in setup
r878
George Yong
Python 2to3, Spectra (all operations) working
r1167 # return cSchain.hildebrand_sekhon(sortdata, navg)
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
ProfileToChannels this is a new Operation to get data with dimensions [nchannels,nsamples]
r501 class Beam:
ReceiverData Operation, test PlotData
r889
Daniel Valdez
ProfileToChannels this is a new Operation to get data with dimensions [nchannels,nsamples]
r501 def __init__(self):
self.codeList = []
self.azimuthList = []
ReceiverData Operation, test PlotData
r889 self.zenithList = []
Daniel Valdez
ProfileToChannels this is a new Operation to get data with dimensions [nchannels,nsamples]
r501
José Chávez
formatting, template actualizado, decimation a 300
r1092
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 GenericData(object):
ReceiverData Operation, test PlotData
r889
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 flagNoData = True
ReceiverData Operation, test PlotData
r889
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 copy(self, inputObj=None):
ReceiverData Operation, test PlotData
r889
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 inputObj == None:
return copy.deepcopy(self)
George Yong
Python 2to3, Spectra (all operations) working
r1167 for key in list(inputObj.__dict__.keys()):
ReceiverData Operation, test PlotData
r889
Miguel Valdez
Bug fixed in jrodata: Error working with more than one branch. When a value is updated in a branch this value is modified in every other branch because variables are references.
r757 attribute = inputObj.__dict__[key]
ReceiverData Operation, test PlotData
r889
José Chávez
formatting, template actualizado, decimation a 300
r1092 # If this attribute is a tuple or list
Miguel Valdez
Bug fixed in jrodata: Error working with more than one branch. When a value is updated in a branch this value is modified in every other branch because variables are references.
r757 if type(inputObj.__dict__[key]) in (tuple, list):
self.__dict__[key] = attribute[:]
continue
ReceiverData Operation, test PlotData
r889
José Chávez
formatting, template actualizado, decimation a 300
r1092 # If this attribute is another object or instance
Miguel Valdez
Bug fixed in jrodata: Error working with more than one branch. When a value is updated in a branch this value is modified in every other branch because variables are references.
r757 if hasattr(attribute, '__dict__'):
self.__dict__[key] = attribute.copy()
continue
ReceiverData Operation, test PlotData
r889
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.__dict__[key] = inputObj.__dict__[key]
def deepcopy(self):
ReceiverData Operation, test PlotData
r889
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 copy.deepcopy(self)
ReceiverData Operation, test PlotData
r889
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 isEmpty(self):
ReceiverData Operation, test PlotData
r889
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.flagNoData
ReceiverData Operation, test PlotData
r889
José Chávez
formatting, template actualizado, decimation a 300
r1092
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 JROData(GenericData):
ReceiverData Operation, test PlotData
r889
José Chávez
formatting, template actualizado, decimation a 300
r1092 # m_BasicHeader = BasicHeader()
# m_ProcessingHeader = ProcessingHeader()
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
systemHeaderObj = SystemHeader()
ReceiverData Operation, test PlotData
r889
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 radarControllerHeaderObj = RadarControllerHeader()
# data = None
ReceiverData Operation, test PlotData
r889
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 type = None
ReceiverData Operation, test PlotData
r889
José Chávez
formatting, template actualizado, decimation a 300
r1092 datatype = None # dtype but in string
ReceiverData Operation, test PlotData
r889
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 # dtype = None
ReceiverData Operation, test PlotData
r889
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 # nChannels = None
ReceiverData Operation, test PlotData
r889
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 # nHeights = None
ReceiverData Operation, test PlotData
r889
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 nProfiles = None
ReceiverData Operation, test PlotData
r889
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 heightList = None
ReceiverData Operation, test PlotData
r889
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 channelList = None
ReceiverData Operation, test PlotData
r889
Miguel Valdez
Merge with branch schain_julia_drifts from rev. 803 to 995....
r568 flagDiscontinuousBlock = False
ReceiverData Operation, test PlotData
r889
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 useLocalTime = False
ReceiverData Operation, test PlotData
r889
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 utctime = None
ReceiverData Operation, test PlotData
r889
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 timeZone = None
ReceiverData Operation, test PlotData
r889
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 dstFlag = None
ReceiverData Operation, test PlotData
r889
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 errorCount = None
ReceiverData Operation, test PlotData
r889
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 blocksize = None
ReceiverData Operation, test PlotData
r889
Miguel Valdez
Merge with branch schain_julia_drifts from rev. 803 to 995....
r568 # nCode = None
ReceiverData Operation, test PlotData
r889 #
Miguel Valdez
Merge with branch schain_julia_drifts from rev. 803 to 995....
r568 # nBaud = None
ReceiverData Operation, test PlotData
r889 #
Miguel Valdez
Merge with branch schain_julia_drifts from rev. 803 to 995....
r568 # code = None
ReceiverData Operation, test PlotData
r889
José Chávez
formatting, template actualizado, decimation a 300
r1092 flagDecodeData = False # asumo q la data no esta decodificada
ReceiverData Operation, test PlotData
r889
José Chávez
formatting, template actualizado, decimation a 300
r1092 flagDeflipData = False # asumo q la data no esta sin flip
ReceiverData Operation, test PlotData
r889
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 flagShiftFFT = False
ReceiverData Operation, test PlotData
r889
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 # ippSeconds = None
ReceiverData Operation, test PlotData
r889
Miguel Valdez
JRODATA: timeInterval is a property now
r526 # timeInterval = None
ReceiverData Operation, test PlotData
r889
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 nCohInt = None
ReceiverData Operation, test PlotData
r889
Miguel Valdez
Merge with branch schain_julia_drifts from rev. 803 to 995....
r568 # noise = None
ReceiverData Operation, test PlotData
r889
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 windowOfFilter = 1
ReceiverData Operation, test PlotData
r889
José Chávez
formatting, template actualizado, decimation a 300
r1092 # Speed of ligth
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 C = 3e8
ReceiverData Operation, test PlotData
r889
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 frequency = 49.92e6
ReceiverData Operation, test PlotData
r889
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 realtime = False
ReceiverData Operation, test PlotData
r889
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 beacon_heiIndexList = None
ReceiverData Operation, test PlotData
r889
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 last_block = None
ReceiverData Operation, test PlotData
r889
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 blocknow = None
Daniel Valdez
Filtering AMISR files for Datetime Range...
r499 azimuth = None
ReceiverData Operation, test PlotData
r889
Daniel Valdez
Filtering AMISR files for Datetime Range...
r499 zenith = None
ReceiverData Operation, test PlotData
r889
Daniel Valdez
ProfileToChannels this is a new Operation to get data with dimensions [nchannels,nsamples]
r501 beam = Beam()
ReceiverData Operation, test PlotData
r889
Miguel Valdez
Affected:...
r534 profileIndex = None
ReceiverData Operation, test PlotData
r889
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 getNoise(self):
ReceiverData Operation, test PlotData
r889
Miguel Valdez
-Using ValueError raises instead of IOError...
r684 raise NotImplementedError
ReceiverData Operation, test PlotData
r889
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 getNChannels(self):
ReceiverData Operation, test PlotData
r889
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 len(self.channelList)
ReceiverData Operation, test PlotData
r889
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 getChannelIndexList(self):
ReceiverData Operation, test PlotData
r889
George Yong
Python 2to3, Spectra (all operations) working
r1167 return list(range(self.nChannels))
ReceiverData Operation, test PlotData
r889
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 getNHeights(self):
ReceiverData Operation, test PlotData
r889
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 len(self.heightList)
ReceiverData Operation, test PlotData
r889
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 getHeiRange(self, extrapoints=0):
ReceiverData Operation, test PlotData
r889
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 heis = self.heightList
# deltah = self.heightList[1] - self.heightList[0]
ReceiverData Operation, test PlotData
r889 #
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 # heis.append(self.heightList[-1])
ReceiverData Operation, test PlotData
r889
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 heis
ReceiverData Operation, test PlotData
r889
Miguel Valdez
Bug fixed: Fmax should not be divided by 2.
r765 def getDeltaH(self):
ReceiverData Operation, test PlotData
r889
Miguel Valdez
Bug fixed: Fmax should not be divided by 2.
r765 delta = self.heightList[1] - self.heightList[0]
ReceiverData Operation, test PlotData
r889
Miguel Valdez
Bug fixed: Fmax should not be divided by 2.
r765 return delta
ReceiverData Operation, test PlotData
r889
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 getltctime(self):
ReceiverData Operation, test PlotData
r889
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.useLocalTime:
José Chávez
formatting, template actualizado, decimation a 300
r1092 return self.utctime - self.timeZone * 60
ReceiverData Operation, test PlotData
r889
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.utctime
ReceiverData Operation, test PlotData
r889
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 getDatatime(self):
ReceiverData Operation, test PlotData
r889
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 datatimeValue = datetime.datetime.utcfromtimestamp(self.ltctime)
return datatimeValue
ReceiverData Operation, test PlotData
r889
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 getTimeRange(self):
ReceiverData Operation, test PlotData
r889
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 datatime = []
ReceiverData Operation, test PlotData
r889
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 datatime.append(self.ltctime)
José Chávez
formatting, template actualizado, decimation a 300
r1092 datatime.append(self.ltctime + self.timeInterval + 1)
ReceiverData Operation, test PlotData
r889
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 datatime = numpy.array(datatime)
ReceiverData Operation, test PlotData
r889
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 datatime
ReceiverData Operation, test PlotData
r889
Miguel Valdez
Bug fixed: Fmax should not be divided by 2.
r765 def getFmaxTimeResponse(self):
ReceiverData Operation, test PlotData
r889
José Chávez
formatting, template actualizado, decimation a 300
r1092 period = (10**-6) * self.getDeltaH() / (0.15)
ReceiverData Operation, test PlotData
r889
José Chávez
formatting, template actualizado, decimation a 300
r1092 PRF = 1. / (period * self.nCohInt)
ReceiverData Operation, test PlotData
r889
Miguel Valdez
Bug fixed: Fmax should not be divided by 2.
r765 fmax = PRF
ReceiverData Operation, test PlotData
r889
Miguel Valdez
Bug fixed: Fmax should not be divided by 2.
r765 return fmax
ReceiverData Operation, test PlotData
r889
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 getFmax(self):
José Chávez
formatting, template actualizado, decimation a 300
r1092 PRF = 1. / (self.ippSeconds * self.nCohInt)
ReceiverData Operation, test PlotData
r889
Miguel Valdez
Bug fixed: Fmax should not be divided by 2.
r765 fmax = PRF
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 fmax
ReceiverData Operation, test PlotData
r889
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 getVmax(self):
ReceiverData Operation, test PlotData
r889
José Chávez
formatting, template actualizado, decimation a 300
r1092 _lambda = self.C / self.frequency
ReceiverData Operation, test PlotData
r889
José Chávez
formatting, template actualizado, decimation a 300
r1092 vmax = self.getFmax() * _lambda / 2
ReceiverData Operation, test PlotData
r889
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 vmax
ReceiverData Operation, test PlotData
r889
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 get_ippSeconds(self):
'''
'''
return self.radarControllerHeaderObj.ippSeconds
ReceiverData Operation, test PlotData
r889
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 set_ippSeconds(self, ippSeconds):
'''
'''
ReceiverData Operation, test PlotData
r889
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.radarControllerHeaderObj.ippSeconds = ippSeconds
ReceiverData Operation, test PlotData
r889
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
ReceiverData Operation, test PlotData
r889
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 get_dtype(self):
'''
'''
return getNumpyDtype(self.datatype)
ReceiverData Operation, test PlotData
r889
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 set_dtype(self, numpyDtype):
'''
'''
ReceiverData Operation, test PlotData
r889
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.datatype = getDataTypeCode(numpyDtype)
Miguel Valdez
Merge with branch schain_julia_drifts from rev. 803 to 995....
r568
def get_code(self):
'''
'''
return self.radarControllerHeaderObj.code
ReceiverData Operation, test PlotData
r889
Miguel Valdez
Merge with branch schain_julia_drifts from rev. 803 to 995....
r568 def set_code(self, code):
'''
'''
self.radarControllerHeaderObj.code = code
ReceiverData Operation, test PlotData
r889
Miguel Valdez
Merge with branch schain_julia_drifts from rev. 803 to 995....
r568 return
def get_ncode(self):
'''
'''
return self.radarControllerHeaderObj.nCode
ReceiverData Operation, test PlotData
r889
Miguel Valdez
Merge with branch schain_julia_drifts from rev. 803 to 995....
r568 def set_ncode(self, nCode):
'''
'''
self.radarControllerHeaderObj.nCode = nCode
ReceiverData Operation, test PlotData
r889
Miguel Valdez
Merge with branch schain_julia_drifts from rev. 803 to 995....
r568 return
def get_nbaud(self):
'''
'''
return self.radarControllerHeaderObj.nBaud
ReceiverData Operation, test PlotData
r889
Miguel Valdez
Merge with branch schain_julia_drifts from rev. 803 to 995....
r568 def set_nbaud(self, nBaud):
'''
'''
self.radarControllerHeaderObj.nBaud = nBaud
ReceiverData Operation, test PlotData
r889
Miguel Valdez
Merge with branch schain_julia_drifts from rev. 803 to 995....
r568 return
ReceiverData Operation, test PlotData
r889
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 nChannels = property(getNChannels, "I'm the 'nChannel' property.")
José Chávez
formatting, template actualizado, decimation a 300
r1092 channelIndexList = property(
getChannelIndexList, "I'm the 'channelIndexList' property.")
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 nHeights = property(getNHeights, "I'm the 'nHeights' property.")
#noise = property(getNoise, "I'm the 'nHeights' property.")
datatime = property(getDatatime, "I'm the 'datatime' property")
ltctime = property(getltctime, "I'm the 'ltctime' property")
ippSeconds = property(get_ippSeconds, set_ippSeconds)
dtype = property(get_dtype, set_dtype)
Miguel Valdez
JRODATA: timeInterval is a property now
r526 # timeInterval = property(getTimeInterval, "I'm the 'timeInterval' property")
Miguel Valdez
Merge with branch schain_julia_drifts from rev. 803 to 995....
r568 code = property(get_code, set_code)
nCode = property(get_ncode, set_ncode)
nBaud = property(get_nbaud, set_nbaud)
ReceiverData Operation, test PlotData
r889
José Chávez
formatting, template actualizado, decimation a 300
r1092
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 Voltage(JROData):
ReceiverData Operation, test PlotData
r889
José Chávez
formatting, template actualizado, decimation a 300
r1092 # data es un numpy array de 2 dmensiones (canales, alturas)
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 = None
ReceiverData Operation, test PlotData
r889
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 __init__(self):
'''
Constructor
'''
ReceiverData Operation, test PlotData
r889
Miguel Valdez
Bug plotting RTI fixed: timezone was removed from getLimit function
r566 self.useLocalTime = True
ReceiverData Operation, test PlotData
r889
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.radarControllerHeaderObj = RadarControllerHeader()
ReceiverData Operation, test PlotData
r889
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.systemHeaderObj = SystemHeader()
ReceiverData Operation, test PlotData
r889
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.type = "Voltage"
ReceiverData Operation, test PlotData
r889
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.data = None
ReceiverData Operation, test PlotData
r889
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.dtype = None
ReceiverData Operation, test PlotData
r889
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.nChannels = 0
ReceiverData Operation, test PlotData
r889
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.nHeights = 0
ReceiverData Operation, test PlotData
r889
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.nProfiles = None
ReceiverData Operation, test PlotData
r889
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.heightList = None
ReceiverData Operation, test PlotData
r889
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.channelList = None
ReceiverData Operation, test PlotData
r889
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.channelIndexList = None
ReceiverData Operation, test PlotData
r889
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.flagNoData = True
ReceiverData Operation, test PlotData
r889
Miguel Valdez
Merge with branch schain_julia_drifts from rev. 803 to 995....
r568 self.flagDiscontinuousBlock = False
ReceiverData Operation, test PlotData
r889
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.utctime = None
ReceiverData Operation, test PlotData
r889
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.timeZone = None
ReceiverData Operation, test PlotData
r889
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.dstFlag = None
ReceiverData Operation, test PlotData
r889
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.errorCount = None
ReceiverData Operation, test PlotData
r889
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.nCohInt = None
ReceiverData Operation, test PlotData
r889
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.blocksize = None
ReceiverData Operation, test PlotData
r889
José Chávez
formatting, template actualizado, decimation a 300
r1092 self.flagDecodeData = False # asumo q la data no esta decodificada
ReceiverData Operation, test PlotData
r889
José Chávez
formatting, template actualizado, decimation a 300
r1092 self.flagDeflipData = False # asumo q la data no esta sin flip
ReceiverData Operation, test PlotData
r889
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.flagShiftFFT = False
ReceiverData Operation, test PlotData
r889
José Chávez
formatting, template actualizado, decimation a 300
r1092 self.flagDataAsBlock = False # Asumo que la data es leida perfil a perfil
ReceiverData Operation, test PlotData
r889
Miguel Valdez
Affected:...
r534 self.profileIndex = 0
ReceiverData Operation, test PlotData
r889
José Chávez
formatting, template actualizado, decimation a 300
r1092 def getNoisebyHildebrand(self, channel=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 """
Determino el nivel de ruido usando el metodo Hildebrand-Sekhon
ReceiverData Operation, test PlotData
r889
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:
noiselevel
"""
Miguel Valdez
Merge with branch schain_julia_drifts from rev. 803 to 995....
r568 if channel != None:
data = self.data[channel]
nChannels = 1
else:
data = self.data
nChannels = self.nChannels
ReceiverData Operation, test PlotData
r889
Miguel Valdez
Merge with branch schain_julia_drifts from rev. 803 to 995....
r568 noise = numpy.zeros(nChannels)
power = data * numpy.conjugate(data)
ReceiverData Operation, test PlotData
r889
Miguel Valdez
Merge with branch schain_julia_drifts from rev. 803 to 995....
r568 for thisChannel in range(nChannels):
if nChannels == 1:
daux = power[:].real
else:
José Chávez
formatting, template actualizado, decimation a 300
r1092 daux = power[thisChannel, :].real
Miguel Valdez
Merge with branch schain_julia_drifts from rev. 803 to 995....
r568 noise[thisChannel] = hildebrand_sekhon(daux, self.nCohInt)
ReceiverData Operation, test PlotData
r889
Miguel Valdez
Merge with branch schain_julia_drifts from rev. 803 to 995....
r568 return noise
ReceiverData Operation, test PlotData
r889
José Chávez
formatting, template actualizado, decimation a 300
r1092 def getNoise(self, type=1, channel=None):
ReceiverData Operation, test PlotData
r889
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 type == 1:
Miguel Valdez
Merge with branch schain_julia_drifts from rev. 803 to 995....
r568 noise = self.getNoisebyHildebrand(channel)
ReceiverData Operation, test PlotData
r889
Miguel Valdez
Coherent Integration by Blocks: Bug fixed, nProfiles is divided by number of integrations
r720 return noise
ReceiverData Operation, test PlotData
r889
José Chávez
formatting, template actualizado, decimation a 300
r1092 def getPower(self, channel=None):
ReceiverData Operation, test PlotData
r889
Miguel Valdez
Merge with branch schain_julia_drifts from rev. 803 to 995....
r568 if channel != None:
data = self.data[channel]
else:
data = self.data
ReceiverData Operation, test PlotData
r889
Miguel Valdez
Merge with branch schain_julia_drifts from rev. 803 to 995....
r568 power = data * numpy.conjugate(data)
José Chávez
formatting, template actualizado, decimation a 300
r1092 powerdB = 10 * numpy.log10(power.real)
Julio Valdez
-Corrections to Vmax calculation...
r850 powerdB = numpy.squeeze(powerdB)
ReceiverData Operation, test PlotData
r889
Julio Valdez
-Corrections to Vmax calculation...
r850 return powerdB
ReceiverData Operation, test PlotData
r889
Miguel Valdez
JRODATA: timeInterval is a property now
r526 def getTimeInterval(self):
ReceiverData Operation, test PlotData
r889
Miguel Valdez
JRODATA: timeInterval is a property now
r526 timeInterval = self.ippSeconds * self.nCohInt
ReceiverData Operation, test PlotData
r889
Miguel Valdez
JRODATA: timeInterval is a property now
r526 return timeInterval
ReceiverData Operation, test PlotData
r889
Miguel Valdez
JRODATA: timeInterval is a property now
r526 noise = property(getNoise, "I'm the 'nHeights' property.")
timeInterval = property(getTimeInterval, "I'm the 'timeInterval' property")
ReceiverData Operation, test PlotData
r889
José Chávez
formatting, template actualizado, decimation a 300
r1092
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 Spectra(JROData):
ReceiverData Operation, test PlotData
r889
José Chávez
formatting, template actualizado, decimation a 300
r1092 # data spc es un numpy array de 2 dmensiones (canales, perfiles, alturas)
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_spc = None
ReceiverData Operation, test PlotData
r889
José Chávez
formatting, template actualizado, decimation a 300
r1092 # data cspc es un numpy array de 2 dmensiones (canales, pares, alturas)
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_cspc = None
ReceiverData Operation, test PlotData
r889
José Chávez
formatting, template actualizado, decimation a 300
r1092 # data dc es un numpy array de 2 dmensiones (canales, alturas)
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_dc = None
ReceiverData Operation, test PlotData
r889
José Chávez
formatting, template actualizado, decimation a 300
r1092 # data power
Julio Valdez
-Parameters Plot corrected...
r832 data_pwr = None
ReceiverData Operation, test PlotData
r889
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 nFFTPoints = None
ReceiverData Operation, test PlotData
r889
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 # nPairs = None
ReceiverData Operation, test PlotData
r889
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 pairsList = None
ReceiverData Operation, test PlotData
r889
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 nIncohInt = None
ReceiverData Operation, test PlotData
r889
José Chávez
formatting, template actualizado, decimation a 300
r1092 wavelength = None # Necesario para cacular el rango de velocidad desde la frecuencia
ReceiverData Operation, test PlotData
r889
José Chávez
formatting, template actualizado, decimation a 300
r1092 nCohInt = None # se requiere para determinar el valor de timeInterval
ReceiverData Operation, test PlotData
r889
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 ippFactor = None
ReceiverData Operation, test PlotData
r889
Miguel Valdez
Affected:...
r534 profileIndex = 0
ReceiverData Operation, test PlotData
r889
Miguel Valdez
jrodata.py: plotting attribute added to SpectraData
r773 plotting = "spectra"
ReceiverData Operation, test PlotData
r889
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 __init__(self):
'''
Constructor
'''
ReceiverData Operation, test PlotData
r889
Miguel Valdez
Bug plotting RTI fixed: timezone was removed from getLimit function
r566 self.useLocalTime = True
ReceiverData Operation, test PlotData
r889
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.radarControllerHeaderObj = RadarControllerHeader()
ReceiverData Operation, test PlotData
r889
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.systemHeaderObj = SystemHeader()
ReceiverData Operation, test PlotData
r889
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.type = "Spectra"
ReceiverData Operation, test PlotData
r889
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.data = None
ReceiverData Operation, test PlotData
r889
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.dtype = None
ReceiverData Operation, test PlotData
r889
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.nChannels = 0
ReceiverData Operation, test PlotData
r889
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.nHeights = 0
ReceiverData Operation, test PlotData
r889
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.nProfiles = None
ReceiverData Operation, test PlotData
r889
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.heightList = None
ReceiverData Operation, test PlotData
r889
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.channelList = None
ReceiverData Operation, test PlotData
r889
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.channelIndexList = None
self.pairsList = None
ReceiverData Operation, test PlotData
r889
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.flagNoData = True
ReceiverData Operation, test PlotData
r889
Miguel Valdez
Merge with branch schain_julia_drifts from rev. 803 to 995....
r568 self.flagDiscontinuousBlock = False
ReceiverData Operation, test PlotData
r889
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.utctime = None
ReceiverData Operation, test PlotData
r889
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.nCohInt = None
ReceiverData Operation, test PlotData
r889
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.nIncohInt = None
ReceiverData Operation, test PlotData
r889
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.blocksize = None
ReceiverData Operation, test PlotData
r889
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.nFFTPoints = None
ReceiverData Operation, test PlotData
r889
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.wavelength = None
ReceiverData Operation, test PlotData
r889
José Chávez
formatting, template actualizado, decimation a 300
r1092 self.flagDecodeData = False # asumo q la data no esta decodificada
ReceiverData Operation, test PlotData
r889
José Chávez
formatting, template actualizado, decimation a 300
r1092 self.flagDeflipData = False # asumo q la data no esta sin flip
ReceiverData Operation, test PlotData
r889
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.flagShiftFFT = False
ReceiverData Operation, test PlotData
r889
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.ippFactor = 1
ReceiverData Operation, test PlotData
r889
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.noise = None
ReceiverData Operation, test PlotData
r889
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.beacon_heiIndexList = []
ReceiverData Operation, test PlotData
r889
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.noise_estimation = None
ReceiverData Operation, test PlotData
r889
Miguel Valdez
Merge with branch schain_julia_drifts from rev. 803 to 995....
r568 def getNoisebyHildebrand(self, xmin_index=None, xmax_index=None, ymin_index=None, ymax_index=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 """
Determino el nivel de ruido usando el metodo Hildebrand-Sekhon
ReceiverData Operation, test PlotData
r889
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:
noiselevel
"""
ReceiverData Operation, test PlotData
r889
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 noise = numpy.zeros(self.nChannels)
ReceiverData Operation, test PlotData
r889
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 range(self.nChannels):
José Chávez
formatting, template actualizado, decimation a 300
r1092 daux = self.data_spc[channel,
xmin_index:xmax_index, ymin_index:ymax_index]
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 noise[channel] = hildebrand_sekhon(daux, self.nIncohInt)
ReceiverData Operation, test PlotData
r889
return noise
Miguel Valdez
Merge with branch schain_julia_drifts from rev. 803 to 995....
r568 def getNoise(self, xmin_index=None, xmax_index=None, ymin_index=None, ymax_index=None):
ReceiverData Operation, test PlotData
r889
Miguel Valdez
minor changes
r729 if self.noise_estimation is not None:
José Chávez
formatting, template actualizado, decimation a 300
r1092 # this was estimated by getNoise Operation defined in jroproc_spectra.py
return self.noise_estimation
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 else:
José Chávez
formatting, template actualizado, decimation a 300
r1092 noise = self.getNoisebyHildebrand(
xmin_index, xmax_index, ymin_index, ymax_index)
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 noise
ReceiverData Operation, test PlotData
r889
Miguel Valdez
Bug fixed: Fmax should not be divided by 2.
r765 def getFreqRangeTimeResponse(self, extrapoints=0):
ReceiverData Operation, test PlotData
r889
José Chávez
formatting, template actualizado, decimation a 300
r1092 deltafreq = self.getFmaxTimeResponse() / (self.nFFTPoints * self.ippFactor)
freqrange = deltafreq * \
(numpy.arange(self.nFFTPoints + extrapoints) -
self.nFFTPoints / 2.) - deltafreq / 2
ReceiverData Operation, test PlotData
r889
Miguel Valdez
jrodata: TimeRange added for ACF module
r771 return freqrange
ReceiverData Operation, test PlotData
r889
Miguel Valdez
jrodata: TimeRange added for ACF module
r771 def getAcfRange(self, extrapoints=0):
ReceiverData Operation, test PlotData
r889
José Chávez
formatting, template actualizado, decimation a 300
r1092 deltafreq = 10. / (self.getFmax() / (self.nFFTPoints * self.ippFactor))
freqrange = deltafreq * \
(numpy.arange(self.nFFTPoints + extrapoints) -
self.nFFTPoints / 2.) - deltafreq / 2
ReceiverData Operation, test PlotData
r889
Miguel Valdez
Bug fixed: Fmax should not be divided by 2.
r765 return freqrange
ReceiverData Operation, test PlotData
r889
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 getFreqRange(self, extrapoints=0):
ReceiverData Operation, test PlotData
r889
José Chávez
formatting, template actualizado, decimation a 300
r1092 deltafreq = self.getFmax() / (self.nFFTPoints * self.ippFactor)
freqrange = deltafreq * \
(numpy.arange(self.nFFTPoints + extrapoints) -
self.nFFTPoints / 2.) - deltafreq / 2
ReceiverData Operation, test PlotData
r889
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 freqrange
def getVelRange(self, extrapoints=0):
ReceiverData Operation, test PlotData
r889
José Chávez
formatting, template actualizado, decimation a 300
r1092 deltav = self.getVmax() / (self.nFFTPoints * self.ippFactor)
velrange = deltav * (numpy.arange(self.nFFTPoints +
extrapoints) - self.nFFTPoints / 2.) # - deltav/2
ReceiverData Operation, test PlotData
r889
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 velrange
ReceiverData Operation, test PlotData
r889
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 getNPairs(self):
ReceiverData Operation, test PlotData
r889
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 len(self.pairsList)
ReceiverData Operation, test PlotData
r889
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 getPairsIndexList(self):
ReceiverData Operation, test PlotData
r889
George Yong
Python 2to3, Spectra (all operations) working
r1167 return list(range(self.nPairs))
ReceiverData Operation, test PlotData
r889
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 getNormFactor(self):
ReceiverData Operation, test PlotData
r889
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 pwcode = 1
ReceiverData Operation, test PlotData
r889
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.flagDecodeData:
pwcode = numpy.sum(self.code[0]**2)
#normFactor = min(self.nFFTPoints,self.nProfiles)*self.nIncohInt*self.nCohInt*pwcode*self.windowOfFilter
José Chávez
formatting, template actualizado, decimation a 300
r1092 normFactor = self.nProfiles * self.nIncohInt * \
self.nCohInt * pwcode * self.windowOfFilter
ReceiverData Operation, test PlotData
r889
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 normFactor
ReceiverData Operation, test PlotData
r889
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 getFlagCspc(self):
ReceiverData Operation, test PlotData
r889
Miguel Valdez
Bug fixed: Padding decode data with zeros at the first heights was eliminated.
r611 if self.data_cspc 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 True
ReceiverData Operation, test PlotData
r889
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 False
ReceiverData Operation, test PlotData
r889
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 getFlagDc(self):
ReceiverData Operation, test PlotData
r889
Miguel Valdez
Bug fixed: Padding decode data with zeros at the first heights was eliminated.
r611 if self.data_dc 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 True
ReceiverData Operation, test PlotData
r889
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 False
ReceiverData Operation, test PlotData
r889
Miguel Valdez
JRODATA: timeInterval is a property now
r526 def getTimeInterval(self):
ReceiverData Operation, test PlotData
r889
Juan C. Espinoza
Include ippFactor in getTimeInterval (Spectra)
r1160 timeInterval = self.ippSeconds * self.nCohInt * self.nIncohInt * self.nProfiles * self.ippFactor
ReceiverData Operation, test PlotData
r889
Miguel Valdez
JRODATA: timeInterval is a property now
r526 return timeInterval
ReceiverData Operation, test PlotData
r889
Julio Valdez
-Parameters Plot corrected...
r832 def getPower(self):
ReceiverData Operation, test PlotData
r889
Julio Valdez
-Parameters Plot corrected...
r832 factor = self.normFactor
José Chávez
formatting, template actualizado, decimation a 300
r1092 z = self.data_spc / factor
ReceiverData Operation, test PlotData
r889 z = numpy.where(numpy.isfinite(z), z, numpy.NAN)
Julio Valdez
-Parameters Plot corrected...
r832 avg = numpy.average(z, axis=1)
ReceiverData Operation, test PlotData
r889
José Chávez
formatting, template actualizado, decimation a 300
r1092 return 10 * numpy.log10(avg)
ReceiverData Operation, test PlotData
r889
def getCoherence(self, pairsList=None, phase=False):
z = []
if pairsList is None:
pairsIndexList = self.pairsIndexList
else:
pairsIndexList = []
for pair in pairsList:
if pair not in self.pairsList:
George Yong
Python 2to3, Spectra (all operations) working
r1167 raise ValueError("Pair %s is not in dataOut.pairsList" % (
pair))
José Chávez
formatting, template actualizado, decimation a 300
r1092 pairsIndexList.append(self.pairsList.index(pair))
ReceiverData Operation, test PlotData
r889 for i in range(len(pairsIndexList)):
pair = self.pairsList[pairsIndexList[i]]
José Chávez
formatting, template actualizado, decimation a 300
r1092 ccf = numpy.average(
self.data_cspc[pairsIndexList[i], :, :], axis=0)
ReceiverData Operation, test PlotData
r889 powa = numpy.average(self.data_spc[pair[0], :, :], axis=0)
powb = numpy.average(self.data_spc[pair[1], :, :], axis=0)
José Chávez
formatting, template actualizado, decimation a 300
r1092 avgcoherenceComplex = ccf / numpy.sqrt(powa * powb)
ReceiverData Operation, test PlotData
r889 if phase:
data = numpy.arctan2(avgcoherenceComplex.imag,
José Chávez
formatting, template actualizado, decimation a 300
r1092 avgcoherenceComplex.real) * 180 / numpy.pi
ReceiverData Operation, test PlotData
r889 else:
data = numpy.abs(avgcoherenceComplex)
z.append(data)
return numpy.array(z)
Miguel Valdez
Bug fixed:...
r624 def setValue(self, value):
ReceiverData Operation, test PlotData
r889
George Yong
Python 2to3, Spectra (all operations) working
r1167 print("This property should not be initialized")
ReceiverData Operation, test PlotData
r889
Miguel Valdez
Bug fixed:...
r624 return
ReceiverData Operation, test PlotData
r889
Miguel Valdez
Bug fixed:...
r624 nPairs = property(getNPairs, setValue, "I'm the 'nPairs' property.")
José Chávez
formatting, template actualizado, decimation a 300
r1092 pairsIndexList = property(
getPairsIndexList, setValue, "I'm the 'pairsIndexList' property.")
normFactor = property(getNormFactor, setValue,
"I'm the 'getNormFactor' property.")
Miguel Valdez
Bug fixed:...
r624 flag_cspc = property(getFlagCspc, setValue)
flag_dc = property(getFlagDc, setValue)
noise = property(getNoise, setValue, "I'm the 'nHeights' property.")
José Chávez
formatting, template actualizado, decimation a 300
r1092 timeInterval = property(getTimeInterval, setValue,
"I'm the 'timeInterval' property")
ReceiverData Operation, test PlotData
r889
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 SpectraHeis(Spectra):
ReceiverData Operation, test PlotData
r889
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_spc = None
ReceiverData Operation, test PlotData
r889
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_cspc = None
ReceiverData Operation, test PlotData
r889
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_dc = None
ReceiverData Operation, test PlotData
r889
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 nFFTPoints = None
ReceiverData Operation, test PlotData
r889
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 # nPairs = None
ReceiverData Operation, test PlotData
r889
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 pairsList = None
ReceiverData Operation, test PlotData
r889
Miguel Valdez
Signal Chain GUI updated:...
r587 nCohInt = None
ReceiverData Operation, test PlotData
r889
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 nIncohInt = None
ReceiverData Operation, test PlotData
r889
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 __init__(self):
ReceiverData Operation, test PlotData
r889
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.radarControllerHeaderObj = RadarControllerHeader()
ReceiverData Operation, test PlotData
r889
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.systemHeaderObj = SystemHeader()
ReceiverData Operation, test PlotData
r889
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.type = "SpectraHeis"
ReceiverData Operation, test PlotData
r889
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.dtype = None
ReceiverData Operation, test PlotData
r889
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.nChannels = 0
ReceiverData Operation, test PlotData
r889
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.nHeights = 0
ReceiverData Operation, test PlotData
r889
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.nProfiles = None
ReceiverData Operation, test PlotData
r889
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.heightList = None
ReceiverData Operation, test PlotData
r889
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.channelList = None
ReceiverData Operation, test PlotData
r889
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.channelIndexList = None
ReceiverData Operation, test PlotData
r889
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.flagNoData = True
ReceiverData Operation, test PlotData
r889
Miguel Valdez
Merge with branch schain_julia_drifts from rev. 803 to 995....
r568 self.flagDiscontinuousBlock = False
ReceiverData Operation, test PlotData
r889
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.nPairs = 0
ReceiverData Operation, test PlotData
r889
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.utctime = None
ReceiverData Operation, test PlotData
r889
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.blocksize = None
ReceiverData Operation, test PlotData
r889
Miguel Valdez
Affected:...
r534 self.profileIndex = 0
ReceiverData Operation, test PlotData
r889
Miguel Valdez
Signal Chain GUI updated:...
r587 self.nCohInt = 1
ReceiverData Operation, test PlotData
r889
Miguel Valdez
Signal Chain GUI updated:...
r587 self.nIncohInt = 1
ReceiverData Operation, test PlotData
r889
Daniel Valdez
The Spectra-1d Plot shows the normalized power.
r496 def getNormFactor(self):
pwcode = 1
if self.flagDecodeData:
pwcode = numpy.sum(self.code[0]**2)
ReceiverData Operation, test PlotData
r889
José Chávez
formatting, template actualizado, decimation a 300
r1092 normFactor = self.nIncohInt * self.nCohInt * pwcode
ReceiverData Operation, test PlotData
r889
Daniel Valdez
The Spectra-1d Plot shows the normalized power.
r496 return normFactor
ReceiverData Operation, test PlotData
r889
Miguel Valdez
JRODATA: timeInterval is a property now
r526 def getTimeInterval(self):
ReceiverData Operation, test PlotData
r889
Miguel Valdez
JRODATA: timeInterval is a property now
r526 timeInterval = self.ippSeconds * self.nCohInt * self.nIncohInt
ReceiverData Operation, test PlotData
r889
Miguel Valdez
JRODATA: timeInterval is a property now
r526 return timeInterval
ReceiverData Operation, test PlotData
r889
Daniel Valdez
The Spectra-1d Plot shows the normalized power.
r496 normFactor = property(getNormFactor, "I'm the 'getNormFactor' property.")
Miguel Valdez
JRODATA: timeInterval is a property now
r526 timeInterval = property(getTimeInterval, "I'm the 'timeInterval' property")
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
formatting, template actualizado, decimation a 300
r1092
Miguel Valdez
Signal Chain GUI updated:...
r587 class Fits(JROData):
ReceiverData Operation, test PlotData
r889
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 heightList = None
ReceiverData Operation, test PlotData
r889
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 channelList = None
ReceiverData Operation, test PlotData
r889
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 flagNoData = True
ReceiverData Operation, test PlotData
r889
Miguel Valdez
Merge with branch schain_julia_drifts from rev. 803 to 995....
r568 flagDiscontinuousBlock = False
ReceiverData Operation, test PlotData
r889
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 useLocalTime = False
ReceiverData Operation, test PlotData
r889
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 utctime = None
ReceiverData Operation, test PlotData
r889
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 timeZone = None
ReceiverData Operation, test PlotData
r889
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 # ippSeconds = None
ReceiverData Operation, test PlotData
r889
Miguel Valdez
JRODATA: timeInterval is a property now
r526 # timeInterval = None
ReceiverData Operation, test PlotData
r889
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 nCohInt = None
ReceiverData Operation, test PlotData
r889
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 nIncohInt = None
ReceiverData Operation, test PlotData
r889
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 noise = None
ReceiverData Operation, test PlotData
r889
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 windowOfFilter = 1
ReceiverData Operation, test PlotData
r889
José Chávez
formatting, template actualizado, decimation a 300
r1092 # Speed of ligth
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 C = 3e8
ReceiverData Operation, test PlotData
r889
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 frequency = 49.92e6
ReceiverData Operation, test PlotData
r889
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 realtime = False
def __init__(self):
ReceiverData Operation, test PlotData
r889
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.type = "Fits"
ReceiverData Operation, test PlotData
r889
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.nProfiles = None
ReceiverData Operation, test PlotData
r889
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.heightList = None
ReceiverData Operation, test PlotData
r889
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.channelList = None
ReceiverData Operation, test PlotData
r889
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.channelIndexList = None
ReceiverData Operation, test PlotData
r889
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.flagNoData = True
ReceiverData Operation, test PlotData
r889
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.utctime = None
ReceiverData Operation, test PlotData
r889
Miguel Valdez
Signal Chain GUI updated:...
r587 self.nCohInt = 1
ReceiverData Operation, test PlotData
r889
Miguel Valdez
Signal Chain GUI updated:...
r587 self.nIncohInt = 1
ReceiverData Operation, test PlotData
r889
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.useLocalTime = True
ReceiverData Operation, test PlotData
r889
Miguel Valdez
Affected:...
r534 self.profileIndex = 0
ReceiverData Operation, test PlotData
r889
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.utctime = None
# self.timeZone = None
# self.ltctime = None
# self.timeInterval = None
# self.header = None
# self.data_header = None
# self.data = None
# self.datatime = None
# self.flagNoData = False
# self.expName = ''
# self.nChannels = None
# self.nSamples = None
# self.dataBlocksPerFile = None
# self.comments = ''
ReceiverData Operation, test PlotData
r889 #
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 getltctime(self):
ReceiverData Operation, test PlotData
r889
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.useLocalTime:
José Chávez
formatting, template actualizado, decimation a 300
r1092 return self.utctime - self.timeZone * 60
ReceiverData Operation, test PlotData
r889
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.utctime
ReceiverData Operation, test PlotData
r889
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 getDatatime(self):
ReceiverData Operation, test PlotData
r889
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 datatime = datetime.datetime.utcfromtimestamp(self.ltctime)
return datatime
ReceiverData Operation, test PlotData
r889
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 getTimeRange(self):
ReceiverData Operation, test PlotData
r889
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 datatime = []
ReceiverData Operation, test PlotData
r889
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 datatime.append(self.ltctime)
datatime.append(self.ltctime + self.timeInterval)
ReceiverData Operation, test PlotData
r889
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 datatime = numpy.array(datatime)
ReceiverData Operation, test PlotData
r889
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 datatime
ReceiverData Operation, test PlotData
r889
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 getHeiRange(self):
ReceiverData Operation, test PlotData
r889
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 heis = self.heightList
ReceiverData Operation, test PlotData
r889
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 heis
ReceiverData Operation, test PlotData
r889
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 getNHeights(self):
ReceiverData Operation, test PlotData
r889
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 len(self.heightList)
ReceiverData Operation, test PlotData
r889
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 getNChannels(self):
ReceiverData Operation, test PlotData
r889
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 len(self.channelList)
ReceiverData Operation, test PlotData
r889
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 getChannelIndexList(self):
ReceiverData Operation, test PlotData
r889
George Yong
Python 2to3, Spectra (all operations) working
r1167 return list(range(self.nChannels))
ReceiverData Operation, test PlotData
r889
José Chávez
formatting, template actualizado, decimation a 300
r1092 def getNoise(self, type=1):
ReceiverData Operation, test PlotData
r889
Miguel Valdez
Merge with branch schain_julia_drifts from rev. 803 to 995....
r568 #noise = numpy.zeros(self.nChannels)
ReceiverData Operation, test PlotData
r889
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 type == 1:
noise = self.getNoisebyHildebrand()
ReceiverData Operation, test PlotData
r889
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 type == 2:
noise = self.getNoisebySort()
ReceiverData Operation, test PlotData
r889
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 type == 3:
noise = self.getNoisebyWindow()
ReceiverData Operation, test PlotData
r889
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 noise
ReceiverData Operation, test PlotData
r889
Miguel Valdez
JRODATA: timeInterval is a property now
r526 def getTimeInterval(self):
ReceiverData Operation, test PlotData
r889
Miguel Valdez
Signal Chain GUI updated:...
r587 timeInterval = self.ippSeconds * self.nCohInt * self.nIncohInt
ReceiverData Operation, test PlotData
r889
Miguel Valdez
Signal Chain GUI updated:...
r587 return timeInterval
ReceiverData Operation, test PlotData
r889
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 datatime = property(getDatatime, "I'm the 'datatime' property")
nHeights = property(getNHeights, "I'm the 'nHeights' property.")
nChannels = property(getNChannels, "I'm the 'nChannel' property.")
José Chávez
formatting, template actualizado, decimation a 300
r1092 channelIndexList = property(
getChannelIndexList, "I'm the 'channelIndexList' property.")
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 noise = property(getNoise, "I'm the 'nHeights' property.")
ReceiverData Operation, test PlotData
r889
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 ltctime = property(getltctime, "I'm the 'ltctime' property")
Miguel Valdez
JRODATA: timeInterval is a property now
r526 timeInterval = property(getTimeInterval, "I'm the 'timeInterval' property")
ReceiverData Operation, test PlotData
r889
Julio Valdez
Processing Modules added:...
r502 class Correlation(JROData):
ReceiverData Operation, test PlotData
r889
Julio Valdez
Processing Modules added:...
r502 noise = None
ReceiverData Operation, test PlotData
r889
Julio Valdez
Processing Modules added:...
r502 SNR = None
ReceiverData Operation, test PlotData
r889
Julio Valdez
Processing Modules added:...
r502 #--------------------------------------------------
ReceiverData Operation, test PlotData
r889
Julio Valdez
-Corrections to Vmax calculation...
r850 mode = None
ReceiverData Operation, test PlotData
r889
Julio Valdez
-Corrections to Vmax calculation...
r850 split = False
data_cf = None
ReceiverData Operation, test PlotData
r889
Julio Valdez
-Corrections to Vmax calculation...
r850 lags = None
ReceiverData Operation, test PlotData
r889
Julio Valdez
-Corrections to Vmax calculation...
r850 lagRange = None
ReceiverData Operation, test PlotData
r889
Julio Valdez
Processing Modules added:...
r502 pairsList = None
ReceiverData Operation, test PlotData
r889
Julio Valdez
-Corrections to Vmax calculation...
r850 normFactor = None
ReceiverData Operation, test PlotData
r889
Julio Valdez
-Corrections to Vmax calculation...
r850 #--------------------------------------------------
ReceiverData Operation, test PlotData
r889
Julio Valdez
-Corrections to Vmax calculation...
r850 # calculateVelocity = None
ReceiverData Operation, test PlotData
r889
Julio Valdez
-Corrections to Vmax calculation...
r850 nLags = None
ReceiverData Operation, test PlotData
r889
Julio Valdez
-Corrections to Vmax calculation...
r850 nPairs = None
ReceiverData Operation, test PlotData
r889
Julio Valdez
-Corrections to Vmax calculation...
r850 nAvg = None
Julio Valdez
Processing Modules added:...
r502 def __init__(self):
'''
Constructor
'''
self.radarControllerHeaderObj = RadarControllerHeader()
ReceiverData Operation, test PlotData
r889
Julio Valdez
Processing Modules added:...
r502 self.systemHeaderObj = SystemHeader()
ReceiverData Operation, test PlotData
r889
Julio Valdez
Processing Modules added:...
r502 self.type = "Correlation"
ReceiverData Operation, test PlotData
r889
Julio Valdez
Processing Modules added:...
r502 self.data = None
ReceiverData Operation, test PlotData
r889
Julio Valdez
Processing Modules added:...
r502 self.dtype = None
ReceiverData Operation, test PlotData
r889
Julio Valdez
Processing Modules added:...
r502 self.nProfiles = None
ReceiverData Operation, test PlotData
r889
Julio Valdez
Processing Modules added:...
r502 self.heightList = None
ReceiverData Operation, test PlotData
r889
Julio Valdez
Processing Modules added:...
r502 self.channelList = None
ReceiverData Operation, test PlotData
r889
Julio Valdez
Processing Modules added:...
r502 self.flagNoData = True
ReceiverData Operation, test PlotData
r889
Miguel Valdez
Merge with branch schain_julia_drifts from rev. 803 to 995....
r568 self.flagDiscontinuousBlock = False
ReceiverData Operation, test PlotData
r889
Julio Valdez
Processing Modules added:...
r502 self.utctime = None
ReceiverData Operation, test PlotData
r889
Julio Valdez
Processing Modules added:...
r502 self.timeZone = None
ReceiverData Operation, test PlotData
r889
Julio Valdez
Processing Modules added:...
r502 self.dstFlag = None
ReceiverData Operation, test PlotData
r889
Julio Valdez
Processing Modules added:...
r502 self.errorCount = None
ReceiverData Operation, test PlotData
r889
Julio Valdez
Processing Modules added:...
r502 self.blocksize = None
ReceiverData Operation, test PlotData
r889
José Chávez
formatting, template actualizado, decimation a 300
r1092 self.flagDecodeData = False # asumo q la data no esta decodificada
ReceiverData Operation, test PlotData
r889
José Chávez
formatting, template actualizado, decimation a 300
r1092 self.flagDeflipData = False # asumo q la data no esta sin flip
ReceiverData Operation, test PlotData
r889
Julio Valdez
Processing Modules added:...
r502 self.pairsList = None
ReceiverData Operation, test PlotData
r889
Julio Valdez
Processing Modules added:...
r502 self.nPoints = None
Julio Valdez
-Corrections to Vmax calculation...
r850
Julio Valdez
Processing Modules added:...
r502 def getPairsList(self):
ReceiverData Operation, test PlotData
r889
Julio Valdez
Processing Modules added:...
r502 return self.pairsList
ReceiverData Operation, test PlotData
r889
José Chávez
formatting, template actualizado, decimation a 300
r1092 def getNoise(self, mode=2):
ReceiverData Operation, test PlotData
r889
Julio Valdez
Processing Modules added:...
r502 indR = numpy.where(self.lagR == 0)[0][0]
indT = numpy.where(self.lagT == 0)[0][0]
ReceiverData Operation, test PlotData
r889
José Chávez
formatting, template actualizado, decimation a 300
r1092 jspectra0 = self.data_corr[:, :, indR, :]
Julio Valdez
Processing Modules added:...
r502 jspectra = copy.copy(jspectra0)
ReceiverData Operation, test PlotData
r889
Julio Valdez
Processing Modules added:...
r502 num_chan = jspectra.shape[0]
num_hei = jspectra.shape[2]
ReceiverData Operation, test PlotData
r889
José Chávez
formatting, template actualizado, decimation a 300
r1092 freq_dc = jspectra.shape[1] / 2
ind_vel = numpy.array([-2, -1, 1, 2]) + freq_dc
ReceiverData Operation, test PlotData
r889
José Chávez
formatting, template actualizado, decimation a 300
r1092 if ind_vel[0] < 0:
George Yong
Python 2to3, Spectra (all operations) working
r1167 ind_vel[list(range(0, 1))] = ind_vel[list(range(0, 1))] + self.num_prof
ReceiverData Operation, test PlotData
r889
if mode == 1:
José Chávez
formatting, template actualizado, decimation a 300
r1092 jspectra[:, freq_dc, :] = (
jspectra[:, ind_vel[1], :] + jspectra[:, ind_vel[2], :]) / 2 # CORRECCION
ReceiverData Operation, test PlotData
r889
Julio Valdez
Processing Modules added:...
r502 if mode == 2:
ReceiverData Operation, test PlotData
r889
José Chávez
formatting, template actualizado, decimation a 300
r1092 vel = numpy.array([-2, -1, 1, 2])
xx = numpy.zeros([4, 4])
ReceiverData Operation, test PlotData
r889
Julio Valdez
Processing Modules added:...
r502 for fil in range(4):
George Yong
Python 2to3, Spectra (all operations) working
r1167 xx[fil, :] = vel[fil]**numpy.asarray(list(range(4)))
ReceiverData Operation, test PlotData
r889
Julio Valdez
Processing Modules added:...
r502 xx_inv = numpy.linalg.inv(xx)
José Chávez
formatting, template actualizado, decimation a 300
r1092 xx_aux = xx_inv[0, :]
ReceiverData Operation, test PlotData
r889
Julio Valdez
Processing Modules added:...
r502 for ich in range(num_chan):
José Chávez
formatting, template actualizado, decimation a 300
r1092 yy = jspectra[ich, ind_vel, :]
jspectra[ich, freq_dc, :] = numpy.dot(xx_aux, yy)
Julio Valdez
Processing Modules added:...
r502
José Chávez
formatting, template actualizado, decimation a 300
r1092 junkid = jspectra[ich, freq_dc, :] <= 0
Julio Valdez
Processing Modules added:...
r502 cjunkid = sum(junkid)
ReceiverData Operation, test PlotData
r889
Julio Valdez
Processing Modules added:...
r502 if cjunkid.any():
José Chávez
formatting, template actualizado, decimation a 300
r1092 jspectra[ich, freq_dc, junkid.nonzero()] = (
jspectra[ich, ind_vel[1], junkid] + jspectra[ich, ind_vel[2], junkid]) / 2
ReceiverData Operation, test PlotData
r889
José Chávez
formatting, template actualizado, decimation a 300
r1092 noise = jspectra0[:, freq_dc, :] - jspectra[:, freq_dc, :]
ReceiverData Operation, test PlotData
r889
Julio Valdez
Processing Modules added:...
r502 return noise
Miguel Valdez
Signal Chain GUI updated:...
r587
def getTimeInterval(self):
ReceiverData Operation, test PlotData
r889
Julio Valdez
-Corrections to Vmax calculation...
r850 timeInterval = self.ippSeconds * self.nCohInt * self.nProfiles
ReceiverData Operation, test PlotData
r889
Miguel Valdez
Signal Chain GUI updated:...
r587 return timeInterval
ReceiverData Operation, test PlotData
r889
Julio Valdez
-Corrections to Vmax calculation...
r850 def splitFunctions(self):
ReceiverData Operation, test PlotData
r889
Julio Valdez
-Corrections to Vmax calculation...
r850 pairsList = self.pairsList
ccf_pairs = []
acf_pairs = []
ccf_ind = []
acf_ind = []
ReceiverData Operation, test PlotData
r889 for l in range(len(pairsList)):
Julio Valdez
-Corrections to Vmax calculation...
r850 chan0 = pairsList[l][0]
chan1 = pairsList[l][1]
ReceiverData Operation, test PlotData
r889
José Chávez
formatting, template actualizado, decimation a 300
r1092 # Obteniendo pares de Autocorrelacion
Julio Valdez
-Corrections to Vmax calculation...
r850 if chan0 == chan1:
acf_pairs.append(chan0)
acf_ind.append(l)
else:
ccf_pairs.append(pairsList[l])
ccf_ind.append(l)
ReceiverData Operation, test PlotData
r889
Julio Valdez
-Corrections to Vmax calculation...
r850 data_acf = self.data_cf[acf_ind]
data_ccf = self.data_cf[ccf_ind]
return acf_ind, ccf_ind, acf_pairs, ccf_pairs, data_acf, data_ccf
def getNormFactor(self):
acf_ind, ccf_ind, acf_pairs, ccf_pairs, data_acf, data_ccf = self.splitFunctions()
acf_pairs = numpy.array(acf_pairs)
José Chávez
formatting, template actualizado, decimation a 300
r1092 normFactor = numpy.zeros((self.nPairs, self.nHeights))
ReceiverData Operation, test PlotData
r889
Julio Valdez
-Corrections to Vmax calculation...
r850 for p in range(self.nPairs):
pair = self.pairsList[p]
ReceiverData Operation, test PlotData
r889
Julio Valdez
-Corrections to Vmax calculation...
r850 ch0 = pair[0]
ch1 = pair[1]
ReceiverData Operation, test PlotData
r889
José Chávez
formatting, template actualizado, decimation a 300
r1092 ch0_max = numpy.max(data_acf[acf_pairs == ch0, :, :], axis=1)
ch1_max = numpy.max(data_acf[acf_pairs == ch1, :, :], axis=1)
normFactor[p, :] = numpy.sqrt(ch0_max * ch1_max)
ReceiverData Operation, test PlotData
r889
Julio Valdez
-Corrections to Vmax calculation...
r850 return normFactor
ReceiverData Operation, test PlotData
r889
Miguel Valdez
Signal Chain GUI updated:...
r587 timeInterval = property(getTimeInterval, "I'm the 'timeInterval' property")
Julio Valdez
-Corrections to Vmax calculation...
r850 normFactor = property(getNormFactor, "I'm the 'normFactor property'")
ReceiverData Operation, test PlotData
r889
José Chávez
formatting, template actualizado, decimation a 300
r1092
Fix all PlotData, add SpectraMean, CrossSpectra plots, now Parameters extends Spectra fix bugs in ParametersProc
r922 class Parameters(Spectra):
Julio Valdez
Processing Modules added:...
r502
José Chávez
formatting, template actualizado, decimation a 300
r1092 experimentInfo = None # Information about the experiment
ReceiverData Operation, test PlotData
r889
José Chávez
formatting, template actualizado, decimation a 300
r1092 # Information from previous data
ReceiverData Operation, test PlotData
r889
José Chávez
formatting, template actualizado, decimation a 300
r1092 inputUnit = None # Type of data to be processed
ReceiverData Operation, test PlotData
r889
José Chávez
formatting, template actualizado, decimation a 300
r1092 operation = None # Type of operation to parametrize
ReceiverData Operation, test PlotData
r889
José Chávez
formatting, template actualizado, decimation a 300
r1092 # normFactor = None #Normalization Factor
ReceiverData Operation, test PlotData
r889
José Chávez
formatting, template actualizado, decimation a 300
r1092 groupList = None # List of Pairs, Groups, etc
ReceiverData Operation, test PlotData
r889
José Chávez
formatting, template actualizado, decimation a 300
r1092 # Parameters
ReceiverData Operation, test PlotData
r889
José Chávez
formatting, template actualizado, decimation a 300
r1092 data_param = None # Parameters obtained
ReceiverData Operation, test PlotData
r889
José Chávez
formatting, template actualizado, decimation a 300
r1092 data_pre = None # Data Pre Parametrization
ReceiverData Operation, test PlotData
r889
José Chávez
formatting, template actualizado, decimation a 300
r1092 data_SNR = None # Signal to Noise Ratio
ReceiverData Operation, test PlotData
r889
Julio Valdez
data...
r608 # heightRange = None #Heights
ReceiverData Operation, test PlotData
r889
José Chávez
formatting, template actualizado, decimation a 300
r1092 abscissaList = None # Abscissa, can be velocities, lags or time
ReceiverData Operation, test PlotData
r889
Add WindProfiler support, multiSchain by_day
r923 # noise = None #Noise Potency
ReceiverData Operation, test PlotData
r889
José Chávez
formatting, template actualizado, decimation a 300
r1092 utctimeInit = None # Initial UTC time
ReceiverData Operation, test PlotData
r889
José Chávez
formatting, template actualizado, decimation a 300
r1092 paramInterval = None # Time interval to calculate Parameters in seconds
ReceiverData Operation, test PlotData
r889
Julio Valdez
Changes in data Parameters
r802 useLocalTime = True
ReceiverData Operation, test PlotData
r889
José Chávez
formatting, template actualizado, decimation a 300
r1092 # Fitting
ReceiverData Operation, test PlotData
r889
José Chávez
formatting, template actualizado, decimation a 300
r1092 data_error = None # Error of the estimation
ReceiverData Operation, test PlotData
r889
constants = None
Julio Valdez
First Spectral Fitting and EW Drifts operative module inside Signal Chain TRUNK
r513 library = None
ReceiverData Operation, test PlotData
r889
José Chávez
formatting, template actualizado, decimation a 300
r1092 # Output signal
ReceiverData Operation, test PlotData
r889
José Chávez
formatting, template actualizado, decimation a 300
r1092 outputInterval = None # Time interval to calculate output signal in seconds
ReceiverData Operation, test PlotData
r889
José Chávez
formatting, template actualizado, decimation a 300
r1092 data_output = None # Out signal
ReceiverData Operation, test PlotData
r889
Julio Valdez
-Corrections to Vmax calculation...
r850 nAvg = None
ReceiverData Operation, test PlotData
r889
Fix all PlotData, add SpectraMean, CrossSpectra plots, now Parameters extends Spectra fix bugs in ParametersProc
r922 noise_estimation = None
José Chávez
formatting, template actualizado, decimation a 300
r1092 GauSPC = None # Fit gaussian SPC
ReceiverData Operation, test PlotData
r889
Julio Valdez
Processing Modules added:...
r502 def __init__(self):
'''
Constructor
'''
self.radarControllerHeaderObj = RadarControllerHeader()
ReceiverData Operation, test PlotData
r889
Julio Valdez
Processing Modules added:...
r502 self.systemHeaderObj = SystemHeader()
ReceiverData Operation, test PlotData
r889
Julio Valdez
Processing Modules added:...
r502 self.type = "Parameters"
ReceiverData Operation, test PlotData
r889
Julio Valdez
-Functional HDF5 Format Writing and Reading Unit...
r804 def getTimeRange1(self, interval):
ReceiverData Operation, test PlotData
r889
Julio Valdez
Processing Modules added:...
r502 datatime = []
ReceiverData Operation, test PlotData
r889
Julio Valdez
data...
r608 if self.useLocalTime:
José Chávez
formatting, template actualizado, decimation a 300
r1092 time1 = self.utctimeInit - self.timeZone * 60
Julio Valdez
data...
r608 else:
Julio Valdez
Changes in data Parameters
r802 time1 = self.utctimeInit
ReceiverData Operation, test PlotData
r889
Julio Valdez
data...
r608 datatime.append(time1)
Julio Valdez
-Functional HDF5 Format Writing and Reading Unit...
r804 datatime.append(time1 + interval)
Julio Valdez
Processing Modules added:...
r502 datatime = numpy.array(datatime)
ReceiverData Operation, test PlotData
r889
Fix all PlotData, add SpectraMean, CrossSpectra plots, now Parameters extends Spectra fix bugs in ParametersProc
r922 return datatime
Add WindProfiler support, multiSchain by_day
r923
def getTimeInterval(self):
Juan C. Espinoza
Add SkyMapPlotData, operation can access parent kwargs, fix server plot for multiple ReceiverData
r937 if hasattr(self, 'timeInterval1'):
return self.timeInterval1
else:
return self.paramInterval
Juan C. Espinoza
Fix timeInterval for Parameters
r928
ebocanegra
15/08/2017
r1001 def setValue(self, value):
George Yong
Python 2to3, Spectra (all operations) working
r1167 print("This property should not be initialized")
ebocanegra
15/08/2017
r1001
return
Juan C. Espinoza
Fix timeInterval for Parameters
r928 def getNoise(self):
return self.spc_noise
timeInterval = property(getTimeInterval)
George Yong
Python 2to3, Spectra (all operations) working
r1167 noise = property(getNoise, setValue, "I'm the 'Noise' property.")