TRES spectra

Processing TRES Spectrograph Data
Jessica Mink, 2023-May-08 2018-October-22

Telescope Data Center
TRES ThAr Image
[TDC Home]  [TDC Search] [OIR Home]
[Observation] [IDL Pipeline)] (Software) [Archive]

[TRES Data Directories] [Raw Data Keywords] [Reduced Data Keywords]

All TRES data since July 6, 2020 has been reduced this way

Task

Commands to Reduce Last Night's Data

3. Check TRES spectra, removing cosmic rays, hot pixels, and bright sky lines

  1. tplot1 [yyyy-mm-dd] [order] runs tresplot on single-exposure spectra listed in file1.list by reduce_tresin the working reduction directory, tred/[yyyy-mm-dd] for one night of reduced data, starting from the specified order. If no arguments are present, last night's data is plotted starting with the first order.
    Night sky emission lines and hot pixels are removed by default from this bad pixel list. Spectra with only one exposure are most likely to need cosmic rays removed.

  2. tplotn [yyyy-mm-dd] [order] runs tresplot on multiple-exposure spectra listed in filen.list by reduce_tresin the working reduction directory, tred/[yyyy-mm-dd] for one night of reduced data, starting from the specified order. If no arguments are present, last night's data is plotted starting for the first order.
    Night sky emission lines and hot pixels are removed by default from this bad pixel list. Spectra made up of multiple exposures are most likely to show cosmic rays in very long exposures with low counts.

Both scripts work in the reduction directory for reduced data from last night or the night of the specified date.
  • twcd goes to the working directory for last night if this is in .myrc:
    alias   twcd     'treswd $*; source ~/.treswd'
    

  • tresplot @file1.list 1 and tresplot @filen.list 1 check the results on a computer running Linux 3.0 or above. The tresplot script uses the tres.tresplot task in the IRAF2.16.1 tres package. It uses rvsao.emsao the same way that the FAST qplot script does, but on earlier IRAF systems, the script doesn't work on multi-order spectra. Bright hot pixels and night sky emission lines on this list are automatically removed.

    Go here for tresplot examples.

    Run through the 51 TRES orders using the ")" command and stop if you see an out-of-place narrow emission line. If you miss something and pass an order, you can go back using "(". If you are processing file1.list, if is probably an artifact. Zoom in by placing the cursor to the left of the line and entering "z" and to the right and entering "z". If it is only one or two pixels wide, fix it by typing "," where you think the data should be. Then type "u" to see the full order, and remove any other artifacts the same way. When you wrap around back to order 1, type "q" to go to the next spectrum on the list. After you look at the last spectrum, tresplot will exit and you will see the command line prompt.

Cursor commands include the following.
  • "(" and ")" move through the orders of each spectrum, wrapping around from first to last or last to first order, depending which way you are going.
  • "z" on the left and "z" on the right zooms in on a region of a spectra.
  • "," replaces the pixel under the cursor with the value where the cursor is.
  • "d" on the left and "d" on the right replaces multiple points in between.
  • "q" moves on to the next spectrum, writing the current results.
  • "x" moves on to the next spectrum without writing the results from the current order.
  • "?" lists all cursor commands.

1. Create and catalog TRES raw data archive

2. Run TRES reduction and classification IDL pipeline

4. Re-run TRES classification IDL pipeline

5. Run multi-order cross-correlations of red TRES spectra

6. Run multi-order cross-correlations of selected TRES spectra

Check last night's data to find out how many spectra will result from only one observation.

