xsh_model
[Xshooter Recipes]

Data Structures

struct  SimAnneal

Defines

#define RECIPE_ID   "xsh_model_compute"
#define RECIPE_AUTHOR   "P. Bristow"
#define RECIPE_CONTACT   "bristowp@eso.org"
#define RECIPE_ID   "xsh_util_guess_xy"
#define RECIPE_AUTHOR   "A.Modigliani, P. Bristow"
#define RECIPE_CONTACT   "amodigli@eso.org"
#define RECIPE_ID   "xsh_util_physmod"
#define RECIPE_AUTHOR   "A.Modigliani, P. Bristow"
#define RECIPE_CONTACT   "amodigli@eso.org"
#define BIG_VAL   400000.0
#define BITS   31
#define WORD_BIT   32
#define MSB   0x40000000L
#define ALL_BITS   0x7fffffffL
#define HALF_RANGE   0x20000000L
#define STEP   7
#define ALL_BITS   0xffffffff
#define uniform(a, b)   ( a + (b - a) * xsh_dr250() )
#define HUGE   HUGE_VAL
#define PI   3.1415626536
#define PI2   (PI/2.0)

Functions

static int xsh_model_anneal_create (cpl_plugin *plugin)
 Setup the recipe options.
static int xsh_model_anneal_exec (cpl_plugin *plugin)
 Execute the plugin instance given by the interface.
static int xsh_model_anneal_destroy (cpl_plugin *plugin)
 Destroy what has been created by the 'create' function.
static int xsh_model_anneal (cpl_parameterlist *parlist, cpl_frameset *frameset)
 Interpret the command line options and execute the data processing.
static int xsh_model_anneal_save (const cpl_table *out_table, cpl_parameterlist *parlist, cpl_frameset *set)
 Save the product of the recipe.
int cpl_plugin_get_info (cpl_pluginlist *list)
 Build the list of available plugins, for this module.
static int xsh_model_create (cpl_plugin *plugin)
 Setup the recipe options.
static int xsh_model_exec (cpl_plugin *plugin)
 Execute the plugin instance given by the interface.
static int xsh_model_destroy (cpl_plugin *plugin)
 Destroy what has been created by the 'create' function.
static int xsh_model (cpl_parameterlist *parlist, cpl_frameset *frameset)
 Interpret the command line options and execute the data processing.
static int xsh_model_reduce (const char *wave_list_file, const char *test_par_file)
 The actual model computation takes place here.
static int xsh_model_first_anneal_create (cpl_plugin *plugin)
 Setup the recipe options.
static int xsh_model_first_anneal_exec (cpl_plugin *plugin)
 Execute the plugin instance given by the interface.
static int xsh_model_first_anneal_destroy (cpl_plugin *plugin)
 Destroy what has been created by the 'create' function.
static int xsh_util_genconfig_create (cpl_plugin *plugin)
 Setup the recipe options.
static int xsh_util_genconfig_exec (cpl_plugin *plugin)
 Execute the plugin instance given by the interface.
static int xsh_util_genconfig_destroy (cpl_plugin *plugin)
 Destroy what has been created by the 'create' function.
static int xsh_util_genconfig (cpl_parameterlist *parlist, cpl_frameset *framelist)
 The FITS file creation occurs here.
static int xsh_util_genconfig_save (cpl_table *out_table, cpl_parameterlist *parlist, cpl_frameset *set)
 Save the product of the recipe.
static int xsh_util_guess_xy_create (cpl_plugin *plugin)
 Setup the recipe options.
static int xsh_util_guess_xy_exec (cpl_plugin *plugin)
 Execute the plugin instance given by the interface.
static int xsh_util_guess_xy_destroy (cpl_plugin *plugin)
 Destroy what has been created by the 'create' function.
static int xsh_util_guess_xy (cpl_parameterlist *parameters, cpl_frameset *frameset)
 The FITS file creation occurs here.
static int xsh_util_physmod_create (cpl_plugin *plugin)
 Setup the recipe options.
static int xsh_util_physmod_exec (cpl_plugin *plugin)
 Execute the plugin instance given by the interface.
static int xsh_util_physmod_destroy (cpl_plugin *plugin)
 Destroy what has been created by the 'create' function.
static int xsh_util_physmod (cpl_parameterlist *parameters, cpl_frameset *frameset)
 The FITS file creation occurs here.
void xsh_report_cpu (FILE *fp, char *str)
void get_cpu_time (double *usertime, double *systime)
void xsh_3_assign (int loc, double val)
void xsh_3_output_data (double *)
cpl_table * xsh_model_anneal_comp (ann_all_par *p_all_par, int nparam, double *abest, double *amin, double *amax, int *aname, struct xs_3 *p_xs_3, int DS_size, coord *msp_coord, DOUBLE *p_wlarray, DOUBLE **ref_ind, int maxit)
 Use the simulated annealing algorithm to adjust the model parameters so that the metric (mean Euclidean residual) is minimised.
