autoreduce¶
-
pydis.
autoreduce
(speclist, flatlist='', biaslist='', HeNeAr_file='', stdstar='', trace_recenter=False, trace_interac=True, trace1=False, ntracesteps=15, airmass_file='apoextinct.dat', flat_mode='spline', flat_order=9, flat_response=True, apwidth=8, skysep=3, skywidth=7, skydeg=0, HeNeAr_prev=False, HeNeAr_interac=True, HeNeAr_tol=20, HeNeAr_order=3, display_HeNeAr=False, std_mode='spline', std_order=12, display_std=False, trim=True, write_reduced=True, display=True, display_final=True, HeNeAr_second_pass=True, silent=True)[source]¶ A wrapper routine to carry out the full steps of the spectral reduction and calibration. Steps include: 1) combines bias and flat images 2) maps wavelength in the HeNeAr image 3) perform simple image reduction: Data = (Raw - Bias)/Flat 4) trace spectral aperture 5) extract spectrum 6) measure sky along extracted spectrum 7) apply flux calibration 8) write output files
- Parameters
- specliststr
Path to file containing list of science images.
- flatliststr
Path to file containing list of flat images.
- biasliststr
Path to file containing list of bias images.
- HeNeAr_filestr
Path to the HeNeAr calibration image
- stdstarstr
Name of the standard star to use for flux calibration. If nothing is entered for “stdstar”, no flux calibration will be computed. (Default is ‘’). NOTE1: must include the subdir for the star, e.g. ‘spec50cal/feige34’. NOTE2: Assumes the first star in “speclist” is the standard star.
- trace1bool, optional
use trace1=True if only perform aperture trace on first object in speclist. Useful if e.g. science targets are faint, and first object is a bright standard star. Note: assumes star placed at same position in spatial direction. (Default is False)
- trace_recenterbool, optional
If trace1=True, set this to True to allow for small linear adjustments to the trace (default is False)
- trace_interacbool, optional
Set to True if user should interactively select aperture center for each object spectrum. (Default is True)
- ntracestepsint, optional
Number of bins in X direction to chop image into. Use fewer bins if ap_trace is having difficulty, such as with faint targets (default here is 25, minimum is 4)
- apwidthint, optional
The width along the Y axis of the trace to extract. Note: a fixed width is used along the whole trace. (default here is 3 pixels)
- skysepint, optional
The separation in pixels from the aperture to the sky window. (Default is 25)
- skywidthint, optional
The width in pixels of the sky windows on either side of the aperture. (Default is 75)
- HeNeAr_interacbool, optional
Should the HeNeAr identification be done interactively (manually)? (Default here is False)
- HeNeAr_tolint, optional
When in automatic mode, the tolerance in pixel units between linelist entries and estimated wavelengths for the first few lines matched… use carefully. (Default here is 20)
- HeNeAr_orderint, optional
The polynomial order to use to interpolate between identified peaks in the HeNeAr (Default is 2)
- display_HeNeArbool, optional
- std_modestr, optional
Fit mode to use with the flux standard star. Options are ‘spline’ and ‘poly’ (Default is ‘spline’)
- std_orderint, optional
The order of polynomial to fit, if std_mode=’poly’. (Default is 12)
- display_stdbool, optional
If set, display plots of the flux standard being fit (Default is False)
- trimbool, optional
Trim the image using the DATASEC keyword in the header, assuming has format of [0:1024,0:512] (Default is True)
- write_reducedbool, optional
Set to True to write output files, including the .spec file with columns (wavelength, flux); the .trace file with columns (X pixel number, Y pixel of trace); .log file with record of settings used in this routine for reduction. (Default is True)
- displaybool, optional
Set to True to display intermediate steps along the way. (Default is True)
- display_finalbool, optional
Set to False to suppress plotting the final reduced spectrum to the screen. Useful for running in quiet batch mode. (Default is True)