Main Page | Modules | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals

Stats


Files

file  psMinimizeLMM.h
 minimization operations
file  psMinimizePolyFit.h
 minimization operations
file  psMinimizePowell.h
 minimization operations
file  psPolynomial.h
 Standard Mathematical Functions.
file  psPolynomial.h
 Standard Mathematical Functions.
file  psStats.h
 basic statistical operations

This file will hold the definition of the histogram and stats data structures.


Data Structures

struct  psMinimization
 A data structure for minimization routines. More...
struct  psMinConstrain
 A data structure for minimization routines. More...
struct  psPolynomial1D
 One-dimensional polynomial. More...
struct  psPolynomial2D
 Two-dimensional polynomial. More...
struct  psPolynomial3D
 Three-dimensional polynomial. More...
struct  psPolynomial4D
 Four-dimensional polynomial. More...
struct  p_chebyPolys
struct  psStats
 This is the generic statistics structure. More...
struct  psHistogram
 The basic histogram structure which contains bounds and bins. More...

Defines

#define PS_DETERMINE_BRACKET_STEP_SIZE   0.10
#define PS_MAX_LMM_ITERATIONS   100
#define PS_MAX_MINIMIZE_ITERATIONS   100
#define P_PSMINIMIZATION_SET_MAXITER(m, val)   *(int*)&m->maxIter = val
#define P_PSMINIMIZATION_SET_TOL(m, val)   *(float*)&m->tol = val
#define PS_ASSERT_POLY1D(NAME, RVAL)
#define PS_ASSERT_POLY_NON_NULL(NAME, RVAL)
#define PS_ASSERT_POLY_TYPE(NAME, TYPE, RVAL)
#define PS_POLY_PRINT_1D(NAME)
#define PS_POLY_PRINT_2D(NAME)

Typedefs

typedef float(* psMinimizeLMChi2Func )(psVector *deriv, const psVector *params, const psVector *x)
 Specifies the format of a user-defined function that the general Levenberg- Marquardt minimizer routine will accept.
typedef float(* psMinimizePowellFunc )(const psVector *params, const psArray *coords)
 Specifies the format of a user-defined function that the general Powell minimizer routine will accept.
typedef psVector *(* psMinimizeChi2PowellFunc )(const psVector *params, const psArray *coords)
 Specifies the format of a user-defined function that the general Powell chi- squared minimizer routine will accept.

Enumerations

enum  psPolynomialType { PS_POLYNOMIAL_ORD, PS_POLYNOMIAL_CHEB }
 Polynomial Type. More...
enum  psStatsOptions {
  PS_STAT_SAMPLE_MEAN = 0x000001, PS_STAT_SAMPLE_MEDIAN = 0x000002, PS_STAT_SAMPLE_STDEV = 0x000004, PS_STAT_SAMPLE_QUARTILE = 0x000008, PS_STAT_ROBUST_MEDIAN = 0x000010, PS_STAT_ROBUST_STDEV = 0x000020, PS_STAT_ROBUST_QUARTILE = 0x000040, PS_STAT_FITTED_MEAN = 0x000080, PS_STAT_FITTED_STDEV = 0x000100, PS_STAT_CLIPPED_MEAN = 0x000200,
  PS_STAT_CLIPPED_STDEV = 0x000400, PS_STAT_MAX = 0x000800, PS_STAT_MIN = 0x001000, PS_STAT_USE_RANGE = 0x002000, PS_STAT_USE_BINSIZE = 0x004000
}
 enumeration of statistical calculation options More...

Functions

psMinConstrainpsMinConstrainAlloc ()
psMinimizationpsMinimizationAlloc (int maxIter, float tol)
 Allocates a psMinimization structure.
bool psMemCheckMinimization (psPtr ptr)
bool psMinimizeLMChi2 (psMinimization *min, psImage *covar, psVector *params, psMinConstrain *constrain, const psArray *x, const psVector *y, const psVector *yWt, psMinimizeLMChi2Func func)
 Minimizes a specified function based on the Levenberg-Marquardt method.
