soxspipe.commonutils.subtract_background¶
fit and subtract background flux from scattered light from frame
- Author
David Young
- Date Created
June 3, 2021
Module Contents¶
Classes¶
fit and subtract background flux from scattered light from frame |
API¶
- class soxspipe.commonutils.subtract_background.subtract_background(log, frame, orderTable, sofName=False, recipeName=False, settings=False, qcTable=False, productsTable=False, lamp='', startNightDate='')[source][source]¶
Bases:
objectfit and subtract background flux from scattered light from frame
Key Arguments:
log– loggersettings– the settings dictionaryframe– the frame to subtract background light fromrecipeName– name of the parent recipesofName– the sof file name given to the parent recipeorderTable– the order geometry tableqcTable– the data frame to collect measured QC metricsproductsTable– the data frame to collect output productslamp– needed for UVB flatsstartNightDate– YYYY-MM-DD date of the observation night. Default “”
Usage:
To setup your logger, settings and database connections, please use the
fundamentalspackage (see tutorial here https://fundamentals.readthedocs.io/en/master/initialisation.html).To fit and subtract the background from an image:
from soxspipe.commonutils import subtract_background background = subtract_background( log=log, frame=myCCDDataObject, orderTable="/path/to/orderTable", settings=settings ) backgroundFrame, backgroundSubtractedFrame = background.subtract()
Initialization
- create_background_image(rowFitOrder, gaussianSigma)[source][source]¶
model the background image from intra-order flux detected
Key Arguments:
rowFitOrder– order of the polynomial fit to flux in each rowgaussianSigma– the sigma of the gaussian used to blur the final image