Wrap files explained
Wrap files are how we tell LBL what to do.
They are run as a standard python script.
You therefore can add more python code (i.e. for loops) or anything else you wish.
After running lbl_setup you will have a wrap file created (and/or you can download one from one of the demos).
Below we give a brief description of all available parameters that you should understand before running LBL.
INSTRUMENT
The instrument name
Set by lbl_setup (if run)
e.g. SPIROU, HARPS, ESPRESSO, CARMENES, NIRPS_HA, NIRPS_HE, HARPSN, MAROONX, SOPHIE, CORALIE
Only one set per wrap file
DATA_SOURCE
Describes which flavour of data reduction was used (and sometimes instrument mode)
Set by lbl_setup (if run)
Depends on instrument (see here: Input data)
e.g. for SPIRou we have APERO and CADC data formats
If no data source needed set this to None
Only one set per wrap file
DATA_DIR
Describes the root directory for LBL to read input and save output data to
Set by lbl_setup (if run)
Only one set per wrap file
OBJECT_SCIENCE
Corresponds to the science name
Must have a corresponding directory in the {DATA_DIR}/science/ directory with valid input data.
Must in in a python list (e.g. can define multiple targets)
e.g. "Gl699"
DATA_TYPES
'SCIENCE’ if the code is not used for measuring calibration drifts in the instrument (other options are 'FP' or 'LFC' currently)
Must be:
a python list (e.g. can define multiple targets) the same length as OBJECT_SCIENCE
or single python string that is used for all OBJECT_SCIENCE
e.g. "SCIENCE"
OBJECT_TEMPLATE
Should be either identical to params[‘SCIENCE’] or another target of similar spectral type that has a high-quality template
Must either generate this template using LBL (and thus provide science data for it) or copy the template to the {DATA_DIR}/templates directory.
Must be:
a python list (e.g. can define multiple targets) the same length as OBJECT_SCIENCE
or single python string that is used for all OBJECT_SCIENCE
e.g. "Gl699"
OBJECT_TEFF
An approximate temperature for each science target in params[‘SCIENCE’]. Does not need to be accurate, simply use a value from SIMBAD or from spectral time. This value is used to compare the template with a stellar model to derive a systemic velocity. The value has no impact on differential velocities.
Must be:
a python list (e.g. can define multiple targets) the same length as OBJECT_SCIENCE
or single python float that is used for all OBJECT_SCIENCE
e.g. 3000
BLAZE
Define a blaze file to force any blaze correction to use (must be in the calib directory)
Must be:
a python list (e.g. can define multiple targets) the same length as OBJECT_SCIENCE
or single python string that is used for all OBJECT_SCIENCE
e.g. "my_blaze_files.fits"
BLAZE_CORRECTED
Whether the input data is blaze corrected
It is either True (if your input data has been blaze corrected) or False (if your input data has been blaze corrected)
Must be:
a python list (e.g. can define multiple targets) the same length as OBJECT_SCIENCE
or single python Boolean (True/False) that is used for all OBJECT_SCIENCE
RUN_LBL_TELLUCLEAN
This flags whether you want data to be cleaned of telluric by LBL
This is not required if your data is already cleaned (i.e. SPIRou data using APERO)
RUN_LBL_TEMPLATE
This flags whether you want a template to be computed for your data
If this is False you must provide a template for your science data even if you have set OBJECT_TEMPLATE to some other target.
You must also provide a template for OBJECT_TEMPLATE if set to some other target.
RUN_LBL_MASK
This runs the LBL recipe for making a mask (identifying "lines").
This has to be run for LBL to function.
You can set this to False if it has already been run (and you only want to run LBL_COMPUTE and LBL_COMPILE)
RUN_LBL_COMPUTE
This runs the LBL recipe that measures the velocity for every line for every file in the science/OBJECT_SCIENCE directory
This has to be run for LBL to function.
You can set this to False if it has already been run (and you only want to run LBL_COMPILE)
RUN_LBL_COMPILE
This runs the LBL recipe that combines the per line velocity into a single velocity per science file in the science/OBJECT_SCIENCE directory
This has to be run for LBL to function.
RESPROJ
This is the place to define new columns calculcated in lbl for projections against derivative i.e. DTemp temperature gradient files
For DTemp temperature gradient files see here.
ROTBROAD
Rotational velocity parameters, should be a list of two values, on being the epsilon and the other one being the vsini in km/s.
Please contact the LBL developers before using this option as it is currently experimental.
PLOT
Either "False" or "True", turns on plots.
There are a lot of them so please only turn on for debugging purposes.
Can be used with PLOT_XXX (see below) to turn on/off individual plots.
Other parameters
Most parameters can be overwritten (this doesn't mean that they should be though)
This may have undesired effects so please only do this if you know what you are doing.
A full list of variables and their default values can be found in here:
lbl/core/parameters.py
Note these parameters are overwritten in the instrument + data_source classes
e.g. lbl/instruments/{instrument}.py {InstrumentClass}.param_override()
where {instrument} is the instrument name (all lower case)
e.g. for SPIRou this is "spirou"
where {InstrumentClass} is normally some instrument + data_source name
e.g. for NIRPS-HE in ESO mode "NIRPS_HA_ESO" and "NIRPS_HA" and "NIRPS" (follow usual python inheritence)
Note none of the following are provided by default. Below we list some possibly useful keys to add, not all of them!
TEMPLATE_FILE: Force a template file for all of LBL - must still set OBJECT_TEMPLATE - but this is only used to name directories.
Don't use this is RUN_LBL_TEMPLATE = Truee.g. TEMPLATE_FILE = 'My_template.fits'
INPUT_FILE: The input science files to use - useful if requiring wildcards in the science/{OBJECT_NAME} directory
Default is '*.fits'e.g. INPUT_FILE = '*e2dsff*AB.fits'
MASK_FILE: Force a mask to be used (either a filename placed in the "mask" directory or a full path to an external file). Don't use this if RUN_LBL_MASK = True.
e.g. MASK_FILE = 'My_mask_file.fits'
SNR_THRESHOLD: The SNR cur off threshold for template creation (only useful if all objects have really low SNR)
Normally set to ~10, but set per instrument+modeSCIENCE_MASK_TYPE: Either "pos", "neg" or "full" - describes whether only positive or negative or all featured "lines" are used.
Default is "full". For ATA_TYPE = "SCIENCE"FP_MASK_TYPE: Either "pos", "neg" or "full" - describes whether only positive or negative or all featured "lines" are used.
Default is "full". For DATA_TYPE = "FP" or "LFC"FORCE_FIBER: Some instrument+mode setup files need to get a specific fiber from a science / calib file - this forces this to a certain string (i.e. A or AB) - the default is set per instrument+mode if used - note many modes do not use this and only use the INPUT_FILE parameter
PLOT_XXX: When PLOT = True you can turn on/off certain plots to only display the ones you want.
By default all plots are turned on when PLOT = True
We list the parameters below (we suggest plotting all to see which you want)PLOT_COMPUTE_CCF
PLOT_COMPUTE_SYSVEL
PLOT_COMPUTE_LINES
PLOT_COMPIL_CUMUL
PLOT_COMPIL_BINNED
PLOT_MASK_CCF
PLOT_CCF_VECTOR_PLOT
PLOT_TELLU_CORR_PLOT
KW_XXX: We define all header keys that are used in LBL, in rare circumstances you may want to override the values for a specific observation. These are listed below.
Note not all instrument+modes use all header keys here, it will depend on specific setups.
Note that some of these keys are only passed to the output file to display as a seperate column (to correlate RV against header keys). If you are interested in a header key being added for a specific instrument please contact us.KW_WAVECOEFFS: Keys that give the wave coefficients with a string formatted suffix: e.g. WAVE{0:04d} where {0:04d} is a 4 digit integer, though any valid python formatting would work [FLOAT]
KW_WAVEORDN: Key that gives the number of orders for wave solution [INTEGER]
KW_WAVEDEGN: Key that gives the degree of the polynomial coefficients [INTEGER]
KW_MID_EXP_TIME: Key that gives the mid exposure time in MJD [FLOAT]
KW_SNR: Key that gives the measured SNR in a chosen order - used as a cut off [FLOAT]
KW_BERV: Key that gives the measured BERV for this observation [FLOAT]
KW_BLAZE_FILE: Key that gives the blaze file to use [STRING]
KW_MJDATE: Key that defines the start time of the observation (APERO only) [FLOAT]
KW_EXPTIME: Key that defines the exposure time of the observation [FLOAT]
KW_AIRMASS: Key that defines the measured airmass of the observation [FLOAT]
KW_DATE: Key that defines the human readible date of the observation [STRING]
KW_TAU_H2O: Key that gives the measured telluric exponent of the water component (APERO only) [FLOAT]
KW_TAU_OTHERS: Key that gives the measured telluric exponent of other components (APERO only) [FLOAT]
KW_DPRTYPE: Key that gives the data type of the observation (usually whats in each fiber e.g OBJECT,SKY) [STRING]
KW_OUTPUT: Key that gives the data type of the reduced file (APERO only, e.g. TELLU_OBJ) [STRING]
KW_FIBER: Key that gives which fiber this file is from [STRING]
KW_WAVETIME: Key that gives the observation time of the wave file in MJD (APERO only) [FLOAT]
KW_WAVEFILE: Key that gives which file to use for the wave solution [STRING]
KW_TLPDVOTR: Key that gives the velocity of water absorbers (APERO only) [FLOAT]
KW_TLPDVOTR: Key that gives the velocity of other absorbers (APERO only) [FLOAT]
KW_CDBWAVE: Wave solution calibration filename (APERO only) [STRING]
KW_OBJNAME: Key that gives the name of this object [STRING]
KW_RHOMB1: Key that gives the rhomb 1 position (SPIROU only) [STRING]
KW_RHOMB2: Key that gives the rhomb 2 position (SPIROU only) [STRING]
KW_CDENP: Key that describes the calib-reference density (SPIROU only) [STRING]
KW_FPI_TEMP: Key that describes internal temperature of the cyrostat [FLOAT]
KW_FPE_TEMP: Key that describes external temperature of the cryostat [FLOAT]
KW_SNRGOAL: The SNR goal of the observation [FLOAT]
KW_EXT_SNR: Key that gives the measured SNR in a chosen order, just for plotting/reporting [FLOAT]
KW_BJD: The barycentric julian date (for some instruments used instead of KW_MID_EXP_TIME) [FLOAT]
KW_SHAPE_DX, KW_SHAPE_DY, KW_SHAPE_A, KW_SHAPE_B, KW_SHAPE_C, KW_SHAPE_D - keys describing the APERO shape correction used (APERO only) [FLOAT]
KW_FP_INT_T: Key to give another measure of internal temperature [FLOAT]
KW_FP_INT_P: Key to give a measure internal pressure [FLOAT]
KW_REF_KEY: Key to give a reference key for drift calculation (usually KW_DPRTYPE) only used when FP is supplied and trying to do a drift correction (e.g. SPIROU) [STRING]
KW_TEMPERATURE: Key that gives the temperature (mostly not used and defined by user) [FLOAT]
KW_MODELVEL: A key to give a velocity from the CCF (mostly set by LBL) [ FLOAT]