---
name: "xsh_cfg_recover"
section: "7"
platform: "linux"
package: "cpl-plugin-xshoo-doc"
version: "3.5.0+dfsg-4"
release: "Debian 11 (Bullseye)"
platforms: ["linux"]
url: "https://new.carta.tech/xsh_cfg_recover"
---

# xsh\_cfg\_recover(7)

Optimizes a model configuration to match data taken after a major format change

## NAME

xsh\_cfg\_recover - Optimizes a model configuration to match data taken after a major format change

## SYNOPSIS

esorex **xsh\_cfg\_recover** \[OPTIONS\] FILE.sof

## DESCRIPTION

This recipe creates a wavelength solution and an order table.

  Input Frames :\
     \- \[UVB, VIS\] A RAW frame (Format = RAW, Tag = FMTCHK\_arm)\
     \- \[NIR\] Two RAW frames (Format = RAW, Tag = FMTCHK\_arm\_ON,FMTCHK\_arm\_OFF)\
     \- The old model cfg table (Format = TABLE, Tag = XSH\_MOD\_CFG\_TAB\_arm)\
     \- A ref. line list. The model computes corresponding positions \
       (Format = TABLE, Tag = ARC\_LINE\_LIST\_arm)\
     \- \[UVB,VIS,OPTIONAL\] A master bias (Format = PRE, Tag = MASTER\_BIAS\_arm)\
     \- \[UVB,VIS,OPTIONAL\] A master dark (Format = PRE, Tag = MASTER\_DARK\_arm)\
     \- \[OPTIONAL-Required if method=pm,peaks\] \
      An order table (Format = TABLE, Tag = ORDER\_TAB\_CENTR\_arm)\
     \- \[OPTIONAL-Required if first-anneal=TRUE\] \
       A table with measured line positions (Format = TABLE, Tag = XSH\_MEASCOORD\_arm)\
   Products : \
     \- if first-anneal=FALSE & last-step=FALSE\
       nothing\
     \- if first-anneal=TRUE & last-step=FALSE\
       an optimized model configuration, PRO.CATG=XSH\_MOD\_CFG\_arm\
     \- if last-step=TRUE\
       an optimized model configuration, PRO.CATG=XSH\_MOD\_FAN\_arm\
       an optimized model configuration, PRO.CATG=XSH\_MOD\_CFG\_OPT\_arm\
       an quality control table, PRO.CATG=MODEL\_GUESS\_XY\_arm\
       the model theoretical map corresponding to the optimized model config,\
       PRO.CATG=THEO\_TAB\_MULT\_arm, THEO\_TAB\_IFU\_arm, and THEO\_TAB\_SING\_arm

## OPTIONS

- **--keep-temp** *\<str\>*

  If ´no´, temporary files are deleted. (str; default: ´no´). The full name of this option for the EsoRex configuration file is **xsh.xsh\_cfg\_recover.keep-temp** \[default = *no*\].

- **--debug-level** *\<str\>*

  Additional xshooter debug level. One of ´none´, ´low´, ´medium´, ´high´ (str; default: ´none´). The full name of this option for the EsoRex configuration file is **xsh.xsh\_cfg\_recover.debug-level** \[default = *none*\].

- **--time-stamp** *\<bool\>*

  Add timestamp to product file name. (bool; default: False). The full name of this option for the EsoRex configuration file is **xsh.xsh\_cfg\_recover.time-stamp** \[default = *False*\].

- **--decode-bp** *\<int\>*

  Integer representation of the bits to be considered bad when decoding the bad pixel mask pixel values.   Most frequent codes relevant for the user:   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 is **xsh.xsh\_cfg\_recover.decode-bp** \[default = *2144337919*\].

- **--first-anneal** *\<bool\>*

  Run first annealing (TRUE) or not (FALSE)See recipe man-page % Input frames (bool; default: False). The full name of this option for the EsoRex configuration file is **xsh.xsh\_cfg\_recover.first-anneal** \[default = *False*\].

