Installing quick-look TripleSpec Extraction program --------------------------------------------------- 1) Un-tar the tsx.tar file. 2) Run 'make'. (You may want to change the '/home/tb/pgplot' to your local version. If the pgplot program fails to link, the main program 'tsx' should still exist.) 3) Set two environment variables: TSXDIR (location of tsx.tar directory) TSXOUT (location of program output, default will be in the current directory) Example: setenv TSXDIR /home/tb/tsx/ 4) Two programs should exist, 'tsx' and 'tsxplot'. 'tsx' will run without 'tsxplot', just use '-noplot' option. Running quick-look TripleSpec Extraction program --------------------------------------------------- -) Create a listing in your raw TripleSpec FITS data files: a) ls *.fits > file.ls b) tsx file.ls list=tsx.tbl This 'tsx.tbl' file will be used by the '-autob' option of tsx to locate the best 'B image' for a given 'A image'. You only need to do step 1) if you use the '-autob' option. -) Automatic extraction of point source: a) Example: 'tsx tspec0027 -autob -autox' (Selects B image, selects extraction range, creates spectra.) -) Manual selection of B image: a) Example: 'tsx tspec0027 tspec0028 -autox' (Uses tspec0028 as B image, automatically selects extraction range, and creates spectra.) -) Create profile only: a) Example: 'tsx tspec0027 tspec0028' (This creates *-pro#.tbl files that can be used to view spatial profile and select extraction window.) -) Manual selection of B image and extraction window: a) Example: 'tsx tspec0027 tspec0028 asp=-10.3,-5.8' (Uses tspec0028 as B image, use extraction window of -10.3 to -5.8 relative arcseconds (see profile data).) -) Manual extraction without a B image: a) Example: 'tsx tspec0027 asp=-10.3,-5.8' Description of Command Line Options ----------------------------------- -) Execute 'tsx' with no parameters to see a quick syntax. Syntax: tsx (raw TripleSpec FITS files) [ TripleSpec B file ] [ sp=pix,pix ] [ asp=arcsec,arcsec ] The optional 'B file' is another raw FITS file where the object has been moved to another position on the slit. If 1st argument ends with '.ls' then program assumes this is a file with a list of FITS files. Create a 'tsx.tbl' exposure listing using 'tsx file.ls list=tsx.tbl', where 'file.ls' is a listing of all raw TSPEC FITS files. Options: sp= : Specify region to spectrally extract (pixels on reddest order#3). asp= : Specify region to spectrally extract in arcseconds (any order). list= : Specify a file to which to write a 'table' listing of exposures. -autox : Automatically select extraction range and extract spectrum. -autob : Automatically select a B file (if a 'tsx.tbl' file exists). -noplot: Do not create PostScript plots (use if tsxplot not created). flat= : Normalized flat field. bk= : Specify region for background (pixels on reddest order #3). abk= : Specify region for background in arcseconds (any order). (bk= and abk= options may be repeated) -rbi : Write out re-binned image with variance and wavelengths. ac= : Root (e.g. 'tspec0045') of a Vega-type star for atmospheric correction. [ Version: 13-October-2014 ] Description of Output Files --------------------------- tspec#-pro#.tbl : profile data. (example: tspec0027-pro4.tbl for image number 27, echelle order 4 (H band)) tspec#-sp#.tbl : spectral data. (example: tspec0027-sp4.tbl for image number 27, echelle order 4 (H band)) tspec#-pro.ps : PostScript plot file of spatial profile of all 5 echelle orders. tspec#-sp.ps : PostScript plot file of spectra of all 5 echelle orders. Description of Table Columns ---------------------------- tspec#-pro#.tbl : row : row number starting at the lower row limit of the echelle order (row=0 is the first row of the slit and the smallest row number on the image.) arcsec : relative arcseconds, this is scaled and offset so the the object appears at the same value in each echelle order. flux : average of counts along dispersion direction (without B image subtraction). bfit : background fit (without B image subtraction). mask : background mask (if '1' this is assumed to be a background row). rawpix : not used- always zero. obj : initial guess at object window, not the same as window used by '-autox'. fmb : flux minus background fit, this is 'flux' minus 'bfit'. apix : adjusted pixel, an arbitrary number which aligns different echelle orders. flux_mb : same as 'flux', but with B image subtraction. bfit_mb : same as 'bfit', but with B image subtraction. fmb_mb : same as 'fmb', but with B image subtraction. xw : extraction window from '-autox' or given by 'sp=' or 'asp=' (1=extracted). tspec#-sp#.tbl : pix : pixel number (in reverse direction of column number, blue-to-red). wave : wavelength in microns. sum : sum of counts in the extraction window (minus background). s2n : signal-to-noise (1 sigma) per wavelength point. backgnd : spectrum of background at center of extraction window (after subtracting B image). cps : counts-per-second ('sum' column divided by exposure time). flux : (same as cps, for now). col : raw image column number. backgnd_nob: spectrum of background at center of extraction window (without subtracting B image-- this shows night sky lines). error : 1 sigma error estimate for 'sum of counts' spectrum. row : raw image row number (at center of extraction window). Arithmetic on Table Columns ---------------------- You can use the program 'tsxop' to perform simple operations on columns from tsx spectral output tables. It creates ASCII tables with wavelength, result, and error. Syntax: tsxop (operation) (root1) (root2) ... result=(filename) Operations: ave add sub mul div The 'root' name would be the filename before the '-sp.tbl' extension. So for example: tsxop add tspec0080 tspec0081 result=tspecadd would add up the files 'tspec0080-sp#.tbl' and 'tspec0081-sp#.tbl', and create files for each order called 'tspecadd-sp#.tbl'. The program uses the 'wave', 'sum', and 'error' columns from the original files. Operations are done in series, including subtraction and division. Last modified: 23 June 2014