def focus_multiprocessing(self, row):
"""
Focus SAR image with TDBP algorithm. NOTE: Image must be range compressed.
It uses local squint angle (antenna coordinate system) and distances to target to focus.
Parameters
----------
row: int.
image row to be focus.
Returns
-------
list of numpy complex.
List containing entire focused row (numpy complex data) calculated in parallel mode.
"""
# Light speed.
c = 300000000.0
# SAR bandwidth, central frequency and lambda.
sar_B = self.param.get_float_parameter("Radar/B")
sar_f0 = self.param.get_float_parameter("Radar/f0")
sar_lambda = c/sar_f0
nt_fast_time = self.simulated_image.traj.nt
nt_slow_time = self.simulated_image.Nt
# Partial row calculated in parallel mode focusing.
partial_row = np.empty(self.ny, dtype=np.complex128)
x_foc_ind = row
for y_foc_ind in range(self.ny):
foc_lin_ind = x_foc_ind*self.ny + y_foc_ind
# Synthetic range compressed data (matched 2D filter).
# Antenna Enclosure (lobe).
doppler_amplitude_lin = (np.sinc(self.local_squint_ref_traj[foc_lin_ind, :]/self.radar_beamwidth*0.886 ))**2
doppler_amplitude = np.tile(doppler_amplitude_lin, [self.simulated_image.Nt, 1])
# Range amplitude: range positions in raw data of backscattered signal. These are the sincs with range
# migration (range compressed image).
range_amplitude = np.sinc( sar_B*( (np.tile(self.simulated_image.t_axis_fast_time, [nt_fast_time, 1])).transpose()
- np.tile(2*self.distances_ref_traj[foc_lin_ind, :]/c, [nt_slow_time, 1]) ) )
# Limit bandwidth to threshold given by a window. Use only 3dB of antenna lobe for azimuth, limited by squint threshold.
doppler_threshold_win = np.absolute( np.tile(self.local_squint_ref_traj[foc_lin_ind, :], [nt_slow_time, 1]) ) < self.squint_threshold
raw_amplitude = doppler_amplitude*range_amplitude*doppler_threshold_win
# Phase of backscattered signal (2*pi*2*r/lambda).
raw_phase = np.exp(-1j*4*np.pi/sar_lambda*np.tile(self.distances_ref_traj[foc_lin_ind, :], [nt_slow_time, 1]))
# Get module of raw_amplitude (for every xn, yn).
mod_raw_amplitude = np.sum(abs(raw_amplitude)**2)
# Repeat over x,y (slow time and fast time) to normalize.
mod_raw_amplitude = np.tile(mod_raw_amplitude, [nt_slow_time, nt_fast_time])
# Get raw odographer with raw_amplitude and raw_phase, i.e. with amplitude and phase information, and normalize.
raw_to_foc = (np.conjugate(raw_phase))*raw_amplitude/mod_raw_amplitude
partial_row[y_foc_ind] = np.sum(self.new_raw*raw_to_foc)
return list(partial_row)
评论列表
文章目录