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

extract/source/create_mask.c File Reference

Main file for create_mask. More...

Go to the source code of this file.

Defines

#define MAXDX   (0.5*SNIFS_INTERSP)

Functions

long nllsqfit_mask (long *mode, long *nlenses, long *npar, long *ldfj, double *par, double f[], double fjac[], long *nstate, long *iuser, double user[])
 Mask-fitting procedure.

int main (int argc, char **argv)

Variables

SnifsOpticsgloptics
Maxima_Set * glmaxset
IMAGE2D * glframe
int glFITARC
int glFITCONT
int glnlbda
float * glxppup
float * glyppup
double glpixsize
double gllbdapup
double * gllbda
double glnormmax


Detailed Description

Main file for create_mask.

Copyright:
(c) 2003 CRAL-Observatoire de Lyon
Date:
Date
2004/10/06 16:56:33
Author:
Yannick Copin <y.copin@ipnl.in2p3.fr>

Author
ycopin
Version:
Adapted from create_mask_SAU v1.1

Revision
1.23
Id
create_mask.c,v 1.23 2004/10/06 16:56:33 ycopin Exp

Definition in file create_mask.c.


Define Documentation

#define MAXDX   (0.5*SNIFS_INTERSP)
 

Definition at line 37 of file create_mask.c.

Referenced by main(), and nllsqfit_mask().


Function Documentation

long nllsqfit_mask long *  mode,
long *  nlenses,
long *  npar,
long *  ldfj,
double *  par,
double  f[],
double  fjac[],
long *  nstate,
long *  iuser,
double  user[]
 

Mask-fitting procedure.

To be used with nllsqfit_bnd. Derivatives are not provided.

Note:
Make heavy use of global variables

Todo:
Add 0th/2nd order fit, with blaze function as weighting (no need to look for a line/max if there's nothing!).

Should we use another function than RMS(dx) in fit to max? And what about a completely diffrent way to fit the arc. E.g. one could go through a peak detection scheme, and use a more-intuitive distance criterion to the peaks, still taking into account the fact that one peak should correspond to a single arc line...

Warning:
For the fit to the max, we use RMS(dx) on good points only, because the find_max routine is not very robust. We should use a mean with rejection...

Definition at line 71 of file create_mask.c.

References SnifsOptics::channel, SnifsOptics::filter, find_nearest_max(), glFITARC, glFITCONT, glframe, gllbda, gllbdapup, glmaxset, glnlbda, glnormmax, gloptics, glpixsize, glxppup, glyppup, SnifsOptics::grism, mask_param2optics(), MAXDX, print_mask_param(), RD_frame_interp(), snifs_optics_CCD2MLA(), snifs_optics_MLA2CCD(), unnorm_mask_param(), and Grism::w_disp.

Referenced by main().

int main int  argc,
char **  argv
 

Bug:
Do not check FCLASS yet: the preprocess does not propagate FCLASS on B-channel

Definition at line 313 of file create_mask.c.

References SnifsConfig::ccd, Channel, SnifsOptics::filter, frame_stats(), glFITARC, glFITCONT, glframe, gllbda, gllbdapup, glmaxset, glnlbda, glnormmax, gloptics, glpixsize, glxppup, glyppup, SnifsOptics::grism, init_snifs(), mask_param2optics(), MAXDX, MSK_ARC, MSK_DXNC, MSK_MAX, MSK_SIGNC, SnifsConfig::name, nllsqfit_mask(), nllsqfit_noderiv(), norm_mask_param(), open_image(), open_mask(), open_max(), SnifsConfig::optics, optics2mask_param(), SnifsDetector::pixsize, print_mask_param_in(), print_mask_param_out(), print_snifs_config(), pup_get_maxdata(), read_channel(), read_default_snifs_config(), read_lbdaref(), read_snifs_config_from_mask(), set_mask_param_limits(), unnorm_mask_param(), Grism::w_disp, and write_snifs_config_to_mask().


Variable Documentation

SnifsOptics* gloptics
 

Definition at line 39 of file create_mask.c.

Referenced by main(), and nllsqfit_mask().

Maxima_Set* glmaxset
 

Definition at line 40 of file create_mask.c.

Referenced by main(), and nllsqfit_mask().

IMAGE2D* glframe
 

Definition at line 41 of file create_mask.c.

Referenced by main(), and nllsqfit_mask().

int glFITARC
 

Definition at line 43 of file create_mask.c.

Referenced by main(), and nllsqfit_mask().

int glFITCONT
 

Definition at line 43 of file create_mask.c.

Referenced by main(), and nllsqfit_mask().

int glnlbda
 

Definition at line 43 of file create_mask.c.

Referenced by main(), and nllsqfit_mask().

float* glxppup
 

Definition at line 45 of file create_mask.c.

Referenced by main(), and nllsqfit_mask().

float * glyppup
 

Definition at line 45 of file create_mask.c.

Referenced by main(), and nllsqfit_mask().

double glpixsize
 

Definition at line 46 of file create_mask.c.

Referenced by main(), and nllsqfit_mask().

double gllbdapup
 

Definition at line 46 of file create_mask.c.

Referenced by main(), and nllsqfit_mask().

double * gllbda
 

Definition at line 46 of file create_mask.c.

Referenced by main(), and nllsqfit_mask().

double glnormmax
 

Definition at line 46 of file create_mask.c.

Referenced by main(), and nllsqfit_mask().


Generated on Tue Nov 23 18:04:22 2004 for Snifs by doxygen 1.3.3