@@ -1419,8 +1419,8 class SpectralMoments(Operation): | |||
|
1419 | 1419 | |
|
1420 | 1420 | absc = dataOut.abscissaList[:-1] |
|
1421 | 1421 | noise = dataOut.noise |
|
1422 | nChannel = data.shape[0] | |
|
1423 |
data_param = numpy.zeros((nChannel, |
|
|
1422 | nChannel = dataOut.data_pre[0].shape[0] | |
|
1423 | data_param = numpy.zeros((nChannel, 4 + proc_type*3, dataOut.data_pre[0].shape[2])) | |
|
1424 | 1424 | |
|
1425 | 1425 | if proc_type == 1: |
|
1426 | 1426 | fwindow = numpy.zeros(absc.size) + 1 |
@@ -1449,7 +1449,7 class SpectralMoments(Operation): | |||
|
1449 | 1449 | smooth=None |
|
1450 | 1450 | |
|
1451 | 1451 | for ind in range(nChannel): |
|
1452 |
data_param[ind,:,:] = self.__calculateMoments( data[ind,:,:] , absc , noise[ind], nicoh=nIncohInt, smooth=smooth, type1=type1, fwindow=fwindow |
|
|
1452 | data_param[ind,:,:] = self.__calculateMoments( data[ind,:,:] , absc , noise[ind], nicoh=nIncohInt, smooth=smooth, type1=type1, fwindow=fwindow) | |
|
1453 | 1453 | |
|
1454 | 1454 | if proc_type == 1: |
|
1455 | 1455 | dataOut.moments = data_param[:,1:,:] |
@@ -666,7 +666,7 class removeInterference(Operation): | |||
|
666 | 666 | median_imag = int(numpy.median(numpy.imag( |
|
667 | 667 | junkcspc_interf[mask_prof[ind[list(range(3 * num_prof // 4))]], :]))) |
|
668 | 668 | comp_mask_prof = [int(e) for e in comp_mask_prof] |
|
669 |
junkcspc_interf[comp_mask_prof, :] = |
|
|
669 | junkcspc_interf[comp_mask_prof, :] = complex( | |
|
670 | 670 | median_real, median_imag) |
|
671 | 671 | |
|
672 | 672 | for iprof in range(num_prof): |
@@ -610,7 +610,7 class SpectraAFCProc(ProcessingUnit): | |||
|
610 | 610 | |
|
611 | 611 | median_real = numpy.median(numpy.real(junkcspc_interf[mask_prof[ind[list(range(3 * num_prof / 4))]], :])) |
|
612 | 612 | median_imag = numpy.median(numpy.imag(junkcspc_interf[mask_prof[ind[list(range(3 * num_prof / 4))]], :])) |
|
613 |
junkcspc_interf[comp_mask_prof, :] = |
|
|
613 | junkcspc_interf[comp_mask_prof, :] = complex(median_real, median_imag) | |
|
614 | 614 | |
|
615 | 615 | for iprof in range(num_prof): |
|
616 | 616 | ind = numpy.abs(junkcspc_interf[iprof, :]).ravel().argsort() |
@@ -613,7 +613,7 class SpectraLagsProc(ProcessingUnit): | |||
|
613 | 613 | |
|
614 | 614 | median_real = numpy.median(numpy.real(junkcspc_interf[mask_prof[ind[list(range(3 * num_prof / 4))]], :])) |
|
615 | 615 | median_imag = numpy.median(numpy.imag(junkcspc_interf[mask_prof[ind[list(range(3 * num_prof / 4))]], :])) |
|
616 |
junkcspc_interf[comp_mask_prof, :] = |
|
|
616 | junkcspc_interf[comp_mask_prof, :] = complex(median_real, median_imag) | |
|
617 | 617 | |
|
618 | 618 | for iprof in range(num_prof): |
|
619 | 619 | ind = numpy.abs(junkcspc_interf[iprof, :]).ravel().argsort() |
@@ -2996,7 +2996,7 class CohInt(Operation): | |||
|
2996 | 2996 | def integrateByBlock(self, dataOut): |
|
2997 | 2997 | |
|
2998 | 2998 | times = int(dataOut.data.shape[1]/self.n) |
|
2999 |
avgdata = numpy.zeros((dataOut.nChannels, times, dataOut.nHeights), dtype= |
|
|
2999 | avgdata = numpy.zeros((dataOut.nChannels, times, dataOut.nHeights), dtype=complex) | |
|
3000 | 3000 | |
|
3001 | 3001 | id_min = 0 |
|
3002 | 3002 | id_max = self.n |
@@ -3236,8 +3236,8 class SSheightProfiles(Operation): | |||
|
3236 | 3236 | self.bufferShape = int(shape[0]), int(numberSamples), int(numberProfile) # nchannels, nsamples , nprofiles |
|
3237 | 3237 | self.profileShape = int(shape[0]), int(numberProfile), int(numberSamples) # nchannels, nprofiles, nsamples |
|
3238 | 3238 | |
|
3239 |
self.buffer = numpy.zeros(self.bufferShape , dtype= |
|
|
3240 |
self.sshProfiles = numpy.zeros(self.profileShape, dtype= |
|
|
3239 | self.buffer = numpy.zeros(self.bufferShape , dtype=complex) | |
|
3240 | self.sshProfiles = numpy.zeros(self.profileShape, dtype=complex) | |
|
3241 | 3241 | |
|
3242 | 3242 | def run(self, dataOut, step, nsamples, code = None, repeat = None): |
|
3243 | 3243 | #print(dataOut.profileIndex) |
@@ -3475,7 +3475,7 class Decoder(Operation): | |||
|
3475 | 3475 | raise ValueError('Number of heights (%d) should be greater than number of bauds (%d)' %(self.__nHeis, self.nBaud)) |
|
3476 | 3476 | |
|
3477 | 3477 | #Frequency |
|
3478 |
__codeBuffer = numpy.zeros((self.nCode, self.__nHeis), dtype= |
|
|
3478 | __codeBuffer = numpy.zeros((self.nCode, self.__nHeis), dtype=complex) | |
|
3479 | 3479 | |
|
3480 | 3480 | __codeBuffer[:,0:self.nBaud] = self.code |
|
3481 | 3481 | |
@@ -3485,7 +3485,7 class Decoder(Operation): | |||
|
3485 | 3485 | |
|
3486 | 3486 | self.ndatadec = self.__nHeis #- self.nBaud + 1 |
|
3487 | 3487 | |
|
3488 |
self.datadecTime = numpy.zeros((self.__nChannels, self.__nProfiles, self.ndatadec), dtype= |
|
|
3488 | self.datadecTime = numpy.zeros((self.__nChannels, self.__nProfiles, self.ndatadec), dtype=complex) | |
|
3489 | 3489 | |
|
3490 | 3490 | else: |
|
3491 | 3491 | |
@@ -3493,7 +3493,7 class Decoder(Operation): | |||
|
3493 | 3493 | self.ndatadec = self.__nHeis #- self.nBaud + 1 |
|
3494 | 3494 | |
|
3495 | 3495 | |
|
3496 |
self.datadecTime = numpy.zeros((self.__nChannels, self.ndatadec), dtype= |
|
|
3496 | self.datadecTime = numpy.zeros((self.__nChannels, self.ndatadec), dtype=complex) | |
|
3497 | 3497 | |
|
3498 | 3498 | def __convolutionInFreq(self, data): |
|
3499 | 3499 | |
@@ -3677,7 +3677,7 class DecoderRoll(Operation): | |||
|
3677 | 3677 | raise ValueError('Number of heights (%d) should be greater than number of bauds (%d)' %(self.__nHeis, self.nBaud)) |
|
3678 | 3678 | |
|
3679 | 3679 | #Frequency |
|
3680 |
__codeBuffer = numpy.zeros((self.nCode, self.__nHeis), dtype= |
|
|
3680 | __codeBuffer = numpy.zeros((self.nCode, self.__nHeis), dtype=complex) | |
|
3681 | 3681 | |
|
3682 | 3682 | __codeBuffer[:,0:self.nBaud] = self.code |
|
3683 | 3683 | |
@@ -3687,7 +3687,7 class DecoderRoll(Operation): | |||
|
3687 | 3687 | |
|
3688 | 3688 | self.ndatadec = self.__nHeis #- self.nBaud + 1 |
|
3689 | 3689 | |
|
3690 |
self.datadecTime = numpy.zeros((self.__nChannels, self.__nProfiles, self.ndatadec), dtype= |
|
|
3690 | self.datadecTime = numpy.zeros((self.__nChannels, self.__nProfiles, self.ndatadec), dtype=complex) | |
|
3691 | 3691 | |
|
3692 | 3692 | else: |
|
3693 | 3693 | |
@@ -3695,7 +3695,7 class DecoderRoll(Operation): | |||
|
3695 | 3695 | self.ndatadec = self.__nHeis #- self.nBaud + 1 |
|
3696 | 3696 | |
|
3697 | 3697 | |
|
3698 |
self.datadecTime = numpy.zeros((self.__nChannels, self.ndatadec), dtype= |
|
|
3698 | self.datadecTime = numpy.zeros((self.__nChannels, self.ndatadec), dtype=complex) | |
|
3699 | 3699 | |
|
3700 | 3700 | def __convolutionInFreq(self, data): |
|
3701 | 3701 | |
@@ -4373,7 +4373,7 class CombineProfiles(Operation): | |||
|
4373 | 4373 | # bufferList = [] |
|
4374 | 4374 | # |
|
4375 | 4375 | # for i in range(nChannels): |
|
4376 |
# bufferByChannel = collections.deque(numpy.zeros( buffer_size*nSamples, dtype= |
|
|
4376 | # bufferByChannel = collections.deque(numpy.zeros( buffer_size*nSamples, dtype=complex) + numpy.NAN, | |
|
4377 | 4377 | # maxlen = buffer_size*nSamples) |
|
4378 | 4378 | # |
|
4379 | 4379 | # bufferList.append(bufferByChannel) |
@@ -4406,7 +4406,7 class CombineProfiles(Operation): | |||
|
4406 | 4406 | # dataOut.flagNoData = True |
|
4407 | 4407 | # return |
|
4408 | 4408 | # |
|
4409 |
# self.__arrayBuffer = numpy.zeros((self.__nChannels, self.__newNSamples), dtype = |
|
|
4409 | # self.__arrayBuffer = numpy.zeros((self.__nChannels, self.__newNSamples), dtype = complex) | |
|
4410 | 4410 | # self.__pulseFound = True |
|
4411 | 4411 | # self.__startIndex = indexFound |
|
4412 | 4412 | # |
@@ -6211,7 +6211,7 class PulsePairVoltage(Operation): | |||
|
6211 | 6211 | # bufferList = [] |
|
6212 | 6212 | # |
|
6213 | 6213 | # for i in range(nChannels): |
|
6214 |
# bufferByChannel = collections.deque(numpy.zeros( buffer_size*nSamples, dtype= |
|
|
6214 | # bufferByChannel = collections.deque(numpy.zeros( buffer_size*nSamples, dtype=complex) + numpy.NAN, | |
|
6215 | 6215 | # maxlen = buffer_size*nSamples) |
|
6216 | 6216 | # |
|
6217 | 6217 | # bufferList.append(bufferByChannel) |
@@ -6244,7 +6244,7 class PulsePairVoltage(Operation): | |||
|
6244 | 6244 | # dataOut.flagNoData = True |
|
6245 | 6245 | # return |
|
6246 | 6246 | # |
|
6247 |
# self.__arrayBuffer = numpy.zeros((self.__nChannels, self.__newNSamples), dtype = |
|
|
6247 | # self.__arrayBuffer = numpy.zeros((self.__nChannels, self.__newNSamples), dtype = complex) | |
|
6248 | 6248 | # self.__pulseFound = True |
|
6249 | 6249 | # self.__startIndex = indexFound |
|
6250 | 6250 | # |
General Comments 0
You need to be logged in to leave comments.
Login now