subtract_dark#

astropop.image.processing.subtract_dark(image, master_dark, dark_exposure, image_exposure, inplace=False)#

Subtract master_dark frame from a FrameData.

Parameters:
imageFrameData compatible

Image to perform the dark correction. Quantity, numerical values and CCDData are also suported.

master_darkFrameData compatible

Master dark image to be subtracted from the image.

dark_exposurefloat

Exposure time of the Master dark.

image_exposurefloat

Exposure time of the image.

inplacebool, optional

If True, the operations will be performed inplace in the image.

Returns:
FrameData:

New dark corrrected FrameData instance if inplace, else the image FrameData instance.

Notes

  • This function will just subtract a master dark frame from the original image. The master dark calculation, by handling several dark images, must be done previously.

  • Different exposure times among dark image and FrameData are handled by a multiplying the Master dark image by image_exposure/dark_exposure

  • If image is not a FrameData instance, inplies in inplace=False, and a new FrameData instance will be created.