My Reduced IGRINS Data Looks Bad!
This page will outline various IGRINS data reduction troubleshooting methods the IGRINS team uses to figure out where a data reduction has gone wrong.
Table of Contents:
Persistent Telluric Residuals
Telluric Residuals describe the atmospheric features that can appear in reduced spectra when you divide an IGRINS target spectrum by an IGRINS A0V spectrum taken on the same night (usually around the same time and same airmass as the target). While IGRINS PLP v3 usually significantly reduces the appearance of telluric residuals, due to the new flexure correction, very rarely will these features entirely disappear as the atmosphere changes rapidly throughout a night of observation. Here we outline troubleshooting for if telluric residuals remain overwhelmingly large in data reduced by IGRINS PLP v3:
Check the paper logs (RRISA v3) to see if there were any issues with weather, focusing, guiding, etc. throughout the observation. Check for any bad frames included in your reduction that are highlighted in the night log.
Check if other reduced data files from the night have similar issues as your reduced data. If all the reduced data shares a similar non-ideal feature check the sky frame for the night. (See example in the Tutorials Telluric Residuals Section 1 on the RRISA Website)
Check that the sky frame used for the reduction in the night is a dim target (!!), high exposure frame(s) (>= 300 sec) if a dedicated sky frame was not taken. Visually inspect the sky frame to make sure the OH lines are visible and bright.
If you find issues with the sky frame, try changing it to a different dim high exposure frame taken in the night or follow the directions in the Tips section of Creating a Recipe File for Beginners to borrow a sky frame from a different night for your reduction.
Check if other stars that share the same A0V star have similar data issues. If only the data that shares the same standard star has an issue try using a different standard star for your A0V division or, if that particular standard star is the only one close in airmass observed for the night, check the standard data quality using Steps 1, 4… and re-reduce accordingly.
If you reduced the data yourself with IGRINS PLP v3, check the telluric_shift_[H or K]. csv file to make sure no file numbers included in your reduction have a high shift value. You can also request this file for a particular night (pre-RRISA v4) by emailing igrinscontact@gmail.com. (See examples of what a telluric shift between frames can look like in the Tutorial Telluric Residuals Section 3 on the RRISA Website.)
A high value is generally larger than a 0.4 variation and indicates that there is a significant shift in the telluric absorption lines between the compared frames (first column is the shifted file number when compared to the reference frame file number in the second column).
A high value means that the target wavelength solution is changing over the span of the observation and is usually related to bad PSF or slit illumination issues (the target is not centered on the slit).
If you find that your reduced data includes a frame with a high telluric shift, you should remove that frame and re-reduce the data to see if there is any improvement.
Check the airmass difference between your target and standard star, if it is over 0.1 try changing the standard star used in your A0V division. (See an example of persistent telluric residuals due to a difference in airmass in the Tutorial Telluric Residuals Section 2 on the RRISA Website.)
If there are no better standard star options for the night you will have to fit some sort of atmospheric model to reduce the residuals in your data.
Optimal Extraction Doesn’t Work As Expected
If you are reducing point sources, it’s common to use the STELLAR_AB/STELLAR_ONOFF (or for standards A0V_AB/A0V_ONOFF) recipes. This recipe uses something called “optimal extraction” which is common practice in reducing data from echelle spectrographs. Optimal extraction uses an average profile of the trace across an entire order to develop weights that down weight areas of the spectra with little flux (noisy) and increases weight in the areas of the spectra with lots of signal when the 1D spectra is extracted. Generally this increases the signal-to-noise (SNR) of extracted 1D spectra over typical summed over the spatial pixel extractions.
Sometimes the optimal extraction for a spectra will fail due to a variety of reasons including: defocusing of the instrument (ie. IGRINS K-band data between April 2018 and May 2019) in combination with defocusing of the telescope, trace width variation across the order, or the object is actually extended, etc. This can produce non-physical features in 1D IGRINS spectral products (ie. .spec.fits and .spec_a0v.fits) in the most extreme cases and show up as significant “jumps” between edges of consecutive orders due to a non-physical trend in the continuum of each order.
There could be more sneaky issues with slit illumination (ie. your target is not centered on the IGRINS slit during observing) that cause similar, but smaller effect, continuum issues--but examples of this are currently unclear and perhaps mixed with other combinations of the above mentioned issues making the affect on the 1D spectra from this issue alone uncharacterized at present.
Fixing Issues with Optimal Extraction
The solution is to not optimally extract the data! In the recipe log, you can change the recipe from something like STELLAR_AB/STELLAR_ONOFF to EXTENDED_AB/EXTENDED_ONOFF and re-reduce the data using IGRINS PLP v3 and the issue should be resolved. The EXTENDED recipes sum the flux along the spatial direction to collapse it into 1D meaning that while the SNR of the spectra will go down slightly (since more noise is included than in the optimal extraction) the data can be entirely recovered.
It is possible that you will have to use the EXTENDED recipe to also extract the accompanying A0V star if the optimal extraction also failed on the A0V (usually indicative of some wider-spread data quality issue throughout the night), otherwise you can continue to use optimal extraction on the A0V star.
You will have to manually divide the 1D target spectrum by the standard spectrum if that is required for your science as the EXTENDED recipes do not allow for A0V division in the IGRINS PLP v3, but this can be done easily in muler.