Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

fit_gauss.c File Reference

Functions to fit a 2D gaussian function to a 2D array of values. More...

#include <math.h>
#include <string.h>
#include "ipc.h"
#include "analyze.h"
#include "lissom.h"
#include "fit_gauss.h"
#include "npsol.h"
#include "globals.h"

Include dependency graph for fit_gauss.c:

Include dependency graph

Go to the source code of this file.

Compounds

struct  SOLVER_DATA

Defines

#define DEFAULT_BOUND_r   1.0
#define DEFAULT_NET_DER_LEVEL   1
#define DEFAULT_NET_MIL   200
#define DEFAULT_NET_FP   -1.0
#define DEFAULT_LIN_SRCH_TOL   -1.0
#define DEFAULT_NET_OPT_TOL   -1.0
#define BUFSIZE   100

Functions

int NN_Configure_Solver (Conf *Config)
int NN_solver_cleanup (void)
int NN_solve (int *inform)
void NN_solver_allocate (void)
npsolfunreturn Objective_Function (INTEGER *mode, INTEGER *nwts, REAL *vars, REAL *objf, REAL *objgrd, INTEGER *nstate)
npsolfunreturn confun (INTEGER *mode, INTEGER *ncnln, INTEGER *n, INTEGER *nrowj, INTEGER *needc, REAL *x, REAL *c, REAL *cjac, INTEGER *nstate)
npsolfunreturn NN_OBJFUN (INTEGER *mode, INTEGER *n, REAL *x, REAL *objf, REAL *objgrd, INTEGER *nstate)
void setup_variable_bounds (double rlow, double rhigh, double thetalow, double thetahigh, double cxlow, double cxhigh, double cylow, double cyhigh, double xsigmalow, double xsigmahigh, double ysigmalow, double ysigmahigh)
void setup_solver (void)
void fit_gauss (double *r, double *theta, double *cx, double *cy, double *sigmax, double *sigmay)

Variables

int npsol_na_error_message_printed = 0
int npopt_na_error_message_printed = 0
struct SOLVER_DATA data
Conf Configuration
REAL Gradient [7]
REAL Variables [7]
REAL Lower_bounds [7]
REAL Upper_bounds [7]
INTEGER No_of_variables = 6
INTEGER nPrints = 0
int lowk
int highk
int lowl
int highl
INTEGER Solver_Status = 0


Detailed Description

Functions to fit a 2D gaussian function to a 2D array of values.

Created June 1994 by Joseph Sirosh.

Calls external NPSOL library in FORTRAN to do the nonlinear optimization; see npsol.h for more info. USE_NPSOL must be defined before using any of these routines or they won't actually call NPSOL.

If NPSOL is not available (e.g. since f2c is not available for non-GNU C systems) the program should still compile but warnings will be printed when those functions are used. To force NPSOL not to be used even if the program incorrectly guesses that it should be available, undefine USE_NPSOL.

Header:
/u/nn/cvsroot/lissom/src/fit_gauss.c,v 1.16 2000/04/21 20:47:23 jbednar Exp

Definition in file fit_gauss.c.


Define Documentation

#define DEFAULT_BOUND_r   1.0
 

Definition at line 31 of file fit_gauss.c.

#define DEFAULT_LIN_SRCH_TOL   -1.0
 

Definition at line 35 of file fit_gauss.c.

#define DEFAULT_NET_DER_LEVEL   1
 

Definition at line 32 of file fit_gauss.c.

#define DEFAULT_NET_FP   -1.0
 

Definition at line 34 of file fit_gauss.c.

#define DEFAULT_NET_MIL   200
 

Definition at line 33 of file fit_gauss.c.

#define DEFAULT_NET_OPT_TOL   -1.0
 

Definition at line 36 of file fit_gauss.c.


Function Documentation

int NN_Configure_Solver ( Conf * Config )
 

Definition at line 347 of file fit_gauss.c.

npsolfunreturn NN_OBJFUN ( INTEGER * mode,
INTEGER * n,
REAL * x,
REAL * objf,
REAL * objgrd,
INTEGER * nstate )
 

Definition at line 417 of file fit_gauss.c.

int NN_solve ( int * inform )
 

Definition at line 446 of file fit_gauss.c.

void NN_solver_allocate ( void )
 

Definition at line 265 of file fit_gauss.c.

npsolfunreturn Objective_Function ( INTEGER * mode,
INTEGER * nwts,
REAL * vars,
REAL * objf,
REAL * objgrd,
INTEGER * nstate )
 

Definition at line 160 of file fit_gauss.c.

npsolfunreturn confun ( INTEGER * mode,
INTEGER * ncnln,
INTEGER * n,
INTEGER * nrowj,
INTEGER * needc,
REAL * x,
REAL * c,
REAL * cjac,
INTEGER * nstate )
 

Definition at line 235 of file fit_gauss.c.

void fit_gauss ( double * r,
double * theta,
double * cx,
double * cy,
double * sigmax,
double * sigmay )
 

Definition at line 136 of file fit_gauss.c.

void setup_solver ( void )
 

Definition at line 115 of file fit_gauss.c.

void setup_variable_bounds ( double rlow,
double rhigh,
double thetalow,
double thetahigh,
double cxlow,
double cxhigh,
double cylow,
double cyhigh,
double xsigmalow,
double xsigmahigh,
double ysigmalow,
double ysigmahigh )
 

Definition at line 91 of file fit_gauss.c.


Variable Documentation

Conf Configuration
 

Definition at line 55 of file fit_gauss.c.

REAL Gradient[]
 

Definition at line 77 of file fit_gauss.c.

REAL Lower_bounds[]
 

Definition at line 78 of file fit_gauss.c.

INTEGER No_of_variables = 6
 

Definition at line 80 of file fit_gauss.c.

INTEGER Solver_Status = 0
 

Definition at line 84 of file fit_gauss.c.

REAL Upper_bounds[]
 

Definition at line 78 of file fit_gauss.c.

REAL Variables[]
 

Definition at line 77 of file fit_gauss.c.

int highk
 

Definition at line 83 of file fit_gauss.c.

int highl
 

Definition at line 83 of file fit_gauss.c.

int lowk
 

Definition at line 83 of file fit_gauss.c.

int lowl
 

Definition at line 83 of file fit_gauss.c.

INTEGER nPrints = 0
 

Definition at line 81 of file fit_gauss.c.

int npopt_na_error_message_printed = 0
 

Definition at line 39 of file fit_gauss.c.

int npsol_na_error_message_printed = 0
 

Definition at line 38 of file fit_gauss.c.


Generated at Mon Aug 21 00:30:59 2000 for RF-LISSOM by doxygen1.2.1 written by Dimitri van Heesch, © 1997-2000