module documentation

Given a badness map, will apply a value cut (or possibly a range of interpolated value cuts) to the badness map to give a boolean mask that defines "bad" pixels

# EXAMPLE >>> python -m aopp_deconv_tool.create_bad_pixel_mask './example_data/ifu_observation_datasets/MUSE.2019-10-18T00:01:19.521_rebin_artifactmap.fits' --const_regions ./example_data/ifu_observation_datasets/MUSE.2019-10-18T00:01:19.521_rebin_const.reg --dynamic_regions 59 ./example_data/ifu_observation_datasets/MUSE.2019-10-18T00:01:19.521_rebin_dynamic_59.reg --dynamic_regions 147 ./example_data/ifu_observation_datasets/MUSE.2019-10-18T00:01:19.521_rebin_dynamic_147.reg --dynamic_regions 262 ./example_data/ifu_observation_datasets/MUSE.2019-10-18T00:01:19.521_rebin_dynamic_262.reg --dynamic_regions 431 ./example_data/ifu_observation_datasets/MUSE.2019-10-18T00:01:19.521_rebin_dynamic_431.reg

Class Attr Class that simulates an attribute of some type that has a value that changes based on an index.
Class DynamicRegionInterpolator Class that takes a list of index,region-parameter pairs and interpolates a region between the defined indices.
Function exec_with_args Undocumented
Function go Thin wrapper around run() to accept string inputs. As long as the names of the arguments to this function are the same as the names expected from the command line we can do this programatically
Function load_const_regions Read a list of regions from multiple region files, concatenate them all into one list and return that list.
Function load_dynamic_regions Read a list of index,region-file pairs. Assume all regions exist in each file. Create a list of index,regions-parameters for each regions, return a dictionary mapping the region name/number to the index,region-parameter list for each region.
Function parse_args Undocumented
Function run Perform the operation associated with this module.
Variable _lgr Undocumented
def exec_with_args(argv):

Undocumented

def go(fits_spec, output_path=None, value_cut_at_index=None, const_regions=None, dynamic_regions=None):

Thin wrapper around run() to accept string inputs. As long as the names of the arguments to this function are the same as the names expected from the command line we can do this programatically

def load_const_regions(const_regions: list[str]) -> list[regions.Regions]:

Read a list of regions from multiple region files, concatenate them all into one list and return that list.

def load_dynamic_regions(dynamic_regions: list[tuple[int, str]]) -> dict[int | str, list[tuple[int, regions.Regions]]]:

Read a list of index,region-file pairs. Assume all regions exist in each file. Create a list of index,regions-parameters for each regions, return a dictionary mapping the region name/number to the index,region-parameter list for each region.

def parse_args(argv):

Undocumented

def run(fits_spec, output_path, index_cut_values: list[list[float, float], ...] | None = None, const_regions: list[str] = [], dynamic_regions: list[tuple[int, str]] = []):

Perform the operation associated with this module.

_lgr =

Undocumented