.TH XSH_PREDICT "7" "2.5.2" "xsh_predict" "xshoo recipes"
.SH NAME
xsh_predict \- Compute a first guess dispersion solution and order table

.SH SYNOPSIS
esorex
.B xsh_predict
[OPTIONS] FILE.sof

.SH DESCRIPTION
This recipe creates a wavelength solution and an order table.
.PP
  Input Frames :
    \- [UVB, VIS] One RAW frame (Format = RAW, Tag = FMTCHK_arm)
    \- [NIR] Two RAW frames ((Format = RAW,  Tag = FMTCHK_arm_ON,FMTCHK_arm_OFF)
    \- A spectral format table (Format = PRE, Tag = SPECTRAL_FORMAT_TAB_arm)
    \- An arc line list (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] A reference badpixel map (Format = QUP, Tag = BP_MAP_RP_arm)
    \- [OPTIONAL] A non\-linear badpixel map (Format = QUP, Tag = BP_MAP_NL_arm)
    \- [OPTIONAL] Reference list to monitor line intensity (Tag = ARC_LINE_LIST_INTMON_arm)
     \- [poly mode] A theoretical map (Format = TABLE, Tag = THEO_TAB_SING_arm)
    \- [physical model mode] A model cfg table (Format = TABLE, Tag = XSH_MOD_CFG_TAB_arm)
  Products : 
    \- [poly mode] A wavelength solution (Format = TABLE, PRO.CATG = WAVE_TAB_GUESS_arm)
    \- An order table, PRO.CATG = ORDER_TAB_GUESS_arm
      (if at least degree+1 points are found in each order).
.PP
      \- A line identification residual table, PRO.CATG = FMTCHK_RESID_TAB_LINES_arm
    \- The bias subtracted formatcheck frame, PRO.CATG = FMTCHK_ON_arm
    \- [physical model mode]An optimized model configuration table, PRO.CATG = XSH_MOD_CFG_OPT_FMT_ARM
  Prepare the frames.
.PP
  For UVB,VIS :
    Subtract Master Bias.
.PP
    Subtract Master Dark
  For NIR:
    Subtract ON OFF
  Compute guess order table and wavelength solution


.SH OPTIONS
.TP
\fB\-\-keep\-temp\fR \fI<str>\fR
If \'no\', temporary files are deleted. (str; default: \'no\'). The full name of this option for the EsoRex configuration
file is \fBxsh.xsh_predict.keep\-temp\fR [default = \fIno\fR].
.TP
\fB\-\-debug\-level\fR \fI<str>\fR
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 \fBxsh.xsh_predict.debug\-level\fR [default = \fInone\fR].
.TP
\fB\-\-time\-stamp\fR \fI<bool>\fR
Add timestamp to product file name. (bool; default: False). The full name of this option for the EsoRex configuration
file is \fBxsh.xsh_predict.time\-stamp\fR [default = \fIFalse\fR].
.TP
\fB\-\-decode\-bp\fR \fI<long>\fR
Integer representation of the bits to be considered bad when decoding
the bad pixel mask pixel values. (long; default: 2144337919). The full name of this option for the EsoRex configuration
file is \fBxsh.xsh_predict.decode\-bp\fR [default = \fI2144337919\fR].
.TP
\fB\-\-pre\-overscan\-corr\fR \fI<long>\fR
pre\-overscan correction.0: no correction1: mean overscan correction2:
mean prescan correction3: (mean pre+mean overscan)/2 correction (long;
default: 1). The full name of this option for the EsoRex configuration
file is \fBxsh.xsh_predict.pre\-overscan\-corr\fR [default = \fI1\fR].
.TP
\fB\-\-detectarclines\-fit\-win\-hsize\fR \fI<long>\fR
Half window size (HWS) in pixels for the line 2D fitting window (total
window size = 2*HWS+1) (long; default: 6). The full name of this option for the EsoRex configuration
file is \fBxsh.xsh_predict.detectarclines\-fit\-win\-hsize\fR [default = \fI6\fR].
.TP
\fB\-\-detectarclines\-search\-win\-hsize\fR \fI<long>\fR
Half window size (HWS) in pixels for the line search box around the
expected position (total window size = 2*HWS+1) [bin units] (long;
default: 3). The full name of this option for the EsoRex configuration
file is \fBxsh.xsh_predict.detectarclines\-search\-win\-hsize\fR [default = \fI3\fR].
.TP
\fB\-\-detectarclines\-running\-median\-hsize\fR \fI<long>\fR
Half window size in pixels (HWS) for the running median box (long;
default: 0). The full name of this option for the EsoRex configuration
file is \fBxsh.xsh_predict.detectarclines\-running\-median\-hsize\fR [default = \fI0\fR].
.TP
\fB\-\-detectarclines\-wavesol\-deg\-lambda\fR \fI<long>\fR
Degree in lambda in the polynomial solution X=f(lambda,order,slit) and
Y=f(lambda,order,slit) (POLY mode) (long; default: 5). The full name of this option for the EsoRex configuration
file is \fBxsh.xsh_predict.detectarclines\-wavesol\-deg\-lambda\fR [default = \fI5\fR].
.TP
\fB\-\-detectarclines\-wavesol\-deg\-order\fR \fI<long>\fR
Degree in order in the polynomial solution X=f(lambda,order,slit) and
Y=f(lambda,order,slit) (POLY mode) (long; default: 5). The full name of this option for the EsoRex configuration
file is \fBxsh.xsh_predict.detectarclines\-wavesol\-deg\-order\fR [default = \fI5\fR].
.TP
\fB\-\-detectarclines\-ordertab\-deg\-y\fR \fI<long>\fR
Degree in Y in the polynomial order tracing X=f(Y) (long; default: 2). The full name of this option for the EsoRex configuration
file is \fBxsh.xsh_predict.detectarclines\-ordertab\-deg\-y\fR [default = \fI2\fR].
.TP
\fB\-\-detectarclines\-min\-sn\fR \fI<float>\fR
Minimum signal\-to\-noise ratio to filter lines [xsh_predict:
UVB,VIS=5,NIR=4; xsh_2dmap: UVB=3, VIS=6, NIR=10] (float; default:
5.0). The full name of this option for the EsoRex configuration
file is \fBxsh.xsh_predict.detectarclines\-min\-sn\fR [default = \fI5.0\fR].
.TP
\fB\-\-detectarclines\-find\-lines\-center\fR \fI<str>\fR
Method used to find the center of the lines: gaussian, barycenter.
Gaussian method applies a Gaussian fit to the line. Barycenter method
computes the line centroid. (str; default: \'gaussian\'). The full name of this option for the EsoRex configuration
file is \fBxsh.xsh_predict.detectarclines\-find\-lines\-center\fR [default = \fIgaussian\fR].
.TP
\fB\-\-detectarclines\-clip\-sigma\fR \fI<float>\fR
Kappa value in sigma clipping during the polynomial solution fit (POLY
mode) (float; default: 2.0). The full name of this option for the EsoRex configuration
file is \fBxsh.xsh_predict.detectarclines\-clip\-sigma\fR [default = \fI2.0\fR].
.TP
\fB\-\-detectarclines\-clip\-niter\fR \fI<long>\fR
Number of iterations in sigma clipping during the polynomial solution
fit (POLY mode) (long; default: 10). The full name of this option for the EsoRex configuration
file is \fBxsh.xsh_predict.detectarclines\-clip\-niter\fR [default = \fI10\fR].
.TP
\fB\-\-detectarclines\-clip\-frac\fR \fI<float>\fR
Minimal fractions of bad pixel allowed in sigma clipping duringthe
polynomial solution fit (POLY mode) (float; default: 0.7). The full name of this option for the EsoRex configuration
file is \fBxsh.xsh_predict.detectarclines\-clip\-frac\fR [default = \fI0.7\fR].
.TP
\fB\-\-model\-maxit\fR \fI<long>\fR
Number/10 of annealing iterations if in physical model mode. (long;
default: 1000). The full name of this option for the EsoRex configuration
file is \fBxsh.xsh_predict.model\-maxit\fR [default = \fI1000\fR].
.TP
\fB\-\-model\-anneal\-factor\fR \fI<float>\fR
Multiplier applied to the automatic parameter ranges (i.e. when
scenario!=0). For routine operations should be 1.0. (physical model
mode). (float; default: 1.0). The full name of this option for the EsoRex configuration
file is \fBxsh.xsh_predict.model\-anneal\-factor\fR [default = \fI1.0\fR].
.TP
\fB\-\-model\-scenario\fR \fI<long>\fR
selects preset flag and range combinations appropriate to common
scenarios:   0 \- No scenario, input cfg flags and limits used.  1 \-
scenario appropriate for the startup recipe (large ranges for
parameters affecting single ph exposures, dist coeff fixed).  2 \- Like
1, but includes parameters affecting all ph positions.  3 \- Scenario
for use in fine tuning cfg to match routine single pinhole exposures.
All parameters affecting 1ph exposures except dist coeffs are included
and parameter ranges are small. (For use by predict in 1ph case).  4 \-
Like 3 but includes parameters  affecting all ph positions (Standard
for use by predict in 9ph case and 2dmap).   (long; default: 3). The full name of this option for the EsoRex configuration
file is \fBxsh.xsh_predict.model\-scenario\fR [default = \fI3\fR].

.PP
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.

.SH SEE ALSO
The full documentation for the xshoo pipeline can be downloaded as 
a PDF file using the following URL:
.IP
.B ftp://ftp.eso.org/pub/dfs/pipelines/xshoo/xshoo\-pipeline\-manual\-12.1.pdf
.PP
An overview over the existing ESO pipelines can be found on the web page
\fBhttp://www.eso.org/sci/software/pipelines/\fR.
.PP
Basic documentation about the EsoRex program can be found at the esorex (1) 
man page.
.PP
It is possible to call the pipelines from python using the python\-cpl package.
See \fBhttp://packages.python.org/python\-cpl/index.html\fR for further
information.
.PP
The other recipes of the xshoo pipeline are
.IR xsh_cfg_recover (7),
.IR xsh_lingain (7),
.IR xsh_geom_ifu (7),
.IR xsh_wavecal (7),
.IR xsh_scired_slit_nod (7),
.IR xsh_respon_slit_nod (7),
.IR xsh_mdark (7),
.IR xsh_respon_slit_offset (7),
.IR xsh_orderpos (7),
.IR xsh_scired_ifu_stare_drl (7),
.IR xsh_scired_ifu_stare (7),
.IR xsh_flexcomp (7),
.IR xsh_scired_ifu_offset_drl (7),
.IR xsh_util_physmod (7),
.IR xsh_respon_slit_stare (7),
.IR xsh_2dmap (7),
.IR xsh_mflat (7),
.IR xsh_mbias (7),
.IR xsh_scired_ifu_offset (7),
.IR xsh_scired_slit_stare (7),
.IR xsh_scired_slit_offset (7)

.SH VERSION
xsh_predict 2.5.2

.SH AUTHOR
P.Goldoni, L.Guglielmi, R. Haigron, F. Royer, P. Bristow, D. Bramich, A. Modigliani <amodigli@eso.org>

.SH 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>.

.SH 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