float xsh_3_energy (double *a)
void xsh_r250_init (int sd)
unsigned int r250 (void)
double xsh_dr250 (void)
long xsh_set_seed (long int sd)
long get_seed (void)
unsigned long int xsh_randlcg (void)
static int equilibrate (float t, int n)
int xsh_SAInit (CostFunction f, int d)
void xsh_SAfree (void)
int xsh_SAiterations (int m)
int xsh_SAdwell (int m)
float xsh_SABoltzmann (float k)
float xsh_SAtemperature (float t)
float xsh_SAlearning_rate (float r)
float xsh_SAjump (float j)
float xsh_SArange (float r)
void xsh_SAinitial (double *xi)
void xsh_SAcurrent (double *xc)
void xsh_SAoptimum (double *xb)
float xsh_SAmelt (int iters)
float xsh_SAanneal (int iters)

Variables

static char xsh_model_anneal_description []
static char xsh_model_anneal_description_short []
static char xsh_model_compute_description_short [] = "Development Only"
static char xsh_model_compute_description []
static const int vectordim = 4
static char xsh_model_first_anneal_description []
static char xsh_model_first_anneal_description_short []
static char xsh_util_genconfig_description []
static char xsh_util_guess_xy_description []
static char xsh_util_guess_xy_description_short [] = "Generate physical model guesses"
static char xsh_util_physmod_description []
static char xsh_util_physmod_description_short [] = "Generate physical model products"
int n = 0
int * chip
int * x
int * y
struct xs_3local_p_xs
int local_nparam
double * local_p_abest
double * local_p_amin
double * local_p_amax
int * local_p_aname
ann_all_parlocal_p_all_par
DOUBLE p_obsx [10000]
DOUBLE p_obsy [10000]
DOUBLE p_obsf [10000]
DOUBLEp_wl
DOUBLE ** ref
int p_obsarm [10000]
int p_obsorder [10000]
int sp_array [10000]
int * p_chipmod
int size
int mm
static unsigned int r250_buffer [250]
static int r250_index
static long int the_quotient = LONG_MAX / 16807L
static long int the_remainder = LONG_MAX % 16807L
static long int seed_val = 1L
static SimAnneal s

xsh_util_model_SPF_create

creates the model Spectral Format table corresponding to the best found model configuration

Parameters:
xsh_config_anneal frame of annealed model configuration parameters
xsh_instrument instrument instrument ARM setting
Returns:
output Spectral Format Table corresponding to model configuration


static cpl_frame * xsh_util_model_SPF_create (cpl_frame *config_frame, xsh_instrument *instrument)

Detailed Description

This recipe Compute optimum config given wavelengths and observed detected positions See man-page for details.

This recipe is a wrapper which calls the model kernel to generate simulated 2D data. IT IS FOR TEST PURPOSES ONLY

This recipe is used to generate the model configuration file. See man-page for details.

This recipe is used to generate the physical model products. See man-page for details.

Physical model random CPU time computation functions See man-page for details.

Physical model metric computation See man-page for details.

Physical model random generator See man-page for details.

Physical model Simulated Annealing functions See man-page for details.


Define Documentation

#define ALL_BITS   0xffffffff

Definition at line 59 of file xsh_model_randlcg.c.

#define ALL_BITS   0x7fffffffL

Definition at line 94 of file xsh_model_r250.c.

Referenced by xsh_dr250(), and xsh_r250_init().

#define BIG_VAL   400000.0

Definition at line 72 of file xsh_model_metric.c.

Referenced by xsh_3_energy().

#define BITS   31

Definition at line 79 of file xsh_model_r250.c.

Referenced by xsh_r250_init().

#define HALF_RANGE   0x20000000L

Definition at line 95 of file xsh_model_r250.c.

Referenced by xsh_r250_init().

#define HUGE   HUGE_VAL

Definition at line 79 of file xsh_model_sa.c.

Referenced by xsh_SAInit().

#define MSB   0x40000000L

Definition at line 93 of file xsh_model_r250.c.

Referenced by xsh_r250_init().

#define PI   3.1415626536

Definition at line 83 of file xsh_model_sa.c.

#define PI2   (PI/2.0)

Definition at line 87 of file xsh_model_sa.c.

Referenced by xsh_SAInit().

#define RECIPE_AUTHOR   "A.Modigliani, P. Bristow"

Definition at line 59 of file xsh_util_physmod.c.

#define RECIPE_AUTHOR   "A.Modigliani, P. Bristow"

Definition at line 60 of file xsh_util_guess_xy.c.

#define RECIPE_AUTHOR   "P. Bristow"

Definition at line 75 of file xsh_model_compute.c.

#define RECIPE_CONTACT   "amodigli@eso.org"

Definition at line 60 of file xsh_util_physmod.c.

#define RECIPE_CONTACT   "amodigli@eso.org"

Definition at line 61 of file xsh_util_guess_xy.c.

#define RECIPE_CONTACT   "bristowp@eso.org"

Definition at line 76 of file xsh_model_compute.c.

#define RECIPE_ID   "xsh_util_physmod"

Definition at line 58 of file xsh_util_physmod.c.

#define RECIPE_ID   "xsh_util_guess_xy"

Definition at line 59 of file xsh_util_guess_xy.c.

#define RECIPE_ID   "xsh_model_compute"

Definition at line 74 of file xsh_model_compute.c.

#define STEP   7

Definition at line 96 of file xsh_model_r250.c.