bool psMinimizeGaussNewtonDelta (psVector *delta, const psVector *params, const psVector *paramMask, const psArray *x, const psVector *y, const psVector *yErr, psMinimizeLMChi2Func func)
psF64 p_psMinLM_SetABX (psImage *alpha, psVector *beta, const psVector *params, const psVector *paramMask, const psArray *x, const psVector *y, const psVector *dy, psMinimizeLMChi2Func func)
 Function used to set parameters for generating "best guess" in minimizing Chi-Squared value.
psPolynomial1DpsVectorFitPolynomial1D (psPolynomial1D *poly, const psVector *mask, psMaskType maskValue, const psVector *f, const psVector *fErr, const psVector *x)
 Derive a polynomial fit.
psPolynomial2DpsVectorFitPolynomial2D (psPolynomial2D *poly, const psVector *mask, psMaskType maskValue, const psVector *f, const psVector *fErr, const psVector *x, const psVector *y)
psPolynomial3DpsVectorFitPolynomial3D (psPolynomial3D *poly, const psVector *mask, psMaskType maskValue, const psVector *f, const psVector *fErr, const psVector *x, const psVector *y, const psVector *z)
psPolynomial4DpsVectorFitPolynomial4D (psPolynomial4D *poly, const psVector *mask, psMaskType maskValue, const psVector *f, const psVector *fErr, const psVector *x, const psVector *y, const psVector *z, const psVector *t)
psPolynomial1DpsVectorClipFitPolynomial1D (psPolynomial1D *poly, psStats *stats, const psVector *mask, psMaskType maskValue, const psVector *f, const psVector *fErr, const psVector *x)
psPolynomial2DpsVectorClipFitPolynomial2D (psPolynomial2D *poly, psStats *stats, const psVector *mask, psMaskType maskValue, const psVector *f, const psVector *fErr, const psVector *x, const psVector *y)
psPolynomial3DpsVectorClipFitPolynomial3D (psPolynomial3D *poly, psStats *stats, const psVector *mask, psMaskType maskValue, const psVector *f, const psVector *fErr, const psVector *x, const psVector *y, const psVector *z)
psPolynomial4DpsVectorClipFitPolynomial4D (psPolynomial4D *poly, psStats *stats, const psVector *mask, psMaskType maskValue, const psVector *f, const psVector *fErr, const psVector *x, const psVector *y, const psVector *z, const psVector *t)
bool psMinimizePowell (psMinimization *min, psVector *params, const psVector *paramMask, const psArray *coords, psMinimizePowellFunc func)
 Minimizes a specified function based on the Powell method.
bool psMinimizeChi2Powell (psMinimization *min, psVector *params, psMinConstrain *constrain, const psArray *coords, const psVector *value, const psVector *error, psMinimizeChi2PowellFunc model)
 Minimizes a specified function based on the Powell chi-squared method.
float psGaussian (float x, float mean, float sigma, bool normal)
 Evaluate a non-normalized Gaussian with the given mean and sigma at the given coordianate.
psVectorp_psGaussianDev (psF32 mean, psF32 sigma, unsigned int Npts)
 Produce a vector of random numbers from a Gaussian distribution with the specified mean and sigma.
psPolynomial1DpsPolynomial1DAlloc (psPolynomialType type, unsigned int nX)
 Allocates a psPolynomial1D structure with n terms.
psPolynomial2DpsPolynomial2DAlloc (psPolynomialType type, unsigned int nX, unsigned int nY)
 Allocates a 2-D polynomial structure.
psPolynomial3DpsPolynomial3DAlloc (psPolynomialType type, unsigned int nX, unsigned int nY, unsigned int nZ)
 Allocates a 3-D polynomial structure.
