amber_run

amber_meta.amber_run.AMBER_SETUP_PATH = '/home/vohl/AMBER_setup/'
amber_meta.amber_run.create_amber_command(base_name='scenario_3_partitions', input_file='data/filterbank/file.fil', scenario_file='$SOURCE_ROOT/scenario/3_dms_partitions/scenario_3_partitions_step1.sh', config_path='$SOURCE_ROOT/install/scenario_3_partitions_step1/', rfim=True, rfim_mode='time_domain_sigma_cut', rfim_threshold_tdsc=None, rfim_threshold_fdsc=None, snr_mode='snr_mom_sigmacut', input_data_mode='sigproc', cpu_id=1, snrmin=10, output_dir='$OUTPUT_ROOT/results/', verbose=True, root_name=None)[source]

Launch amber.

Creates an amber launch command to be run with subprocess.

Parameters:
  • base_name (str) -- Base name.
  • input_file (str) -- Intput filterbank file.
  • scenario_file (str) -- Scenario file (including path)
  • config_path (str) -- Path of configuration files
  • rfim (bool) -- Use RFI mitigation or not.
  • rfim_mode (str) -- RFI mitigation mode. Choices: [time_domain_sigma_cut | frequency_domain_sigma_cut]
  • rfim_threshold (str) -- Override rfim threshold value. Default: None
  • snr_mode (str) -- SNR mode. Choices: [snr_standard | snr_momad | snr_mom_sigmacut]
  • input_data_mode (str) -- Input data mode. Choices: [sigproc | data]
  • cpu_id (int) -- CPU id for process and GPU.
  • snrmin (int) -- Minimum SNR for outlier detection.
  • output_dir (str) -- Output directory.
  • verbose (bool) -- Print extra information at runtime.
  • root_name (str) -- Root name used for output.
amber_meta.amber_run.create_rfim_configuration_threshold_from_yaml_root(input_yaml_file, root='subband', rfim_threshold_tdsc='3.25', rfim_threshold_fdsc='2.50', verbose=False, print_only=False)[source]

Create RFIm configuration file starting from with a yaml root

Parameters:
  • input_yaml_file (str) -- Input root yaml file
  • root (str) -- Root value of the yaml file. Default: 'subband'
  • threshold (list) -- New threshold file to be generated. Default: '2.50',
  • verbose (bool) -- Print extra information at runtime. Default: False.
  • print_only (bool) -- Only print command, do not launch them. Default: False.
amber_meta.amber_run.create_rfim_configuration_thresholds_from_yaml_root(input_yaml_file, root='subband', thresholds=['2.00', '2.50', '3.00', '3.50', '4.00', '4.50', '5.00'], verbose=False, print_only=False)[source]

Create RFIm configuration files starting from with a yaml root

Parameters:
  • input_yaml_file (str) -- Input root yaml file
  • root (str) -- Root value of the yaml file. Default: 'subband'
  • thresholds (list) -- Thresholds files to be generated. Default: ['2.00', '2.50', '3.00', '3.50', '4.00', '4.50', '5.00'],
  • verbose (bool) -- Print extra information at runtime. Default: False.
  • print_only (bool) -- Only print command, do not launch them. Default: False.
amber_meta.amber_run.get_amber_run_results_from_root_yaml(input_yaml_file, root='subband', verbose=False)[source]

Run amber starting from a yaml root scenario file.

Launches a amber scenario where each step is run as independent sub-processes.

Parameters:
  • input_yaml_file (str) -- Accepted format are .yaml and .yml
  • root (str) -- Name of root scenario in input yaml.
  • verbose (bool) -- Print extra information at runtime.
amber_meta.amber_run.run_amber_from_yaml_root(input_yaml_file, root='subband', rfim_threshold_override=False, rfim_threshold_tdsc='3.25', rfim_threshold_fdsc='2.50', verbose=False, print_only=True, detach_completely=True)[source]

Run amber starting from a yaml root scenario file.

