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

extract/lib/proc_mpup.c File Reference

Misc. procedures used by find_mpup. More...

Go to the source code of this file.

Defines

#define DISLIN   1
#define MERGENEIGHBOR   1
#define MEDSIG2GAUSSIG   1.4826

Functions

int discard_null_mpups (int npup, int **ilist, int **jlist, float **value, int ppup[])
 Remove empty classes from mpup list.

int detect_mpups (IMAGE2D mpup, double threshold, int *ppup[], double *fpup[], float *xpup[], float *ypup[])
 Detect mpups in input frame and compute associated quantities.

int study_triangulation (IMAGE2D mpup, float xpup[], float ypup[], int npup, int iadj[], int iend[], double xtri[], double ytri[], double stri[], double ltri[], double atri[])
 Study of the (raw) mpup triangulation.

void mpup_orders (double fpup[], int opup[], int npup, double f[3], double df[3])
 Classify mpups according to their orders and compute mean fluxes.

void rotate_coord (float x[], float y[], int n, float x0, float y0, float angle, float xr[], float yr[])
 Rotate coordinates.

int select_mpup_dist (float x0, float y0, float maxdist, int npup, float xpup[], float ypup[], int opup[], int icen[])
 Select mpups according to distance criterion.

int select_mpup_sharpest_smooth (float maxdist, int npup, float xpup[], float ypup[], int opup[], float spup[], int icen[])
 Select mpups closest to the (median-smoothed) sharpest one.


Detailed Description

Misc. procedures used by find_mpup.

Copyright:
(c) 2003 CRAL-Observatoire de Lyon / IPNL
Date:
Thu Feb 3 16:12:39 2005
Author:
Yannick Copin <y.copin@ipnl.in2p3.fr>

Author
ycopin
Version:
Revision
1.18
Id
proc_mpup.c,v 1.18 2005/04/20 09:52:28 ycopin Exp

Definition in file proc_mpup.c.


Define Documentation

#define DISLIN   1
 

Local flag for DISLIN output (submitted to HAVE_LIBDISLIN definition)

Definition at line 26 of file proc_mpup.c.

#define MERGENEIGHBOR   1
 

Neighborhood for micropupil merging

Definition at line 29 of file proc_mpup.c.

Referenced by detect_mpups().

#define MEDSIG2GAUSSIG   1.4826
 

Conversion median sigma to gaussian sigma

Definition at line 32 of file proc_mpup.c.

Referenced by detect_mpups().


Function Documentation

int discard_null_mpups int  npup,
int **  ilist,
int **  jlist,
float **  value,
int  ppup[]
 

Remove empty classes from mpup list.

Parameters:
npup Nb of classes (input)
ilist i-index of pixels in mpups (2D-array)
jlist j-index of pixels in mpups (2D-array)
value flux of pixels in mpups (2D-array)
ppup nb of pixels in mpups
Returns:
Nb of non-null mpups

Definition at line 47 of file proc_mpup.c.

Referenced by detect_mpups().

int detect_mpups IMAGE2D  mpup,
double  threshold,
int *  ppup[],
double *  fpup[],
float *  xpup[],
float *  ypup[]
 

Detect mpups in input frame and compute associated quantities.

Parameters:
mpup input frame
threshold detection limit for the mpups
ppup nb of pixels in mpups (dynamically allocated)
fpup total flux in mpups (dynamically allocated)
xpup centroid (x) of mpups (dynamically allocated)
ypup centroid (y) of mpups (dynamically allocated)
Returns:
total number of mpups

Definition at line 84 of file proc_mpup.c.

References discard_null_mpups(), MEDSIG2GAUSSIG, MERGENEIGHBOR, SNIFS_LENS_NX, SNIFS_LENS_NY, and SNIFS_LENS_PX.

Referenced by main().

Here is the call graph for this function:

int study_triangulation IMAGE2D  mpup,
float  xpup[],
float  ypup[],
int  npup,
int  iadj[],
int  iend[],
double  xtri[],
double  ytri[],
double  stri[],
double  ltri[],
double  atri[]
 

Study of the (raw) mpup triangulation.

Will clean up the raw mpup triangulation to keep only unique good-shape (half-square) triangles, and compute triangle quantities (center, surface, shortest lengthes, orientation). The xtri,...,atri double arrays should be allocated prior to call with size npup*6 (except ltri, of size npup*12).

Parameters:
mpup mpup frame
xpup 
ypup mpup positions
npup nb of mpups
iadj 
iend triangulation vectors, as issued from TRMESH
xtri 
ytri triangle barycenter (length: ntri)
stri triangle surface (length: ntri)
ltri shortest sides length (length: 2*ntri)
atri triangle orientation (length: ntri)
Returns:
final number of triangles (ntri)
Note:
If compilation variable HAVE_LIBDISLIN is defined, a graphical output of the triangulation can be stored in dislin_triangulation.eps using the graphical library DISLIN (in debug-mode).

Bug:
In previous versions of find_mpup, npts is initialized to iend[0]-1 instead of iend[0].

Definition at line 279 of file proc_mpup.c.

References DISLIN, Plot::Limits, plot_axes(), plot_increase_limits(), plot_initialize(), plot_set_limits(), plot_start(), plot_title(), SNIFS_LENS_PX, and Plot::Symbol.

Referenced by main().

Here is the call graph for this function:

void mpup_orders double  fpup[],
int  opup[],
int  npup,
double  f[3],
double  df[3]
 

Classify mpups according to their orders and compute mean fluxes.

Parameters:
fpup mpup flux
opup mpup order
npup nb of mpups
f mean flux for each mpup class
df flux dispersion for each mpup class

Definition at line 443 of file proc_mpup.c.

Referenced by main().

void rotate_coord float  x[],
float  y[],
int  n,
float  x0,
float  y0,
float  angle,
float  xr[],
float  yr[]
 

Rotate coordinates.

Parameters:
x 
y input coord.
n 
x0 
y0 center of rotation
angle angle of rotation (trigonometric radians)
xr 
yr rotated coord.

Definition at line 484 of file proc_mpup.c.

References angle, and x.

Referenced by main().

int select_mpup_dist float  x0,
float  y0,
float  maxdist,
int  npup,
float  xpup[],
float  ypup[],
int  opup[],
int  icen[]
 

Select mpups according to distance criterion.

Parameters:
x0 
y0 Center of reference
maxdist Maximal distance (minimal if <0)
npup 
xpup 
ypup 
opup Mpups number, position and order
icen Selected indices
Returns:
Nb of selected mpups

Definition at line 518 of file proc_mpup.c.

Referenced by select_mpup_sharpest_smooth().

int select_mpup_sharpest_smooth float  maxdist,
int  npup,
float  xpup[],
float  ypup[],
int  opup[],
float  spup[],
int  icen[]
 

Select mpups closest to the (median-smoothed) sharpest one.

Parameters:
maxdist Smoothing distance/Maximal distance
npup 
xpup 
ypup 
opup 
spup Mpups number, position, order and dispersion
icen Selected indices
Returns:
Nb of selected mpups

Definition at line 555 of file proc_mpup.c.

References minmax_f(), select_mpup_dist(), and spatial_filter().

Referenced by main().

Here is the call graph for this function:


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