from read_files import read_radar_data, read_motion_data from rcs import rcs from data_align import align_data from GeneralAlignedRangeTimeGraph import AlignedGraph from FastLinInt import FastBackProjection from LinInt import BackProjection from Deconvolution import deconvolute from plotRTI import plotRTI from helper_functions import linear_interp_nan import pickle #Converts motion and RADAR data to the right data structures unpack("../Raw_Data/uavsar1flight7") #Loads data from the RADAR motion_data = read_motion_data("../Raw_Data/UAVSAR1Flight7.csv", "UAVSAR1") motion_data = linear_interp_nan(motion_data[1], motion_data[0]) radar_data = read_radar_data("data.pkl", 580, 0.3) #580, 0.30 is probably good #Performs RCS correction radar_data = rcs(radar_data) #Plot RTI for radar_data plotRTI(radar_data) #Set parameters #Take motion_start and motion_end from .tak file video #Estimate radar_start from the plotRTI above, initially comment out code below radar_start = 300 #Initial 500 380 for flight 6 300 for flight 7 motion_start = 3850 #5200 flight 6 3900 flight 7 2411 flight 8 motion_end = 34129 #16400 flight 6 34129 flight 7 29126 flight 8
import pickle from Unpack import unpack from read_files import read_radar_data, read_motion_data from data_align import align_data motion_data = read_motion_data("../Raw_Data/UASSAR4_rail_diagonal.csv","UASSAR4") radar_data = read_radar_data("../Raw_Data/railTestDiagonal.pkl") aligned_data = align_data(radar_data,motion_data,272,1844,5368) Pulses = aligned_data[0] Final_Motion = aligned_data[1] print(Final_Motion) aligned_data[2] = radar_data[2] with open('parrot.pkl', 'wb') as f: pickle.dump(aligned_data,f) f.close()
Debug file that plots RTI graph with RADAR data pre-alignment @author: Mason ''' #Import required modules import matplotlib.pyplot as plt import numpy as np import math from read_files import read_radar_data, read_motion_data #Loads data data = read_radar_data('../Raw_Data/railTestDiagonal.pkl') Pulses = data[0] Range_Bins = data[2] RangeBinDistance = Range_Bins[2]-Range_Bins[1] position = read_motion_data('../Raw_Data/MC-RailSAR.csv') def rti_graph(radar_data,motion_data,pulse_start,motion_start,motion_end,pulse_end): Pulses = radar_data[0] Range_Bins = radar_data[2] RangeBinDistance = Range_Bins[2]-Range_Bins[1] position = motion_data #Define box positions and calculate expected distances distance = [] total_distance = [] box_position = [[.33,.168,-.149],[2.44,.168,-2.168],[.233,.168,-2.69],[2.48,.168,.859]] for x in range(len(box_position)): for i in range(len(Pulses)): distance.append(math.sqrt((position[i][0]-box_position[x][0])**2+(position[i][1]-box_position[x][1])**2+(position[i][2]-box_position[x][2])**2)) total_distance.append(distance)
@author: Mason ''' #Import required modules from pulson440_unpack import unpack from read_files import read_radar_data, read_motion_data from radar_movement import find_point_one_radar, find_i_of_first_motion, find_i_of_last_motion from data_align import align_data from AlignedRangeTimeGraph import AlignedGraph from RangeTimeGraph import rti_graph from rcs import rcs import numpy as np import matplotlib.pyplot as plt #unpack("../Raw_data/uavsar1flight1") #Currently commented out because unused motion_data = read_motion_data("UAVSAR1Flight1.csv","UAVSAR1") radar_data = read_radar_data() #motion_start = find_i_of_first_motion(motion_data) #motion_end = find_i_of_last_motion(motion_data) #radar_start = find_point_one_radar(radar_data) motion_start = 6600 motion_end = 29545 radar_start = 600 #plt.imshow(abs(radar_data[0])) #Aligns data, currently using frames given in function definition aligned_data = align_data(radar_data,motion_data,radar_start,motion_start, motion_end) radar_end = aligned_data[2] rti_graph(radar_data,motion_data,radar_start,motion_start,motion_end,radar_end)
from Unpack import unpack from read_files import read_radar_data, read_motion_data from radar_movement import find_point_one_radar, find_i_of_first_motion, find_i_of_last_motion from data_align import align_data from AlignedRangeTimeGraph import AlignedGraph from LinInt import BackProjection from read_intensity import read_intensity from Deconvolution import deconvolute from backprojection import interp_approach, main #Ramu's backprojection from rcs import rcs import numpy as np import matplotlib.pyplot as plt #Converts motion and RADAR data to the right data structures #unpack("../Raw_data/RailSAR-record1") #Currently commented out because unused motion_data = read_motion_data("../Raw_Data/UAVSAR4Flight1.csv", "UASSAR4") radar_data = read_radar_data("../Raw_Data/UAVSAR4Flight1.pkl") #Does RCS correction new_radar_data = rcs(radar_data) #Plots RTI graph plt.figure(0) plt.set_cmap('jet') rti_ax = plt.imshow(20 * np.log10(np.abs(new_radar_data[0]))) rti_ax.axes.set_aspect('auto') plt.title('Range-Time Intensity') plt.xlabel('Range Bins') plt.ylabel('Pulse Index') cbar = plt.colorbar() cbar.ax.set_ylabel('dB')
from read_files import read_radar_data, read_motion_data from rcs import rcs from data_align import align_data from GeneralAlignedRangeTimeGraph import AlignedGraph from LinInt import BackProjection from Deconvolution import deconvolute from plotRTI import plotRTI from FastLinInt import FastBackProjection from helper_functions import linear_interp_nan import matplotlib.pyplot as plt #Converts motion and RADAR data to the right data structures unpack("../Raw_Data/uavsar3flight5") #Loads data from the RADAR motion_data = read_motion_data("../Raw_Data/UAVSAR3Flight5.csv", "UAVSAR3") motion_data = linear_interp_nan(motion_data[1], motion_data[0]) radar_data = read_radar_data("data.pkl", 580, 2) #580, 0.25 is probably good #Performs RCS correction radar_data = rcs(radar_data) #Plot RTI for radar_data plotRTI(radar_data) #Set parameters #Take motion_start and motion_end from .tak file video #Estimate radar_start from the plotRTI above, initially comment out code below radar_start = 1 #Flight4: 510, FLight3: 135, Flight2: 113 motion_start = 3100 #Flight2: 3300, Flight3: 2400, FLight4: 3450, Flight5: 4477, 4803 motion_end = motion_start + 3400 #Flight2: 24000, Flight3: 15382, Flight4: 14462, Flight5: 14201, 12670