Contents:
Time-series photometric reduction for ground-based IR photometry and spectroscopy.
Assumes a single filter and a regular dither pattern (or ‘staring’), and sky (& dark) removal via subtraction of temporally adjacent frames.
Take raw NIR frames and output sky-subtracted, flat-fielded frames ready for photometry extraction.
Subtract sky (and dark) levels from a set of dithered exposures with equal exposure settings.
For now, compute a robust mean sky frame from each ndither set. Then subtract them, flat-field them, and output.
NOTE: unlike other reduction tasks, the input index here refers ONLY to science frames.
Add keyword to FITS header, without overwriting existing keys.
Inputs : |
|
---|
Initialize variables for ground-based IR data analysis.
obsname: (str) – e.g., 20091203k, 20091203h, ‘20120427_chip2’ cal : str
Valid options are ‘dome’ and ‘sky’, in case two sets of calibration files are available. If not, this option will have no effect.
Correct a set of IR array measurements for nonlinearity.
Inputs : |
|
---|---|
Outputs : | A Numpy array of the same shape as ‘measurement,’ but appropriately linearized following the algorithm of the reference below. If retall is True, the linearized measurement is the first element of a 2-tuple. |
Notes : | Vacca et al. recommend that this algorithm be applied _after_ dark current has been subtracted and flat-fielding performed. |
See_also : | |
Reference : | Vacca et al. 2004, PASP. |
Linearity correction curve for Subaru/MOIRCS detectors.
Inputs : |
|
---|---|
Notes : | This function should not be used to perform linearity corrections on MOIRCS data; for that, you should use linearity_correct() (for which this function is only a helper). |
See_also : | |
Reference : | Vacca et al. 2004, PASP. |
Make bad pixel mask from science frames.
list of filenames, in ADU (i.e., DN).
These files should already have been flat-fielded!
Helper function; input is list of FITS filenames and dark (to subtract).
Make f-map for linearity correction of Subaru/MOIRCS data.
Inputs : |
|
---|---|
Outputs : |
|
Reference : | Vacca et al. 2004, PASP. |
If an array is passed, return it. Otherwise, return a median stack of the input filename list.
Defringe multiple subregions in MOIRCS multi-object spectroscopy frames.
Tanaka-san’s prescription for inital calibration of MOIRCS images.
Inputs : |
|
---|---|
Example : |
|
Notes : |
|
As you may already know, making object mask is a critical part of the good median-sky data.
Perform inital calibration of MOIRCS spectroscopic data.
Inputs : |
|
---|---|
Example : |
|
Description : |
|
Notes : | Unfortunately, MOIRCS reduction is best done as a two-step process. First, set up the observations in initobs() using some standard, generic bad pixel mask (perhaps produced by makebadpixelmask_darks()); reduce the data using this routine. From the reduced, flattened data, generate a second (higher-fidelity) bad pixel map (using makebadpixelmask_science()). Combine these two bad pixel masks (and perhaps, as well, the appropriate mask from the MOIRCS instrument website). Insert the proper reference to this in initobs(), and then re-reduce the data. |
Extract spectra from a calibrated MOIRCS multi-object frame.
Inputs : |
|
---|---|
Options : |
|
Output : | For each frame, an object will be returned with various interesting and useful fields. The ‘specs’ field will contain a list (one per subregion), for which each element is the output of spec.optspecextr_idl(). |
To_do : | Allow the routine to write files to disk, and update FITS headers (writefns, returnspec). Do better at finding the spectral trace. |
Requirements : | |
See_also : | |
Example : |
|
Compute and return MOSFIRE reference pixel values, from individual readouts.
Inputs : |
|
---|---|
Options : |
|
Outputs : | a length-32 Numpy array. |
Notes : | For a filename ‘frame.fits’, reads in the file as well as the individual CDS reads “frame_001.fits” and “frame_002.fits”. Computes the difference between (frame - (frame002-frame001)), and uses it to return the reference pixel bias levels. |
Perform inital calibration of MOSFIRE spectroscopic data.
Inputs : |
|
---|---|
Example : |
|
Description : |
|
Notes : | Unfortunately, MOSFIRE reduction is best done as a two-step process. First, set up the observations in initobs() using some standard, generic bad pixel mask (perhaps produced by makebadpixelmask_darks()); reduce the data using this routine. From the reduced, flattened data, generate a second (higher-fidelity) bad pixel map (using makebadpixelmask_science()). Combine these two bad pixel masks (and perhaps, as well, the appropriate mask from the MOIRCS instrument website). Insert the proper reference to this in initobs(), and then re-reduce the data. |
Python script to call Pyraf and extract spectra from a file.
Inputs : |
|
---|
Combine dark frames into a single dark frame:
Dark-correct flats, make normalized super-flat.
Combine numbered super-flats into a single flat.
Dark-subtract science frames.
I don’t currently use this (Jan 2010)