# unique_ID = 240700 unique_ID = 240783 N = 100 block_help = [int(unique_ID / N)] image_widths = [100, 100, 100] # image_widths = [30,30,120] max_pixel_size = 0.2 num_threads = 4 ### open data ### processed_data_folder = processed_data_dir(timeID) data_dir = processed_data_folder + "/" + input_folder interferometry_header, IPSE_list = R_IPSE.load_interferometric_PSE( data_dir, blocks_to_open=block_help) IPSE_to_image = [ IPSE for IPSE in IPSE_list if IPSE.unique_index == unique_ID ][0] print("intensity:", IPSE_to_image.intensity) print(" loc:", IPSE_to_image.loc) # prefered_antenna_index = IPSE_to_image.prefered_antenna_index ## prep imager ### # antennas = interferometry_header.antenna_data ## all antennas = [ ant for ant in interferometry_header.antenna_data if interferometry_header.use_core_stations_S2 or np.isfinite(ant.no_core_ant_i)
# input_folder = "interferometry_out_S2abs" # input_folder = "interferometry_out4_tstS2normabsBefore" # input_folder = "interferometry_out4_tstS2normabsBefore_noCore2" # input_folder = "interferometry_out4_sumLog" input_folder = "interferometry_out4" # input_folder = "interferometry_out4_noRemSaturation" # input_folder = "interferometry_out4_no_erase" # input_folder = "interferometry_out4_PrefStatRS306" processed_data_folder = processed_data_dir(timeID) data_dir = processed_data_folder + "/" + input_folder #### make the widget #### qApp = QtWidgets.QApplication(sys.argv) plotter = Active3DPlotter(coordinate_system) plotter.setWindowTitle("LOFAR-LIM data viewer") plotter.show() interferometry_header, IPSE = R_IPSE.load_interferometric_PSE( data_dir) #, blocks_to_open=[338,339,340,341] ) # IPSE = R_IPSE.filter_IPSE(IPSE, [[-15340,-15240], [10330,10350], [4800,4925], [1.229,1.245] ]) IPSE_dataset = DataSet_interferometricPointSources(IPSE, marker='s', marker_size=5, color_mode="time", name="PSE", cmap=cmap) plotter.add_dataset(IPSE_dataset) qApp.exec_()
station_delay_file) raw_fpaths = filePaths_by_stationName(timeID) raw_data_files = {sname:MultiFile_Dal1(fpaths, force_metadata_ant_pos=True, polarization_flips=polarization_flips, bad_antennas=bad_antennas, additional_ant_delays=additional_antenna_delays) \ for sname,fpaths in raw_fpaths.items() if sname in station_timing_offsets} data_filters = { sname: window_and_filter(timeID=timeID, sname=sname) for sname in station_timing_offsets } trace_locator = getTrace_fromLoc(raw_data_files, data_filters, station_timing_offsets) interferometry_header, IPSE_list = R_IPSE.load_interferometric_PSE( processed_data_folder + "/" + input_folder, blocks_to_open=[IPSE_block]) IPSE = [IPSE for IPSE in IPSE_list if IPSE.unique_index == IPSE_unique_ID][0] print('station:', interferometry_header.antenna_data[antenna_num].station) print('antenna:', interferometry_header.antenna_data[antenna_num].name) if pulse_length is None: pulse_length = interferometry_header.pulse_length print("saved trace") T = np.array(IPSE.file_dataset[antenna_num]) plt.plot(np.abs(T)) plt.plot(np.real(T)) plt.show()
first_block = 0 blocks_per_run = 174 run_number = 1 #/5 block_override = None #282 half_blocks_to_search = 2 ## actual blocks searched is 2*half_blocks_to_search + 1 min_intensity = 0.8 max_S1S2_distance = 50 pulse_length = 50 ### load previous data processed_data_folder = processed_data_dir(timeID) data_dir = processed_data_folder + "/" + input_folder interferometry_header, IPSE_list = R_IPSE.load_interferometric_PSE( data_dir) IPSE_by_block = {} for IPSE in IPSE_list: block = IPSE.block_index if block not in IPSE_by_block: IPSE_by_block[block] = [] if IPSE.converged and IPSE.intensity > min_intensity and IPSE.S1_S2_distance < max_S1S2_distance: IPSE_by_block[block].append(IPSE) ### create the imager ### imager_utility = relocator(timeID, interferometry_header, pulse_length) imager_utility.do_RFI_filtering = True