apero_fit_tellu_spirou

Contents

1. Description

SHORTNAME: FTELLU

Correcting telluric absorption (ftellu)

All hot stars and science targets are corrected for telluric absorption. The first step, as with mktellu, is the pre-cleaning correction. Then, we correct the residuals of the pre-cleaning at any given wavelength by fitting a linear combination of water and dry components. We assume that any given absorption line in the TAPAS absorption spectrum has a strength that is over or underestimated relative to reality, the residuals after correction will scale, as a first order, with the absorption of the chemical species. The same is true with line profiles; if the wings of a line are over or underestimated, the residuals will scale with absorption We correct the telluric absorption on the combined AB extracted spectrum and subsequently use the same reconstructed absorption (for fiber AB) to correct the extracted spectra for fibers A and B individually.

2. Schematic

No schematic set

3. Usage

apero_fit_tellu_spirou.py {obs_dir}[STRING] [FILE:EXT_E2DS,EXT_E2DS_FF] {options}
{obs_dir}[STRING] // [STRING] The directory to find the data files in. Most of the time this is organised by nightly observation directory
[FILE:EXT_E2DS,EXT_E2DS_FF] // [STRING/STRINGS] A list of fits files to use separated by spaces. Currently  allowed types: E2DS, E2DSFF

4. Optional Arguments

--use_template[True/False] // Whether to use the template provided from the telluric database
--template[FILE:TELLU_TEMP] // Filename of the custom template to use (instead of from telluric database)
--finiteres[True/False] // Whether to do the finite resolution correction (Always false if no template)
--onlypreclean // Only run the precleaning steps (not recommended - for debugging ONLY)
--database[True/False] // [BOOLEAN] Whether to add outputs to calibration database
--blazefile[FILE:FF_BLAZE] // [STRING] Define a custom file to use for blaze correction. If unset uses closest file from calibDB. Checks for an absolute path and then checks 'directory' (CALIBDB=BADPIX)
--plot[0>INT>4] // [INTEGER] Plot level. 0 = off, 1 = interactively, 2 = save to file
--wavefile[FILE:WAVESOL_REF,WAVE_NIGHT,WAVESOL_DEFAULT] // [STRING] Define a custom file to use for the wave solution. If unset uses closest file from header or calibDB (depending on setup). Checks for an absolute path and then checks 'directory'
--no_in_qc // Disable checking the quality control of input files

5. Special Arguments

--xhelp[STRING] // Extended help menu (with all advanced arguments)
--debug[STRING] // Activates debug mode (Advanced mode [INTEGER] value must be an integer greater than 0, setting the debug level)
--listing[STRING] // Lists the night name directories in the input directory if used without a 'directory' argument or lists the files in the given 'directory' (if defined). Only lists up to 15 files/directories
--listingall[STRING] // Lists ALL the night name directories in the input directory if used without a 'directory' argument or lists the files in the given 'directory' (if defined)
--version[STRING] // Displays the current version of this recipe.
--info[STRING] // Displays the short version of the help menu
--program[STRING] // [STRING] The name of the program to display and use (mostly for logging purpose) log becomes date | {THIS STRING} | Message
--recipe_kind[STRING] // [STRING] The recipe kind for this recipe run (normally only used in apero_processing.py)
--parallel[STRING] // [BOOL] If True this is a run in parellel - disable some features (normally only used in apero_processing.py)
--shortname[STRING] // [STRING] Set a shortname for a recipe to distinguish it from other runs - this is mainly for use with apero processing but will appear in the log database
--idebug[STRING] // [BOOLEAN] If True always returns to ipython (or python) at end (via ipdb or pdb)
--ref[STRING] // If set then recipe is a reference recipe (e.g. reference recipes write to calibration database as reference calibrations)
--crunfile[STRING] // Set a run file to override default arguments
--quiet[STRING] // Run recipe without start up text
--nosave // Do not save any outputs (debug/information run). Note some recipes require other recipesto be run. Only use --nosave after previous recipe runs have been run successfully at least once.
--force_indir[STRING] // [STRING] Force the default input directory (Normally set by recipe)
--force_outdir[STRING] // [STRING] Force the default output directory (Normally set by recipe)

6. Output directory

DRS_DATA_REDUC // Default: "red" directory

7. Output files

Outputs

name

description

HDR[DRSOUTID]

file type

suffix

basename

fibers

dbname

dbkey

input file

ABSO_NPY

Telluric absorption temporary file 1

.npy

tellu_save.npy

ABSO1_NPY

Telluric absorption temporary file 2

.npy

tellu_save1.npy

TELLU_OBJ

Telluric corrected extracted 2D spectrum

TELLU_OBJ

.fits

_e2dsff_tcorr

AB, A, B

telluric

TELLU_OBJ

EXT_E2DS_FF

SC1D_W_FILE

Telluric corrected extracted 1D spectrum (constant wavelength binning)

SC1D_W_FILE

.fits

_s1d_w_tcorr

AB, A, B

EXT_E2DS_FF

SC1D_V_FILE

Telluric corrected extracted 1D spectrum (constant velocity binning)

SC1D_V_FILE

.fits

_s1d_v_tcorr

AB, A, B

EXT_E2DS_FF

TELLU_RECON

Telluric reconstructed 2D absorption file

TELLU_RECON

.fits

_e2dsff_recon

AB, A, B

telluric

TELLU_RECON

EXT_E2DS_FF

RC1D_W_FILE

Telluric reconstructed 1D absorption file (constant wavelength binning)

RC1D_W_FILE

.fits

_s1d_w_recon

AB, A, B

EXT_E2DS_FF

RC1D_V_FILE

Telluric reconstructed 1D absorption file (constant velocity binning)

RC1D_V_FILE

.fits

_s1d_v_recon

AB, A, B

EXT_E2DS_FF

TELLU_SCLEAN

Sky-cleaning file

TELLU_SCLEAN

.fits

_tellu_sclean.fits

EXT_E2DS_FF

TELLU_PCLEAN

Telluric pre-cleaning file

TELLU_PCLEAN

.fits

_tellu_pclean

AB, A, B

telluric

TELLU_PCLEAN

EXT_E2DS_FF

8. Debug plots

TELLU_SKY_CORR_PLOT
EXTRACT_S1D
EXTRACT_S1D_WEIGHT
FTELLU_PCA_COMP1
FTELLU_PCA_COMP2
FTELLU_RECON_SPLINE1
FTELLU_RECON_SPLINE2
FTELLU_WAVE_SHIFT1
FTELLU_WAVE_SHIFT2
FTELLU_RECON_ABSO1
FTELLU_RECON_ABSO2
TELLUP_WAVE_TRANS
TELLUP_ABSO_SPEC
TELLUP_CLEAN_OH
FTELLU_RES_MODEL
TELLU_FINITE_RES_CORR

9. Summary plots

SUM_EXTRACT_S1D
SUM_FTELLU_RECON_ABSO
SUM_TELLUP_WAVE_TRANS
SUM_TELLUP_ABSO_SPEC
SUM_FTELLU_RES_MODEL