FlagRFIAnalyzer¶
-
class
dias.analyzers.FlagRFIAnalyzer(name, write_dir, state_dir)¶ Bases:
dias.chime_analyzer.CHIMEAnalyzerIdentifies data contaminated by RFI.
Wrapper for ch_util.rfi.number_deviations. Flags data as RFI if the stacked autocorrelations are greater than some number of local median absolute deviations (MAD) from the local median.
Attributes: - apply_static_mask
- archive_data_dir
- data_size_max
- freq_high
- freq_low
- freq_width
- instrument
- log_level
- max_num_file
- offset
- output_suffix
- period
- rolling
- separate_cyl_pol
- start_time
- state_size_max
- threshold_mad
- time_width
Methods
Finder([acqs])Get a ch_util Finder object. add_data_metric(name[, description, …])Add a gauge metric. add_task_metric(metric_name[, description, …])Add a gauge metric. delete_callback(deleted_files)Tell the analyzer that files have been deleted after the task has run. finish()Close connection to data index database. from_config(config, *args, **kwargs)Create a new instance with values loaded from config. init_logger([log_level_override])Set up the logger. read_config(config[, compare_keys, use_defaults])Set all properties in this class from the supplied config. refresh_data_index()Remove expired rows from the data index database. run()Run the task. setup()Initialize data index database and Prometheus metrics. update_data_index(start, stop[, filename])Add row to data index database. Construct the CHIME analyzer base class.
Parameters: - name (String) – The name of the task.
- write_dir (String) – The path to write output data to.
- state_dir (String) – The path to write state data to.
Attributes: - apply_static_mask
- archive_data_dir
- data_size_max
- freq_high
- freq_low
- freq_width
- instrument
- log_level
- max_num_file
- offset
- output_suffix
- period
- rolling
- separate_cyl_pol
- start_time
- state_size_max
- threshold_mad
- time_width
Methods
Finder([acqs])Get a ch_util Finder object. add_data_metric(name[, description, …])Add a gauge metric. add_task_metric(metric_name[, description, …])Add a gauge metric. delete_callback(deleted_files)Tell the analyzer that files have been deleted after the task has run. finish()Close connection to data index database. from_config(config, *args, **kwargs)Create a new instance with values loaded from config. init_logger([log_level_override])Set up the logger. read_config(config[, compare_keys, use_defaults])Set all properties in this class from the supplied config. refresh_data_index()Remove expired rows from the data index database. run()Run the task. setup()Initialize data index database and Prometheus metrics. update_data_index(start, stop[, filename])Add row to data index database. Attributes Summary
apply_static_maskfreq_highfreq_lowfreq_widthinstrumentmax_num_fileoffsetoutput_suffixrollingseparate_cyl_polthreshold_madtime_widthMethods Summary
finish()Close connection to data index database. refresh_data_index()Remove expired rows from the data index database. run()Run the task. setup()Initialize data index database and Prometheus metrics. update_data_index(start, stop[, filename])Add row to data index database. Attributes Documentation
-
apply_static_mask= None¶
-
freq_high= None¶
-
freq_low= None¶
-
freq_width= None¶
-
instrument= None¶
-
max_num_file= None¶
-
offset= None¶
-
output_suffix= None¶
-
rolling= None¶
-
separate_cyl_pol= None¶
-
threshold_mad= None¶
-
time_width= None¶
Methods Documentation
-
finish()¶ Close connection to data index database.
-
refresh_data_index()¶ Remove expired rows from the data index database.
Remove any rows of the data index database that correspond to files that have been cleaned (removed) by dias manager.
-
run()¶ Run the task.
Load stacked autocorrelations from the last period, generate rfi mask, write to disk, and update the data index database.
-
setup()¶ Initialize data index database and Prometheus metrics.
-
update_data_index(start, stop, filename=None)¶ Add row to data index database.
Update the data index database with a row that contains the name of the file and the span of time the file contains.
Parameters: - start (unix time) – Earliest time contained in the file.
- stop (unix time) – Latest time contained in the file.
- filename (str) – Name of the file.