Referenced by xsh_r250_init().

#define uniform ( a,
 )     ( a + (b - a) * xsh_dr250() )

Definition at line 75 of file xsh_model_sa.c.

Referenced by equilibrate(), xsh_SAanneal(), and xsh_SAmelt().

#define WORD_BIT   32

Definition at line 80 of file xsh_model_r250.c.


Function Documentation

int cpl_plugin_get_info ( cpl_pluginlist *  list  ) 

Build the list of available plugins, for this module.

Parameters:
list the plugin list
Returns:
0 if everything is ok, -1 otherwise

Create the recipe instance and make it available to the application using the interface. This function is exported.

Parameters:
list the plugin list
Returns:
0 iff everything is ok

This function is exported.

Definition at line 108 of file xsh_util_physmod.c.

References xsh_get_license(), xsh_util_physmod_create(), xsh_util_physmod_description, xsh_util_physmod_description_short, xsh_util_physmod_destroy(), and xsh_util_physmod_exec().

static int equilibrate ( float  t,
int  n 
) [static]
void get_cpu_time ( double *  usertime,
double *  systime 
)

Definition at line 101 of file xsh_model_cputime.c.

Referenced by xsh_report_cpu().

long get_seed ( void   ) 

Definition at line 71 of file xsh_model_randlcg.c.

References seed_val.

unsigned int r250 ( void   ) 

Definition at line 176 of file xsh_model_r250.c.

References r250_buffer, and r250_index.

void xsh_3_assign ( int  loc,
double  val 
)
float xsh_3_energy ( double *  a  ) 
void xsh_3_output_data ( double *  a  ) 
double xsh_dr250 ( void   ) 

Definition at line 199 of file xsh_model_r250.c.

References ALL_BITS, r250_buffer, and r250_index.

static int xsh_model ( cpl_parameterlist *  parlist,
cpl_frameset *  frameset 
) [static]

Interpret the command line options and execute the data processing.

Parameters:
parlist the parameters list
frameset the frames list

In case of failure the cpl_error_code is set.

Definition at line 245 of file xsh_model_compute.c.

References xs_3::arm, check, check_msg, instrument, XSH_ARM_NIR, XSH_ARM_UVB, XSH_ARM_VIS, xsh_find_model_testpar(), xsh_find_model_wavelist(), xsh_instrument_free(), xsh_instrument_new(), xsh_instrument_set_arm(), and xsh_model_reduce().

Referenced by xsh_model_exec().

static int xsh_model_anneal ( cpl_parameterlist *  parlist,
cpl_frameset *  frameset 
) [static]

Interpret the command line options and execute the data processing.

Parameters:
parlist the parameters list
frameset the frames list
Returns:
0 if everything is ok

Definition at line 208 of file xsh_model_anneal.c.

References xs_3::arm, check, instrument, XSH_ARM_NIR, XSH_ARM_UVB, XSH_ARM_VIS, xsh_find_calpro_model_config(), xsh_find_calpro_model_meas_coord(), xsh_instrument_free(), xsh_instrument_new(), xsh_instrument_set_arm(), xsh_model_anneal_reduce(), and xsh_model_anneal_save().

Referenced by xsh_model_anneal_exec().

cpl_table* xsh_model_anneal_comp ( ann_all_par p_all_par,
int  nparam,
double *  abest,
double *  amin,
double *  amax,
int *  aname,
struct xs_3 p_xs_3,
int  DS_size,
coord msp_coord,
DOUBLE p_wlarray,
DOUBLE **  ref_ind,
int  maxit 
)

Use the simulated annealing algorithm to adjust the model parameters so that the metric (mean Euclidean residual) is minimised.

Parameters:
p_all_par Pointer to structure of parameters to be optimised
nparam Number of parameters to be optimised
abest Array of initial guess values
amin Array of lower limit values
amax Array of upper limit values
aname Array of parameter names
p_xs_3 Model parameter structure
DS_size Number of wavelengths
msp_coord Structure containing measured positions
p_wlarray pointer to the array containing the list of wavelengths
ref_ind Refractive index
maxit Maximum number of iterations
Returns:
conf_tab Table of optimised parameters

Definition at line 122 of file xsh_model_metric.c.

References coord::arm, check, coord::flux, local_nparam, local_p_abest, local_p_amax, local_p_amin, local_p_aname, NO_VALUE, coord::order, p_obsarm, p_obsf, p_obsorder, p_obsx, p_obsy, p_wl, ref, size, coord::slit_pos, sp_array, coord::x, xsh_3_energy(), xsh_3_output_data(), xsh_model_io_output_cfg(), xsh_report_cpu(), xsh_SAanneal(), xsh_SABoltzmann(), xsh_SAcurrent(), xsh_SAInit(), xsh_SAinitial(), xsh_SAlearning_rate(), xsh_SAmelt(), xsh_SAtemperature(), and coord::y.

Referenced by xsh_model_anneal_reduce(), xsh_model_first_anneal(), and xsh_model_pipe_anneal().

static int xsh_model_anneal_create ( cpl_plugin *  plugin  )  [static]

Setup the recipe options.

Parameters:
plugin the plugin
Returns:
0 if everything is ok

Defining the command-line/configuration parameters for the recipe.