- **--arm** *\<str\>*

  Arm setting:  (str; default: ´vis´). The full name of this option for the EsoRex configuration file is **xsh.xsh\_model\_compute.arm** \[default = *vis*\].

- **--name\_i** *\<str\>*

  Filename with wavelength,x,y,order:  (str; default: ´line\_xy\_ord.txt´). The full name of this option for the EsoRex configuration file is **xsh.xsh\_model\_compute.name\_i** \[default = *line\_xy\_ord.txt*\].

- **--niter** *\<int\>*

  No of iterations for first anneal (int; default: 100000). The full name of this option for the EsoRex configuration file is **xsh.xsh\_model\_compute.niter** \[default = *100000*\].

- **--coord\_frame** *\<int\>*

  Co-ordinate frame for centroids (0=raw,1=pre) (int; default: 1). The full name of this option for the EsoRex configuration file is **xsh.xsh\_model\_compute.coord\_frame** \[default = *1*\].

- **--last-step** *\<bool\>*

  Run last step (TRUE) or not (FALSE)See recipe man-page % Input frames (bool; default: False). The full name of this option for the EsoRex configuration file is **xsh.xsh\_cfg\_recover.last-step** \[default = *False*\].

- **--plot** *\<bool\>*

  Display plot (TRUE) or not (FALSE) (bool; default: False). The full name of this option for the EsoRex configuration file is **xsh.xsh\_cfg\_recover.plot** \[default = *False*\].

- **--ima\_tresh\_min** *\<float\>*

  Min thresh raw image. (float; default: 40.0). The full name of this option for the EsoRex configuration file is **xsh.xsh\_cfg\_recover.ima\_thresh\_min** \[default = *40.0*\].

- **--cor\_prescan** *\<bool\>*

  Correct for prescan (bool; default: False). The full name of this option for the EsoRex configuration file is **xsh.xsh\_cfg\_recover.cor\_prescan** \[default = *False*\].

- **--method** *\<str\>*

  Model predictions correction method. safefit: safe fitgfit: 2D Gaussian line fitpeaks: line peaks detectionpm: line peaks detection & pattern match (str; default: ´safefit´). The full name of this option for the EsoRex configuration file is **xsh.xsh\_cfg\_recover.method** \[default = *safefit*\].

- **--offx** *\<float\>*

  X offset to model predictions (float; default: 0.0). The full name of this option for the EsoRex configuration file is **xsh.xsh\_cfg\_recover.offx** \[default = *0.0*\].

- **--offy** *\<float\>*

  Y offset to model predictions (float; default: 0.0). The full name of this option for the EsoRex configuration file is **xsh.xsh\_cfg\_recover.offy** \[default = *0.0*\].

- **--slit** *\<int\>*

  Extraction slit (int; default: 5). The full name of this option for the EsoRex configuration file is **xsh.xsh\_cfg\_recover.slit** \[default = *5*\].

- **--gfit\_box\_sy** *\<int\>*

  Gauss fit Y search box size for lines on actual frame (int; default: 20). The full name of this option for the EsoRex configuration file is **xsh.xsh\_cfg\_recover.gfit\_box\_sy** \[default = *20*\].

- **--peak\_line\_fwhm** *\<int\>*

  The FWHM used in line convolution, in pixel units (int; default: 4). The full name of this option for the EsoRex configuration file is **xsh.xsh\_cfg\_recover.peak\_line\_fwhm** \[default = *4*\].

- **--peak\_kappa** *\<float\>*

  The kappa value, used to identify line peaks if max\>kappa\*stdev+median, max is a valid peak where max, stdev,median are computed on the extracted spectrum (float; default: 5.0). The full name of this option for the EsoRex configuration file is **xsh.xsh\_cfg\_recover.peak\_kappa** \[default = *5.0*\].

