opticam_new.reduction.correctors ================================ .. py:module:: opticam_new.reduction.correctors Classes ------- .. autoapisummary:: opticam_new.reduction.correctors.FlatFieldCorrector Module Contents --------------- .. py:class:: 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. .. py:attribute:: out_dir .. py:attribute:: flat_paths .. py:attribute:: master_flats .. py:method:: _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_paths : List[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. .. py:method:: create_master_flats(overwrite = False) Create master flat-field images for each available filter. Parameters ---------- overwrite : bool, optional Whether to overwrite the existing master flat-field image, by default False. .. py:method:: correct(image, fltr) Correct an image for flat-fielding. Parameters ---------- image : np.ndarray The image to correct. fltr : str The image filter. Returns ------- NDArray The corrected image.