FlagRFIAnalyzer

class dias.analyzers.FlagRFIAnalyzer(name, write_dir, state_dir)

Bases: dias.chime_analyzer.CHIMEAnalyzer

Identifies 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.

DocLib 777 describes this analyzer and the associated theremin graph.

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(self[, acqs]) Get a ch_util Finder object.
add_data_metric(self, name[, description, …]) Add a gauge metric.
add_task_metric(self, metric_name[, …]) Add a gauge metric.
delete_callback(self, deleted_files) Tell the analyzer that files have been deleted after the task has run.
finish(self) Close connection to data index database.
from_config(config, \*args, \*\*kwargs) Create a new instance with values loaded from config.
init_logger(self[, log_level_override]) Set up the logger.
read_config(self, config[, compare_keys, …]) Set all properties in this class from the supplied config.
refresh_data_index(self) Remove expired rows from the data index database.
run(self) Run the task.
setup(self) Initialize data index database and Prometheus metrics.
update_data_index(self, 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(self[, acqs]) Get a ch_util Finder object.
add_data_metric(self, name[, description, …]) Add a gauge metric.
add_task_metric(self, metric_name[, …]) Add a gauge metric.
delete_callback(self, deleted_files) Tell the analyzer that files have been deleted after the task has run.
finish(self) Close connection to data index database.
from_config(config, \*args, \*\*kwargs) Create a new instance with values loaded from config.
init_logger(self[, log_level_override]) Set up the logger.
read_config(self, config[, compare_keys, …]) Set all properties in this class from the supplied config.
refresh_data_index(self) Remove expired rows from the data index database.
run(self) Run the task.
setup(self) Initialize data index database and Prometheus metrics.
update_data_index(self, start, stop[, filename]) Add row to data index database.

Attributes Summary

apply_static_mask
freq_high
freq_low
freq_width
instrument
max_num_file
offset
output_suffix
rolling
separate_cyl_pol
threshold_mad
time_width

Methods Summary

finish(self) Close connection to data index database.
refresh_data_index(self) Remove expired rows from the data index database.
run(self) Run the task.
setup(self) Initialize data index database and Prometheus metrics.
update_data_index(self, 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(self)

Close connection to data index database.

refresh_data_index(self)

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(self)

Run the task.

Load stacked autocorrelations from the last period, generate rfi mask, write to disk, and update the data index database.

setup(self)

Initialize data index database and Prometheus metrics.

update_data_index(self, 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.