Definition at line 126 of file xsh_model_anneal.c.

References assure, and xsh_init().

static int xsh_model_anneal_destroy ( cpl_plugin *  plugin  )  [static]

Destroy what has been created by the 'create' function.

Parameters:
plugin the plugin
Returns:
0 if everything is ok

Definition at line 187 of file xsh_model_anneal.c.

static int xsh_model_anneal_exec ( cpl_plugin *  plugin  )  [static]

Execute the plugin instance given by the interface.

Parameters:
plugin the plugin
Returns:
0 if everything is ok

Definition at line 168 of file xsh_model_anneal.c.

References xsh_model_anneal().

static int xsh_model_anneal_save ( const cpl_table *  out_table,
cpl_parameterlist *  parlist,
cpl_frameset *  set 
) [static]

Save the product of the recipe.

Parameters:
out_table the table
parlist the input list of parameters
set the input frame set
Returns:
0 if everything is ok, -1 otherwise

Definition at line 312 of file xsh_model_anneal.c.

References XSH_MOD_CFG.

Referenced by xsh_model_anneal().

static int xsh_model_create ( cpl_plugin *  plugin  )  [static]

Setup the recipe options.

Parameters:
plugin the plugin
Returns:
0 if everything is ok

Create the recipe instance and make it available to the application using the interface.

Definition at line 160 of file xsh_model_compute.c.

References xsh_init().

static int xsh_model_destroy ( cpl_plugin *  plugin  )  [static]

Destroy what has been created by the 'create' function.

Parameters:
plugin the plugin
Returns:
0 if everything is ok

Definition at line 222 of file xsh_model_compute.c.

static int xsh_model_exec ( cpl_plugin *  plugin  )  [static]

Execute the plugin instance given by the interface.

Parameters:
plugin the plugin
Returns:
0 if everything is ok

Definition at line 202 of file xsh_model_compute.c.

References xsh_model().

static int xsh_model_first_anneal_create ( cpl_plugin *  plugin  )  [static]

Setup the recipe options.

Parameters:
plugin the plugin
Returns:
0 if everything is ok

Defining the command-line/configuration parameters for the recipe.

Definition at line 98 of file xsh_model_first_anneal.c.

References assure, and xsh_init().

static int xsh_model_first_anneal_destroy ( cpl_plugin *  plugin  )  [static]

Destroy what has been created by the 'create' function.

Parameters:
plugin the plugin
Returns:
0 if everything is ok

Definition at line 166 of file xsh_model_first_anneal.c.

static int xsh_model_first_anneal_exec ( cpl_plugin *  plugin  )  [static]

Execute the plugin instance given by the interface.

Parameters:
plugin the plugin
Returns:
0 if everything is ok

Definition at line 147 of file xsh_model_first_anneal.c.

References xsh_model_first_anneal().

static int xsh_model_reduce ( const char *  wave_list_file,
const char *  test_par_file 
) [static]

The actual model computation takes place here.

Parameters:
wave_list_file input line list filename
test_par_file input test model cfg filename
Returns:
0 if everything is ok, -1 in error case

Definition at line 309 of file xsh_model_compute.c.

References xs_3::arm, xs_3::ASIZE, xs_3::blaze_pad, xs_3::BSIZE, xsh_order::cenpoly, check, check_msg, xs_3::chippix, xs_3::chipxpix, xs_3::chipypix, cknull, xsh_order::endy, endy, xs_3::es_s, xs_3::es_w, xs_3::es_x, xs_3::es_y, xs_3::es_y_tot, xs_3::grat_alpha, xs_3::grat_beta, instrument, xsh_order_list::list, M_PI, xs_3::morder, xs_3::morder_max, xs_3::morder_min, NIR_ASIZE, NIR_BSIZE, NIR_chipxpix, NIR_chipypix, NIR_morder, NIR_morder_max, NIR_morder_min, NIR_SIZE, xs_3::nug, XSH_INSTRCONFIG::ny, ny, xs_3::pix, xs_3::pix_X, xs_3::pix_Y, xs_3::sg, xsh_order_list::size, xs_3::SIZE, xs_3::slit_scale, xsh_order::starty, starty, xs_3::t_ir_p2, xs_3::temper, UVB_ASIZE, UVB_BSIZE, UVB_chipxpix, UVB_chipypix, UVB_morder, UVB_morder_max, UVB_morder_min, UVB_SIZE, VIS_ASIZE, VIS_BSIZE, VIS_chipxpix, VIS_chipypix, VIS_morder, VIS_morder_max, VIS_morder_min, VIS_SIZE, x, xs_3::xpospix, xsh_3_detpix(), xsh_3_eval(), xsh_3_init(), xsh_alloc1Darray(), xsh_alloc1Darray_INT(), xsh_alloc2Darray(), XSH_ARCLIST_TABLE_COLNAME_FLUX, XSH_ARCLIST_TABLE_COLNAME_WAVELENGTH, XSH_ARM_NIR, XSH_ARM_UVB, XSH_ARM_VIS, XSH_ASSURE_NOT_NULL, xsh_copy2D_to_1D(), XSH_DEBUG_LEVEL_MEDIUM, xsh_debug_level_set(), xsh_error_dump, xsh_free2Darray(), xsh_free_frame(), xsh_instrument_free(), xsh_instrument_get_arm(), xsh_instrument_get_config(), xsh_instrument_new(), xsh_instrument_set_arm(), xsh_instrument_set_binx(), xsh_instrument_set_biny(), xsh_instrument_set_mode(), XSH_MOD_CFG_NIR, XSH_MOD_CFG_UVB, XSH_MOD_CFG_VIS, XSH_MODE_IFU, xsh_model_binxy(), xsh_model_config_load_best(), xsh_model_get_xy(), xsh_model_io_output_cfg_txt(), xsh_model_locus(), xsh_model_maps_create(), xsh_model_order_edges_tab_create(), xsh_model_refining_detect(), xsh_model_spectralformat_create(), xsh_model_THE_create(), xsh_msg, xsh_order_list_free(), xsh_order_list_load(), XSH_ORDERS_NIR, XSH_ORDERS_UVB, XSH_ORDERS_VIS, xsh_pfits_get_pcatg(), xsh_ref_ind_read(), XSH_TABLE_FREE, XSH_TABLE_LOAD, y, and xs_3::ypospix.