psPolynomial4DpsPolynomial4DAlloc (psPolynomialType type, unsigned int nX, unsigned int nY, unsigned int nZ, unsigned int nT)
 Allocates a 4-D polynomial structure.
psF64 psPolynomial1DEval (const psPolynomial1D *poly, psF64 x)
 Evaluates a 1-D polynomial at specific coordinates.
psF64 psPolynomial2DEval (const psPolynomial2D *poly, psF64 x, psF64 y)
 Evaluates a 2-D polynomial at specific coordinates.
psF64 psPolynomial3DEval (const psPolynomial3D *poly, psF64 x, psF64 y, psF64 z)
 Evaluates a 3-D polynomial at specific coordinates.
psF64 psPolynomial4DEval (const psPolynomial4D *poly, psF64 x, psF64 y, psF64 z, psF64 t)
 Evaluates a 4-D polynomial at specific coordinates.
psVectorpsPolynomial1DEvalVector (const psPolynomial1D *poly, const psVector *x)
 Evaluates a 1-D polynomial at specific sets of coordinates.
psVectorpsPolynomial2DEvalVector (const psPolynomial2D *poly, const psVector *x, const psVector *y)
 Evaluates a 2-D polynomial at specific sets of coordinates.
psVectorpsPolynomial3DEvalVector (const psPolynomial3D *poly, const psVector *x, const psVector *y, const psVector *z)
 Evaluates a 3-D polynomial at specific sets of coordinates.
psVectorpsPolynomial4DEvalVector (const psPolynomial4D *poly, const psVector *x, const psVector *y, const psVector *z, const psVector *t)
 Evaluates a 4-D polynomial at specific sets of coordinates.
bool psMemCheckPolynomial1D (psPtr ptr)
 Checks the type of a particular pointer.
bool psMemCheckPolynomial2D (psPtr ptr)
 Checks the type of a particular pointer.
bool psMemCheckPolynomial3D (psPtr ptr)
 Checks the type of a particular pointer.
bool psMemCheckPolynomial4D (psPtr ptr)
 Checks the type of a particular pointer.
psPolynomial1D ** p_psCreateChebyshevPolys (psS32 numPolys)
 Creates the specified number of chebyshev polys.
psStatspsVectorStats (psStats *stats, const psVector *in, const psVector *errors, const psVector *mask, psMaskType maskVal)
 Performs statistical calculations on a vector.
psStatspsStatsAlloc (psStatsOptions options)
 Allocator of the psStats structure.
bool psMemCheckStats (psPtr ptr)
 Checks the type of a particular pointer.
psHistogrampsHistogramAlloc (float lower, float upper, int n)
 Allocator for psHistogram where the bounds of the bins are implicitly specified through simply specifying an upper and lower limit along with the size of the bins.
bool psMemCheckHistogram (psPtr ptr)
 Checks the type of a particular pointer.
psHistogrampsHistogramAllocGeneric (const psVector *bounds)
 Allocator for psHistogram where the bounds of the bins are explicitly specified.
psHistogrampsVectorHistogram (psHistogram *out, const psVector *values, const psVector *errors, const psVector *mask, psMaskType maskVal)
 Calculate a histogram.
psBool p_psGetStatValue (const psStats *stats, psF64 *value)
 Extracts the statistic value specified by stats->options.


Define Documentation

#define P_PSMINIMIZATION_SET_MAXITER m,
val   )     *(int*)&m->maxIter = val
 

Definition at line 74 of file psMinimizeLMM.h.

#define P_PSMINIMIZATION_SET_TOL m,
val   )     *(float*)&m->tol = val
 

Definition at line 75 of file psMinimizeLMM.h.

#define PS_ASSERT_POLY1D NAME,
RVAL   ) 
 

Value:

if (false == psMemCheckPolynomial1D(NAME)) { \
    psError(PS_ERR_BAD_PARAMETER_NULL, true, \
            "Unallowable operation: argument %s is not a psPolynomial1D struct.\n",\
            #NAME); \
    return(RVAL); \
} \

Definition at line 312 of file psPolynomial.h.

#define PS_ASSERT_POLY_NON_NULL NAME,
RVAL   ) 
 