Launches a amber scenario where each step is run as independent sub-processes.

Parameters:
  • input_yaml_file (str) -- Input filename with .yaml or .yml extension.
  • root (str) -- Name of root scenario in input yaml.
  • verbose (bool) -- Print extra information at runtime.
  • print_only (bool) -- Only print command, do not launch them.
  • detach_completely (bool) -- If True, launch all processes and detach from them. Else, wait on last cpu.
amber_meta.amber_run.run_amber_from_yaml_root_override_threshold(input_basename='yaml/root/root', root='subband', threshold='2.00', verbose=False, print_only=False, detach_completely=True)[source]

Run amber from a yaml root file and override threshold for RFIm

input_basename : str
Default: 'yaml/root/root'
root : str
Default: 'subband',
threshold : str
Default: '2.00'
verbose : bool
Print extra information at runtime. Default: False.
print_only : bool
Only print command, do not launch them. Default: False.
amber_meta.amber_run.run_amber_from_yaml_root_override_thresholds(input_basename='yaml/root/root', root='subband', thresholds_tdsc=['3.25'], thresholds_fdsc=['2.00', '2.25', '2.50', '2.698', '2.75'], verbose=False, print_only=False, detach_completely=False)[source]

Run amber from a yaml root file and for multiple overriden threshold for RFIm

input_basename : str
Default: 'yaml/root/root'
root : str
Default: 'subband',
thresholds : list
Default: ['2.00', '2.50', '3.00', '3.50', '4.00', '4.50', '5.00']
verbose : bool
Print extra information at runtime. Default: False.
print_only : bool
Only print command, do not launch them. Default: False.
amber_meta.amber_run.test_amber_run(input_file='data/dm100.0_nfrb500_1536_sec_20190214-1542.fil', n_cpu=3, base_name='tuning_halfrate_3GPU_goodcentralfreq', base_scenario_path='/home/vohl/software/AMBER/scenario/', scenario_files=['tuning_1.sh', 'tuning_2.sh', 'tuning_3.sh'], snrmin=8, base_config_path='$SOURCE_ROOT/configuration/', config_repositories=['tuning_halfrate_3GPU_goodcentralfreq_step1', 'tuning_halfrate_3GPU_goodcentralfreq_step2', 'tuning_halfrate_3GPU_goodcentralfreq_step3'], rfim=True, rfim_mode='time_domain_sigma_cut', snr_mode='snr_mom_sigmacut', input_data_mode='sigproc', verbose=True, print_only=False)[source]

Test amber.

Creates three amber jobs.

Parameters:
  • amber_mode (str) --
  • input_file (str) --
  • n_cpu (int) --
  • base_name (str) --
  • base_scenario_path (str) --
  • scenario_files (list) --
  • snrmin (int) --
  • base_config_path (str) --
  • config_repositories (list) --
  • rfim (bool) --
  • rfim_mode (str) --
  • snr_mode (str) --
  • input_data_mode (str) --
  • verbose (bool) -- Print extra information at runtime.
  • print_only (bool) -- Only print the command without launching it.
amber_meta.amber_run.test_tune(base_scenario_path='/home/vohl/software/AMBER/scenario/', base_name='tuning_halfrate_3GPU_goodcentralfreq', scenario_files=['tuning_1.sh', 'tuning_2.sh', 'tuning_3.sh'], config_path='/home/vohl/software/AMBER/configuration/', verbose=True, print_only=True)[source]

Test tuning amber.

Launch tune_amber for three scenarios.

Parameters base_scenario_path : str base_name : str scenario_files : list config_path : str

amber_meta.amber_run.tune_amber(scenario_file='/home/vohl/software/AMBER/scenario/tuning_step1.sh', config_path='/home/vohl/software/AMBER/configuration/tuning_step1', verbose=True, print_only=True)[source]

Tune amber.

Tune amber based on a scenario file. The output is save to config_path.

Parameters:
  • scenario_file (str) --
  • config_path (str) --