Referenced by xsh_model().

void xsh_r250_init ( int  sd  ) 

Definition at line 120 of file xsh_model_r250.c.

References ALL_BITS, BITS, HALF_RANGE, MSB, r250_buffer, r250_index, STEP, xsh_randlcg(), and xsh_set_seed().

Referenced by xsh_SAInit().

unsigned long int xsh_randlcg ( void   ) 

Definition at line 77 of file xsh_model_randlcg.c.

References seed_val, the_quotient, and the_remainder.

Referenced by xsh_r250_init().

void xsh_report_cpu ( FILE *  fp,
char *  str 
)

Definition at line 72 of file xsh_model_cputime.c.

References get_cpu_time().

Referenced by xsh_model_anneal_comp().

float xsh_SAanneal ( int  iters  ) 
float xsh_SABoltzmann ( float  k  ) 

Definition at line 267 of file xsh_model_sa.c.

References SimAnneal::K.

Referenced by xsh_model_anneal_comp().

void xsh_SAcurrent ( double *  xc  ) 

Definition at line 345 of file xsh_model_sa.c.

References SimAnneal::dimension, and SimAnneal::x.

Referenced by xsh_model_anneal_comp().

int xsh_SAdwell ( int  m  ) 

Definition at line 252 of file xsh_model_sa.c.

References SimAnneal::dwell.

void xsh_SAfree ( void   ) 

Definition at line 227 of file xsh_model_sa.c.

References SimAnneal::dimension, SimAnneal::x, SimAnneal::xbest, and SimAnneal::xnew.

int xsh_SAInit ( CostFunction  f,
int  d 
)
void xsh_SAinitial ( double *  xi  ) 

Definition at line 333 of file xsh_model_sa.c.

References SimAnneal::dimension, and SimAnneal::x.

Referenced by xsh_model_anneal_comp().

int xsh_SAiterations ( int  m  ) 

Definition at line 239 of file xsh_model_sa.c.

References SimAnneal::maxit.

Referenced by xsh_3_energy().

float xsh_SAjump ( float  j  ) 

Definition at line 306 of file xsh_model_sa.c.

References SimAnneal::c_jump.

float xsh_SAlearning_rate ( float  r  ) 

Definition at line 293 of file xsh_model_sa.c.

References SimAnneal::rho.

Referenced by xsh_model_anneal_comp().

float xsh_SAmelt ( int  iters  ) 
void xsh_SAoptimum ( double *  xb  ) 

Definition at line 358 of file xsh_model_sa.c.

References SimAnneal::dimension, and SimAnneal::xbest.

float xsh_SArange ( float  r  ) 

Definition at line 319 of file xsh_model_sa.c.

References SimAnneal::range.

float xsh_SAtemperature ( float  t  ) 

Definition at line 280 of file xsh_model_sa.c.

References SimAnneal::t0.

Referenced by xsh_model_anneal_comp().

long xsh_set_seed ( long int  sd  ) 

Definition at line 66 of file xsh_model_randlcg.c.

References seed_val.

Referenced by xsh_r250_init().

static int xsh_util_genconfig ( cpl_parameterlist *  parlist,
cpl_frameset *  framelist 
) [static]

The FITS file creation occurs here.

Parameters:
parlist the list of parameters.
framelist the frames list
Returns:
0 iff everything is ok The recipe expects a text file and will create a FITS file out of it.

Definition at line 191 of file xsh_util_genconfig.c.

References XSH_COL_MODEL_CONF_BEST, XSH_COL_MODEL_CONF_FLAG, XSH_COL_MODEL_CONF_HIGH, XSH_COL_MODEL_CONF_LOW, XSH_COL_MODEL_CONF_NAME, and xsh_util_genconfig_save().

Referenced by xsh_util_genconfig_exec().

static int xsh_util_genconfig_create ( cpl_plugin *  plugin  )  [static]

Setup the recipe options.

Parameters:
plugin the plugin
Returns:
0 iff everything is ok

Create the recipe instance and make it available to the application using the interface.

Definition at line 128 of file xsh_util_genconfig.c.

