liger_iris_pipeline.background.subtract_background_imager_step

Functions

subtract_background_imager(input_model, ...)

Subtracts the background image model from the input image model.

Classes

SubtractBackgroundImagerStep([config_file])

Subtracts the background image model from the input image model.

class liger_iris_pipeline.background.subtract_background_imager_step.SubtractBackgroundImagerStep(config_file: str | None = None, **kwargs)[source]

Bases: LigerIRISStep

Subtracts the background image model from the input image model. Errors are combined in quadrature. Data quality flags are combined using a bitwise OR operation.

class_alias = 'subtract_bkg'
process(input: str | ImagerModel)[source]

This is where real work happens. Every Step subclass has to override this method. The default behaviour is to raise a NotImplementedError exception. The signature must be process(self, input : str | LigerIRISDataModel).

spec = '\n        background = is_string_or_datamodel(default=None) # Reference image model to subtract from the input model.\n        scale = float(default=1.0) # Scale factor to apply to the background before subtraction.\n    '
liger_iris_pipeline.background.subtract_background_imager_step.subtract_background_imager(input_model: ImagerModel, bkg_model: ImagerModel, scale: float = 1.0) dict[source]

Subtracts the background image model from the input image model. Errors are combined in quadrature. Data quality flags are combined using a bitwise OR operation.

Parameters:
Returns:

ImagerModel – A dictionary containing the sky level, error, and number of pixels used.