DaveStrickland / AstroPhotography

Python workflow for processing astrophotography images from either digital cameras and/or amateur telescopes.
GNU General Public License v3.0
19 stars 3 forks source link

Tool needed to fix imperfect bias/dark/flat calibration #8

Closed DaveStrickland closed 2 years ago

DaveStrickland commented 3 years ago

A tool is needed to fix non-uniform sky backgrounds left by imperfect bias/dark/flat calibration.

The following image shows example H-alpha and Green frames (separate rows) from a recent iTelescope T05 observation of M82. Left hand panels are the raw uncalibrated frames, right hand panels are after calibration with the latest 2021 calibration files. Note the strong gradients across the images. Likely cause is some imperfection in the flat fields.

Astropy photutils has most of the functionality needed.

Tool should be able to:

itelescope_imperfect_calibration

DaveStrickland commented 3 years ago

Added ApMeasureBackground.py and ap_measure_background.py, which use photutils 2-dimensional background estimation methods to generate a background model that can be later subtracted using ap_imarith.py.

This works pretty well, although it is not perfect. For example, in the case below the transition between the relatively flat background covering most the image and the slope-off to the bottom is not captured exactly, leaving a hint of the transition.

Top left is the "default" calibrated dark/bias/flat corrected (asinh between 240 and 300 ADU), top right is the background model (which only varies between 240 to 260 ADU peak to peak), bottom left is the original calibrated image with the sky subtracted (asinh between -10 and 50 ADU).

Screen_Shot_2021-06-06_at_8 22 45_PM