> tws 2023-04-20
Listing 32 spectrum FITS files in tred/2023-04-20 by RFN
20230420.0002 7 172 sky_2023-04-20_23h24m57s_cb.spec.fits
20230420.0047 3 5.5000 Sirius_2023-04-21_02h52m23s_cb.spec.fits
20230420.0051 3 250 H38230_2023-04-21_02h58m30s_cb.spec.fits
20230420.0056 3 2000 T0192982424_2023-04-21_03h12m39s_cb.spec.fits
20230420.0060 3 195 H65583_2023-04-21_03h54m11s_cb.spec.fits
20230420.0065 3 1100 HD93380_2023-04-21_04h06m56s_cb.spec.fits
20230420.0069 3 3200 HD93380B_2023-04-21_04h32m32s_cb.spec.fits
20230420.0073 3 2400 BA022322550_2023-04-21_05h32m54s_cb.spec.fits
20230420.0077 3 675 HD104957_2023-04-21_06h26m08s_cb.spec.fits
20230420.0081 3 360 HD105601_2023-04-21_06h42m03s_cb.spec.fits
20230420.0085 3 720 HD112431_2023-04-21_06h53m06s_cb.spec.fits
20230420.0089 3 120 H127334_2023-04-21_07h12m45s_cb.spec.fits
20230420.0094 3 300 W44785_2023-04-21_07h22m52s_cb.spec.fits
20230420.0098 3 300 W41153_2023-04-21_07h33m12s_cb.spec.fits
20230420.0102 3 510 W13695_2023-04-21_07h43m42s_cb.spec.fits
20230420.0106 3 225 W33207_2023-04-21_07h58m39s_cb.spec.fits
20230420.0110 3 300 W60039_2023-04-21_08h09m35s_cb.spec.fits
20230420.0114 3 450 W50652_2023-04-21_08h24m46s_cb.spec.fits
20230420.0118 3 300 W25140_2023-04-21_08h41m17s_cb.spec.fits
20230420.0122 4 1400 W34568_2023-04-21_08h53m03s_cb.spec.fits
20230420.0127 3 180 W50769_2023-04-21_09h23m13s_cb.spec.fits
20230420.0131 3 450 W23311_2023-04-21_09h31m06s_cb.spec.fits
20230420.0135 3 450 W25011_2023-04-21_09h45m31s_cb.spec.fits
20230420.0139 3 450 HD144999_2023-04-21_09h59m11s_cb.spec.fits
20230420.0143 3 300 HD158116_2023-04-21_10h11m12s_cb.spec.fits
20230420.0147 3 825 HD188593_2023-04-21_10h21m49s_cb.spec.fits
20230420.0151 3 2000 T0065737977_2023-04-21_10h42m07s_cb.spec.fits
20230420.0155 3 1100 T0193979250_2023-04-21_11h19m41s_cb.spec.fits
20230420.0159 3 120 HD185144_2023-04-21_11h43m25s_cb.spec.fits
20230420.0164 3 225 HIP093984_2023-04-21_11h52m51s_cb.spec.fits
20230420.0167 1 60 HIP099841_2023-04-21_11h58m42s_cb.spec.fits
20230420.0169 3 12 Vega_2023-04-21_12h04m07s_cb.spec.fits
Check single-exposure spectra first because they're the most work.


> tplot1 2023-04-20
tred/2024-03-20
Plotting 1 single-exposture TRES spectrum on 2024-04-20 from order 1
IRAF rvsao.emsao 2.8.5 @fleming  27-Apr-2023 15:20

File: HIP099841_2023-04-21_11h58m42s_cb.spec.fits 1 
Object: HIP099841_1  RA: 20:15:23.70 Dec: 33:43:44.0 2000.0
Observed 2023-Apr-21 11:59:12.00 = JD 2460055.9994 BCV:   0.00
No emission lines found

File: HIP099841_2023-04-21_11h58m42s_cb.spec.fits 2 
Object: HIP099841_2  RA: 20:15:23.70 Dec: 33:43:44.0 2000.0
Observed 2023-Apr-21 11:59:12.00 = JD 2460055.9994 BCV:   0.00
No emission lines found

