soxspipe.commonutils.detect_order_edges¶
using a fully-illuminated slit flat frame detect and record the order-edges
- Author
David Young & Marco Landoni
- Date Created
September 18, 2020
Module Contents¶
Classes¶
using a fully-illuminated slit flat frame detect and record the order-edges |
API¶
- class soxspipe.commonutils.detect_order_edges.detect_order_edges(log, flatFrame, orderCentreTable, settings=False, recipeSettings=False, recipeName='soxs-mflat', verbose=False, qcTable=False, productsTable=False, tag='', sofName=False, binx=1, biny=1, extendToEdges=True, lampTag=False, startNightDate='', debug=False)[source][source]¶
Bases:
soxspipe.commonutils._base_detectusing a fully-illuminated slit flat frame detect and record the order-edges
Key Arguments:
log– loggersettings– the settings dictionaryrecipeSettings– the recipe specific settingsflatFrame– the flat frame to detect the order edges onorderCentreTable– the order centre tablerecipeName– name of the recipe as it appears in the settings dictionaryverbose– verbose. True or False. Default FalseqcTable– the data frame to collect measured QC metricsproductsTable– the data frame to collect output productstag– e.g. ‘_DLAMP’ to differentiate between UV-VIS lampssofName– name of the originating SOF filebinx– binning in x-axisbiny– binning in y-axisextendToEdges– if true, extend the order edge tracing to the edges of the frame (Default True)lampTag– add this tag to the end of the product filename (Default False)startNightDate– YYYY-MM-DD date of the observation night. Default “”
Usage:
from soxspipe.commonutils import detect_order_edges edges = detect_order_edges( log=log, flatFrame=flatFrame, orderCentreTable=orderCentreTable, settings=settings, recipeSettings=recipeSettings, recipeName="soxs-mflat", verbose=False, qcTable=False, productsTable=False, extendToEdges=True, lampTag=False ) productsTable, qcTable, orderDetectionCounts = edges.get()
Initialization
- calculate_residuals(orderPixelTable, coeff, axisACol, axisBCol, orderCol=False, writeQCs=False)[source]¶
- determine_lower_upper_edge_pixel_positions(orderData)[source][source]¶
from a pixel postion somewhere on the trace of the order centre, return the lower and upper edges of the order
Key Arguments:
orderData– one row in the orderTable
Return:
orderData– orderData with upper and lower edge xcoord arrays added
- determine_order_flux_threshold(orderData, orderPixelTable)[source][source]¶
determine the flux threshold at the central column of each order
Key Arguments:
orderData– one row in the orderTableorderPixelTablethe order table containing pixel arrays
Return:
orderData– orderData with min and max flux thresholds added
- fit_global_polynomial(pixelList, axisACol='cont_x', axisBCol='cont_y', orderCol='order', exponentsIncluded=False, writeQCs=False)[source]¶
- fit_order_polynomial(pixelList, order, axisBDeg, axisACol, axisBCol, exponentsIncluded=False)[source]¶
- get()[source][source]¶
get the detect_order_edges object
Return:
orderTablePath– path to the new order table
- plot_results(orderPixelTableUpper, orderPixelTableLower, orderPolyTable, orderMetaTable, clippedDataUpper, clippedDataLower)[source][source]¶
generate a plot of the polynomial fits and residuals
Key Arguments:
orderPixelTableUpper– the pixel table with residuals of fits for the upper edgesorderPixelTableLower– the pixel table with residuals of fits for the lower edgesorderPolyTable– data-frame of order-location polynomial coefforderMetaTable– data-frame containing the limits of the fitclippedDataUpper– the sigma-clipped data from upper edgeclippedDataLower– the sigma-clipped data from lower edge
Return:
filePath– path to the plot pdf