XSH_LINGAIN(7)
π XSH_LINGAIN π
okay bestie, welcome to the xsh_lingain page from the xshoo recipes manual (that's the XSH_LINGAIN(7) one, section 7, iykyk). it computes the detector's gain and linearity map. yes it's a whole thing. yes we're gonna get through it together. grab a snack π
β¨ NAME β¨
xsh_lingain β Computes detector's gain/linearity-map. that's it, that's the job, no cap π
πΈ SYNOPSIS πΈ
esorex xsh_lingain [OPTIONS] FILE.sof
π¦ DESCRIPTION π¦
so this recipe computes the detector linearity coefficients and the gain. that's the whole main character arc right there.
π₯ Input Frames π₯
arm = UVB-VIS:
- a set of
nRAWlinearity frames (Format=RAW,n >=8,Tag = LINEARITY_arm_ON) - a set of
nRAWbias frames (Format=RAW,n >=1,Tag = LINEARITY_arm_OFF)
arm = NIR:
- a set of
nRAWlinearity on frames (Format=RAW,n >=8,Tag = LINEARITY_arm_ON) - a set of
nRAWlinearity off frames (Format=RAW,n >=8,Tag = LINEARITY_arm_OFF) [OPTIONAL]a static bad pixel map (PRO.CATG=BP_MAP_RP_arm)
note bestie: on and off frames are taken in pairs sequence βOFF-ON-ON-OFF, at least16frames. don't freestyle this, the pairs matter fr fr.
π€ Products π€
- a linearity map table,
PRO.CATG = BP_MAP_LIN_NIR - a gain table,
PRO.CATG = GAIN_INFO - a cube cointaining the linearity coefficients,
PRO.CATG = COEFFS_CUBE_arm - a linearity map image (
RAWformat),PRO.CATG = RAW_BP_MAP_NL_arm - a linearity map image (
PREformat),PRO.CATG = BP_MAP_NL_arm
(yes, "cointaining" β that's how the original spells it, we don't edit the lore β¨)
π OPTIONS π
this is the long part and honestly? iconic of it. every single one, in order, here we go π«Ά
--keep-temp <str>β if it's set tono, temporary files get deleted. (str; default:no). the full name of this option for the EsoRex configuration file isxsh.xsh_lingain.keep-temp [default = no].--debug-level <str>β extra xshooter debug level. one ofnone,low,medium,high(str; default:none). the full name of this option for the EsoRex configuration file isxsh.xsh_lingain.debug-level [default = none].--time-stamp <bool>β add a timestamp to the product file name. (bool; default:False). the full name of this option for the EsoRex configuration file isxsh.xsh_lingain.time-stamp [default = False].--decode-bp <int>β integer representation of the bits to be considered bad when decoding the bad pixel mask pixel values. the most frequent codes relevant for the user are:0: good pixel,8: pick-up noise,16: cosmic-ray removed,32: cosmic-ray unremoved,128: calibration file defect,256: hot pixel,512: dark pixel,4096: A/D converted saturation,32768: non linear pixel,1048576: extrapolated flux in NIR,4194304: Interpolated flux during extraction. (int; default:2144337919). the full name of this option for the EsoRex configuration file isxsh.xsh_lingain.decode-bp [default = 2144337919].--method <str>β the method to be used when computingGAIN. methods appliable:<PTC | MED>. by default thePTCmethod will be applied. (str; default:PTC). the full name of this option for the EsoRex configuration file isxshoo.xsh_lingain.method [default = PTC].--order <int>β polynomial order for the fit (Linearity) (int; default:3). the full name of this option for the EsoRex configuration file isxshoo.xsh_lingain.order [default = 3].--kappa <float>β kappa value for the kappa-sigma clipping (Gain) (float; default:3.0). the full name of this option for the EsoRex configuration file isxshoo.xsh_lingain.kappa [default = 3.0].--niter <int>β number of iterations to compute rms (Gain) (int; default:5). the full name of this option for the EsoRex configuration file isxshoo.xsh_lingain.niter [default = 5].--llx <int>βxcoordinate of the lower-left point of the region of interest. if not modified, the default value will be1. (int; default:-1). the full name of this option for the EsoRex configuration file isxshoo.xsh_lingain.llx [default = -1].--lly <int>βycoordinate of the lower-left point of the region of interest. if not modified, the default value will be1. (int; default:-1). the full name of this option for the EsoRex configuration file isxshoo.xsh_lingain.lly [default = -1].--urx <int>βxcoordinate of the upper-right point of the region of interest. if not modified, the default value will be theXdimension of the input image. (int; default:-1). the full name of this option for the EsoRex configuration file isxshoo.xsh_lingain.urx [default = -1].--ury <int>βycoordinate of the upper-right point of the region of interest. if not modified, the default value will be theYdimension of the input image. (int; default:-1). the full name of this option for the EsoRex configuration file isxshoo.xsh_lingain.ury [default = -1].--ref_level <int>β user reference level (int; default:10000). the full name of this option for the EsoRex configuration file isxshoo.xsh_lingain.ref_level [default = 10000].--intermediate <bool>β de-/activate intermediate products (bool; default:False). the full name of this option for the EsoRex configuration file isxshoo.xsh_lingain.intermediate [default = False].--autocorr <bool>β de-/activate the autocorr option (bool; default:False). the full name of this option for the EsoRex configuration file isxshoo.xsh_lingain.autocorr [default = False].--collapse <bool>β de-/activate the collapse option (bool; default:True). the full name of this option for the EsoRex configuration file isxshoo.xsh_lingain.collapse [default = True].--rescale <bool>β de-/activate the image rescale option (bool; default:True). the full name of this option for the EsoRex configuration file isxshoo.xsh_lingain.rescale [default = True].--pix2pix <bool>β de-/activate the computation with pixel to pixel accuracy (bool; default:True). the full name of this option for the EsoRex configuration file isxshoo.xsh_lingain.pix2pix [default = True].--bpmbin <bool>β de-/activate the binary bpm option (bool; default:False). the full name of this option for the EsoRex configuration file isxshoo.xsh_lingain.bpmbin [default = False].--m <int>β maximumx-shift for the autocorr (int; default:26). the full name of this option for the EsoRex configuration file isxshoo.xsh_lingain.m [default = 26].--filter <int>β upper limit of Median flux to be filtered (int; default:-1). the full name of this option for the EsoRex configuration file isxshoo.xsh_lingain.filter [default = -1].--n <int>β maximumy-shift for the autocorr (int; default:26). the full name of this option for the EsoRex configuration file isxshoo.xsh_lingain.n [default = 26].--tolerance <float>β tolerance for pair discrimination (float; default:0.1). the full name of this option for the EsoRex configuration file isxshoo.xsh_lingain.tolerance [default = 0.1].--pafgen <bool>β generate PAF file (bool; default:False). the full name of this option for the EsoRex configuration file isxshoo.xsh_lingain.pafgen [default = False].--pafname <str>β specific name for PAF file (str; default:xsh_lingain). the full name of this option for the EsoRex configuration file isxshoo.xsh_lingain.pafname [default = xsh_lingain].--exts <int>β activate the multi-exts option. choose-1to process all extensions. choose an extension number to process the appropriate extension. (int; default:0). the full name of this option for the EsoRex configuration file isxshoo.xsh_lingain.exts [default = 0].--fpn_method <str>β method for computing Fixed Pattern Noise (SMOOTHorHISTOGRAM) (str; default:HISTOGRAM). the full name of this option for the EsoRex configuration file isxshoo.xsh_lingain.fpn_method [default = HISTOGRAM].--fpn_smooth <int>β template size in pixels for smoothing during FPN computation (only for theSMOOTHmethod) (int; default:13). the full name of this option for the EsoRex configuration file isxshoo.xsh_lingain.fpn_smooth [default = 13].--saturation_limit <float>β all frames with mean saturation above the limit would not be used in linearity calculation (float; default:65535.0). the full name of this option for the EsoRex configuration file isxshoo.xsh_lingain.saturation_limit [default = 65535.0].--gain_threshold <float>β all frames with mean flux above the threshold would not be used in gain calculation (float; default:65535.0). the full name of this option for the EsoRex configuration file isxshoo.xsh_lingain.gain_threshold [default = 65535.0].--coeffs_cube_split <bool>β ifTRUE, the recipe writes as manyCOEFFS_CUBE_Pi(i=0..order) as the value of theorderparameter in a separate file (bool; default:False). the full name of this option for the EsoRex configuration file isxshoo.xsh_lingain.coeffs_cube_split [default = False].--llx1 <int>βxcoord of the lower-left point of the first field used for contamination measurement. if not modified, the default value will be1. (int; default:-1). the full name of this option for the EsoRex configuration file isxshoo.xsh_lingain.llx1 [default = -1].--lly1 <int>βycoord of the lower-left point of the first field used for contamination measurement. if not modified, the default value will be1. (int; default:-1). the full name of this option for the EsoRex configuration file isxshoo.xsh_lingain.lly1 [default = -1].--urx1 <int>βxcoord of the upper-right point of the first field used for contamination measurement. if not modified, the default value will be theXdimension of the input image. (int; default:-1). the full name of this option for the EsoRex configuration file isxshoo.xsh_lingain.urx1 [default = -1].--ury1 <int>βycoord of the upper-right point of the first field used for contamination measurement. if not modified, the default value will be theYdimension of the input image. (int; default:-1). the full name of this option for the EsoRex configuration file isxshoo.xsh_lingain.ury1 [default = -1].--llx2 <int>βxcoord of the lower-left point of the second field used for contamination measurement. if not modified, the default value will be1. (int; default:-1). the full name of this option for the EsoRex configuration file isxshoo.xsh_lingain.llx2 [default = -1].--lly2<int> β the y coord of the lower-left point of the second field used for contamination measurement. If you don't touch it, the default value will be1. (int; default:-1). The full name of this option for the EsoRex configuration file isxshoo.xsh_lingain.lly2 [default = -1].--urx2<int> β the x coord of the upper-right point of the second field used for contamination measurement. If you don't touch it, the default value will be half of the X dimension of the input image. (int; default:-1). The full name of this option for the EsoRex configuration file isxshoo.xsh_lingain.urx2 [default = -1].--ury2<int> β the y coord of the upper-right point of the second field used for contamination measurement. If you don't touch it, the default value will be half of the Y dimension of the input image. (int; default:-1). The full name of this option for the EsoRex configuration file isxshoo.xsh_lingain.ury2 [default = -1].--llx3<int> β the x coord of the lower-left point of the third field used for contamination measurement. If you don't touch it, the default value will be1. (int; default:-1). The full name of this option for the EsoRex configuration file isxshoo.xsh_lingain.llx3 [default = -1].--lly3<int> β the y coord of the lower-left point of the third field used for contamination measurement. If you don't touch it, the default value will be half of the Y dimension of the input image. (int; default:-1). The full name of this option for the EsoRex configuration file isxshoo.xsh_lingain.lly3 [default = -1].--urx3<int> β the x coord of the upper-right point of the third field used for contamination measurement. If you don't touch it, the default value will be half of X dimension of the image. (int; default:-1). The full name of this option for the EsoRex configuration file isxshoo.xsh_lingain.urx3 [default = -1].--ury3<int> β the y coord of the upper-right point of the third field used for contamination measurement. If you don't touch it, the default value will be Y dimension of the image. (int; default:-1). The full name of this option for the EsoRex configuration file isxshoo.xsh_lingain.ury3 [default = -1].--llx4<int> β the x coord of the lower-left point of the fourth field used for contamination measurement. If you don't touch it, the default value will be half of X dimension of the image. (int; default:-1). The full name of this option for the EsoRex configuration file isxshoo.xsh_lingain.llx4 [default = -1].--lly4<int> β the y coord of the lower-left point of the fourth field used for contamination measurement. If you don't touch it, the default value will be half of the Y dimension of the input image. (int; default:-1). The full name of this option for the EsoRex configuration file isxshoo.xsh_lingain.lly4 [default = -1].--urx4<int> β the x coord of the upper-right point of the fourth field used for contamination measurement. If you don't touch it, the default value will be X dimension of the image. (int; default:-1). The full name of this option for the EsoRex configuration file isxshoo.xsh_lingain.urx4 [default = -1].--ury4<int> β the y coord of the upper-right point of the fourth field used for contamination measurement. If you don't touch it, the default value will be Y dimension of the input image. (int; default:-1). The full name of this option for the EsoRex configuration file isxshoo.xsh_lingain.ury4 [default = -1].--llx5<int> β the x coord of the lower-left point of the fifth field used for contamination measurement. If you don't touch it, the default value will be half of the X dimension of the input image. (int; default:-1). The full name of this option for the EsoRex configuration file isxshoo.xsh_lingain.llx5 [default = -1].--lly5<int> β the y coord of the lower-left point of the fifth field used for contamination measurement. If you don't touch it, the default value will be1. (int; default:-1). The full name of this option for the EsoRex configuration file isxshoo.xsh_lingain.lly5 [default = -1].--urx5<int> β the x coord of the upper-right point of the fifth field used for contamination measurement. If you don't touch it, the default value will be X dimension of the image. (int; default:-1). The full name of this option for the EsoRex configuration file isxshoo.xsh_lingain.urx5 [default = -1].--ury5<int> β the y coord of the upper-right point of the fifth field used for contamination measurement. If you don't touch it, the default value will be half of Y dimension of the input image. (int; default:-1). The full name of this option for the EsoRex configuration file isxshoo.xsh_lingain.ury5 [default = -1].
okay bestie, lowkey the most important glow-up here: you can totally make a configuration file containing these options, along with suitable default values. π
Please refer to the details provided by the 'esorex --help' command. iykyk π«Ά
π SEE ALSO π
The full documentation for the xshoo pipeline can be downloaded as a PDF file using the following URL:
ftp://ftp.eso.org/pub/dfs/pipelines/xshoo/xshoo-pipeline-manual-12.1.pdf
An overview over the existing ESO pipelines can be found on the web page https://www.eso.org/sci/software/pipelines/.
Basic documentation about the EsoRex program can be found at the esorex(1) man page.
It is possible to call the pipelines from python using the python-cpl package. See https://packages.python.org/python-cpl/index.html for further information.
The other recipes of the xshoo pipeline are xsh_2dmap(7), xsh_cfg_recover(7), xsh_flexcomp(7), xsh_geom_ifu(7), xsh_mbias(7), xsh_mdark(7), xsh_mflat(7), xsh_orderpos(7), xsh_predict(7), xsh_respon_slit_nod(7), xsh_respon_slit_offset(7), xsh_respon_slit_stare(7), xsh_scired_ifu_offset(7), xsh_scired_ifu_offset_drl(7), xsh_scired_ifu_stare(7), xsh_scired_ifu_stare_drl(7), xsh_scired_slit_nod(7), xsh_scired_slit_offset(7), xsh_scired_slit_stare(7), xsh_util_physmod(7), xsh_wavecal(7) β¨ (the whole friend group fr fr π)
π VERSION π
xsh_lingain 3.5.3
π AUTHOR π
Lander de Bilbao,A.Modigliani <amodigli@eso.org>
π BUG REPORTS π
Please report any problems to amodigli@eso.org. Alternatively, you may send a report to the ESO User Support Department <usd-help@eso.org>. (they want to help you, bestie, don't be shy π«Ά)
π LICENSE π
This file is part of the X-shooter Instrument Pipeline Copyright (C) 2006 European Southern Observatory
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
fr fr, that warranty disclaimer is doing the most β no warranty, no promises, periodt. π
and that's a wrap on xsh_lingain, bestie β recipe version 3.5.3, and this page is dated 3.5.3, same energy, no cap. go get that linearity gain, you main character πβ¨
π¦ where this page comes from
- ubuntu jammy: cpl-plugin-xshoo-doc 3.5.3+dfsg-1build1 Β· GPL-v2+
- ubuntu noble: cpl-plugin-xshoo-doc 3.5.3+dfsg-1build4 Β· GPL-v2+
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms