subtract_dark

ccdproc.subtract_dark(ccd, master, dark_exposure=None, data_exposure=None, exposure_time=None, exposure_unit=None, scale=False)[source]

Subtract dark current from an image.

Parameters:
ccdCCDData

Image from which dark will be subtracted.

masterCCDData

Dark image.

dark_exposureQuantity or None, optional

Exposure time of the dark image; if specified, must also provided data_exposure. Default is None.

data_exposureQuantity or None, optional

Exposure time of the science image; if specified, must also provided dark_exposure. Default is None.

exposure_timestr or Keyword or None, optional

Name of key in image metadata that contains exposure time. Default is None.

exposure_unitUnit or None, optional

Unit of the exposure time if the value in the meta data does not include a unit. Default is None.

scale: bool, optional

If True, scale the dark frame by the exposure times. Default is False.

add_keywordstr, Keyword or dict-like, optional

Item(s) to add to metadata of result. Set to False or None to completely disable logging. Default is to add a dictionary with a single item: The key is the name of this function and the value is a string containing the arguments the function was called with, except the value of this argument.

Returns:
resultCCDData

Dark-subtracted image.