static int xsh_util_genconfig_destroy ( cpl_plugin *  plugin  )  [static]

Destroy what has been created by the 'create' function.

Parameters:
plugin the plugin
Returns:
0 iff everything is ok

Definition at line 169 of file xsh_util_genconfig.c.

static int xsh_util_genconfig_exec ( cpl_plugin *  plugin  )  [static]

Execute the plugin instance given by the interface.

Parameters:
plugin the plugin
Returns:
0 iff everything is ok

Definition at line 150 of file xsh_util_genconfig.c.

References xsh_util_genconfig().

static int xsh_util_genconfig_save ( cpl_table *  out_table,
cpl_parameterlist *  parlist,
cpl_frameset *  set 
) [static]

Save the product of the recipe.

Parameters:
out_table the table
parlist the input list of parameters
set the input frame set
Returns:
0 if everything is ok, -1 otherwise

Definition at line 278 of file xsh_util_genconfig.c.

References XSH_MOD_CFG.

Referenced by xsh_util_genconfig().

static int xsh_util_guess_xy ( cpl_parameterlist *  parameters,
cpl_frameset *  frameset 
) [static]

The FITS file creation occurs here.

Parameters:
parameters the list of parameters.
frameset the frames list
Returns:
0 iff everything is ok The recipe expects a text file and will create a FITS file out of it.

Definition at line 228 of file xsh_util_guess_xy.c.

References binx, biny, check, instrument, RECIPE_ID, s, x, XSH_ARC_LINE_LIST, xsh_begin(), xsh_find_frame_with_tag(), xsh_free_frameset(), xsh_instrument_free(), XSH_MOD_CFG, xsh_model_binxy(), xsh_model_config_load_best(), xsh_model_get_xy(), xsh_msg, xsh_util_guess_xy_description_short, and y.

Referenced by xsh_util_guess_xy_exec().

static int xsh_util_guess_xy_create ( cpl_plugin *  plugin  )  [static]

Setup the recipe options.

Parameters:
plugin the plugin
Returns:
0 iff everything is ok

Create the recipe instance and make it available to the application using the interface.

Definition at line 138 of file xsh_util_guess_xy.c.

References check, RECIPE_ID, xsh_init(), and xsh_parameters_generic().

static int xsh_util_guess_xy_destroy ( cpl_plugin *  plugin  )  [static]

Destroy what has been created by the 'create' function.

Parameters:
plugin the plugin
Returns:
0 iff everything is ok

Definition at line 206 of file xsh_util_guess_xy.c.

static int xsh_util_guess_xy_exec ( cpl_plugin *  plugin  )  [static]

Execute the plugin instance given by the interface.

Parameters:
plugin the plugin
Returns:
0 iff everything is ok

Definition at line 187 of file xsh_util_guess_xy.c.

References xsh_util_guess_xy().

static cpl_frame * xsh_util_model_SPF_create ( cpl_frame *  config_frame,
xsh_instrument instrument 
) [static]
static int xsh_util_physmod ( cpl_parameterlist *  parameters,
cpl_frameset *  frameset 
) [static]

The FITS file creation occurs here.

Parameters:
parameters the list of parameters.
frameset the frames list
Returns:
0 iff everything is ok The recipe expects a text file and will create a FITS file out of it.

Definition at line 248 of file xsh_util_physmod.c.

References binx, biny, check, instrument, RECIPE_ID, xsh_add_product_image(), xsh_add_product_table_multi(), XSH_ARC_LINE_LIST, xsh_begin(), xsh_create_model_map(), xsh_find_frame_with_tag(), XSH_FREE, xsh_free_frameset(), XSH_GET_TAG_FROM_ARM, xsh_instrument_free(), xsh_instrument_set_binx(), xsh_instrument_set_biny(), XSH_MOD_CFG, XSH_PREFIX, XSH_SLIT_MAP, XSH_THEO_TAB_IFU, xsh_util_model_SPF_create(), xsh_util_physmod_description_short, xsh_util_physmod_model_THE_create(), and XSH_WAVE_MAP.

Referenced by xsh_util_physmod_exec().

static int xsh_util_physmod_create ( cpl_plugin *  plugin  )  [static]

Setup the recipe options.

Parameters:
plugin the plugin
Returns:
0 iff everything is ok

Create the recipe instance and make it available to the application using the interface.

Definition at line 142 of file xsh_util_physmod.c.

References check, RECIPE_ID, xsh_init(), and xsh_parameters_generic().

Referenced by cpl_plugin_get_info().

static int xsh_util_physmod_destroy ( cpl_plugin *  plugin  )  [static]

Destroy what has been created by the 'create' function.

Parameters:
plugin the plugin
Returns:
0 iff everything is ok

Definition at line 226 of file xsh_util_physmod.c.

Referenced by cpl_plugin_get_info().

static int xsh_util_physmod_exec ( cpl_plugin *  plugin  )  [static]

Execute the plugin instance given by the interface.

Parameters:
plugin the plugin
Returns:
0 iff everything is ok

Definition at line 207 of file xsh_util_physmod.c.

References xsh_util_physmod().

Referenced by cpl_plugin_get_info().


Variable Documentation

int* chip

