##// END OF EJS Templates
add one more line generateblockdata
avaldez -
r1293:931bf57459a8
parent child
Show More
@@ -1,485 +1,480
1 1 import numpy,math,random,time
2 2 import zmq
3 3 import tempfile
4 4 from io import StringIO
5 5 ########## 1 Heredamos JRODatareader
6 6 from schainpy.model.io.jroIO_base import *
7 7 ########## 2 Heredamos las propiedades de ProcessingUnit
8 8 from schainpy.model.proc.jroproc_base import ProcessingUnit,Operation,MPDecorator
9 9 ########## 3 Importaremos las clases BascicHeader, SystemHeader, RadarControlHeader, ProcessingHeader
10 10 from schainpy.model.data.jroheaderIO import PROCFLAG, BasicHeader,SystemHeader,RadarControllerHeader, ProcessingHeader
11 11 ########## 4 Importaremos el objeto Voltge
12 12 from schainpy.model.data.jrodata import Voltage
13 13
14 14 @MPDecorator
15 15 class SimulatorReader(JRODataReader, ProcessingUnit):
16 16 incIntFactor = 1
17 17 nFFTPoints = 0
18 18 FixPP_IncInt = 1
19 19 FixRCP_IPP = 1000
20 20 FixPP_CohInt = 1
21 21 Tau_0 = 250
22 22 AcqH0_0 = 70
23 23 H0 = AcqH0_0
24 24 AcqDH_0 = 1.25
25 25 DH0 = AcqDH_0
26 26 Bauds = 32
27 27 BaudWidth = None
28 28 FixRCP_TXA = 40
29 29 FixRCP_TXB = 70
30 30 fAngle = 2.0*math.pi*(1/16)
31 31 DC_level = 500
32 32 stdev = 8
33 33 Num_Codes = 2
34 34 #code0 = numpy.array([1,1,1,0,1,1,0,1,1,1,1,0,0,0,1,0,1,1,1,0,1,1,0,1,0,0,0,1,1,1,0,1])
35 35 #code1 = numpy.array([1,1,1,0,1,1,0,1,1,1,1,0,0,0,1,0,0,0,0,1,0,0,1,0,1,1,1,0,0,0,1,0])
36 36 #Dyn_snCode = numpy.array([Num_Codes,Bauds])
37 37 Dyn_snCode = None
38 38 Samples = 200
39 39 channels = 5
40 40 pulses = None
41 41 Reference = None
42 42 pulse_size = None
43 43 prof_gen = None
44 44 Fdoppler = 100
45 45 Hdoppler = 36
46 46 def __init__(self):
47 47 """
48 48 Inicializador de la clases SimulatorReader para
49 49 generar datos de voltage simulados.
50 50 Input:
51 51 dataOut: Objeto de la clase Voltage.
52 52 Este Objeto sera utilizado apra almacenar
53 53 un perfil de datos cada vez qe se haga psiversho
54 54 un requerimiento (getData)
55 55 """
56 56 ProcessingUnit.__init__(self)
57 57 print(" [ START ] init - Metodo Simulator Reader")
58 58
59 59 self.isConfig = False
60 60 self.basicHeaderObj = BasicHeader(LOCALTIME)
61 61 self.systemHeaderObj = SystemHeader()
62 62 self.radarControllerHeaderObj = RadarControllerHeader()
63 63 self.processingHeaderObj = ProcessingHeader()
64 64 self.profileIndex = 2**32-1
65 65 self.dataOut = Voltage()
66 66 #code0 = numpy.array([1,1,1,0,1,1,0,1,1,1,1,0,0,0,1,0,1,1,1,0,1,1,0,1,0,0,0,1,1,1,0,1])
67 67 code0 = numpy.array([1,1,1,-1,1,1,-1,1,1,1,1,-1,-1,-1,1,-1,1,1,1,-1,1,1,-1,1,-1,-1,-1,1,1,1,-1,1])
68 68 #code1 = numpy.array([1,1,1,0,1,1,0,1,1,1,1,0,0,0,1,0,0,0,0,1,0,0,1,0,1,1,1,0,0,0,1,0])
69 69 code1 = numpy.array([1,1,1,-1,1,1,-1,1,1,1,1,-1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,1,-1,1,1,1,-1,-1,-1,1,-1])
70 70 #self.Dyn_snCode = numpy.array([code0,code1])
71 71 self.Dyn_snCode = None
72 72 print(" [ END ] init - Metodo simulator Reader" )
73 73
74 74
75 75 def __hasNotDataInBuffer(self):
76 76
77 77 if self.profileIndex >= self.processingHeaderObj.profilesPerBlock* self.nTxs:
78 78 if self.nReadBlocks>0:
79 79 tmp = self.dataOut.utctime
80 80 tmp_utc = int(self.dataOut.utctime)
81 81 tmp_milisecond = int((tmp-tmp_utc)*1000)
82 82 self.basicHeaderObj.utc = tmp_utc
83 83 self.basicHeaderObj.miliSecond= tmp_milisecond
84 84 return 1
85 85 return 0
86 86
87 87
88 88 def setNextFile(self):
89 89 """Set the next file to be readed open it and parse de file header"""
90 90
91 91 if (self.nReadBlocks >= self.processingHeaderObj.dataBlocksPerFile):
92 92 print('------------------- [Opening file] ------------------------------')
93 93 self.nReadBlocks = 0
94 94
95 95 def __setNewBlock(self):
96 96
97 97 self.setNextFile()
98 98 if self.flagIsNewFile:
99 99 return 1
100 100
101 101 def readNextBlock(self):
102 102 while True:
103 103 self.__setNewBlock()
104 104 if not(self.readBlock()):
105 105 return 0
106 106 self.getBasicHeader()
107 107 break
108 108 if self.verbose:
109 109 print("[Reading] Block No. %d/%d -> %s" %(self.nReadBlocks,
110 110 self.processingHeaderObj.dataBlocksPerFile,
111 111 self.dataOut.datatime.ctime()) )
112 112 return 1
113 113
114 114 def getFirstHeader(self):
115 115 self.getBasicHeader()
116 116 self.dataOut.processingHeaderObj = self.processingHeaderObj.copy()
117 117 self.dataOut.systemHeaderObj = self.systemHeaderObj.copy()
118 118 self.dataOut.radarControllerHeaderObj = self.radarControllerHeaderObj.copy()
119 119 #ADD NEW
120 120 self.dataOut.nProfiles = self.processingHeaderObj.profilesPerBlock
121 121 self.dataOut.heightList = numpy.arange(self.processingHeaderObj.nHeights) * self.processingHeaderObj.deltaHeight + self.processingHeaderObj.firstHeight
122 122 self.dataOut.channelList = list(range(self.systemHeaderObj.nChannels))
123 123 self.dataOut.nCohInt = self.processingHeaderObj.nCohInt
124 124 # asumo q la data no esta decodificada
125 125 self.dataOut.flagDecodeData = self.processingHeaderObj.flag_decode
126 126 # asumo q la data no esta sin flip
127 127 self.dataOut.flagDeflipData = self.processingHeaderObj.flag_deflip
128 128 self.dataOut.flagShiftFFT = self.processingHeaderObj.shif_fft
129 129
130 130 def getBasicHeader(self):
131 131
132 132 self.dataOut.utctime = self.basicHeaderObj.utc + self.basicHeaderObj.miliSecond / \
133 133 1000. + self.profileIndex * self.radarControllerHeaderObj.ippSeconds
134 134
135 135 self.dataOut.flagDiscontinuousBlock = self.flagDiscontinuousBlock
136 136
137 137 self.dataOut.timeZone = self.basicHeaderObj.timeZone
138 138
139 139 self.dataOut.dstFlag = self.basicHeaderObj.dstFlag
140 140
141 141 self.dataOut.errorCount = self.basicHeaderObj.errorCount
142 142
143 143 self.dataOut.useLocalTime = self.basicHeaderObj.useLocalTime
144 144
145 145 self.dataOut.ippSeconds = self.radarControllerHeaderObj.ippSeconds / self.nTxs
146 146
147 147 def reshapeData(self):
148 148 if self.nTxs==1:
149 149 return
150 150
151 151 def readBlock(self):
152 152
153 153 self.jro_GenerateBlockOfData(Samples= self.samples,DC_level=self.DC_level,
154 154 stdev=self.stdev,Reference= self.Reference,
155 155 pulses = self.pulses,Num_Codes=self.Num_Codes,
156 156 pulse_size=self.pulse_size,prof_gen=self.profiles,
157 157 H0=self.H0,DH0=self.DH0)
158 158
159 159 self.profileIndex = 0
160 160 self.flagIsNewFile = 0
161 161 self.flagIsNewBlock = 1
162 162 self.nTotalBlocks += 1
163 163 self.nReadBlocks += 1
164 164
165 165 return 1
166 166
167 167
168 168 def getData(self): ### metodo propio de VoltageReader
169 169
170 170 if self.flagNoMoreFiles:
171 171 self.dataOut.flagNodata = True
172 172 self.flagDiscontinuousBlock = 0
173 173 self.flagIsNewBlock = 0
174 174 if self.__hasNotDataInBuffer(): # aqui es verdad
175 175 if not(self.readNextBlock()): # return 1 y por eso el if not salta a getBasic Header
176 176 return 0
177 177 self.getFirstHeader() # atributo
178 178 self.reshapeData() # nTxx1 =1 return , n
179 179
180 180 if not self.getByBlock:
181 181 self.dataOut.flagDataAsBlock = False
182 182 self.dataOut.data = self.datablock[:, self.profileIndex, :]
183 183 self.dataOut.profileIndex = self.profileIndex
184 184 self.profileIndex += 1
185 185 else:
186 186 pass
187 187 self.dataOut.flagNoData = False
188 188 self.getBasicHeader()
189 189 self.dataOut.realtime = self.online
190 190 return self.dataOut.data
191 191
192 192 def set_kwargs(self, **kwargs):
193 193 for key, value in kwargs.items():
194 194 setattr(self, key, value)
195 195
196 196 def set_RCH(self, expType=2, nTx=1,ipp=None, txA=0, txB=0,
197 197 nWindows=None, nHeights=None, firstHeight=None, deltaHeight=None,
198 198 numTaus=0, line6Function=0, line5Function=0, fClock=None,
199 199 prePulseBefore=0, prePulseAfter=0,
200 200 codeType=0, nCode=0, nBaud=0, code=None,
201 201 flip1=0, flip2=0):
202 202
203 203 self.radarControllerHeaderObj.expType = expType
204 204 self.radarControllerHeaderObj.nTx = nTx
205 205 self.radarControllerHeaderObj.ipp = float(ipp)
206 206 self.radarControllerHeaderObj.txA = float(txA)
207 207 self.radarControllerHeaderObj.txB = float(txB)
208 208 self.radarControllerHeaderObj.rangeIPP = ipp
209 209 self.radarControllerHeaderObj.rangeTxA = txA
210 210 self.radarControllerHeaderObj.rangeTxB = txB
211 211
212 212 self.radarControllerHeaderObj.nHeights = int(nHeights)
213 213 self.radarControllerHeaderObj.firstHeight = numpy.array([firstHeight])
214 214 self.radarControllerHeaderObj.deltaHeight = numpy.array([deltaHeight])
215 215 self.radarControllerHeaderObj.samplesWin = numpy.array([nHeights])
216 216
217 217
218 218 self.radarControllerHeaderObj.nWindows = nWindows
219 219 self.radarControllerHeaderObj.numTaus = numTaus
220 220 self.radarControllerHeaderObj.codeType = codeType
221 221 self.radarControllerHeaderObj.line6Function = line6Function
222 222 self.radarControllerHeaderObj.line5Function = line5Function
223 223 self.radarControllerHeaderObj.fclock = fClock
224 224 self.radarControllerHeaderObj.prePulseBefore= prePulseBefore
225 225 self.radarControllerHeaderObj.prePulseAfter = prePulseAfter
226 226
227 227 self.radarControllerHeaderObj.nCode = nCode
228 228 self.radarControllerHeaderObj.nBaud = nBaud
229 229 self.radarControllerHeaderObj.code = code
230 230 self.radarControllerHeaderObj.flip1 = flip1
231 231 self.radarControllerHeaderObj.flip2 = flip2
232 232
233 233 self.radarControllerHeaderObj.code_size = int(numpy.ceil(nBaud / 32.)) * nCode * 4
234 234
235 235 if fClock is None and deltaHeight is not None:
236 236 self.fClock = 0.15 / (deltaHeight * 1e-6)
237 237
238 238 def set_PH(self, dtype=0, blockSize=0, profilesPerBlock=0,
239 239 dataBlocksPerFile=0, nWindows=0, processFlags=0, nCohInt=0,
240 240 nIncohInt=0, totalSpectra=0, nHeights=0, firstHeight=0,
241 241 deltaHeight=0, samplesWin=0, spectraComb=0, nCode=0,
242 242 code=0, nBaud=None, shif_fft=False, flag_dc=False,
243 243 flag_cspc=False, flag_decode=False, flag_deflip=False):
244 244
245 245 self.processingHeaderObj.profilesPerBlock = profilesPerBlock
246 246 self.processingHeaderObj.dataBlocksPerFile = dataBlocksPerFile
247 247 self.processingHeaderObj.nWindows = nWindows
248 248 self.processingHeaderObj.nCohInt = nCohInt
249 249 self.processingHeaderObj.nIncohInt = nIncohInt
250 250 self.processingHeaderObj.totalSpectra = totalSpectra
251 251 self.processingHeaderObj.nHeights = int(nHeights)
252 252 self.processingHeaderObj.firstHeight = firstHeight
253 253 self.processingHeaderObj.deltaHeight = deltaHeight
254 254 self.processingHeaderObj.samplesWin = nHeights
255 255
256 256 def set_BH(self, utc = 0, miliSecond = 0, timeZone = 0):
257 257 self.basicHeaderObj.utc = utc
258 258 self.basicHeaderObj.miliSecond = miliSecond
259 259 self.basicHeaderObj.timeZone = timeZone
260 260
261 261 def set_SH(self, nSamples=0, nProfiles=0, nChannels=0, adcResolution=14, pciDioBusWidth=0):
262 262 self.systemHeaderObj.nSamples = nSamples
263 263 self.systemHeaderObj.nProfiles = nProfiles
264 264 self.systemHeaderObj.nChannels = nChannels
265 265 self.systemHeaderObj.adcResolution = adcResolution
266 266 self.systemHeaderObj.pciDioBusWidth = pciDioBusWidth
267 267
268 268 def setup(self,incIntFactor= 1, nFFTPoints = 0, FixPP_IncInt=1,FixRCP_IPP=1000,
269 269 FixPP_CohInt= 1,Tau_0= 250,AcqH0_0 = 70 ,AcqDH_0=1.25, Bauds= 32,
270 270 FixRCP_TXA = 40, FixRCP_TXB = 50, fAngle = 2.0*math.pi*(1/16),DC_level= 500,
271 271 stdev= 8,Num_Codes = 1 , Dyn_snCode = None, samples=200,channels=1,Fdoppler=20,Hdoppler=36,
272 272 **kwargs):
273 273
274 274 self.set_kwargs(**kwargs)
275 275 self.nReadBlocks = 0
276 276 tmp = time.time()
277 277 tmp_utc = int(tmp)
278 278 tmp_milisecond = int((tmp-tmp_utc)*1000)
279 279 print(" SETUP -basicHeaderObj.utc",datetime.datetime.utcfromtimestamp(tmp))
280 280 if Dyn_snCode is None:
281 281 Num_Codes=1
282 282 Bauds =1
283 283
284 284
285 285
286 286 self.set_BH(utc= tmp_utc,miliSecond= tmp_milisecond,timeZone=300 )
287 287
288 288 self.set_RCH( expType=0, nTx=150,ipp=FixRCP_IPP, txA=FixRCP_TXA, txB= FixRCP_TXB,
289 289 nWindows=1 , nHeights=samples, firstHeight=AcqH0_0, deltaHeight=AcqDH_0,
290 290 numTaus=1, line6Function=0, line5Function=0, fClock=None,
291 291 prePulseBefore=0, prePulseAfter=0,
292 292 codeType=14, nCode=Num_Codes, nBaud=32, code=Dyn_snCode,
293 293 flip1=0, flip2=0)
294 294
295 295 self.set_PH(dtype=0, blockSize=0, profilesPerBlock=300,
296 296 dataBlocksPerFile=120, nWindows=1, processFlags=0, nCohInt=1,
297 297 nIncohInt=1, totalSpectra=0, nHeights=samples, firstHeight=AcqH0_0,
298 298 deltaHeight=AcqDH_0, samplesWin=samples, spectraComb=0, nCode=0,
299 299 code=0, nBaud=None, shif_fft=False, flag_dc=False,
300 300 flag_cspc=False, flag_decode=False, flag_deflip=False)
301 301
302 302 self.set_SH(nSamples=samples, nProfiles=300, nChannels=channels)
303 303
304 304 self.incIntFactor = incIntFactor
305 305 self.nFFTPoints = nFFTPoints
306 306 self.FixPP_IncInt = FixPP_IncInt
307 307 self.FixRCP_IPP = FixRCP_IPP
308 308 self.FixPP_CohInt = FixPP_CohInt
309 309 self.Tau_0 = Tau_0
310 310 self.AcqH0_0 = AcqH0_0
311 311 self.H0 = AcqH0_0
312 312 self.AcqDH_0 = AcqDH_0
313 313 self.DH0 = AcqDH_0
314 314 self.Bauds = Bauds
315 315 self.FixRCP_TXA = FixRCP_TXA
316 316 self.FixRCP_TXB = FixRCP_TXB
317 317 self.fAngle = fAngle
318 318 self.DC_level = DC_level
319 319 self.stdev = stdev
320 320 self.Num_Codes = Num_Codes
321 321 self.Dyn_snCode = Dyn_snCode
322 322 self.samples = samples
323 323 self.channels = channels
324 324 self.profiles = None
325 325 self.m_nReference = None
326 326 self.Baudwidth = None
327 327 self.Fdoppler = Fdoppler
328 328 self.Hdoppler = Hdoppler
329 329
330 330 print("IPP ", self.FixRCP_IPP)
331 331 print("Tau_0 ",self.Tau_0)
332 332 print("AcqH0_0",self.AcqH0_0)
333 333 print("samples,window ",self.samples)
334 334 print("AcqDH_0",AcqDH_0)
335 335 print("FixRCP_TXA",self.FixRCP_TXA)
336 336 print("FixRCP_TXB",self.FixRCP_TXB)
337 337 print("Dyn_snCode",Dyn_snCode)
338 338 print("Fdoppler", Fdoppler)
339 339 print("Hdoppler",Hdoppler)
340 340
341 341 self.init_acquisition()
342 342 self.pulses,self.pulse_size=self.init_pulse(Num_Codes=self.Num_Codes,Bauds=self.Bauds,BaudWidth=self.BaudWidth,Dyn_snCode=Dyn_snCode)
343 343 print(" [ END ] - SETUP metodo")
344 344 return
345 345
346 346 def run(self,**kwargs): # metodo propio
347 347 if not(self.isConfig):
348 348 self.setup(**kwargs)
349 349 self.isConfig = True
350 350 self.getData()
351 351
352 352 ##################################################################
353 353 ###### Aqui ingresamos las clases y metodos propios del simulador
354 354 ##################################################################
355 355
356 356 #############################################
357 357 ############## INIT_ACQUISITION##############
358 358 #############################################
359 359 def init_acquisition(self):
360 360
361 361 if self.nFFTPoints != 0:
362 362 self.incIntFactor = m_nProfilesperBlock/self.nFFTPoints
363 363 if (self.FixPP_IncInt > self.incIntFactor):
364 364 self.incIntFactor = self.FixPP_IncInt/ self.incIntFactor
365 365 elif(self.FixPP_IncInt< self.incIntFactor):
366 366 print("False alert...")
367 367
368 368 ProfilesperBlock = self.processingHeaderObj.profilesPerBlock
369 369
370 370 self.timeperblock =int(((self.FixRCP_IPP
371 371 *ProfilesperBlock
372 372 *self.FixPP_CohInt
373 373 *self.incIntFactor)
374 374 /150.0)
375 375 *0.9
376 376 +0.5)
377 377 # para cada canal
378 378 self.profiles = ProfilesperBlock*self.FixPP_CohInt
379 379 self.profiles = ProfilesperBlock
380 380 self.Reference = int((self.Tau_0-self.AcqH0_0)/(self.AcqDH_0)+0.5)
381 381 self.BaudWidth = int((self.FixRCP_TXA/self.AcqDH_0)/self.Bauds + 0.5 )
382 382
383 383 if (self.BaudWidth==0):
384 384 self.BaudWidth=1
385 385 #################################################################
386 386 ####################### init_pulse ##############################
387 387 ################################################################
388 388
389 389 def init_pulse(self,Num_Codes=Num_Codes,Bauds=Bauds,BaudWidth=BaudWidth,Dyn_snCode=Dyn_snCode):
390 390
391 391 Num_Codes = Num_Codes
392 392 Bauds = Bauds
393 393 BaudWidth = BaudWidth
394 394 Dyn_snCode = Dyn_snCode
395 395
396 396 if Dyn_snCode:
397 397 print("EXISTE")
398 398 else:
399 399 print("No existe")
400 400
401 401 if Dyn_snCode: # if Bauds:
402 402 pulses = list(range(0,Num_Codes))
403 403 num_codes = Num_Codes
404 404 for i in range(num_codes):
405 405 pulse_size = Bauds*BaudWidth
406 406 pulses[i] = numpy.zeros(pulse_size)
407 407 for j in range(Bauds):
408 408 for k in range(BaudWidth):
409 409 pulses[i][j*BaudWidth+k] = int(Dyn_snCode[i][j]*600)
410 410 else:
411 411 print("sin code")
412 412 pulses = list(range(1))
413 413 pulse_size = int(self.FixRCP_TXB/0.15+0.5)
414 414 pulses[0] = numpy.ones(pulse_size)
415 415 pulses = 600*pulses[0]
416 416
417 417 return pulses,pulse_size
418 418
419 419 #################################################################
420 420 ##################### Generate block data
421 421 ################################################################
422 422
423 423 def jro_GenerateBlockOfData(self,Samples=Samples,DC_level= DC_level,stdev=stdev,
424 424 Reference= Reference,pulses= pulses,
425 425 Num_Codes= Num_Codes,pulse_size=pulse_size,
426 426 prof_gen= prof_gen,H0 = H0,DH0=DH0,Fdoppler= Fdoppler,Hdoppler=Hdoppler):
427 427 Samples = Samples
428 428 DC_level = DC_level
429 429 stdev = stdev
430 430 m_nR = Reference
431 431 pulses = pulses
432 432 num_codes = Num_Codes
433 433 ps = pulse_size
434 434 prof_gen = prof_gen
435 435 channels = self.channels
436 436 H0 = H0
437 437 DH0 = DH0
438 438 ippSec = self.radarControllerHeaderObj.ippSeconds
439 439 Fdoppler = self.Fdoppler
440 440 Hdoppler = self.Hdoppler
441 441
442 442 self.datablock = numpy.zeros([channels,prof_gen,Samples],dtype= numpy.complex64)
443 443 for i in range(channels):
444 444 for k in range(prof_gen):
445 445 #·······················NOISE···············
446 446 Noise_r = numpy.random.normal(DC_level,stdev,Samples)
447 447 Noise_i = numpy.random.normal(DC_level,stdev,Samples)
448 448 Noise = numpy.zeros(Samples,dtype=complex)
449 449 Noise.real = Noise_r
450 450 Noise.imag = Noise_i
451 451 #·······················PULSOS··············
452 452 Pulso = numpy.zeros(pulse_size,dtype=complex)
453 453 Pulso.real = pulses[k%num_codes]
454 454 Pulso.imag = pulses[k%num_codes]
455 455 #····················· PULSES+NOISE··········
456 456 InBuffer = numpy.zeros(Samples,dtype=complex)
457 457 InBuffer[m_nR:m_nR+ps] = Pulso
458 458 InBuffer = Noise+ InBuffer
459 459 #····················· ANGLE ·······························
460
461
462
463
460 InBuffer.real[m_nR:m_nR+ps] = InBuffer.real[m_nR:m_nR+ps]*(math.cos( self.fAngle)*5)
464 461 InBuffer.imag[m_nR:m_nR+ps] = InBuffer.imag[m_nR:m_nR+ps]*(math.sin( self.fAngle)*5)
465 462 InBuffer=InBuffer
466 463 self.datablock[i][k]= InBuffer
467 #plot_cts(InBuffer,H0=H0,DH0=DH0
468
469
464 #plot_cts(InBuffer,H0=H0,DH0=DH0)
470 465 #wave_fft(x=InBuffer,plot_show=True)
471 466 #time.sleep(1)
472 467 #················DOPPLER SIGNAL...............................................
473 468 time_vec = numpy.linspace(0,(prof_gen-1)*ippSec,int(prof_gen))+self.nReadBlocks*ippSec*prof_gen
474 469 fd = Fdoppler #+(600.0/120)*self.nReadBlocks
475 470 d_signal = 650*numpy.array(numpy.exp(1.0j*2.0*math.pi*fd*time_vec),dtype=numpy.complex64)
476 471 #·················· DATABLOCK + DOPPLER············...........................
477 472 HD=int(Hdoppler/self.AcqDH_0)
478 473 self.datablock[0,:,HD]=self.datablock[0,:,HD]+ d_signal # RESULT
479 474 '''
480 475 a= numpy.zeros(10)
481 476 for i in range(10):
482 477 a[i]=i+self.nReadBlocks+20
483 478 for i in a:
484 479 self.datablock[0,:,int(i)]=self.datablock[0,:,int(i)]+ d_signal # RESULT
485 480 '''
General Comments 0
You need to be logged in to leave comments. Login now