Value:

if ((NAME) == NULL || (NAME)->coeff == NULL) { \
    psError(PS_ERR_BAD_PARAMETER_NULL, true, \
            "Unallowable operation: polynomial %s or its coeffs is NULL.", \
            #NAME); \
    return(RVAL); \
} \

Definition at line 320 of file psPolynomial.h.

#define PS_ASSERT_POLY_TYPE NAME,
TYPE,
RVAL   ) 
 

Value:

if ((NAME)->type != TYPE) { \
    psError(PS_ERR_BAD_PARAMETER_TYPE, true, \
            "Unallowable operation: polynomial %s has wrong type.", #NAME); \
    return(RVAL); \
} \

Definition at line 328 of file psPolynomial.h.

#define PS_DETERMINE_BRACKET_STEP_SIZE   0.10
 

Definition at line 40 of file psMinimizeLMM.h.

#define PS_MAX_LMM_ITERATIONS   100
 

Definition at line 41 of file psMinimizeLMM.h.

#define PS_MAX_MINIMIZE_ITERATIONS   100
 

Definition at line 42 of file psMinimizeLMM.h.

#define PS_POLY_PRINT_1D NAME   ) 
 

Value:

printf("Poly %s: (nX) is (%d)\n", #NAME, NAME->nX);\
for (psS32 i = 0 ; i < NAME->nX+1 ; i++) {\
    printf("%s->coeff[%d] is %f\n", #NAME, i, NAME->coeff[i]); \
}\

Definition at line 335 of file psPolynomial.h.

#define PS_POLY_PRINT_2D NAME   ) 
 

Value:

printf("Poly %s: (nX, nY) is (%d, %d)\n", #NAME, NAME->nX, NAME->nY);\
for (psS32 i = 0 ; i < NAME->nX+1 ; i++) {\
    for (psS32 j = 0 ; j < NAME->nY+1 ; j++) {\
        printf("%s->coeff[%d][%d] is %f\n", #NAME, i, j, NAME->coeff[i][j]); \
    }\
}\

Definition at line 341 of file psPolynomial.h.


Typedef Documentation

typedef psVector*(* psMinimizeChi2PowellFunc)(const psVector *params,const psArray *coords)
 

Specifies the format of a user-defined function that the general Powell chi- squared minimizer routine will accept.

Returns:
psVector*: Calculated values given the parameters and coordinates.

Definition at line 71 of file psMinimizePowell.h.

typedef float(* psMinimizeLMChi2Func)(psVector *deriv,const psVector *params,const psVector *x)
 

Specifies the format of a user-defined function that the general Levenberg- Marquardt minimizer routine will accept.

Returns:
float: the single float value of the function given the parameters, positions, and derivatives.

Definition at line 104 of file psMinimizeLMM.h.

typedef float(* psMinimizePowellFunc)(const psVector *params,const psArray *coords)
 

Specifies the format of a user-defined function that the general Powell minimizer routine will accept.

Returns:
float: the single float value of the function given the parameters and coordinate vectors.

Definition at line 48 of file psMinimizePowell.h.


Enumeration Type Documentation

enum psPolynomialType
 

Polynomial Type.

Enumeration for Polynomial types.

Enumerator:
PS_POLYNOMIAL_ORD  Ordinary Polynomial.
PS_POLYNOMIAL_CHEB  Chebyshev Polynomial.

Definition at line 65 of file psPolynomial.h.

enum psStatsOptions
 

enumeration of statistical calculation options

See also:
psStats, psVectorStats, psImageStats
Enumerator:
PS_STAT_SAMPLE_MEAN  Sample Mean.
PS_STAT_SAMPLE_MEDIAN  Sample Median.
PS_STAT_SAMPLE_STDEV  Sample Standard Deviation.
PS_STAT_SAMPLE_QUARTILE  Sample Quartile.
PS_STAT_ROBUST_MEDIAN  Robust Median.
PS_STAT_ROBUST_STDEV  Robust Standarad Deviation.
PS_STAT_ROBUST_QUARTILE  Robust Quartile.
PS_STAT_FITTED_MEAN  Fitted Mean.
PS_STAT_FITTED_STDEV  Fitted Standard Deviation.
PS_STAT_CLIPPED_MEAN  Clipped Mean.
PS_STAT_CLIPPED_STDEV  Clipped Standard Deviation.
PS_STAT_MAX  Maximum.
PS_STAT_MIN  Minumum.
PS_STAT_USE_RANGE  Range.
PS_STAT_USE_BINSIZE  Binsize.

Definition at line 38 of file psStats.h.


Function Documentation

psPolynomial1D** p_psCreateChebyshevPolys psS32  numPolys  ) 
 

Creates the specified number of chebyshev polys.

Returns:
psPolynomial1D** The chebyshev polys.

psVector* p_psGaussianDev psF32  mean,
psF32  sigma,
unsigned int  Npts
 

Produce a vector of random numbers from a Gaussian distribution with the specified mean and sigma.

Returns:
psVector* vector of random numbers
Parameters:
mean  The mean of the Gaussian
sigma  The sigma of the Gaussian
Npts  The size of the vector

psBool p_psGetStatValue const psStats stats,
psF64 value
 

Extracts the statistic value specified by stats->options.

Returns:
psBool If more than one statistic result is set in stats->options, false is returned and the value parameter is not set, otherwise true is returned.
Parameters:
stats  the statistic struct to operate on
value  if return is true, this is set to the specified statistic value by stats->options

psF64 p_psMinLM_SetABX psImage alpha,
psVector beta,
const psVector params,
const psVector paramMask,
const psArray x,
const psVector y,
const psVector dy,
psMinimizeLMChi2Func  func
 

Function used to set parameters for generating "best guess" in minimizing Chi-Squared value.

Returns:
psF64: Chi-squared value for new guess
Parameters:
alpha  alpha guess
beta  beta guess
params  params guess
paramMask  param mask
x  Measurement ordinates
y  Measurement coordinates
dy  Weights calculated from y-errors
func  Specified function

float psGaussian float  x,
float  mean,
float  sigma,
bool  normal
 

Evaluate a non-normalized Gaussian with the given mean and sigma at the given coordianate.

Note that this is not a Gaussian deviate. The evaluated Gaussian is:

\[ exp(-\frac{(x-mean)^2}{2\sigma^2}) \]

Returns:
float value on the gaussian curve given the input parameters
Parameters:
x  Value at which to evaluate
mean  Mean for the Gaussian
sigma  Standard deviation for the Gaussian
normal  Indicates whether result should be normalized

psHistogram* psHistogramAlloc float  lower,
float  upper,
int  n
 

Allocator for psHistogram where the bounds of the bins are implicitly specified through simply specifying an upper and lower limit along with the size of the bins.

Returns:
psHistogram* Newly allocated psHistogram
Parameters:
lower  Lower limit for the bins
upper  Upper limit for the bins
n  Number of bins

psHistogram* psHistogramAllocGeneric const psVector bounds  ) 
 

Allocator for psHistogram where the bounds of the bins are explicitly specified.

Returns:
psHistogram* Newly allocated psHistogram
Parameters:
bounds  Bounds for the bins

bool psMemCheckHistogram psPtr  ptr  ) 
 

Checks the type of a particular pointer.

Uses the appropriate deallocation function in psMemBlock to check the ptr datatype.

Returns:
bool: True if the pointer matches a psHistogram structure, false otherwise.
Parameters:
ptr  the pointer whose type to check

bool psMemCheckMinimization psPtr  ptr  ) 
 

Parameters:
ptr  the pointer whose type to check

bool psMemCheckPolynomial1D psPtr  ptr  ) 
 

