reduce module
reduce module provides a function for doing quick reduction, including basic data reduction, extraction, and addition of wavelength calibration and response function.
Module functions
- reduce.specreduce(n, red=None, trace=None, wav=None, retrace=False, cr=True, scat=False, response=None, write=False, outdir='reduced', display=None, clobber=False, twod=False, wav_rmsmax=0.003)[source]
Quick reduction
- Parameters:
n (str or int) – number or name of file to reduce
red (Reducer object, default=None) – pyvista imred.Reducer object for doing basic reduction
trace (Trace object, default=None) – pyvista spectra.Trace object for extraction
wav (WaveCal object, default=None) – pyvista spectra.WaveCal object for wavelength calibration
retrace (bool, default=False) – set to True to retrace on object
cr (bool, default=True) – set to True to do CR cleaning
scat (bool, default=False) – set to True to do scattered light correction
response (pyvista Data object, default=None) – response function to load into output
write (bool, default=False) – set to True to write extracted frame to disk
display (pyvista TV object, default=None) – if given, display data during reduction, and pause for inspection
clobber (bool, default=False) – if True, re-reduce objects even if output file exists already
- reduce.throughput(spec, ax, name, mag=None, song=None, red=None, orders=[34])[source]
Reduce and add plot of extracted spectrum, throughput, and S/N for an image to existing Axes
- Parameters:
ax (Axes[3]) – matplotlib Axes to plot into
i (int or str) – number or name of file to reduce
name (str) – name for plot legend
mag (float, default=None) – magnitude of object to compute throughput, if not given, query database
orders (list, default=[34]) – Order(s) to plot
- reduce.throughput_all(mjd=None, hard=None, iodine=True, open=True)[source]
Make plot of throughput from database query