flatcombine¶
-
pydis.
flatcombine
(flatlist, bias, output='FLAT.fits', trim=True, mode='spline', display=True, flat_poly=5, response=True, Saxis=1)[source]¶ Combine the flat frames in to a master flat image. Subtracts the master bias image first from each flat image. Currently only supports median combining the images.
- Parameters
- flatliststr
Path to file containing list of flat images.
- biasstr or 2-d array
Either the path to the master bias image (str) or the output from 2-d array output from biascombine
- outputstr, optional
Name of the master flat image to write. (Default is “FLAT.fits”)
- responsebool, optional
If set to True, first combines the median image stack along the spatial (Y) direction, then fits polynomial to 1D curve, then divides each row in flat by this structure. This nominally divides out the spectrum of the flat field lamp. (Default is True)
- trimbool, optional
Trim the image using the DATASEC keyword in the header, assuming has format of [0:1024,0:512] (Default is True)
- displaybool, optional
Set to True to show 1d flat, and final flat (Default is False)
- flat_polyint, optional
Polynomial order to fit 1d flat curve with. Only used if response is set to True. (Default is 5)
- Saxisint, optional
Set which axis the spatial dimension is along. 1 = Y axis, 0 = X. (Default is 1)
- Returns
- flat2-d array
The median combined master flat