Checks the type of a particular pointer.

Uses the appropriate deallocation function in psMemBlock to check the ptr datatype.

Returns:
bool: True if the pointer matches a psPolynomial1D structure, false otherwise.
Parameters:
ptr  the pointer whose type to check

bool psMemCheckPolynomial2D psPtr  ptr  ) 
 

Checks the type of a particular pointer.

Uses the appropriate deallocation function in psMemBlock to check the ptr datatype.

Returns:
bool: True if the pointer matches a psPolynomial2D structure, false otherwise.
Parameters:
ptr  the pointer whose type to check

bool psMemCheckPolynomial3D psPtr  ptr  ) 
 

Checks the type of a particular pointer.

Uses the appropriate deallocation function in psMemBlock to check the ptr datatype.

Returns:
bool: True if the pointer matches a psPolynomial3D structure, false otherwise.
Parameters:
ptr  the pointer whose type to check

bool psMemCheckPolynomial4D psPtr  ptr  ) 
 

Checks the type of a particular pointer.

Uses the appropriate deallocation function in psMemBlock to check the ptr datatype.

Returns:
bool: True if the pointer matches a psPolynomial4D structure, false otherwise.
Parameters:
ptr  the pointer whose type to check

bool psMemCheckStats psPtr  ptr  ) 
 

