apero_mk_template_spirou¶
Contents¶
1. Description¶
SHORTNAME: MKTEMP
Template generation (mktemp)¶
Templates for each astrophysical object are created simply by shifting all observations (in BERV) from their nightly wavelength solution to the reference wavelength solution. This effectively creates a cube (In practice some astrophysical objects have thousands of observations so a median is done in parts, splitting into bins in time, combining the median cubes together to produce one final cube, to reduce computational requirements) of observations for specific astrophysical objects which are then normalized (per observation) by the median for each order.
We pass a low-pass filter over this cube and then the cube is reduced to a single 2D (extracted and telluric-corrected) spectrum by taking a median in the time dimension (across observations). The same process is done for the 1D spectrum. The 2D templates are copied to the telluric database for use in the rest of the telluric cleaning process (the second iterations of mktellu and ftellu), except if the BERV change throughout all epochs is below 8 \(km s^{-1}\). The 1D spectrum is saved as a useful output of APERO.
2. Schematic¶
No schematic set
3. Usage¶
apero_mk_template_spirou.py {objname}[STRING] {options}
{objname}[STRING] // [STRING] The object name to process
4. Optional Arguments¶
--filetype[EXT_E2DS,EXT_E2DS_FF,TELLU_OBJ] // [STRING] optional, the filetype (KW_OUTPUT) to use when processing files
--fiber[AB,A,B,C] // [STRING] optional, the fiber type to use when processing files
--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¶
name |
description |
HDR[DRSOUTID] |
file type |
basename |
fibers |
dbname |
dbkey |
input file |
---|---|---|---|---|---|---|---|---|
TELLU_TEMP |
Telluric 2D template file |
TELLU_TEMP |
.fits |
Template |
AB, A, B |
telluric |
TELLU_TEMP |
EXT_E2DS_FF, TELLU_OBJ |
TELLU_BIGCUBE |
Telluric object 2D stack file (star frame) |
TELLU_BIGCUBE |
.fits |
BigCube |
AB, A, B |
– |
– |
EXT_E2DS_FF, TELLU_OBJ |
TELLU_BIGCUBE0 |
Telluric object 2D stack file (Earth frame) |
TELLU_BIGCUBE0 |
.fits |
BigCube0 |
AB, A, B |
– |
– |
EXT_E2DS_FF, TELLU_OBJ |
TELLU_TEMP_S1DV |
Telluric 1D template file |
TELLU_TEMP_S1DV |
.fits |
Template_s1dv |
AB, A, B |
telluric |
TELLU_TEMP_S1DV |
EXT_E2DS_FF, TELLU_OBJ |
TELLU_TEMP_S1DW |
Telluric 1D template file |
TELLU_TEMP_S1DW |
.fits |
Template_s1dw |
AB, A, B |
telluric |
TELLU_TEMP_S1DW |
EXT_E2DS_FF, TELLU_OBJ |
TELLU_BIGCUBE_S1D |
Telluric object 1D stack file (Earth frame) |
TELLU_BIGCUBE_S1D |
.fits |
BigCube_s1d |
AB, A, B |
– |
– |
EXT_E2DS_FF, TELLU_OBJ |
8. Debug plots¶
EXTRACT_S1D
MKTEMP_BERV_COV
MKTEMP_S1D_DECONV
9. Summary plots¶
SUM_EXTRACT_S1D
SUM_MKTEMP_BERV_COV