def compressRawData(self, showProgress=True): """ Apply RDA on raw data 1) Range compression 2) Range Cell Migration Correction 3) Azimuth compression Returns (compressed 2D array, azimuth positions, range time) """ rawData = self._rawData assert rawData is not None, logPrint( "Raw data should be computed ( using computeRawData() ) or provided as argument" ) assert self._dt is not None, logPrint( "Error : Simulator badly configured, dt is None") assert self._dx is not None, logPrint( "Error : Simulator badly configured, dx is None") assert self._xArray is not None, logPrint( "Error : Simulator badly configured, xArray is None") assert self._tArray is not None, logPrint( "Error : Simulator badly configured, tArray is None") Tp = self._platform.Tp Vsat = self._platform.Vsat K = self._platform.K PRF = self._platform.PRF H = self._platform.H Lambda = self._platform.Lambda # 1) Range compression : if showProgress: logPrint(" - Range compression ...") fRangeArray = GC.freq(rawData.shape[1], 1.0 / self._dt) HMF = GC.rect(fRangeArray / (np.abs(K) * Tp)) * np.exp( 1j * np.pi * fRangeArray**2 / K) # Multiply by a phase due to different range zero time ## tZero = self._tArray[len(self._tArray)/2] ## HMF = HMF * np.exp( -1j* 2.0 * np.pi * fRangeArray * tZero) procData = rangeCompression(rawData, HMF) HMF = None if self.verbose: showResponse(procData, None, 'Range compression') # 2) Azimuth FFT : if showProgress: logPrint(" -- Azimuth FFT ...") procDataAF = np.zeros(procData.shape, dtype=complex) for i in range(procDataAF.shape[1]): # get range fixed column procDataAF[:, i] = GC.fft(procData[:, i]) procData = procDataAF procDataAF = None fArray = GC.freq(procData.shape[0], self._platform.Vsat / self._dx) if self.verbose: ## showResponse(procData, [self._tArray[0], self._tArray[-1], fArray[0], fArray[-1]], 'Azimuth FFT') showResponse(procData, None, 'Azimuth FFT') # 3) Range migration : if showProgress: logPrint(" --- Range migration ...") Dfreq = np.sqrt(1.0 - (0.5 * Lambda * fArray / Vsat)**2) procData = rangeMigration2(procData, self._tArray, Dfreq) if self.verbose: ## showResponse(procData, [self._tArray[0], self._tArray[-1], fArray[0], fArray[-1]], 'RCMC') showResponse(procData, None, 'RCMC') # 4) Azimuth compression : if showProgress: logPrint(" ---- Azimuth compression ...") etaZero = self._xArray[len(self._xArray) / 2] / Vsat for i in range(procData.shape[1]): # Use H(f) = exp( 1j * 4 * pi * R0 * D(f) * f0 / c ) # HMF = np.exp(2 * np.pi * 1j * GC.C * self._tArray[i] / Lambda * Dfreq) # Multiply by a phase due to different azimuth zero time HMF = HMF * np.exp(-1j * 2.0 * np.pi * fArray * etaZero) procData[:, i] = procData[:, i] * HMF # 5) Azimuth IFFT if showProgress: logPrint(" ----- Azimuth IFFT ...") procDataAF = np.zeros(procData.shape, dtype=complex) for i in range(procDataAF.shape[1]): # get range fixed column procDataAF[:, i] = GC.ifft(procData[:, i]) procData = procDataAF procDataAF = None if self.verbose: showResponse( procData, [self._tArray[0], self._tArray[-1], fArray[0], fArray[-1]], 'Compressed image', False) return procData, self._xArray, self._tArray
## win = [1842, 1500, 150, data.shape[0]-1500] ## win = [1742, 0, 250, data.shape[0]] ## index = 134 ## data = data[win[1]:win[1]+win[3], win[0]:win[0]+win[2]] ## yArray = yArray[win[0]:win[0]+win[2]] SARSim.showResponse(data, None, 'Compressed image - Ground range') # Decompress image at azimuth dataAF = azimuthFFT(data) fArray = GC.freq(dataAF.shape[0], Vsat/dx) dataAF = azimuthTransform(dataAF, 'decompress', fArray, yArray, Lambda, Vsat) # Compress at different velocities vset = np.arange(0.0, 10.0, .2) stack3D = np.zeros((data.shape[0], data.shape[1], len(vset)), dtype=np.float32) for i, v in enumerate(vset): print "Compress at velocity:", v dataAF2 = azimuthTransform(dataAF, 'compress', fArray, yArray, Lambda, Vsat, v) outData = azimuthIFFT(dataAF2) stack3D[:,:,i] = np.abs(outData[:,:]) # User interaction : data0 = stack3D[:,:,0] fig, ax = plt.subplots(1,2)
import Sensors.GlobalVariablesCSK_HI as Sensor # Test xc = 0.0 yc = Sensor.H * np.tan(55.0 * np.pi / 180.0) # Absolute reference distance Rref = np.sqrt(Sensor.H**2 + yc**2) # Relative reference distance to Rmin ymin = Sensor.H * np.tan(54.995 * np.pi / 180.0) Rref2 = Rref - np.sqrt(Sensor.H**2 + ymin**2) Vref = Sensor.Vsat dt = 1.0 / (1.4 * np.abs(Sensor.K) * Sensor.Tp) dx = Vref / Sensor.PRF fRangeArray = GC.freq(2 * 1024, 1.0 / dt) fAzimuthArray = GC.freq(2 * 1024, Vref / dx) phaseRef = generateRefPhase(fAzimuthArray, fRangeArray, Sensor.Freq, Rref2, Vref, Sensor.K, Sensor.Tp) Sref = GC.ifft2(phaseRef) showResponse(Sref) exit() ## filename = "C:\\VFomin_folder\\PISE_project\\SAR-GMTI\\Data\\CSK_RAW_0340_B001_2689_15971_3028_3027.npy" ## pt = [2689,15971] ## filename = "C:\\VFomin_folder\\PISE_project\\SAR-GMTI\\Data\\CSK_RAW_0340_B001_10255_8742_3195_3195.npy" ## pt = [10255,8742]
def compressRawData2(self, showProgress=True): """ Omega-K compressing algorithm 1) FFT 2D 2) Reference Function Multiplication 3) Stolt interpolation 4) IFFT 2D Returns (compressed 2D array, azimuth positions, range time) """ rawData = self._rawData assert rawData is not None, logPrint( "Raw data should be computed ( using computeRawData() ) or provided as argument" ) assert self._dt is not None, logPrint( "Error : Simulator badly configured, dt is None") assert self._dx is not None, logPrint( "Error : Simulator badly configured, dx is None") assert self._xArray is not None, logPrint( "Error : Simulator badly configured, xArray is None") assert self._tArray is not None, logPrint( "Error : Simulator badly configured, tArray is None") Tp = self._platform.Tp Vsat = self._platform.Vsat K = self._platform.K PRF = self._platform.PRF H = self._platform.H Lambda = self._platform.Lambda f0 = self._platform.Freq # 1) 2D freq domain if showProgress: logPrint(" - 2D FFT ...") fRangeArray = GC.freq(rawData.shape[1], 1.0 / self._dt) fAzimuthArray = GC.freq(rawData.shape[0], Vsat / self._dx) procData = rawData procData = GC.fft2(procData) if self.verbose: showResponse(procData, None, '2D FFT') # 2) RFM if showProgress: logPrint(" -- RMF ...") # Reference distance tZero = self._tArray[len(self._tArray) / 2] etaZero = self._xArray[len(self._xArray) / 2] / Vsat Rref = 0.5 * GC.C * tZero Vref = Vsat phaseRef = generateRefPhase(fAzimuthArray, fRangeArray, f0, Rref, Vref, K, Tp, tZero, etaZero) procData = procData * phaseRef if self.verbose: ## showReImAbsPhaseResponse(phaseRef, None, 'Reference Phase') showResponse(procData, None, 'RFM') # 3) Stolt mapping if showProgress: logPrint(" --- Stolt mapping ...") # For azimuth line : for i, f in enumerate(fAzimuthArray): # # Here we need analytical inverse of Stolt mapping : # f' + f0 = sqrt( (f0 + f)^2 - (c * fEta / (2*Vsat))^2 ) # # f + f0 = + sqrt( (f0 + f')^2 + (c * fEta / (2*Vsat))^2 ) # nfRangeArray = -f0 + np.sqrt((f0 + fRangeArray)**2 + (0.5 * GC.C * f / Vsat)**2) yRe = np.real(procData[i, :]) yIm = np.imag(procData[i, :]) yRe = np.interp(nfRangeArray, fRangeArray, yRe) yIm = np.interp(nfRangeArray, fRangeArray, yIm) procData[i, :] = yRe + 1j * yIm if self.verbose: showReImAbsPhaseResponse(procData, None, 'Stolt mapping') # 4) 2D IFFT if showProgress: logPrint(" ---- 2D IFFT ...") procData = GC.ifft2(procData) if self.verbose: showResponse(procData, None, '2D IFFT') return procData, self._xArray, self._tArray
def compressRawData(self, showProgress=True): """ Apply RDA on raw data 1) Range compression 2) Range Cell Migration Correction 3) Azimuth compression Returns (compressed 2D array, azimuth positions, range time) """ rawData = self._rawData assert rawData is not None, logPrint( "Raw data should be computed ( using computeRawData() ) or provided as argument" ) assert self._dt is not None, logPrint( "Error : Simulator badly configured, dt is None") assert self._dx is not None, logPrint( "Error : Simulator badly configured, dx is None") assert self._xArray is not None, logPrint( "Error : Simulator badly configured, xArray is None") assert self._xSwath is not None, logPrint( "Error : Simulator badly configured, xSwath is None") assert self._tArray is not None, logPrint( "Error : Simulator badly configured, tArray is None") Tp = self._platform.Tp Vsat = self._platform.Vsat K = self._platform.K PRF = self._platform.PRF H = self._platform.H Lambda = self._platform.Lambda # 1) Range compression : if showProgress: logPrint(" - Range compression ...") ## # !!! VERY VERY SLOW !!! ## tArray0=np.arange(-Tp*0.5,Tp*0.5,self._dt) ## h = GC.chirpSignal(tArray0, Tp, -K) ## procData = compression(rawData, h, 'range') fRangeArray = GC.freq(rawData.shape[1], 1.0 / self._dt) HMF = GC.rect(fRangeArray / (np.abs(K) * Tp)) * np.exp( 1j * np.pi * fRangeArray**2 / K) procData = rangeCompression(rawData, HMF) HMF = None if self.verbose: showResponse(procData, None, 'Range compression') ## # TEMP ## yc = self._params[2][1] ## yArray = np.sqrt( (0.5 * GC.C * self._tArray)**2 - H**2 ) ## indices = [1050] ## for index in indices: ## f = plt.figure() ## f.suptitle("Range compression") ## plt.subplot(211) ## plt.plot(yArray-yc, np.abs(rawData[index,:])) ## plt.subplot(212) ## plt.plot(yArray-yc, np.abs(procData[index,:])) ## plt.show() ## # TEMP # 2) Azimuth FFT : if showProgress: logPrint(" -- Azimuth FFT ...") procDataAF = np.zeros(procData.shape, dtype=complex) for i in range(procDataAF.shape[1]): # get range fixed column procDataAF[:, i] = GC.fft(procData[:, i]) procData = procDataAF procDataAF = None ## fArray = np.fft.fftshift(np.fft.fftfreq( procData.shape[0], self._dx / self._platform.Vsat)) fArray = GC.freq(procData.shape[0], self._platform.Vsat / self._dx) if self.verbose: ## showResponse(procData, [self._tArray[0], self._tArray[-1], fArray[0], fArray[-1]], 'Azimuth FFT') showResponse(procData, None, 'Azimuth FFT') # 3) Range migration : if showProgress: logPrint(" --- Range migration ...") Dfreq = np.sqrt(1.0 - (0.5 * Lambda * fArray / Vsat)**2) procData = rangeMigration2(procData, self._tArray, Dfreq) if self.verbose: ## showResponse(procData, [self._tArray[0], self._tArray[-1], fArray[0], fArray[-1]], 'RCMC') showResponse(procData, None, 'RCMC') # 4) Azimuth compression : if showProgress: logPrint(" ---- Azimuth compression ...") ## xc = self._params[2][0] ## yc = self._params[2][1] ## Rc = np.sqrt(H**2 + yc**2) ## Ka = 2.0 / Lambda * 1.0 / Rc ## h = GC.rect((self._xArray-xc)/self._xSwath) * np.exp(1j * np.pi * Ka * (self._xArray - xc)**2) ## H = GC.fft(h) xc = self._xArray[len(self._xArray) / 2] for i in range(procData.shape[1]): # Small squint approximation ## Ka = 4.0 * Vsat**2 / Lambda / GC.C / self._tArray[i] ## hMF = GC.rect((self._xArray-xc)/self._xSwath) * np.exp(1j * np.pi * Ka/Vsat**2 * (self._xArray - xc)**2) ## HMF = GC.fft(hMF) # Use H(f) = exp( 1j * 4 * pi * R0 * D(f) * f0 / c ) HMF = np.exp(2 * np.pi * 1j * GC.C * self._tArray[i] / Lambda * Dfreq) procData[:, i] = procData[:, i] * HMF # 5) Azimuth IFFT if showProgress: logPrint(" ----- Azimuth IFFT ...") procDataAF = np.zeros(procData.shape, dtype=complex) for i in range(procDataAF.shape[1]): # get range fixed column procDataAF[:, i] = GC.ifft(procData[:, i]) procData = procDataAF procDataAF = None if self.verbose: showResponse( procData, [self._tArray[0], self._tArray[-1], fArray[0], fArray[-1]], 'Compressed image', False) return procData, self._xArray, self._tArray
def compressRawData(self, showProgress=True): """ Apply RDA on raw data 1) Range compression 2) Range Cell Migration Correction 3) Azimuth compression Returns (compressed 2D array, azimuth positions, range time) """ rawData = self._rawData assert rawData is not None, logPrint("Raw data should be computed ( using computeRawData() ) or provided as argument") assert self._dt is not None, logPrint("Error : Simulator badly configured, dt is None") assert self._dx is not None, logPrint("Error : Simulator badly configured, dx is None") assert self._xArray is not None, logPrint("Error : Simulator badly configured, xArray is None") assert self._tArray is not None, logPrint("Error : Simulator badly configured, tArray is None") Tp = self._platform.Tp Vsat = self._platform.Vsat K = self._platform.K PRF = self._platform.PRF H = self._platform.H Lambda = self._platform.Lambda # 1) Range compression : if showProgress: logPrint(" - Range compression ...") fRangeArray = GC.freq(rawData.shape[1], 1.0/self._dt) HMF = GC.rect(fRangeArray / (np.abs(K)*Tp)) * np.exp(1j*np.pi*fRangeArray**2 / K) # Multiply by a phase due to different range zero time ## tZero = self._tArray[len(self._tArray)/2] ## HMF = HMF * np.exp( -1j* 2.0 * np.pi * fRangeArray * tZero) procData = rangeCompression(rawData, HMF) HMF = None if self.verbose: showResponse(procData, None, 'Range compression') # 2) Azimuth FFT : if showProgress: logPrint(" -- Azimuth FFT ...") procDataAF = np.zeros(procData.shape, dtype=complex) for i in range(procDataAF.shape[1]): # get range fixed column procDataAF[:,i] = GC.fft(procData[:,i]) procData = procDataAF procDataAF = None fArray = GC.freq(procData.shape[0], self._platform.Vsat/self._dx) if self.verbose: ## showResponse(procData, [self._tArray[0], self._tArray[-1], fArray[0], fArray[-1]], 'Azimuth FFT') showResponse(procData, None, 'Azimuth FFT') # 3) Range migration : if showProgress: logPrint(" --- Range migration ...") Dfreq = np.sqrt(1.0 - (0.5 * Lambda * fArray / Vsat)**2) procData = rangeMigration2(procData, self._tArray, Dfreq) if self.verbose: ## showResponse(procData, [self._tArray[0], self._tArray[-1], fArray[0], fArray[-1]], 'RCMC') showResponse(procData, None, 'RCMC') # 4) Azimuth compression : if showProgress: logPrint(" ---- Azimuth compression ...") etaZero = self._xArray[len(self._xArray)/2] / Vsat for i in range(procData.shape[1]): # Use H(f) = exp( 1j * 4 * pi * R0 * D(f) * f0 / c ) # HMF = np.exp( 2*np.pi*1j * GC.C * self._tArray[i] / Lambda * Dfreq) # Multiply by a phase due to different azimuth zero time HMF = HMF * np.exp( -1j* 2.0 * np.pi * fArray * etaZero) procData[:,i] = procData[:,i] * HMF # 5) Azimuth IFFT if showProgress: logPrint(" ----- Azimuth IFFT ...") procDataAF = np.zeros(procData.shape, dtype=complex) for i in range(procDataAF.shape[1]): # get range fixed column procDataAF[:,i] = GC.ifft(procData[:,i]) procData = procDataAF procDataAF = None if self.verbose: showResponse(procData, [self._tArray[0], self._tArray[-1], fArray[0], fArray[-1]], 'Compressed image', False) return procData, self._xArray, self._tArray
def compressRawData2(self, showProgress=True): """ Omega-K compressing algorithm 1) FFT 2D 2) Reference Function Multiplication 3) Stolt interpolation 4) IFFT 2D Returns (compressed 2D array, azimuth positions, range time) """ rawData = self._rawData assert rawData is not None, logPrint("Raw data should be computed ( using computeRawData() ) or provided as argument") assert self._dt is not None, logPrint("Error : Simulator badly configured, dt is None") assert self._dx is not None, logPrint("Error : Simulator badly configured, dx is None") assert self._xArray is not None, logPrint("Error : Simulator badly configured, xArray is None") assert self._tArray is not None, logPrint("Error : Simulator badly configured, tArray is None") Tp = self._platform.Tp Vsat = self._platform.Vsat K = self._platform.K PRF = self._platform.PRF H = self._platform.H Lambda = self._platform.Lambda f0 = self._platform.Freq # 1) 2D freq domain if showProgress: logPrint(" - 2D FFT ...") fRangeArray = GC.freq(rawData.shape[1], 1.0/self._dt) fAzimuthArray = GC.freq(rawData.shape[0], Vsat/self._dx) procData = rawData procData = GC.fft2(procData) if self.verbose: showResponse(procData, None, '2D FFT') # 2) RFM if showProgress: logPrint(" -- RMF ...") # Reference distance tZero = self._tArray[len(self._tArray)/2] etaZero = self._xArray[len(self._xArray)/2] / Vsat Rref = 0.5 * GC.C * tZero Vref = Vsat phaseRef = generateRefPhase(fAzimuthArray, fRangeArray, f0, Rref, Vref, K, Tp, tZero, etaZero) procData = procData * phaseRef if self.verbose: ## showReImAbsPhaseResponse(phaseRef, None, 'Reference Phase') showResponse(procData, None, 'RFM') # 3) Stolt mapping if showProgress: logPrint(" --- Stolt mapping ...") # For azimuth line : for i, f in enumerate(fAzimuthArray): # # Here we need analytical inverse of Stolt mapping : # f' + f0 = sqrt( (f0 + f)^2 - (c * fEta / (2*Vsat))^2 ) # # f + f0 = + sqrt( (f0 + f')^2 + (c * fEta / (2*Vsat))^2 ) # nfRangeArray = -f0 + np.sqrt( (f0 + fRangeArray)**2 + ( 0.5 * GC.C * f / Vsat)**2 ) yRe = np.real(procData[i,:]) yIm = np.imag(procData[i,:]) yRe = np.interp(nfRangeArray, fRangeArray, yRe) yIm = np.interp(nfRangeArray, fRangeArray, yIm) procData[i,:] = yRe + 1j * yIm if self.verbose: showReImAbsPhaseResponse(procData, None, 'Stolt mapping') # 4) 2D IFFT if showProgress: logPrint(" ---- 2D IFFT ...") procData = GC.ifft2(procData) if self.verbose: showResponse(procData, None, '2D IFFT') return procData, self._xArray, self._tArray
import Sensors.GlobalVariablesCSK_HI as Sensor # Test xc = 0.0 yc = Sensor.H * np.tan(55.0 * np.pi / 180.0) # Absolute reference distance Rref = np.sqrt(Sensor.H**2 + yc**2) # Relative reference distance to Rmin ymin = Sensor.H * np.tan(54.995 * np.pi / 180.0) Rref2 = Rref - np.sqrt(Sensor.H**2 + ymin**2) Vref = Sensor.Vsat dt = 1.0/(1.4*np.abs(Sensor.K) * Sensor.Tp) dx = Vref/Sensor.PRF fRangeArray = GC.freq(2*1024, 1.0/dt) fAzimuthArray = GC.freq(2*1024, Vref/dx) phaseRef = generateRefPhase(fAzimuthArray, fRangeArray, Sensor.Freq, Rref2, Vref, Sensor.K, Sensor.Tp) Sref = GC.ifft2(phaseRef) showResponse(Sref) exit() ## filename = "C:\\VFomin_folder\\PISE_project\\SAR-GMTI\\Data\\CSK_RAW_0340_B001_2689_15971_3028_3027.npy" ## pt = [2689,15971] ## filename = "C:\\VFomin_folder\\PISE_project\\SAR-GMTI\\Data\\CSK_RAW_0340_B001_10255_8742_3195_3195.npy" ## pt = [10255,8742]
def compressRawData(self, showProgress=True): """ Apply RDA on raw data 1) Range compression 2) Range Cell Migration Correction 3) Azimuth compression Returns (compressed 2D array, azimuth positions, range time) """ rawData = self._rawData assert rawData is not None, logPrint("Raw data should be computed ( using computeRawData() ) or provided as argument") assert self._dt is not None, logPrint("Error : Simulator badly configured, dt is None") assert self._dx is not None, logPrint("Error : Simulator badly configured, dx is None") assert self._xArray is not None, logPrint("Error : Simulator badly configured, xArray is None") assert self._xSwath is not None, logPrint("Error : Simulator badly configured, xSwath is None") assert self._tArray is not None, logPrint("Error : Simulator badly configured, tArray is None") Tp = self._platform.Tp Vsat = self._platform.Vsat K = self._platform.K PRF = self._platform.PRF H = self._platform.H Lambda = self._platform.Lambda # 1) Range compression : if showProgress: logPrint(" - Range compression ...") ## # !!! VERY VERY SLOW !!! ## tArray0=np.arange(-Tp*0.5,Tp*0.5,self._dt) ## h = GC.chirpSignal(tArray0, Tp, -K) ## procData = compression(rawData, h, 'range') fRangeArray = GC.freq(rawData.shape[1], 1.0/self._dt) HMF = GC.rect(fRangeArray / (np.abs(K)*Tp)) * np.exp(1j*np.pi*fRangeArray**2 / K) procData = rangeCompression(rawData, HMF) HMF = None if self.verbose: showResponse(procData, None, 'Range compression') ## # TEMP ## yc = self._params[2][1] ## yArray = np.sqrt( (0.5 * GC.C * self._tArray)**2 - H**2 ) ## indices = [1050] ## for index in indices: ## f = plt.figure() ## f.suptitle("Range compression") ## plt.subplot(211) ## plt.plot(yArray-yc, np.abs(rawData[index,:])) ## plt.subplot(212) ## plt.plot(yArray-yc, np.abs(procData[index,:])) ## plt.show() ## # TEMP # 2) Azimuth FFT : if showProgress: logPrint(" -- Azimuth FFT ...") procDataAF = np.zeros(procData.shape, dtype=complex) for i in range(procDataAF.shape[1]): # get range fixed column procDataAF[:,i] = GC.fft(procData[:,i]) procData = procDataAF procDataAF = None ## fArray = np.fft.fftshift(np.fft.fftfreq( procData.shape[0], self._dx / self._platform.Vsat)) fArray = GC.freq(procData.shape[0], self._platform.Vsat/self._dx) if self.verbose: ## showResponse(procData, [self._tArray[0], self._tArray[-1], fArray[0], fArray[-1]], 'Azimuth FFT') showResponse(procData, None, 'Azimuth FFT') # 3) Range migration : if showProgress: logPrint(" --- Range migration ...") Dfreq = np.sqrt(1.0 - (0.5 * Lambda * fArray / Vsat)**2) procData = rangeMigration2(procData, self._tArray, Dfreq) if self.verbose: ## showResponse(procData, [self._tArray[0], self._tArray[-1], fArray[0], fArray[-1]], 'RCMC') showResponse(procData, None, 'RCMC') # 4) Azimuth compression : if showProgress: logPrint(" ---- Azimuth compression ...") ## xc = self._params[2][0] ## yc = self._params[2][1] ## Rc = np.sqrt(H**2 + yc**2) ## Ka = 2.0 / Lambda * 1.0 / Rc ## h = GC.rect((self._xArray-xc)/self._xSwath) * np.exp(1j * np.pi * Ka * (self._xArray - xc)**2) ## H = GC.fft(h) xc = self._xArray[len(self._xArray)/2] for i in range(procData.shape[1]): # Small squint approximation ## Ka = 4.0 * Vsat**2 / Lambda / GC.C / self._tArray[i] ## hMF = GC.rect((self._xArray-xc)/self._xSwath) * np.exp(1j * np.pi * Ka/Vsat**2 * (self._xArray - xc)**2) ## HMF = GC.fft(hMF) # Use H(f) = exp( 1j * 4 * pi * R0 * D(f) * f0 / c ) HMF = np.exp( 2*np.pi*1j * GC.C * self._tArray[i] / Lambda * Dfreq) procData[:,i] = procData[:,i] * HMF # 5) Azimuth IFFT if showProgress: logPrint(" ----- Azimuth IFFT ...") procDataAF = np.zeros(procData.shape, dtype=complex) for i in range(procDataAF.shape[1]): # get range fixed column procDataAF[:,i] = GC.ifft(procData[:,i]) procData = procDataAF procDataAF = None if self.verbose: showResponse(procData, [self._tArray[0], self._tArray[-1], fArray[0], fArray[-1]], 'Compressed image', False) return procData, self._xArray, self._tArray