Checks the type of a particular pointer.

Uses the appropriate deallocation function in psMemBlock to check the ptr datatype.

Returns:
bool: True if the pointer matches a psStats structure, false otherwise.
Parameters:
ptr  the pointer whose type to check

psMinConstrain* psMinConstrainAlloc  ) 
 

psMinimization* psMinimizationAlloc int  maxIter,
float  tol
 

Allocates a psMinimization structure.

Returns:
psMinimization* : a new psMinimization struct
Parameters:
maxIter  Number of minimization iterations to perform.
tol  Requested error tolerance

bool psMinimizeChi2Powell psMinimization min,
psVector params,
psMinConstrain constrain,
const psArray coords,
const psVector value,
const psVector error,
psMinimizeChi2PowellFunc  model
 

Minimizes a specified function based on the Powell chi-squared method.

Returns:
bool: True is successful.
Parameters:
min  Minimization specification
params  "Best guess" for parameters that minimize func
coords  Measurement coordinates
value  Measured values at the coordinates
error  Errors in the measure values (or NULL)
model  Specified function

bool psMinimizeGaussNewtonDelta psVector delta,
const psVector params,
const psVector paramMask,
const psArray x,
const psVector y,
const psVector yErr,
psMinimizeLMChi2Func  func
 

bool psMinimizeLMChi2 psMinimization min,
psImage covar,
psVector params,
psMinConstrain constrain,
const psArray x,
const psVector y,
const psVector yWt,
psMinimizeLMChi2Func  func
 

Minimizes a specified function based on the Levenberg-Marquardt method.

Returns:
bool: True if successful.
Parameters:
min  Minimization specification
covar  Covariance matrix
params  "Best Guess" for the parameters that minimize func
constrain  Constraints on the parameters
x  Measurement ordinates of multiple vectors
y  Measurement coordinates
yWt  Errors in the measurement coordinates
func  Specified function

bool psMinimizePowell psMinimization min,
psVector params,
const psVector paramMask,
const psArray coords,
psMinimizePowellFunc  func
 

Minimizes a specified function based on the Powell method.

Returns:
bool: True if successful.
Parameters:
min  Minimization specification
params  "Best guess" for parameters that minimize func
paramMask  Parameters to be held fixed by minimizer
coords  Measurement coordinates
func  Specified function

psPolynomial1D* psPolynomial1DAlloc psPolynomialType  type,
unsigned int  nX
 

Allocates a psPolynomial1D structure with n terms.

Returns:
psPolynomial1D* new 1-D polynomial struct
Parameters:
type  Polynomial Type
nX  Number of terms

