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

Stats


Files

file  psMinimize.h
 minimization operations
file  psPolynomial.h
 Standard Mathematical Functions.
file  psPolynomial.h
 Standard Mathematical Functions.
file  psStats.h
 basic statistical operations

Data Structures

struct  psMinimization
 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  psStats
 This is the generic statistics structure. More...
struct  psHistogram
 The basic histogram structure which contains bounds and bins. More...

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_MEAN = 0x000010, PS_STAT_ROBUST_MEDIAN = 0x000020, PS_STAT_ROBUST_MODE = 0x000040, PS_STAT_ROBUST_STDEV = 0x000080, PS_STAT_ROBUST_QUARTILE = 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

psMinimizationpsMinimizationAlloc (int maxIter, float tol)
 Allocates a psMinimization structure.
bool psMemCheckMinimization (psPtr ptr)
 Checks the type of a particular pointer.
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 psMinimizeLMChi2 (psMinimization *min, psImage *covar, psVector *params, const psVector *paramMask, const psArray *x, const psVector *y, const psVector *yErr, 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)
psBool p_psMinLM_GuessABP (psImage *Alpha, psVector *Beta, psVector *Params, const psImage *alpha, const psVector *beta, const psVector *params, const psVector *paramMask, psF64 lambda)
 Use specified alpha, beta, params to generate a new guess for Alpha, Beta, Params.
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.
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, const psVector *paramMask, const psArray *coords, const psVector *value, const psVector *error, psMinimizeChi2PowellFunc model)
 Minimizes a specified function based on the Powell chi-squared method.
bool psGaussJordan (psImage *a, psVector *b)
 Gauss-Jordan numerical solver.
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, psS32 Npts)
 Produce a vector of random numbers from a Gaussian distribution with the specified mean and sigma.
psPolynomial1DpsPolynomial1DAlloc (int n, psPolynomialType type)
 Allocates a psPolynomial1D structure with n terms.
psPolynomial2DpsPolynomial2DAlloc (int nX, int nY, psPolynomialType type)
 Allocates a 2-D polynomial structure.
psPolynomial3DpsPolynomial3DAlloc (int nX, int nY, int nZ, psPolynomialType type)
 Allocates a 3-D polynomial structure.
psPolynomial4DpsPolynomial4DAlloc (int nX, int nY, int nZ, int nT, psPolynomialType type)
 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.
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.
void p_psNormalizeVectorRangeU8 (psVector *myData, psU8 low, psU8 high)
 Normalize the range of a vector containing U8 values.
void p_psNormalizeVectorRangeU16 (psVector *myData, psU16 low, psU16 high)
 Normalize the range of a vector containing U16 values.
void p_psNormalizeVectorRangeU32 (psVector *myData, psU32 low, psU32 high)
 Normalize the range of a vector containing U32 values.
void p_psNormalizeVectorRangeU64 (psVector *myData, psU64 low, psU64 high)
 Normalize the range of a vector containing U64 values.
void p_psNormalizeVectorRangeS8 (psVector *myData, psS8 low, psS8 high)
 Normalize the range of a vector containing S8 values.
void p_psNormalizeVectorRangeS16 (psVector *myData, psS16 low, psS16 high)
 Normalize the range of a vector containing S16 values.
void p_psNormalizeVectorRangeS32 (psVector *myData, psS32 low, psS32 high)
 Normalize the range of a vector containing S32 values.
void p_psNormalizeVectorRangeS64 (psVector *myData, psS64 low, psS64 high)
 Normalize the range of a vector containing S64 values.
void p_psNormalizeVectorRangeF32 (psVector *myData, psF32 low, psF32 high)
 Normalize the range of a vector containing F32 values.
void p_psNormalizeVectorRangeF64 (psVector *myData, psF64 low, psF64 high)
 Normalize the range of a vector containing F64 values.


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 277 of file psMinimize.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 184 of file psMinimize.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 254 of file psMinimize.h.


Enumeration Type Documentation

enum psPolynomialType
 

Polynomial Type.

Enumeration for Polynomial types.

Enumeration values:
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
Enumeration values:
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_MEAN  Robust Mean.
PS_STAT_ROBUST_MEDIAN  Robust Median.
PS_STAT_ROBUST_MODE  Robust Mode.
PS_STAT_ROBUST_STDEV  Robust Standarad Deviation.
PS_STAT_ROBUST_QUARTILE  Robust Quartile.
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

