<jupyter_start><jupyter_text>The PolInSAR course - October 4, 2021  Synthetic Aperture Radar (SAR)  Part 2: Azimuth Resolution<jupyter_code># --- To get started, we set the ipympl backend, which makes matplotlib plots interactive.
# --- We do this using a magic command, starting with %.
%matplotlib widget

# --- import libraries
import sys
sys.path.append('/projects/src/')

import numpy as np
import matplotlib.pyplot as plt
from numpy.fft import fft, fftfreq, fftshift, ifft

# --- import rat class
from ste_io import *

# --- Useful functions

def rect(t, T0):
    # Implements y = rect(t/T0) = 1 if abs(t/T0) <= 0.5, 0 otherwise 
    # All input / outputs are Numpy arrays
    
    N = t.shape[0]
    y = np.zeros(N, 'float32') 
    y[np.abs(t/T0) <= 0.5] = 1
    
    return y

# --- Constants

# speed of light
c0 = 2.9972190e+08<jupyter_output><empty_output><jupyter_text>Exercise 1A typical P-band acquisition of DLR's F-SAR system is characterized by the following parameters:<jupyter_code># --- Input parameters 

# SAR wavelength meters
lambda0 = 0.68901587
# platform velocity, meters/second
vp    = 102.89772    
# range at closest point
R0    = 6445.2197      
# pixel spacing in meters
azsp  = 0.90879266    
# number of pixels 
Nsaz  = 9984<jupyter_output><empty_output><jupyter_text>The (unfocused) azimuth signal in */projects/data/01-sar/signal1_ac.npy* refers to 1 point-like scatterer. Which is the correct value for the azimuth resolution among 0.5 m, 1.5 m, 5 m ?  Solution  Exercise 2 Now load the azimuth signal in */projects/data/01-sar/signal2_ac.npy*, and focus it with the azimuth chirp calculated with the resolution determined in Exercise 1. How many scatterer do you see, and where?  Solution  Exercise 3 We are now ready now to focus in both rangea nd azimuth the real F-SAR P-band data already used last week !1. Open the raw data image in the file */projects/data/01-sar/raw-img.rat*, and visualize it (only the amplitude).2. Compress it in range using the chirp parameters provided below using the FFT. What do you see?3. After range focusing, compress the result in azimuth, again using the FFT. What happens if the azimuth chirp is adapted in near range? what happens if the chirp is adapted in far range?Tip:Use the provided rat class to open the data - Example: img = rrat(*filename.rat*)<jupyter_code># --- Inputs

# SAR wavelength
lambda0 = 0.68901587

# --- parameters for range focusing

# range chirp duration, s
T   = 1.0016000e-05
# chirp bandwidth, Hz
Wr  = 50.0e6
# range sampling, m
rsp = 1.1988876
# number of samples 
Nsr = 3772
# range delay, s <---- NEW !!!
rd  = 4.3008000e-05
# the range delay is the amount of time between the chirp transmission
# and the receipt of the first backscattered signal ==> converted in meters it provides the minimum range

# --- parameters for azimuth focusing

# azimut resolution, m
deltasa = 2/1.33 # 1.5
# platform velocity, meters/second
vp      = 102.89772    
# pixel spacing in meters
azsp    = 0.90879266    
# number of pixels 
Nsaz    = 9984<jupyter_output><empty_output><jupyter_text>Solution<jupyter_code><jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.08989480395282116, 'fraction_numerical': 0.05259802358941664, 'mean_word_length': 3.6420118343195265, 'pattern_counts': {'":': 0, '<': 20, '<?xml version=': 0, '>': 18, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '4', 'dir': 'jupyter-structured-clean-dedup', 'id': '611013', 'license': 'MIT', 'n_tokens_mistral': 1149, 'n_tokens_neox': 1003, 'n_words': 393, 'path': 'notebooks-us/2021_10_04_MAAP_PolInSAR_SAR_Part2.ipynb', 'repo_name': 'IslamAlam/sar-introduction', 'size': '3137'}