Main Page | Modules | Data Structures | File List | Data Fields | Globals | Related Pages

extract/lib/proc_mask.c File Reference

Misc. procedures used by create_mask. More...

Go to the source code of this file.

Defines

#define LIMITS_RANGE   0.2

Functions

void norm_mask_param (Channel channel, double par[MASK_NPARAM])
 Mask parameters normalization.

void unnorm_mask_param (Channel channel, double par[MASK_NPARAM])
 Mask parameters unnormalization.

void set_mask_param_limits (double par[MASK_NPARAM], double parlb[MASK_NPARAM], double parub[MASK_NPARAM])
 Set limits to mask parameters.

void optics2mask_param (SnifsOptics *optics, double par[MASK_NPARAM])
 Copy mask parameters from SnifsOptics.

void mask_param2optics (double par[MASK_NPARAM], SnifsOptics *optics)
 Copy mask parameters to SnifsOptics.

void print_mask_param (double par[MASK_NPARAM])
 Print-out (non-normalized) mask parameters.

void pmpin_line (char *format, double par, double parlb, double parub)
 Print-out single mask parameter (including fit boundaries if needed).

void print_mask_param_in (double par[MASK_NPARAM], double parlb[MASK_NPARAM], double parub[MASK_NPARAM])
 Print-out (non-norm.) mask parameters (including fit boundaries).

void pmpout_line (char *format, double par, double epar)
 Print-out single mask parameter (including fit error if needed).

void print_mask_param_out (double par[MASK_NPARAM], double epar[MASK_NPARAM])
 Print-out (non-norm.) mask parameters (including fit errors).

int open_mask (char *maskname, TABLE *mask, char *mode)
 Open a mask table.

int read_local_model (TABLE *mask, int flag, double ***coeff)
 Read local coeffs from mask (position adjusment or sigma).

int has_local_model (int nc, double coeff[])
 Check if the local adjustment is valid (i.e. some coeffs are non-null).

int read_mask_arc (TABLE *mask, char *maskname, char *refname)
 Read reference arc from mask, including path.


Detailed Description

Misc. procedures used by create_mask.

Copyright:
(c) 2003 CRAL-Observatoire de Lyon
Date:
Tue Aug 2 03:26:21 2005
Author:
Yannick Copin <y.copin@ipnl.in2p3.fr>

Author
ycopin
Version:
Revision
1.19
Id
proc_mask.c,v 1.19 2005/08/02 14:41:42 ycopin Exp

Definition in file proc_mask.c.


Define Documentation

#define LIMITS_RANGE   0.2
 

Definition at line 21 of file proc_mask.c.

Referenced by set_mask_param_limits().


Function Documentation

void norm_mask_param Channel  channel,
double  par[MASK_NPARAM]
 

Mask parameters normalization.

Definition at line 29 of file proc_mask.c.

References BLUE_CHANNEL, CCDB_NX, CCDB_NY, CCDR_NX, CCDR_NY, NB_CHANNELS, RED_CHANNEL, SNIFSB_CAM_A1, SNIFSB_CAM_A2, SNIFSB_CAM_A3, SNIFSB_CAM_E, SNIFSB_CAM_F, SNIFSB_COLL_A1, SNIFSB_COLL_A2, SNIFSB_COLL_A3, SNIFSB_COLL_E, SNIFSB_COLL_F, SNIFSB_GRISM_ANG, SNIFSR_CAM_A1, SNIFSR_CAM_A2, SNIFSR_CAM_A3, SNIFSR_CAM_E, SNIFSR_CAM_F, SNIFSR_COLL_A1, SNIFSR_COLL_A2, SNIFSR_COLL_A3, SNIFSR_COLL_E, SNIFSR_COLL_F, SNIFSR_GRISM_ANG, and UNKNOWN_CHANNEL.

Referenced by main().

void unnorm_mask_param Channel  channel,
double  par[MASK_NPARAM]
 

Mask parameters unnormalization.

Definition at line 90 of file proc_mask.c.

References BLUE_CHANNEL, CCDB_NX, CCDB_NY, CCDR_NX, CCDR_NY, NB_CHANNELS, RED_CHANNEL, SNIFSB_CAM_A1, SNIFSB_CAM_A2, SNIFSB_CAM_A3, SNIFSB_CAM_E, SNIFSB_CAM_F, SNIFSB_COLL_A1, SNIFSB_COLL_A2, SNIFSB_COLL_A3, SNIFSB_COLL_E, SNIFSB_COLL_F, SNIFSB_GRISM_ANG, SNIFSR_CAM_A1, SNIFSR_CAM_A2, SNIFSR_CAM_A3, SNIFSR_CAM_E, SNIFSR_CAM_F, SNIFSR_COLL_A1, SNIFSR_COLL_A2, SNIFSR_COLL_A3, SNIFSR_COLL_E, SNIFSR_COLL_F, SNIFSR_GRISM_ANG, and UNKNOWN_CHANNEL.

