#Include standard library dependencies import numpy as np import matplotlib.pylab as plt #Include Dictionaries from SARplatform import plat_dict #Include SARIT toolset from ritsar import phsTools from ritsar import imgTools #Create platform dictionary platform = plat_dict() #Create image plane dictionary img_plane = imgTools.img_plane_dict(platform) #Simulate phase history, if needed ############################################################################## nsamples = platform['nsamples'] npulses = platform['npulses'] x = img_plane['u']; y = img_plane['v'] points = [[0,0,0], [0,-100,0], [200,0,0]] amplitudes = [1,1,1] phs = phsTools.simulate_phs(platform, points, amplitudes) ############################################################################## #Apply RVP correction phs_corr = phsTools.RVP_correct(phs, platform)
from sys import path path.append('../') path.append('./dictionaries') #Include Dictionaries from SARplatform import plat_dict #Include SARIT toolset from ritsar import phsTools from ritsar import imgTools #Create platform dictionary platform = plat_dict() #Create image plane dictionary img_plane = imgTools.img_plane_dict(platform, aspect = 1) #Simulate phase history, if needed ############################################################################## nsamples = platform['nsamples'] npulses = platform['npulses'] x = img_plane['u']; y = img_plane['v'] points = [[0,0,0], [0,-100,0], [200,0,0]] amplitudes = [1,1,1] phs = phsTools.simulate_phs(platform, points, amplitudes) ############################################################################## #Apply RVP correction phs_corr = phsTools.RVP_correct(phs, platform)
#Include standard library dependencies import numpy as np import matplotlib.pylab as plt from matplotlib import cm cmap = cm.Greys_r #Include SARIT toolset from ritsar import phsRead from ritsar import phsTools from ritsar import imgTools #Define directory containing *.au2 and *.phs files directory = './data/Sandia/' #Import phase history and create platform dictionary [phs, platform] = phsRead.Sandia(directory) #Correct for reisdual video phase phs_corr = phsTools.RVP_correct(phs, platform) #Import image plane dictionary from './parameters/img_plane' img_plane = imgTools.img_plane_dict(platform, res_factor = 1.0, n_hat = platform['n_hat']) #Apply polar format algorithm to phase history data #(Other options not available since platform position is unknown) img_pf = imgTools.polar_format(phs_corr, platform, img_plane, taylor = 43) #Output image plt.imshow(np.abs(img_pf)**(0.1), cmap = cmap)
#Include SARIT toolset from ritsar import phsRead from ritsar import imgTools #Define top level directory containing *.mat file #and choose polarization and starting azimuth pol = 'HH' directory = './data/AFRL/pass1' start_az = 1 #Import phase history and create platform dictionary [phs, platform] = phsRead.AFRL(directory, pol, start_az, n_az = 3) #Create image plane dictionary img_plane = imgTools.img_plane_dict(platform, res_factor = 1.5, upsample = True, aspect = 1.0) #Apply algorithm of choice to phase history data img_bp = imgTools.backprojection(phs, platform, img_plane, taylor = 43, upsample = 6) #img_pf = imgTools.polar_format(phs, platform, img_plane, taylor = 43) #Output image plt.imshow(np.abs(img_bp)**0.5, cmap = cm.Greys_r) plt.title('Backprojection') #Autofocus image print('autofocusing') #img_af, af_ph = imgTools.autoFocus(img_bp, win = 0, win_params = [300,0.8]) img_af, af_ph = imgTools.autoFocus(img_bp, win = 0, win_params = [300,0.8]) #Output autofocused image
#Add include directories to default path list from sys import path path.append('../') #Include SARIT toolset from ritsar import phsRead from ritsar import phsTools from ritsar import imgTools #Define directory containing *.au2 and *.phs files directory = './data/DIRSIG/' #Import phase history and create platform dictionary [phs, platform] = phsRead.DIRSIG(directory) #Correct for reisdual video phase phs_corr = phsTools.RVP_correct(phs, platform) #Demodulate phase history with constant reference, if needed phs_fixed = phsTools.phs_to_const_ref(phs_corr, platform, upchirp = 1) #Import image plane dictionary from './parameters/img_plane' img_plane = imgTools.img_plane_dict(platform, res_factor = 1.0, aspect = 1.0) #Apply polar format algorithm to phase history data img_wk = imgTools.omega_k(phs_fixed, platform, taylor = 13, upsample = 2) #img_bp = imgTools.backprojection(phs_corr, platform, img_plane, taylor = 13, upsample = 6) #img_pf = imgTools.polar_format(phs_corr, platform, img_plane, taylor = 13) #Output image imgTools.imshow(img_wk, [-20,0])
plt.tight_layout() ''' #AFRL DSBP demo ############################################################################### #Define top level directory containing *.mat file #and choose polarization and starting azimuth pol = 'HH' directory = './data/AFRL/pass1' start_az = 1 #Import phase history and create platform dictionary [phs, platform] = phsRead.AFRL(directory, pol, start_az, n_az=4) #Create image plane dictionary img_plane = imgTools.img_plane_dict(platform, res_factor=1.0, upsample=True, aspect=1.0) #full backprojection start = time() img_bp = imgTools.backprojection(phs, platform, img_plane, taylor=17, upsample=2) bp_time = time() - start #Fast-factorized backprojection without multi-processing start = time() img_FFBP = imgTools.FFBP(phs, platform, img_plane, taylor=17, factor_max=2) fbp_time = time() - start
import matplotlib.pylab as plt from matplotlib import cm cmap = cm.Greys_r #Include SARIT toolset from ritsar import phsRead from ritsar import phsTools from ritsar import imgTools #Define directory containing *.au2 and *.phs files directory = './data/DIRSIG/' #Import phase history and create platform dictionary [phs, platform] = phsRead.DIRSIG(directory) #Correct for reisdual video phase phs_corr = phsTools.RVP_correct(phs, platform) #Demodulate phase history with constant reference, if needed phs_fixed = phsTools.phs_to_const_ref(phs_corr, platform, upchirp = 1) #Import image plane dictionary from './parameters/img_plane' img_plane = imgTools.img_plane_dict(platform, res_factor = 0.5, aspect = 2.0) #Apply polar format algorithm to phase history data img_wk = imgTools.omega_k(phs_fixed, platform, taylor = 43, upsample = 2) #img_bp = imgTools.backprojection(phs_corr, platform, img_plane, taylor = 43, upsample = 6) #img_pf = imgTools.polar_format(phs_corr, platform, img_plane, taylor = 43) #Output image plt.imshow(np.abs(img_wk), cmap = cmap)
path.append('../') path.append('./dictionaries') # Include Dictionaries from SARplatformUHF import plat_dict # Include SARIT toolset from ritsar import phsTools from ritsar import imgTools # Create platform dictionary platform = plat_dict() # Create image plane dictionary img_plane = imgTools.img_plane_dict(platform, aspect=1) # Simulate phase history, if needed ############################################################################## nsamples = platform['nsamples'] npulses = platform['npulses'] x = img_plane['u'] y = img_plane['v'] points = [[0, 0, 0], [0, -100, 0], [200, 0, 0]] amplitudes = [1, 1, 1] phs = phsTools.simulate_phs(platform, points, amplitudes) ############################################################################## # Apply RVP correction phs_corr = phsTools.RVP_correct(phs, platform)
path.append('../') # Include SARIT toolset from ritsar import phsRead from ritsar import phsTools from ritsar import imgTools # Define directory containing *.img files directory = './data/DIRSIG/' # Import phase history and create platform dictionary [phs, platform] = phsRead.DIRSIG(directory) # Correct for reisdual video phase phs_corr = phsTools.RVP_correct(phs, platform) # Demodulate phase history with constant reference, if needed phs_fixed = phsTools.phs_to_const_ref(phs_corr, platform, upchirp=1) # Import image plane dictionary from './parameters/img_plane' img_plane = imgTools.img_plane_dict(platform, res_factor=1.0, aspect=1.0) # Apply polar format algorithm to phase history data img_wk = imgTools.omega_k(phs_fixed, platform, taylor=13, upsample=2) # img_bp = imgTools.backprojection(phs_corr, platform, img_plane, taylor = 13, upsample = 6) # img_pf = imgTools.polar_format(phs_corr, platform, img_plane, taylor = 13) # Output image imgTools.imshow(img_wk, [-20, 0])
# Add include directories to default path list from sys import path path.append('../') # Include SARIT toolset from ritsar import phsRead from ritsar import phsTools from ritsar import imgTools # Define directory containing *.au2 and *.phs files directory = './data/Sandia/' # Import phase history and create platform dictionary [phs, platform] = phsRead.Sandia(directory) # Correct for residual video phase phs_corr = phsTools.RVP_correct(phs, platform) # Import image plane dictionary from './parameters/img_plane' img_plane = imgTools.img_plane_dict(platform, res_factor=1.0, n_hat=platform['n_hat']) # Apply polar format algorithm to phase history data # (Other options not available since platform position is unknown) img_pf = imgTools.polar_format(phs_corr, platform, img_plane, taylor=30) # Output image imgTools.imshow(img_pf, [-45, 0])