Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
default_reduction [2013/09/05 05:53]
mjc
default_reduction [2025/07/03 00:44] (current)
onken Update for v2
Line 1: Line 1:
 ====== Default Data Reduction Steps ====== ====== Default Data Reduction Steps ======
 +
 +** In version 2 of PyWiFeS, the association of the pipeline steps with their particular file suffixes from the table below has been retained. But note that the final datacubes are renamed from p11.fits to cube.fits. In addition, regarding footnote C, standard stars are now identified by header keyword IMAGETYP='STANDARD' with a user option to also grab any IMAGETYP='OBJECT' exposures with sky positions close to the tabulated standard stars. **
  
 The default data reduction steps in 'reduce_red_data.py' and 'reduce_blue_data.py' are outlined below.  Most "steps" are numbered by the number of actual operations on data (e.g. step "1" ends when raw data goes through its first processing, and so on).  Sub-steps consist of the calibration calculations performed after the conclusion of the previous step, and the final sub-step is always when a new processing of data occurs (e.g., step 3 consists of numerous calibration steps that occur after bias subtraction at the end of step 2, but before creation of multi-extension fits -- MEF -- files at the end of step 3). The default data reduction steps in 'reduce_red_data.py' and 'reduce_blue_data.py' are outlined below.  Most "steps" are numbered by the number of actual operations on data (e.g. step "1" ends when raw data goes through its first processing, and so on).  Sub-steps consist of the calibration calculations performed after the conclusion of the previous step, and the final sub-step is always when a new processing of data occurs (e.g., step 3 consists of numerous calibration steps that occur after bias subtraction at the end of step 2, but before creation of multi-extension fits -- MEF -- files at the end of step 3).
Line 10: Line 12:
 |  //CAL//  |  'superbias'  | imcombine, generate_wifes_bias_fit | Creates super-bias from bias frame co-add, then fits a smooth model of the bias shape across entire detector. | |  //CAL//  |  'superbias'  | imcombine, generate_wifes_bias_fit | Creates super-bias from bias frame co-add, then fits a smooth model of the bias shape across entire detector. |
 |  **02**    'bias_sub'  | imarith | Subtracts master bias (or local bias) from science frames. | |  **02**    'bias_sub'  | imarith | Subtracts master bias (or local bias) from science frames. |
-|  //CAL//  |  'superflat'<sup>A</sup>  | x | x +|  //CAL//  |  'superflat'  | imcombine | Co-adds all flats (standard: median coadd).<sup>A</sup>
-|  //CAL//  |  'slitlet_profile' +|  //CAL//  |  'slitlet_profile' derive_slitlet_profiles Uses flat lamp to measure slitlet locations. 
-|  //CAL//  |  'flat_cleanup' +|  //CAL//  |  'flat_cleanup' interslice_cleanup Corrects contamination of flat lamp and sky flat data for internal light reflections inside the instrument. 
-|  //CAL//  |  'superflat_mef' +|  //CAL//  |  'superflat_mef' wifes_slitlet_mef Converts cleaned-up superflats into MEF files. 
-|  **03**    'slitlet_mef' +|  **03**    'slitlet_mef' wifes_slitlet_mef Converts all science frames into MEF files. 
-|  //CAL//  |   +|  //CAL//  |  'wave_soln'  derive_wifes_wave_solution [[data_reduction#wavelength_solution|Derives wavelength solution]] from arc lamp data, by default using the WiFeS optical model. | 
-|  **04**    'cosmic_rays' +|  //CAL//  |  'wire_soln'  | derive_wifes_wire_solution | Derives spatial zeropoint in the y-direction (along slitlet) from a wire frame. | 
-|  **05**    'sky_sub'<sup>B</sup>  | x | x +|  //CAL//  |  'flat_response'  | wifes_2dim_response | Uses lamp flat, sky flat, and wavelength solution to [[data_reduction#flat-fielding|derive flatfield response function]] for all slitlet. 
-|  **06**    'obs_coadd' +|  **04**    'cosmic_rays' lacos_wifes Identify and correct cosmic rays using the [[http://adsabs.harvard.edu/abs/2001PASP..113.1420V|LA Cosmic]] procedure developed by Pieter van Dokkum, as adapted to work with WiFeS data. 
-|  **07**    'flatfield' +|  **05**    'sky_sub'  | imarith | Raw subtraction of sky frame from science frame, or sky pixels from object pixels in nod-and-shuffle (appropriately scaled for exposure time).<sup>B</sup>
-|  **08**    'cube_gen' | x | +|  **06**    'obs_coadd' imcombine Co-add multiple observations of the same object or field, as defined by the metadata structure. 
-|  **09**    'flux_calib' +|  **07**    'flatfield' imarith Divide science data by the flatfield response function. 
-|  **10**    'telluric_corr' +|  **08**    'cube_gen' generate_wifes_cubes Rectify data onto square (x,y,λ) grid to [[data_reduction#data_cube_generation|create final data cube]]. | 
-|  **11**    'save_3dcube' |+|  //CAL//  |  'extract_stars'  | extract_wifes_stdstar | Automatically extract standard star spectrum from WiFeS data cube (uncalibrated). | 
 +|  //CAL//  |  'derive_calib'  | derive_wifes_calibration | Derive instrument sensitivity function from comparison of observed standard star fluxes to reference spectra.<sup>C</sup> 
 +|  **09**    'flux_calib' calibrate_wifes_cube Flux calibrate the data by applying instrument sensitivity function to science frames. | 
 +|  //CAL//  |  'extract_stars'  | extract_wifes_stdstar | Automatically extract standard star spectrum from WiFeS data cube (calibrated, but not telluric-corrected). | 
 +|  //CAL//  |  'derive_telluric'  | derive_wifes_telluric | Derive telluric feature corrections from flux-calibrated spectra of smooth-spectrum standard stars. 
 +|  **10**    'telluric_corr' apply_wifes_telluric Correct telluric absorption in all science frames. 
 +|  **11**    'save_3dcube' generate_wifes_3dcube Convert fully calibrated data into standard 3D fits data format, as preferred for ds9. |
  
 <sup>A</sup> "Superflat" procedures performed for both spectral (quartz lamp) flats and spatial (twilight) flats. <sup>A</sup> "Superflat" procedures performed for both spectral (quartz lamp) flats and spatial (twilight) flats.
  
 <sup>B</sup> Currently this step is a strict subtraction of object data and sky data (either "point-and-stare" or "nod-and-shuffle").  This is planned to be moved to after flat-fielding once a sophisticated sky-subtraction model procedure has been devised (part of PyWiFeS "Phase 2"). <sup>B</sup> Currently this step is a strict subtraction of object data and sky data (either "point-and-stare" or "nod-and-shuffle").  This is planned to be moved to after flat-fielding once a sophisticated sky-subtraction model procedure has been devised (part of PyWiFeS "Phase 2").
 +
 +<sup>C</sup> Identification of standard star spectra is done automatically by name matching from the 'OBJECT' header field to the list of stars in 'wifes_calib.py' Alternatively users can set the name of the standard stars in their calibration list manually.  Plans for PyWiFeS "Phase 2" include automatic identification based on target coordinates.