- **--peak\_factor** *\<float\>*

  Relative Intensity threshold factor for line peaks detection (float; default: 10.0). The full name of this option for the EsoRex configuration file is **xsh.xsh\_cfg\_recover.peak\_factor** \[default = *10.0*\].

- **--peak\_match\_x** *\<int\>*

  Radii for line peaks matches (int; default: 10). The full name of this option for the EsoRex configuration file is **xsh.xsh\_cfg\_recover.peak\_match\_x** \[default = *10*\].

- **--peak\_match\_y** *\<int\>*

  Radii for line peaks matches (int; default: 20). The full name of this option for the EsoRex configuration file is **xsh.xsh\_cfg\_recover.peak\_match\_y** \[default = *20*\].

- **--pm\_ord\_sel** *\<int\>*

  From guess line and peaks positions are extracted the ones in the range \[ord\_min,ord\_min+pm\_ord\_sel\]  (int; default: 1). The full name of this option for the EsoRex configuration file is **xsh.xsh\_cfg\_recover.pm\_ord\_sel** \[default = *1*\].

- **--pm\_radius** *\<float\>*

  Search radius applied in final pattern matching (data units). (float; default: 20.0). The full name of this option for the EsoRex configuration file is **xsh.xsh\_cfg\_recover.pm\_radius** \[default = *20.0*\].

- **--pm\_tolerance** *\<float\>*

  Max relative difference of angles and scales from their median value for match acceptance. (float; default: 0.1). The full name of this option for the EsoRex configuration file is **xsh.xsh\_cfg\_recover.pm\_tolerance** \[default = *0.1*\].

- **--anneal\_niter** *\<int\>*

  Simulated annealing iterations (int; default: 1000). The full name of this option for the EsoRex configuration file is **xsh.xsh\_cfg\_recover.anneal\_niter** \[default = *1000*\].

Note that it is possible to create a configuration file containing these options, along with suitable default values. Please refer to the details provided by the 'esorex --help' command.

## 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_2dmap/7.md), [*xsh\_flexcomp*(7)](/xsh_flexcomp/7.md), [*xsh\_geom\_ifu*(7)](/xsh_geom_ifu/7.md), [*xsh\_lingain*(7)](/xsh_lingain/7.md), [*xsh\_mbias*(7)](/xsh_mbias/7.md), [*xsh\_mdark*(7)](/xsh_mdark/7.md), [*xsh\_mflat*(7)](/xsh_mflat/7.md), [*xsh\_orderpos*(7)](/xsh_orderpos/7.md), [*xsh\_predict*(7)](/xsh_predict/7.md), [*xsh\_respon\_slit\_nod*(7)](/xsh_respon_slit_nod/7.md), [*xsh\_respon\_slit\_offset*(7)](/xsh_respon_slit_offset/7.md), [*xsh\_respon\_slit\_stare*(7)](/xsh_respon_slit_stare/7.md), [*xsh\_scired\_ifu\_offset*(7)](/xsh_scired_ifu_offset/7.md), [*xsh\_scired\_ifu\_offset\_drl*(7)](/xsh_scired_ifu_offset_drl/7.md), [*xsh\_scired\_ifu\_stare*(7)](/xsh_scired_ifu_stare/7.md), [*xsh\_scired\_ifu\_stare\_drl*(7)](/xsh_scired_ifu_stare_drl/7.md), [*xsh\_scired\_slit\_nod*(7)](/xsh_scired_slit_nod/7.md), [*xsh\_scired\_slit\_offset*(7)](/xsh_scired_slit_offset/7.md), [*xsh\_scired\_slit\_stare*(7)](/xsh_scired_slit_stare/7.md), [*xsh\_util\_physmod*(7)](/xsh_util_physmod/7.md), [*xsh\_wavecal*(7)](/xsh_wavecal/7.md)

## VERSION

xsh\_cfg\_recover 3.5.0

## AUTHOR

A. Modigliani, P. Bristow \<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\>.

## 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