psVector* p_psGaussianDev psF32  mean,
psF32  sigma,
psS32  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

psBool p_psMinLM_GuessABP psImage Alpha,
psVector Beta,
psVector Params,
const psImage alpha,
const psVector beta,
const psVector params,
const psVector paramMask,
psF64  lambda
 

Use specified alpha, beta, params to generate a new guess for Alpha, Beta, Params.

Returns:
psBool: True if successful.
Parameters:
Alpha  New Alpha guess
Beta  New Beta guess
Params  New Params guess
alpha  Old Alpha guess
beta  Old Beta guess
params  Old Params guess
paramMask  Param Mask
lambda  Factor used in update

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

void p_psNormalizeVectorRangeF32 psVector myData,
psF32  low,
psF32  high
 

Normalize the range of a vector containing F32 values.

Parameters:
myData  Vector containing the F32 values
low  Minimum value
high  Maximum value

void p_psNormalizeVectorRangeF64 psVector myData,
psF64  low,
psF64  high
 

Normalize the range of a vector containing F64 values.

Parameters:
myData  Vector containing the F64 values
low  Minimum value
high  Maximum value

void p_psNormalizeVectorRangeS16 psVector myData,
psS16  low,
psS16  high
 

Normalize the range of a vector containing S16 values.

Parameters:
myData  Vector containing the S16 values
low  Minimum value
high  Maximum value

void p_psNormalizeVectorRangeS32 psVector myData,
psS32  low,
psS32  high
 

Normalize the range of a vector containing S32 values.

Parameters:
myData  Vector containing the S32 values
low  Minimum value
high  Maximum value

void p_psNormalizeVectorRangeS64 psVector myData,
psS64  low,
psS64  high
 

Normalize the range of a vector containing S64 values.

Parameters:
myData  Vector containing the S64 values
low  Minimum value
high  Maximum value

void p_psNormalizeVectorRangeS8 psVector myData,
psS8  low,
psS8  high
 

Normalize the range of a vector containing S8 values.

Parameters:
myData  Vector containing the S8 values
low  Minimum value
high  Maximum value

void p_psNormalizeVectorRangeU16 psVector myData,
psU16  low,
psU16  high
 

Normalize the range of a vector containing U16 values.

Parameters:
myData  Vector containing the U16 values
low  Minimum value
high  Maximum value

void p_psNormalizeVectorRangeU32 psVector myData,
psU32  low,
psU32  high
 

Normalize the range of a vector containing U32 values.

Parameters:
myData  Vector containing the U32 values
low  Minimum value
high  Maximum value

void p_psNormalizeVectorRangeU64 psVector myData,
psU64  low,
psU64  high
 

Normalize the range of a vector containing U64 values.

Parameters:
myData  Vector containing the U64 values
low  Minimum value
high  Maximum value

void p_psNormalizeVectorRangeU8 psVector myData,
psU8  low,
psU8  high
 

Normalize the range of a vector containing U8 values.

Parameters:
myData  Vector containing the U8 values
low  Minimum value
high  Maximum value

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

bool psGaussJordan psImage a,
psVector b
 

Gauss-Jordan numerical solver.

Returns:
bool: True if successful.
Parameters:
a  Matrix to be solved
b  Vector of values

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  ) 
 

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 psMinimization structure, false otherwise.
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

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,
const psVector paramMask,
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
paramMask  Parameters to be held fixed by minimizer
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,
const psVector paramMask,
const psArray x,
const psVector y,
const psVector yErr,
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
paramMask  Parameters to be held fixed by the minimizer
x  Measurement ordinates of multiple vectors
y  Measurement coordinates
yErr  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 int  n,
psPolynomialType  type
 

Allocates a psPolynomial1D structure with n terms.

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

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 int  nX,
int  nY,
psPolynomialType  type
 

Allocates a 2-D polynomial structure.

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

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 int  nX,
int  nY,
int  nZ,
psPolynomialType  type
 

Allocates a 3-D polynomial structure.

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

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 int  nX,
int  nY,
int  nZ,
int  nT,
psPolynomialType  type
 

Allocates a 4-D polynomial structure.

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

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 Wed Sep 14 10:43:47 2005 for Pan-STARRS Foundation Library by  doxygen 1.4.2