HOPS
HOPS class reference
|
Functions | |
def | apply_fringe_file_cuts (ff_list, control_file_hash, min_snr=0.0, max_snr=1e30, valid_quality_code_list=None, start_scan_limit="000-0000", stop_scan_limit="999-9999") |
def | construct_valid_baseline_list (directory, network_reference_station, remote_stations, network_reference_baselines_only=False, include_autos=False) |
def | construct_valid_mixedmode_baseline_polproduct_dict (directory, legacy_stations, vgos_stations) |
def | gather_fringe_files (base_directory, control_file, blines, pol_products=['I'], include_autos=False, exclude_list=None, max_depth=2) |
def | get_max_nblines_in_all_collections (bl_collection_list) |
def | group_baseline_collections_by_scan (bl_collection_list) |
def | join_fringes_into_baseline_collection (exp_directory, fringe_object_list, station_list, include_autos=False, required_polprod_list=None, only_complete=True) |
def | launch_fourfit_processes_in_parallel (full_arg_list, max_num_processes=1, use_progress_ticker=True, log_processes=False) |
def | load_and_batch_fourfit (exp_directory, network_reference_station, remote_stations, control_file_path, set_commands, network_reference_baselines_only=True, num_processes=1, start_scan_limit=None, stop_scan_limit=None, pol_products=None, frequency_group=None, use_progress_ticker=True, log_fourfit_processes=False, use_ionex_file=None, force_run=False) |
def | load_and_batch_fourfit_mixedmode (exp_directory, legacy_stations, vgos_stations, control_file_path, set_commands, num_processes=1, start_scan_limit="000-0000", stop_scan_limit="999-9999", pol_products=None, frequency_group=None, use_progress_ticker=True, log_fourfit_processes=False) |
def | load_batch_cut_and_sort (exp_directory, network_reference_station, remote_stations, control_file_path, set_commands, min_snr=0, max_snr=1e5, valid_quality_code_list=None, network_reference_baselines_only=True, num_processes=1, start_scan_limit=None, stop_scan_limit=None, only_complete=True, pol_products=None, frequency_group=None, use_progress_ticker=True, log_fourfit_processes=False) |
def | load_batch_cut_and_sort_mixedmode (exp_directory, network_reference_station, remote_stations, control_file_path, set_commands, min_snr=30, max_snr=500, valid_quality_code_list=None, network_reference_baselines_only=True, num_processes=1, start_scan_limit="000-0000", stop_scan_limit="999-9999", only_complete=True, pol_products=None, frequency_group=None, use_progress_ticker=True, log_fourfit_processes=False) |
def | load_directory_fringe_files (dir_name, baselines_list, frequency_group=None, include_autos=False) |
def | sort_collections_by_baseline (baseline_collection_list) |
Variables | |
processing_logger = logging.getLogger(__name__) | |
some useful utility functions for data processing with fourfit
def vpal.processing.apply_fringe_file_cuts | ( | ff_list, | |
control_file_hash, | |||
min_snr = 0.0 , |
|||
max_snr = 1e30 , |
|||
valid_quality_code_list = None , |
|||
start_scan_limit = "000-0000" , |
|||
stop_scan_limit = "999-9999" |
|||
) |
convenience function for a set of commonly used filters on fringe files, default values for this function, are such that it essentially only filters on the control file hash
def vpal.processing.construct_valid_baseline_list | ( | directory, | |
network_reference_station, | |||
remote_stations, | |||
network_reference_baselines_only = False , |
|||
include_autos = False |
|||
) |
construct a list of all the valid baselines in this experiment
def vpal.processing.construct_valid_mixedmode_baseline_polproduct_dict | ( | directory, | |
legacy_stations, | |||
vgos_stations | |||
) |
construct a dictionary of all the valid legacy-vgos baselines in this experiment, along with their valid pol-products
def vpal.processing.gather_fringe_files | ( | base_directory, | |
control_file, | |||
blines, | |||
pol_products = ['I'] , |
|||
include_autos = False , |
|||
exclude_list = None , |
|||
max_depth = 2 |
|||
) |
Returns a list of all the fringe (type2) files found in any directory up to max_depth under the base_directory In a typical VGOS experiment directory, the fringe files are two levels below the base_directory (the first level below the base directory is the scan name). The exp_dir is expecting an absolute path to a HOPS experiment number directory (four-digit number) The control file is an absolute path Assumes fringe files have a six-digit extension with three '.' in the filename.
def vpal.processing.get_max_nblines_in_all_collections | ( | bl_collection_list | ) |
get the maximum number of baselines in any single observation/scan
def vpal.processing.group_baseline_collections_by_scan | ( | bl_collection_list | ) |
group the data of associated with each baseline by scan
def vpal.processing.join_fringes_into_baseline_collection | ( | exp_directory, | |
fringe_object_list, | |||
station_list, | |||
include_autos = False , |
|||
required_polprod_list = None , |
|||
only_complete = True |
|||
) |
this function takes individual fringe files (for each scan, baseline, and polarization product) and assembles the polarization product files together by baseline for each scan
def vpal.processing.launch_fourfit_processes_in_parallel | ( | full_arg_list, | |
max_num_processes = 1 , |
|||
use_progress_ticker = True , |
|||
log_processes = False |
|||
) |
launch several fourfit processes in parallel to process all the jobs specified by the 'full_arg_list'
def vpal.processing.load_and_batch_fourfit | ( | exp_directory, | |
network_reference_station, | |||
remote_stations, | |||
control_file_path, | |||
set_commands, | |||
network_reference_baselines_only = True , |
|||
num_processes = 1 , |
|||
start_scan_limit = None , |
|||
stop_scan_limit = None , |
|||
pol_products = None , |
|||
frequency_group = None , |
|||
use_progress_ticker = True , |
|||
log_fourfit_processes = False , |
|||
use_ionex_file = None , |
|||
force_run = False |
|||
) |
loads any pre-existing fringe files which match the criteria and batch fourfits any missing items, then returns a list of the fringe-files
def vpal.processing.load_and_batch_fourfit_mixedmode | ( | exp_directory, | |
legacy_stations, | |||
vgos_stations, | |||
control_file_path, | |||
set_commands, | |||
num_processes = 1 , |
|||
start_scan_limit = "000-0000" , |
|||
stop_scan_limit = "999-9999" , |
|||
pol_products = None , |
|||
frequency_group = None , |
|||
use_progress_ticker = True , |
|||
log_fourfit_processes = False |
|||
) |
loads any pre-existing fringe files which match the criteria and batch fourfits any missing items, then returns a list of the fringe-files
def vpal.processing.load_batch_cut_and_sort | ( | exp_directory, | |
network_reference_station, | |||
remote_stations, | |||
control_file_path, | |||
set_commands, | |||
min_snr = 0 , |
|||
max_snr = 1e5 , |
|||
valid_quality_code_list = None , |
|||
network_reference_baselines_only = True , |
|||
num_processes = 1 , |
|||
start_scan_limit = None , |
|||
stop_scan_limit = None , |
|||
only_complete = True , |
|||
pol_products = None , |
|||
frequency_group = None , |
|||
use_progress_ticker = True , |
|||
log_fourfit_processes = False |
|||
) |
convenience function to do a load-and-batch fourfit, followed by some filters, then join fringe files associated with a single scan-baseline into collections
def vpal.processing.load_batch_cut_and_sort_mixedmode | ( | exp_directory, | |
network_reference_station, | |||
remote_stations, | |||
control_file_path, | |||
set_commands, | |||
min_snr = 30 , |
|||
max_snr = 500 , |
|||
valid_quality_code_list = None , |
|||
network_reference_baselines_only = True , |
|||
num_processes = 1 , |
|||
start_scan_limit = "000-0000" , |
|||
stop_scan_limit = "999-9999" , |
|||
only_complete = True , |
|||
pol_products = None , |
|||
frequency_group = None , |
|||
use_progress_ticker = True , |
|||
log_fourfit_processes = False |
|||
) |
convenience function to do a load-and-batch fourfit, followed by some filters, then join fringe files associated with a single scan-baseline into collections
def vpal.processing.load_directory_fringe_files | ( | dir_name, | |
baselines_list, | |||
frequency_group = None , |
|||
include_autos = False |
|||
) |
find and load all fringe files in a directory
def vpal.processing.sort_collections_by_baseline | ( | baseline_collection_list | ) |
returns a dict of lists, each dict value contains a list of the collections corresponding to a single baseline
vpal.processing.processing_logger = logging.getLogger(__name__) |