File: HIP099841_2023-04-21_11h58m42s_cb.spec.fits 3 
Object: HIP099841_3  RA: 20:15:23.70 Dec: 33:43:44.0 2000.0
Observed 2023-Apr-21 11:59:12.00 = JD 2460055.9994 BCV:   0.00
No emission lines found
Remove any cosmic rays which come up, usually one or two pixels wide.
Zoom region around the cosmic ray using "z" to the left and "z" to the right of the peak.
HIP099841 order 3 with cosmic ray HIP099841 order 3 zoomed around cosmic ray
Take out the cosmic ray using a "," or two under the peak at the base. This took two.
Unzoom using the "u" key and move on to the next order of the spectrum using ")".
HIP099841 order 3 zoomed around removed cosmic ray HIP099841 order 3 unzoomed with cosmic ray removed

File: HIP099841_2023-04-21_11h58m42s_cb.spec.fits 4 
Object: HIP099841_4  RA: 20:15:23.70 Dec: 33:43:44.0 2000.0
Observed 2023-Apr-21 11:59:12.00 = JD 2460055.9994 BCV:   0.00
No emission lines found

File: HIP099841_2023-04-21_11h58m42s_cb.spec.fits 5 
Object: HIP099841_5  RA: 20:15:23.70 Dec: 33:43:44.0 2000.0
Observed 2023-Apr-21 11:59:12.00 = JD 2460055.9994 BCV:   0.00
No emission lines found

...


File: HIP099841_2023-04-21_11h58m42s_cb.spec.fits 21 
Object: HIP099841_21  RA: 20:15:23.70 Dec: 33:43:44.0 2000.0
Observed 2023-Apr-21 11:59:12.00 = JD 2460055.9994 BCV:   0.00
No emission lines found
HIP099841_2023-04-21_11h58m42s_cb.spec.fits[21]: Replacing pixel 1576=5053.059A with 3487.9819336
HIP099841_2023-04-21_11h58m42s_cb.spec.fits[21]: Replacing pixel 1577=5053.078A with 3436.2561035
Here's another cosmic ray on a spectrum where three hot pixels have been removed automatically.
Zoom region around the cosmic ray using "z" to the left and "z" to the right of the peak.
HIP099841 order 21 with cosmic ray HIP099841 order 21 zoomed around cosmic ray
Take out the cosmic ray using a "," or two under the peak at the base. This took two.
Unzoom using the "u" key and move on to the next order of the spectrum using ")".
HIP099841 order 21 zoomed around removed cosmic ray HIP099841 order 21 unzoomed with cosmic ray removed
. . .

File: HIP099841_2023-04-21_11h58m42s_cb.spec.fits 31 
Object: HIP099841_31  RA: 20:15:23.70 Dec: 33:43:44.0 2000.0
Observed 2023-Apr-21 11:59:12.00 = JD 2460055.9994 BCV:   0.00
No emission lines found

File: HIP099841_2023-04-21_11h58m42s_cb.spec.fits 32 
Object: HIP099841_32  RA: 20:15:23.70 Dec: 33:43:44.0 2000.0
Observed 2023-Apr-21 11:59:12.00 = JD 2460055.9994 BCV:   0.00
No emission lines found
Sometimes there are three cosmic rays in one in one order!
Remove each of them the same way.
HIP099841 order 32 with cosmic rays HIP099841 order 32 with cosmic rays
After order 51, the next ")" will send you back to order 1. Type "q" to move on to the next spectrum. When you reach the end of the input list, you will be returned to the system prompt and can start running tplotn.

File: HIP099841_2023-04-21_11h58m42s_cb.spec.fits 51 
Object: HIP099841_51  RA: 20:15:23.70 Dec: 33:43:44.0 2000.0
Observed 2023-Apr-21 11:59:12.00 = JD 2460055.9994 BCV:   0.00
No emission lines found

File: HIP099841_2023-04-21_11h58m42s_cb.spec.fits 1 
Object: HIP099841_1  RA: 20:15:23.70 Dec: 33:43:44.0 2000.0
Observed 2023-Apr-21 11:59:12.00 = JD 2460055.9994 BCV:   0.00
No emission lines found
> tplotn