Beispiel #1
0
def generateRefPhase(fAzimuthArray,
                     fRangeArray,
                     f0,
                     Rref,
                     Vref,
                     K,
                     Tp,
                     tZero=0,
                     etaZero=0):
    """
    Phi_ref(f_eta, f_tau) = 4*pi*Rref/c * sqrt( (f0+f_tau)^2 - c^2 * f_eta^2 / (4*Vref^2) )
    - tZero corresponds to the 'zero' range time of the signal range time sampling. tZero = (tmax+tmin)/2
    - etaZero corresponds to the 'zero' azimuth time of the signal azimuth time sampling. etaZero = (etaMax+etaMin)/2

    """
    a = 4.0 * np.pi * Rref / GC.C
    fRangeMax = np.abs(K) * Tp
    ##        fRangeMax = fRangeArray[-1]
    phase = np.zeros((len(fAzimuthArray), len(fRangeArray)), dtype=np.complex)
    for i, f in enumerate(fAzimuthArray):
        b = np.sqrt((f0 + fRangeArray)**2 - (0.5 * GC.C * f / Vref)**2)
        c = np.pi * fRangeArray**2 / K
        d = 2.0 * np.pi * tZero * fRangeArray
        d2 = 2.0 * np.pi * etaZero * f
        phase[i, :] = GC.rect(
            fRangeArray / fRangeMax) * np.exp(1j * a * b[:] + 1j * c[:] -
                                              1j * d[:] - 1j * d2)
    return phase
Beispiel #2
0
def idealWa(x,x_c,deltaX):
    """
    Antenna Beam pattern
    ideal : Wa(x) = rect( (x - x_c)/deltaX ) where
        deltaX - azimuth flight distance covered by satellite during elimination and reception
        deltaX = deltaT * V_{sat}, V_{sat} - satellite velocity
    """
    return GC.rect( (x-x_c) / deltaX )
Beispiel #3
0
def received2DSignal(t, x, dist, tau_p, f_c, K_r, Wa, sigma=1):
    """
    SAR received signal at range time t and azimuth position x
    S_{out}(t,x) = rect( (t-2*d(x)/c) / tau_p) * Wa(x) * sigma
                    * exp( -4*pi*1j* f_c * d(x)/c + 1j*pi*K_r*(t-2*d(x)/c)^2 )

    """
    tt = t - 2.0 * dist(x) / GC.C
    phase = -4.0 * f_c * dist(x) / GC.C + K_r * (tt**2)
    return GC.rect(tt / tau_p) * Wa(x) * sigma * np.exp(1j * np.pi * phase)
Beispiel #4
0
def received2DSignal(t, x, dist, tau_p, f_c, K_r, Wa, sigma=1) :
    """
    SAR received signal at range time t and azimuth position x
    S_{out}(t,x) = rect( (t-2*d(x)/c) / tau_p) * Wa(x) * sigma
                    * exp( -4*pi*1j* f_c * d(x)/c + 1j*pi*K_r*(t-2*d(x)/c)^2 )

    """
    tt = t - 2.0*dist(x) / GC.C
    phase = -4.0*f_c*dist(x) / GC.C + K_r*(tt**2)
    return GC.rect( tt/tau_p ) * Wa(x) * sigma * np.exp(1j*np.pi*phase)
def sarResp(t,y,d_a,E_y):
    """
    The demodulated received data for a single point at slant-range and azimuth position of
    r_a and y_a, respectively is given as

    s_a(t,y) = E_t(t - 2*d_a(y)/c) * E_y(y - Y0) * exp( -4*pi*1j * f_c * d_a(y) / c + 1j * pi * K_r * (t - 2*d_a(y) / c)**2 )

    E_t(t) = rect(t/T_p)
    T_p - chirp duration time
    E_y - antenna beam pattern

    """
    tt = t - 2.0*d_a(y) / GC.C
    return GC.rect(tt / T_p) * E_y(y - Y0) * np.exp(-4.0*1j*np.pi * TSX.Freq * d_a(y) / GC.C + 1j*np.pi * TSX.K * (tt)**2 )
Beispiel #6
0
def sarResp(t, y, d_a, E_y):
    """
    The demodulated received data for a single point at slant-range and azimuth position of
    r_a and y_a, respectively is given as

    s_a(t,y) = E_t(t - 2*d_a(y)/c) * E_y(y - Y0) * exp( -4*pi*1j * f_c * d_a(y) / c + 1j * pi * K_r * (t - 2*d_a(y) / c)**2 )

    E_t(t) = rect(t/T_p)
    T_p - chirp duration time
    E_y - antenna beam pattern

    """
    tt = t - 2.0 * d_a(y) / GC.C
    return GC.rect(tt / T_p) * E_y(y - Y0) * np.exp(
        -4.0 * 1j * np.pi * TSX.Freq * d_a(y) / GC.C + 1j * np.pi * TSX.K *
        (tt)**2)
Beispiel #7
0
def generateRefPhase(fAzimuthArray, fRangeArray, f0, Rref, Vref, K, Tp, tZero=0, etaZero=0):
    """
    Phi_ref(f_eta, f_tau) = 4*pi*Rref/c * sqrt( (f0+f_tau)^2 - c^2 * f_eta^2 / (4*Vref^2) )
    - tZero corresponds to the 'zero' range time of the signal range time sampling. tZero = (tmax+tmin)/2
    - etaZero corresponds to the 'zero' azimuth time of the signal azimuth time sampling. etaZero = (etaMax+etaMin)/2

    """
    a = 4.0*np.pi*Rref/GC.C
    fRangeMax = np.abs(K)*Tp