Definition at line 78 of file xsh_model_metric.c.

Definition at line 82 of file xsh_model_metric.c.

Referenced by xsh_3_energy(), and xsh_model_anneal_comp().

double* local_p_abest

Definition at line 83 of file xsh_model_metric.c.

Referenced by xsh_3_energy(), and xsh_model_anneal_comp().

Definition at line 87 of file xsh_model_metric.c.

double* local_p_amax

Definition at line 85 of file xsh_model_metric.c.

Referenced by xsh_3_energy(), and xsh_model_anneal_comp().

double* local_p_amin

Definition at line 84 of file xsh_model_metric.c.

Referenced by xsh_3_energy(), and xsh_model_anneal_comp().

Definition at line 86 of file xsh_model_metric.c.

Referenced by xsh_3_energy(), and xsh_model_anneal_comp().

struct xs_3* local_p_xs

Definition at line 81 of file xsh_model_metric.c.

int mm
int n = 0

Definition at line 77 of file xsh_model_metric.c.

int* p_chipmod

Definition at line 93 of file xsh_model_metric.c.

int p_obsarm[10000]

Definition at line 92 of file xsh_model_metric.c.

Referenced by xsh_3_output_data(), and xsh_model_anneal_comp().

DOUBLE p_obsf[10000]

Definition at line 89 of file xsh_model_metric.c.

Referenced by xsh_3_energy(), xsh_3_output_data(), and xsh_model_anneal_comp().

int p_obsorder[10000]

Definition at line 92 of file xsh_model_metric.c.

Referenced by xsh_3_energy(), xsh_3_output_data(), and xsh_model_anneal_comp().

DOUBLE p_obsx[10000]

Definition at line 89 of file xsh_model_metric.c.

Referenced by xsh_3_energy(), xsh_3_output_data(), and xsh_model_anneal_comp().

DOUBLE p_obsy[10000]

Definition at line 89 of file xsh_model_metric.c.

Referenced by xsh_3_energy(), xsh_3_output_data(), and xsh_model_anneal_comp().

Definition at line 90 of file xsh_model_metric.c.

Referenced by xsh_3_energy(), xsh_3_output_data(), and xsh_model_anneal_comp().

unsigned int r250_buffer[250] [static]

Definition at line 113 of file xsh_model_r250.c.

Referenced by r250(), xsh_dr250(), and xsh_r250_init().

int r250_index [static]

Definition at line 114 of file xsh_model_r250.c.

Referenced by r250(), xsh_dr250(), and xsh_r250_init().

Definition at line 91 of file xsh_model_metric.c.

Referenced by xsh_3_energy(), xsh_3_output_data(), and xsh_model_anneal_comp().

SimAnneal s [static]
long int seed_val = 1L [static]

Definition at line 64 of file xsh_model_randlcg.c.

Referenced by get_seed(), xsh_randlcg(), and xsh_set_seed().

int size

Definition at line 94 of file xsh_model_metric.c.

Referenced by irplib_fill_table_DETWINUIT(), irplib_table_create_column(), main(), xsh_3_energy(), xsh_3_output_data(), xsh_afcthetab_create(), xsh_arclist_get_wavelength(), xsh_arclist_is_rejected(), xsh_arclist_reject(), xsh_arclist_restore(), xsh_atmos_ext_dump_ascii(), xsh_cfg_recover_add_peaks_xpos(), xsh_cfg_recover_guess_tab_corr_by_ordpos(), xsh_cfg_recover_measure_tab_xy_peaks(), xsh_create_dispersol_physmod(), xsh_create_master_bias2(), xsh_create_order_table(), xsh_create_poly_wavemap(), xsh_detect_order_edge(), xsh_detect_slitlet_ratio(), xsh_detmon_bpixs(), xsh_detmon_lg_find_dits_ndits(), xsh_dispersol_list_add(), xsh_frameset_average(), xsh_frameset_average_pre(), xsh_geom_ifu(), xsh_get_noffsets(), xsh_gfit_tests(), xsh_image_3d_save(), xsh_image_create_model_image(), xsh_image_divide_1D(), xsh_image_mflat_detect_blemishes(), xsh_image_mflat_detect_hotcold(), xsh_image_mult_1D(), xsh_iml_merge_avg(), xsh_linetilt_list_get_deltay(), xsh_linetilt_list_get_orders(), xsh_linetilt_list_get_posx(), xsh_linetilt_list_get_posy(), xsh_linetilt_list_get_pre_posy(), xsh_linetilt_list_get_sigma_y(), xsh_linetilt_list_get_slit_index(), xsh_linetilt_list_get_slits(), xsh_linetilt_list_get_wavelengths(), xsh_model_anneal_comp(), xsh_model_pipe_anneal(), xsh_opt_extract_orders(), xsh_order_list_create(), xsh_order_list_get_endy(), xsh_order_list_get_index_by_absorder(), xsh_order_list_get_starty(), xsh_order_list_merge(), xsh_pre_abs(), xsh_pre_data_window_median_flux_pa(), xsh_pre_data_window_sample_flux_pa(), xsh_pre_frameset_subtract_frame(), xsh_prepare(), xsh_property_dump(), xsh_rec_list_create(), xsh_rec_list_load(), xsh_rec_list_load_eso(), xsh_rec_list_set_data_size(), xsh_rectify_orders(), xsh_remove_cosmics(), xsh_resid_order_load(), xsh_resid_tab_load(), xsh_resid_tab_save(), xsh_spectralformat_list_get_orders(), xsh_spectralformat_list_load(), xsh_spectrum_load(), xsh_spectrum_load_order(), xsh_star_flux_list_dump_ascii(), xsh_star_flux_list_filter_median(), xsh_star_flux_list_save(), xsh_star_flux_list_save_order(), xsh_stringcat_any(), xsh_subtract_sky_nod(), xsh_the_map_get_detx(), xsh_the_map_get_dety(), xsh_the_map_get_order(), xsh_the_map_get_slit_index(), xsh_the_map_get_slit_position(), xsh_the_map_get_wavelength(), xsh_util_afc(), xsh_vector_divide_poly(), xsh_vector_integrate(), xsh_wavemap_lambda_range(), xsh_wavemap_list_create(), and xsh_wavemap_list_set_max_size().