Referenced by main(), and nllsqfit_mask().

void set_mask_param_limits double  par[MASK_NPARAM],
double  parlb[MASK_NPARAM],
double  parub[MASK_NPARAM]
 

Set limits to mask parameters.

Definition at line 143 of file proc_mask.c.

References LIMITS_RANGE, and MASK_NPARAM.

Referenced by main().

void optics2mask_param SnifsOptics optics,
double  par[MASK_NPARAM]
 

Copy mask parameters from SnifsOptics.

Definition at line 182 of file proc_mask.c.

References Grism::A, SnifsOptics::camera, SnifsOptics::center, SnifsOptics::collimator, CameraCollimator::distor, CameraCollimator::focal, SnifsOptics::grism, CameraCollimator::LateralColor, Grism::rotz, Grism::tiltx, and Grism::tilty.

Referenced by main().

void mask_param2optics double  par[MASK_NPARAM],
SnifsOptics optics
 

Copy mask parameters to SnifsOptics.

Definition at line 215 of file proc_mask.c.

References Grism::A, SnifsOptics::camera, SnifsOptics::center, SnifsOptics::collimator, CameraCollimator::distor, CameraCollimator::focal, SnifsOptics::grism, CameraCollimator::LateralColor, Grism::rotz, Grism::tiltx, and Grism::tilty.

Referenced by main(), and nllsqfit_mask().

void print_mask_param double  par[MASK_NPARAM]  ) 
 

Print-out (non-normalized) mask parameters.

Definition at line 248 of file proc_mask.c.

Referenced by nllsqfit_mask().

void pmpin_line char *  format,
double  par,
double  parlb,
double  parub
 

Print-out single mask parameter (including fit boundaries if needed).

Definition at line 267 of file proc_mask.c.

Referenced by print_mask_param_in().

void print_mask_param_in double  par[MASK_NPARAM],
double  parlb[MASK_NPARAM],
double  parub[MASK_NPARAM]
 

Print-out (non-norm.) mask parameters (including fit boundaries).

Definition at line 284 of file proc_mask.c.

References pmpin_line().

Referenced by main().

Here is the call graph for this function:

void pmpout_line char *  format,
double  par,
double  epar
 

Print-out single mask parameter (including fit error if needed).

Definition at line 316 of file proc_mask.c.

Referenced by print_mask_param_out().

void print_mask_param_out double  par[MASK_NPARAM],
double  epar[MASK_NPARAM]
 

Print-out (non-norm.) mask parameters (including fit errors).

Definition at line 333 of file proc_mask.c.

References pmpout_line().

Referenced by main().

Here is the call graph for this function:

int open_mask char *  maskname,
TABLE *  mask,
char *  mode
 

Open a mask table.

Parameters:
maskname Name of the mask
mask Mask structure
mode I/O mode (same as open_table)
Returns:
Error status

Definition at line 369 of file proc_mask.c.

Referenced by main().

int read_local_model TABLE *  mask,
int  flag,
double ***  coeff
 

Read local coeffs from mask (position adjusment or sigma).

Parameters:
mask Mask table
flag 1: dx (position adjustment), 2: sigma (X-disp.)
coeff Coefficients of the local model
Returns:
Nb of coeff. in the local model

Definition at line 403 of file proc_mask.c.

References MSK_DXNC, and MSK_SIGNC.

Referenced by main().

int has_local_model int  nc,
double  coeff[]
 

Check if the local adjustment is valid (i.e. some coeffs are non-null).

Parameters:
nc Nb of coeff. in the local model
coeff Coefficients of the local model
Returns:
True if some coeffs are non-null

Definition at line 465 of file proc_mask.c.

Referenced by main().

int read_mask_arc TABLE *  mask,
char *  maskname,
char *  refname
 

Read reference arc from mask, including path.

Parameters:
mask Mask table
maskname Mask name (from the cmd-line)
refname Output name
Returns:
Status
Note:
What did happen to the path field of the mask table?

Definition at line 487 of file proc_mask.c.

References MSK_ARC.

Referenced by main().


Generated on Thu Oct 27 00:00:05 2005 for Snifs by doxygen 1.3.5