psF64 psPolynomial1DEval const psPolynomial1D poly,
psF64  x
 

Evaluates a 1-D polynomial at specific coordinates.

Returns:
psF64 result of polynomial at given location
Parameters:
poly  Coefficients for the polynomial
x  location at which to evaluate

psVector* psPolynomial1DEvalVector const psPolynomial1D poly,
const psVector x
 

Evaluates a 1-D polynomial at specific sets of coordinates.

Returns:
psVector* results of polynomials at given locations
Parameters:
poly  Coefficients for the polynomial
x  x locations at which to evaluate

psPolynomial2D* psPolynomial2DAlloc psPolynomialType  type,
unsigned int  nX,
unsigned int  nY
 

Allocates a 2-D polynomial structure.

Returns:
psPolynomial2D* new 2-D polynomial struct
Parameters:
type  Polynomial Type
nX  Number of terms in x
nY  Number of terms in y

psF64 psPolynomial2DEval const psPolynomial2D poly,
psF64  x,
psF64  y
 

Evaluates a 2-D polynomial at specific coordinates.

Returns:
psF64 result of polynomial at given location
Parameters:
poly  Coefficients for the polynomial
x  x location at which to evaluate
y  y location at which to evaluate

psVector* psPolynomial2DEvalVector const psPolynomial2D poly,
const psVector x,
const psVector y
 

Evaluates a 2-D polynomial at specific sets of coordinates.

Returns:
psVector* results of polynomial at given locations
Parameters:
poly  Coefficients for the polynomial
x  x locations at which to evaluate
y  y locations at which to evaluate

psPolynomial3D* psPolynomial3DAlloc psPolynomialType  type,
unsigned int  nX,
unsigned int  nY,
unsigned int  nZ
 

Allocates a 3-D polynomial structure.

Returns:
psPolynomial3D* new 3-D polynomial struct
Parameters:
type  Polynomial Type
nX  Number of terms in x
nY  Number of terms in y
nZ  Number of terms in z

psF64 psPolynomial3DEval const psPolynomial3D poly,
psF64  x,
psF64  y,
psF64  z
 

Evaluates a 3-D polynomial at specific coordinates.

Returns:
psF64 result of polynomial at given location
Parameters:
poly  Coefficients for the polynomial
x  x location at which to evaluate
y  y location at which to evaluate
z  z location at which to evaluate

psVector* psPolynomial3DEvalVector const psPolynomial3D poly,
const psVector x,
const psVector y,
const psVector z
 

Evaluates a 3-D polynomial at specific sets of coordinates.

Returns:
psVector* results of polynomial at given locations
Parameters:
poly  Coefficients for the polynomial
x  x locations at which to evaluate
y  y locations at which to evaluate
z  z locations at which to evaluate

psPolynomial4D* psPolynomial4DAlloc psPolynomialType  type,
unsigned int  nX,
unsigned int  nY,
unsigned int  nZ,
unsigned int  nT
 

Allocates a 4-D polynomial structure.

Returns:
psPolynomial4D* new 4-D polynomial struct
Parameters:
type  Polynomial Type
nX  Number of terms in x
nY  Number of terms in y
nZ  Number of terms in z
nT  Number of terms in t

psF64 psPolynomial4DEval const psPolynomial4D poly,
psF64  x,
psF64  y,
psF64  z,
psF64  t
 

Evaluates a 4-D polynomial at specific coordinates.

Returns:
psF64 result of polynomial at given location
Parameters:
poly  Coefficients for the polynomial
x  x location at which to evaluate
y  y location at which to evaluate
z  z location at which to evaluate
t  t location at which to evaluate

psVector* psPolynomial4DEvalVector const psPolynomial4D poly,
const psVector x,
const psVector y,
const psVector z,
const psVector t
 

Evaluates a 4-D polynomial at specific sets of coordinates.

