opticam_new.reduction.correctors

Classes

FlatFieldCorrector

Helper class for performing flat-field corrections on OPTICAM images.

Module Contents

class opticam_new.reduction.correctors.FlatFieldCorrector(out_dir, flats_dir=None, c1_flats_dir=None, c2_flats_dir=None, c3_flats_dir=None)

Helper class for performing flat-field corrections on OPTICAM images.

Parameters:
  • out_dir (str)

  • flats_dir (str | None)

  • c1_flats_dir (str | None)

  • c2_flats_dir (str | None)

  • c3_flats_dir (str | None)

out_dir
flat_paths
master_flats
_validate_flat_files(flat_paths)

Ensure that the flat-field images in the specified directory are valid (i.e., contain at most three filters and use the same binning).

Parameters

flat_pathsList[str]

The paths to the flat-field images.

Returns

Dict[str, List[str]]

A dictionary containing the paths to the flat-field images for each filter.

Parameters:

flat_paths (List[str])

Return type:

Dict[str, List[str]]

create_master_flats(overwrite=False)

Create master flat-field images for each available filter.

Parameters

overwritebool, optional

Whether to overwrite the existing master flat-field image, by default False.

Parameters:

overwrite (bool)

Return type:

None

correct(image, fltr)

Correct an image for flat-fielding.

Parameters

imagenp.ndarray

The image to correct.

fltrstr

The image filter.

Returns

NDArray

The corrected image.

Parameters:
  • image (numpy.typing.NDArray)

  • fltr (str)

Return type:

numpy.typing.NDArray