##        fRangeMax = fRangeArray[-1]
    phase = np.zeros((len(fAzimuthArray),len(fRangeArray)), dtype=np.complex)
    for i, f in enumerate(fAzimuthArray):
        b = np.sqrt( (f0 + fRangeArray)**2 - ( 0.5 * GC.C * f / Vref)**2 )
        c = np.pi * fRangeArray**2 / K
        d =  2.0*np.pi* tZero * fRangeArray
        d2 = 2.0*np.pi* etaZero * f
        phase[i,:] = GC.rect(fRangeArray / fRangeMax) * np.exp(1j * a * b[:] + 1j*c[:] - 1j*d[:] - 1j*d2)
    return phase
Beispiel #8
0
def chirpSignal(t,tau_p,K_r):
    """
    Emitted signal :
        S_{tx}(t) = rect(t/tau_p) * exp(1j*pi*K_r*t^2)
    """
    return GC.rect(t / tau_p) * np.exp(1j*np.pi*K_r * t**2)
Beispiel #9
0
    # 5) Range cell migration Compensation (RCMC)
    # from range time to range distance :
    dist = lambda x : distSST(x, Sat.H, x_c, y_c)
    dR = deltaR(xArray, x_c, dist)
    dRI = np.round(dR).astype(np.int)
    Srx_RC_RCMC = rangeMigration(Srx_RC, dRI)




    # 6) Azimuth compression :
    # azimuth reference signal
    Rc = dist(x_c)
    Ka = 2.0 / Sat.Lambda * 1.0 / Rc
    h = GC.rect((xArray-x_c)/(2.0*Xb)) * np.exp(1j * np.pi * Ka * (xArray - x_c)**2)
    Srx_RC_RCMC_AC = azimuthCompression(Srx_RC_RCMC, h)
    showResponse(Srx_RC_RCMC_AC)

##    showResponse(Srx_final)
##    Srx_final = np.zeros(SrxAF_RCMC.shape, dtype=complex)
##    for i in range(SrxAF_RCMC.shape[1]):
##        # get range fixed column
##        Srx_final[:,i] = GC.ifft(SrxAF_RCMC[:,i])
##
##    showResponse(Srx_final)




Beispiel #10
0
def chirp(t):
    """
    SAR emitting pulse
    """
    return GC.rect(t / T_p) * np.exp(1j * np.pi *
                                     (2.0 * TSX.Freq * t + TSX.K * t**2))
Beispiel #11
0
    tArray = np.arange(-T_p * 0.6, T_p * 0.8, T_p * 0.001)

    # Chirp signal
    ##    emitSig=chirp(tArray)
    ##    plt.subplot(121)
    ##    plt.title("Chirp module")
    ##    plt.plot(tArray,np.absolute(emitSig))
    ##    plt.subplot(122)
    ##    plt.title("Chirp phase")
    ##    plt.plot(tArray,np.angle(emitSig))
    ##    plt.show()

    # Radar-Target distance plot
    ##    dArray = d_a_0(yArray)
    ##    plt.plot(yArray,dArray,'-b')
    ##    plt.show()

    # SAR raw data
    respSig = np.zeros((len(tArray), len(yArray)), dtype=complex)
    E_y = lambda y: GC.rect(y / Y_d)
    for index, t in enumerate(tArray):
        respSig[index, :] = sarResp(t, yArray[:], d_a_0, E_y)

    plt.subplot(121)
    plt.imshow(np.absolute(respSig))
    plt.colorbar()
    plt.subplot(122)
    plt.imshow(np.angle(respSig))
    plt.colorbar()
    plt.show()
Beispiel #12
0
    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
##    plt.title("Chirp module")
##    plt.plot(tArray,np.absolute(emitSig))
##    plt.subplot(122)
##    plt.title("Chirp phase")
##    plt.plot(tArray,np.angle(emitSig))
##    plt.show()

    # Radar-Target distance plot
##    dArray = d_a_0(yArray)
##    plt.plot(yArray,dArray,'-b')
##    plt.show()


    # SAR raw data
    respSig = np.zeros((len(tArray), len(yArray)), dtype=complex)
    E_y = lambda y : GC.rect(y/Y_d)
    for index, t in enumerate(tArray):
        respSig[index,:] = sarResp(t, yArray[:],d_a_0,E_y)

    plt.subplot(121)
    plt.imshow(np.absolute(respSig))
    plt.colorbar()
    plt.subplot(122)
    plt.imshow(np.angle(respSig))
    plt.colorbar()
    plt.show()




Beispiel #14
0
    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
Beispiel #15
0
    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 chirp(t):
    """
    SAR emitting pulse
    """
    return GC.rect(t / T_p) * np.exp(1j*np.pi*( 2.0* TSX.Freq * t + TSX.K * t**2 ) )
Beispiel #17
0
def emittedSignal(t,tau_p, f_c, K_r):
    """
    Emitted signal :
        S_{tx}(t) = rect(t/tau_p) * exp(2*pi*1j* f_c * t + 1j*pi*K_r*t^2)
    """
    return GC.rect(t / tau_p) * np.exp(1j*np.pi*( 2.0* f_c * t + K_r * t**2 ) )
    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