Returns:
psVector* results of polynomial at given locations
Parameters:
poly  Coefficients for the polynomial
x  x locations at which to evaluate
y  y locations at which to evaluate
z  z locations at which to evaluate
t  t locations at which to evaluate

psStats* psStatsAlloc psStatsOptions  options  ) 
 

Allocator of the psStats structure.

Returns:
psStats* A new psStats struct with the options member set to the value given.
Parameters:
options  Statistics to calculate

psPolynomial1D* psVectorClipFitPolynomial1D psPolynomial1D poly,
psStats stats,
const psVector mask,
psMaskType  maskValue,
const psVector f,
const psVector fErr,
const psVector x
 

psPolynomial2D* psVectorClipFitPolynomial2D psPolynomial2D poly,
psStats stats,
const psVector mask,
psMaskType  maskValue,
const psVector f,
const psVector fErr,
const psVector x,
const psVector y
 

psPolynomial3D* psVectorClipFitPolynomial3D psPolynomial3D poly,
psStats stats,
const psVector mask,
psMaskType  maskValue,
const psVector f,
const psVector fErr,
const psVector x,
const psVector y,
const psVector z
 

psPolynomial4D* psVectorClipFitPolynomial4D psPolynomial4D poly,
psStats stats,
const psVector mask,
psMaskType  maskValue,
const psVector f,
const psVector fErr,
const psVector x,
const psVector y,
const psVector z,
const psVector t
 

psPolynomial1D* psVectorFitPolynomial1D psPolynomial1D poly,
const psVector mask,
psMaskType  maskValue,
const psVector f,
const psVector fErr,
const psVector x
 

Derive a polynomial fit.

psVectorFitPolynomial1d returns the polynomial that best fits the observations. The input parameters are a polynomial that specifies the fit order, myPoly, which will be altered and returned with the best-fit coefficients; and the observations, x, y and yErr. The independent variable list, x may be NULL, in which case the vector index is used. The dependent variable error, yErr may be null, in which case the solution is determined in the assumption that all data errors are equal. This function must be valid only for types psF32, psF64.

Returns:
psPolynomial1D* polynomial fit

psPolynomial2D* psVectorFitPolynomial2D psPolynomial2D poly,
const psVector mask,
psMaskType  maskValue,
const psVector f,
const psVector fErr,
const psVector x,
const psVector y
 

psPolynomial3D* psVectorFitPolynomial3D psPolynomial3D poly,
const psVector mask,
psMaskType  maskValue,
const psVector f,
const psVector fErr,
const psVector x,
const psVector y,
const psVector z
 

psPolynomial4D* psVectorFitPolynomial4D psPolynomial4D poly,
const psVector mask,
psMaskType  maskValue,
const psVector f,
const psVector fErr,
const psVector x,
const psVector y,
const psVector z,
const psVector t
 

psHistogram* psVectorHistogram psHistogram out,
const psVector values,
const psVector errors,
const psVector mask,
psMaskType  maskVal
 

Calculate a histogram.

The following function populates the histogram bins from the specified vector (in). It alters and returns the histogram out structure. The input vector may be of types psU8, psU16, psF32, psF64.

Returns:
psHistogram* histogram result
Parameters:
out  Histogram data
values  Vector to analyse
errors  Errors
mask  Mask dat for input vector
maskVal  Mask value

psStats* psVectorStats psStats stats,
const psVector in,
const psVector errors,
const psVector mask,
psMaskType  maskVal
 

Performs statistical calculations on a vector.

Returns:
psStats* the statistical results as specified by stats->options
Parameters:
stats  stats structure defines stats to be calculated and how
in  Vector to be analysed.
errors  Errors.
mask  Ignore elements where (maskVector & maskVal) != 0: must be INT or NULL
maskVal  Only mask elements with one of these bits set in maskVector


Generated on Mon Jul 3 14:15:13 2006 for Pan-STARRS Foundation Library by  doxygen 1.4.4