int sp_array[10000]

Definition at line 92 of file xsh_model_metric.c.

Referenced by xsh_3_energy(), xsh_3_output_data(), and xsh_model_anneal_comp().

long int the_quotient = LONG_MAX / 16807L [static]

Definition at line 61 of file xsh_model_randlcg.c.

Referenced by xsh_randlcg().

long int the_remainder = LONG_MAX % 16807L [static]

Definition at line 62 of file xsh_model_randlcg.c.

Referenced by xsh_randlcg().

const int vectordim = 4 [static]

Definition at line 103 of file xsh_model_compute.c.

int* x
Initial value:
   "This recipe is for development use only.\n"

Definition at line 75 of file xsh_model_anneal.c.

Initial value:
"Compute optimum config given wavelengths and observed detected positions"

Definition at line 77 of file xsh_model_anneal.c.

Initial value:
   "This recipe is for development use only.\n"

Definition at line 98 of file xsh_model_compute.c.

char xsh_model_compute_description_short[] = "Development Only" [static]

Definition at line 96 of file xsh_model_compute.c.

Initial value:
   "Facilatates a first appro phys mod fit using interactively derived list of wavelengths and centroids.\n"

Definition at line 47 of file xsh_model_first_anneal.c.

Initial value:
"Compute optimum config given wavelengths and observed detected positions"

Definition at line 49 of file xsh_model_first_anneal.c.

Initial value:
"This recipe is used to generate the model configuration file.\n"
"The sof file contains the names of the input ASCII file\n"
"tagged with "XSH_UTIL_GENCONFIG_RAW".\n"
"The ASCII file must contain five columns:\n"
"1st: The best guess value\n"
"2nd: The low limit\n"
"3th: The high limit\n"
"4th: The Flag to recompute or not\n"
"5th: Name of the Parameter\n"
"The ASCII files are in the catalogs/ directory of the XSH distribution.\n"
"This recipe produces 1 file:\n"
"First product:     the table with the configuration for the model.\n"
"                   (PRO CATG = XSH_MOD_CFG_TAB_ARM)\n"

Definition at line 66 of file xsh_util_genconfig.c.

Initial value:
  "This recipe finds X-Y guesses corresponding to 'grating_order','wavelength','slit' as in input tab. \n"
  "The sof file contains the names of the input FITS file\n"
  "tagged with XSH_MOD_CFG_arm.\n"
  "tagged with ARC_LINE_LIST_arm.\n"
  "This recipe has the following products:\n"
  "Model predictions (PRO CATG = MOD_arm)\n"

Definition at line 81 of file xsh_util_guess_xy.c.

char xsh_util_guess_xy_description_short[] = "Generate physical model guesses" [static]

Definition at line 89 of file xsh_util_guess_xy.c.

Referenced by xsh_util_guess_xy().

Initial value:
  "This recipe generates the theoretical and the spectral format tables. \n"
  "and possibly the model based wave map.\n"
  "The sof file contains the names of the input FITS file\n"
  "tagged with XSH_MOD_CFG_TAB_arm.\n"
  "tagged with ARC_LINE_LIST_arm.\n"
  "This recipe has the following products:\n"
  "Model order traces for nine pinholes (PRO CATG = THEO_TAB_MULT_arm)\n"
  "Model order traces for nine pinholes (PRO CATG = THEO_TAB_IFU_arm)\n"
  "Model order traces for central pinhole (PRO CATG = THEO_TAB_SING_arm)\n"
  "Spectral format table (PRO CATG = SPECTRAL_FORMAT_TAB_arm)\n" 
  "Wave map image (PRO CATG = WAVE_MAP_arm)\n" 
  "Slit map image (PRO CATG = SLIT_MAP_arm)\n"

Definition at line 79 of file xsh_util_physmod.c.

Referenced by cpl_plugin_get_info().

char xsh_util_physmod_description_short[] = "Generate physical model products" [static]

Definition at line 93 of file xsh_util_physmod.c.

Referenced by cpl_plugin_get_info(), and xsh_util_physmod().

int* y

Generated on 9 Mar 2011 for X-shooter Pipeline Reference Manual by  doxygen 1.6.1