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

Statistic Functions
[Data Manipulation]

Collaboration diagram for Statistic Functions:


Files

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

Data Structures

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  psDPolynomial1D
 Double-precision one-dimensional polynomial. More...
struct  psDPolynomial2D
 Double-precision two-dimensional polynomial. More...
struct  psDPolynomial3D
 Double-precision three-dimensional polynomial. More...
struct  psDPolynomial4D
 Double-precision four-dimensional polynomial. More...
struct  psSpline1D
 One-Dimensional Spline. More...
struct  psMinimization
struct  psStats
 This is the generic statistics structure. More...
struct  psHistogram
 The basic histogram structure which contains bounds and bins. More...

Typedefs

typedef psF64(* psMinimizeLMChi2Func )(psVector *deriv, psVector *params, psVector *x)
typedef psF32(* psMinimizePowellFunc )(const psVector *params, const psArray *coords)
typedef psVector *(* psMinimizeChi2PowellFunc )(const psVector *params, const psArray *coords)

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, PS_STAT_ROBUST_FOR_SAMPLE = 0x008000
}
 enumeration of statistical calculation options More...

Functions

psF32 psGaussian (psF32 x, psF32 mean, psF32 stddev, psBool 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 (psS32 n, psPolynomialType type)
 Allocates a psPolynomial1D structure with n terms.
psPolynomial2DpsPolynomial2DAlloc (psS32 nX, psS32 nY, psPolynomialType type)
 Allocates a 2-D polynomial structure.
psPolynomial3DpsPolynomial3DAlloc (psS32 nX, psS32 nY, psS32 nZ, psPolynomialType type)
 Allocates a 3-D polynomial structure.
psPolynomial4DpsPolynomial4DAlloc (psS32 nW, psS32 nX, psS32 nY, psS32 nZ, psPolynomialType type)
 Allocates a 4-D polynomial structure.
psF32 psPolynomial1DEval (const psPolynomial1D *myPoly, psF32 x)
 Evaluates a 1-D polynomial at specific coordinates.
psF32 psPolynomial2DEval (const psPolynomial2D *myPoly, psF32 x, psF32 y)
 Evaluates a 2-D polynomial at specific coordinates.
psF32 psPolynomial3DEval (const psPolynomial3D *myPoly, psF32 x, psF32 y, psF32 z)
 Evaluates a 3-D polynomial at specific coordinates.
psF32 psPolynomial4DEval (const psPolynomial4D *myPoly, psF32 w, psF32 x, psF32 y, psF32 z)
 Evaluates a 4-D polynomial at specific coordinates.
psVectorpsPolynomial1DEvalVector (const psPolynomial1D *myPoly, const psVector *x)
 Evaluates a 1-D polynomial at specific sets of coordinates.
psVectorpsPolynomial2DEvalVector (const psPolynomial2D *myPoly, const psVector *x, const psVector *y)
 Evaluates a 2-D polynomial at specific sets of coordinates.
psVectorpsPolynomial3DEvalVector (const psPolynomial3D *myPoly, const psVector *x, const psVector *y, const psVector *z)
 Evaluates a 3-D polynomial at specific sets of coordinates.
psVectorpsPolynomial4DEvalVector (const psPolynomial4D *myPoly, const psVector *w, const psVector *x, const psVector *y, const psVector *z)
 Evaluates a 4-D polynomial at specific sets of coordinates.
psDPolynomial1DpsDPolynomial1DAlloc (psS32 n, psPolynomialType type)
 Allocates a double-precision 1-D polynomial structure with n terms.
psDPolynomial2DpsDPolynomial2DAlloc (psS32 nX, psS32 nY, psPolynomialType type)
 Allocates a double-precision 2-D polynomial structure.
psDPolynomial3DpsDPolynomial3DAlloc (psS32 nX, psS32 nY, psS32 nZ, psPolynomialType type)
 Allocates a double-precision 3-D polynomial structure.
psDPolynomial4DpsDPolynomial4DAlloc (psS32 nW, psS32 nX, psS32 nY, psS32 nZ, psPolynomialType type)
 Allocates a double-precision 4-D polynomial structure.
psF64 psDPolynomial1DEval (const psDPolynomial1D *myPoly, psF64 x)
 Evaluates a double-precision 1-D polynomial at specific coordinates.
psF64 psDPolynomial2DEval (const psDPolynomial2D *myPoly, psF64 x, psF64 y)
 Evaluates a double-precision 2-D polynomial at specific coordinates.
psF64 psDPolynomial3DEval (const psDPolynomial3D *myPoly, psF64 x, psF64 y, psF64 z)
 Evaluates a double-precision 3-D polynomial at specific coordinates.
psF64 psDPolynomial4DEval (const psDPolynomial4D *myPoly, psF64 w, psF64 x, psF64 y, psF64 z)
 Evaluates a double-precision 4-D polynomial at specific coordinates.
psVectorpsDPolynomial1DEvalVector (const psDPolynomial1D *myPoly, const psVector *x)
 Evaluates a double-precision 1-D polynomial at specific sets of coordinates.
psVectorpsDPolynomial2DEvalVector (const psDPolynomial2D *myPoly, const psVector *x, const psVector *y)
 Evaluates a double-precision 2-D polynomial at specific sets of coordinates.
psVectorpsDPolynomial3DEvalVector (const psDPolynomial3D *myPoly, const psVector *x, const psVector *y, const psVector *z)
 Evaluates a double-precision 3-D polynomial at specific sets of coordinates.
psVectorpsDPolynomial4DEvalVector (const psDPolynomial4D *myPoly, const psVector *w, const psVector *x, const psVector *y, const psVector *z)
 Evaluates a double-precision 4-D polynomial at specific sets of coordinates.
psSpline1DpsSpline1DAlloc (psS32 n, psS32 order, psF32 min, psF32 max)
 Upper boundary value of spline polynomials.
psSpline1DpsSpline1DAllocGeneric (const psVector *bounds, psS32 order)
 Order of spline polynomials.
psF32 psSpline1DEval (const psSpline1D *spline, psF32 x)
 Evaluates 1-D spline polynomials at a specific coordinate.
psVectorpsSpline1DEvalVector (const psSpline1D *spline, const psVector *x)
 Evaluates 1-D spline polynomials at a set of specific coordinates.
psS32 p_psVectorBinDisect (psVector *bins, psScalar *x)
 Target value to find.
psScalarp_psVectorInterpolate (psVector *domain, psVector *range, psS32 order, psScalar *x)
 Location at which to evaluate.
psMinimizationpsMinimizationAlloc (psS32 maxIter, psF32 tol)
psPolynomial1DpsVectorFitPolynomial1D (psPolynomial1D *myPoly, const psVector *x, const psVector *y, const psVector *yErr)
 Derive a polynomial fit.
psSpline1DpsVectorFitSpline1D (psSpline1D *mySpline, const psVector *x, const psVector *y, const psVector *yErr)
psBool psMinimizeLMChi2 (psMinimization *min, psImage *covar, 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, psImage *alpha, psVector *beta, psVector *params, psF64 lambda)
psF64 p_psMinLM_SetABX (psImage *alpha, psVector *beta, psVector *params, const psArray *x, const psVector *y, const psVector *dy, psMinimizeLMChi2Func func)
psBool psMinimizePowell (psMinimization *min, psVector *params, const psVector *paramMask, const psArray *coords, psMinimizePowellFunc func)
psVectorpsMinimizeLMChi2Gauss1D (psImage *deriv, const psVector *params, const psArray *coords)
psVectorpsMinimizePowellChi2Gauss1D (const psVector *params, const psArray *coords)
psBool psMinimizeChi2Powell (psMinimization *min, psVector *params, const psVector *paramMask, const psArray *coords, const psVector *value, const psVector *error, psMinimizeChi2PowellFunc func)
bool psGaussJordan (psImage *a, psVector *b)
psStatspsVectorStats (psStats *stats, const psVector *in, const psVector *errors, const psVector *mask, psU32 maskVal)
 Performs statistical calculations on a vector.
psStatspsStatsAlloc (psStatsOptions options)
 Allocator of the psStats structure.
psHistogrampsHistogramAlloc (psF32 lower, psF32 upper, psS32 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.
psHistogrampsHistogramAllocGeneric (const psVector *bounds)
 Allocator for psHistogram where the bounds of the bins are explicitly specified.
psHistogrampsVectorHistogram (psHistogram *out, const psVector *in, const psVector *errors, const psVector *mask, psU32 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)
void p_psNormalizeVectorRangeU16 (psVector *myData, psU16 low, psU16 high)
void p_psNormalizeVectorRangeU32 (psVector *myData, psU32 low, psU32 high)
void p_psNormalizeVectorRangeU64 (psVector *myData, psU64 low, psU64 high)
void p_psNormalizeVectorRangeS8 (psVector *myData, psS8 low, psS8 high)
void p_psNormalizeVectorRangeS16 (psVector *myData, psS16 low, psS16 high)
void p_psNormalizeVectorRangeS32 (psVector *myData, psS32 low, psS32 high)
void p_psNormalizeVectorRangeS64 (psVector *myData, psS64 low, psS64 high)
void p_psNormalizeVectorRangeF32 (psVector *myData, psF32 low, psF32 high)
void p_psNormalizeVectorRangeF64 (psVector *myData, psF64 low, psF64 high)


Typedef Documentation

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

Definition at line 128 of file psMinimize.h.

typedef psF64(* psMinimizeLMChi2Func)(psVector *deriv, psVector *params, psVector *x)
 

Definition at line 81 of file psMinimize.h.

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

Definition at line 111 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 66 of file psFunctions.h.

enum psStatsOptions
 

enumeration of statistical calculation options

See also:
psStats, psVectorStats, psImageStats
Enumeration values:
PS_STAT_SAMPLE_MEAN 
PS_STAT_SAMPLE_MEDIAN 
PS_STAT_SAMPLE_STDEV 
PS_STAT_SAMPLE_QUARTILE 
PS_STAT_ROBUST_MEAN 
PS_STAT_ROBUST_MEDIAN 
PS_STAT_ROBUST_MODE 
PS_STAT_ROBUST_STDEV 
PS_STAT_ROBUST_QUARTILE 
PS_STAT_CLIPPED_MEAN 
PS_STAT_CLIPPED_STDEV 
PS_STAT_MAX 
PS_STAT_MIN 
PS_STAT_USE_RANGE 
PS_STAT_USE_BINSIZE 
PS_STAT_ROBUST_FOR_SAMPLE 

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,
psImage alpha,
psVector beta,
psVector params,
psF64  lambda
 

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

void p_psNormalizeVectorRangeF32 psVector myData,
psF32  low,
psF32  high
 

void p_psNormalizeVectorRangeF64 psVector myData,
psF64  low,
psF64  high
 

void p_psNormalizeVectorRangeS16 psVector myData,
psS16  low,
psS16  high
 

void p_psNormalizeVectorRangeS32 psVector myData,
psS32  low,
psS32  high
 

void p_psNormalizeVectorRangeS64 psVector myData,
psS64  low,
psS64  high
 

void p_psNormalizeVectorRangeS8 psVector myData,
psS8  low,
psS8  high
 

void p_psNormalizeVectorRangeU16 psVector myData,
psU16  low,
psU16  high
 

void p_psNormalizeVectorRangeU32 psVector myData,
psU32  low,
psU32  high
 

void p_psNormalizeVectorRangeU64 psVector myData,
psU64  low,
psU64  high
 

void p_psNormalizeVectorRangeU8 psVector myData,
psU8  low,
psU8  high
 

psS32 p_psVectorBinDisect psVector bins,
psScalar x
 

Target value to find.

Searches through an array of data for a specified value.

Returns:
psS32 corresponding index number of specified value
Parameters:
bins  Array of non-decreasing values

psScalar* p_psVectorInterpolate psVector domain,
psVector range,
psS32  order,
psScalar x
 

Location at which to evaluate.

Uses a Lagrange interpolation method.

Returns:
psScalar* Lagrange interpolation value at given location
Parameters:
domain  Domain (x coords) for interpolation
range  Range (y coords) for interpolation
order  Order of interpolation function

psDPolynomial1D* psDPolynomial1DAlloc psS32  n,
psPolynomialType  type
 

Allocates a double-precision 1-D polynomial structure with n terms.

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

psF64 psDPolynomial1DEval const psDPolynomial1D myPoly,
psF64  x
 

Evaluates a double-precision 1-D polynomial at specific coordinates.

Returns:
psF32 result of polynomial at given location
Parameters:
myPoly  Coefficients for the polynomial
x  Value at which to evaluate

psVector* psDPolynomial1DEvalVector const psDPolynomial1D myPoly,
const psVector x
 

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

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

psDPolynomial2D* psDPolynomial2DAlloc psS32  nX,
psS32  nY,
psPolynomialType  type
 

Allocates a double-precision 2-D polynomial structure.

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

psF64 psDPolynomial2DEval const psDPolynomial2D myPoly,
psF64  x,
psF64  y
 

Evaluates a double-precision 2-D polynomial at specific coordinates.

Returns:
psF32 result of polynomial at given location
Parameters:
myPoly  Coefficients for the polynomial
x  Value x at which to evaluate
y  Value y at which to evaluate

psVector* psDPolynomial2DEvalVector const psDPolynomial2D myPoly,
const psVector x,
const psVector y
 

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

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

psDPolynomial3D* psDPolynomial3DAlloc psS32  nX,
psS32  nY,
psS32  nZ,
psPolynomialType  type
 

Allocates a double-precision 3-D polynomial structure.

Returns:
psPolynomial3D* new double-precision 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 psDPolynomial3DEval const psDPolynomial3D myPoly,
psF64  x,
psF64  y,
psF64  z
 

Evaluates a double-precision 3-D polynomial at specific coordinates.

Returns:
psF32 result of polynomial at given location
Parameters:
myPoly  Coefficients for the polynomial
x  Value x at which to evaluate
y  Value y at which to evaluate
z  Value z at which to evaluate

psVector* psDPolynomial3DEvalVector const psDPolynomial3D myPoly,
const psVector x,
const psVector y,
const psVector z
 

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

Returns:
psVector* results of polynomial at given locations
Parameters:
myPoly  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

psDPolynomial4D* psDPolynomial4DAlloc psS32  nW,
psS32  nX,
psS32  nY,
psS32  nZ,
psPolynomialType  type
 

Allocates a double-precision 4-D polynomial structure.

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

psF64 psDPolynomial4DEval const psDPolynomial4D myPoly,
psF64  w,
psF64  x,
psF64  y,
psF64  z
 

Evaluates a double-precision 4-D polynomial at specific coordinates.

Returns:
psF32 result of polynomial at given location
Parameters:
myPoly  Coefficients for the polynomial
w  Value w at which to evaluate
x  Value x at which to evaluate
y  Value y at which to evaluate
z  Value z at which to evaluate

psVector* psDPolynomial4DEvalVector const psDPolynomial4D myPoly,
const psVector w,
const psVector x,
const psVector y,
const psVector z
 

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

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

psF32 psGaussian psF32  x,
psF32  mean,
psF32  stddev,
psBool  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:
psF32 value on the gaussian curve given the input parameters
Parameters:
x  Value at which to evaluate
mean  Mean for the Gaussian
stddev  Standard deviation for the Gaussian
normal  Indicates whether result should be normalized

bool psGaussJordan psImage a,
psVector b
 

psHistogram* psHistogramAlloc psF32  lower,
psF32  upper,
psS32  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

psMinimization* psMinimizationAlloc psS32  maxIter,
psF32  tol
 

Parameters:
maxIter  Number of minimization iterations to perform.
tol  Requested error tolerance

psBool psMinimizeChi2Powell psMinimization min,
psVector params,
const psVector paramMask,
const psArray coords,
const psVector value,
const psVector error,
psMinimizeChi2PowellFunc  func
 

psBool psMinimizeLMChi2 psMinimization min,
psImage covar,
psVector params,
const psVector paramMask,
const psArray x,
const psVector y,
const psVector yErr,
psMinimizeLMChi2Func  func
 

psVector* psMinimizeLMChi2Gauss1D psImage deriv,
const psVector params,
const psArray coords
 

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

psVector* psMinimizePowellChi2Gauss1D const psVector params,
const psArray coords
 

psPolynomial1D* psPolynomial1DAlloc psS32  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

psF32 psPolynomial1DEval const psPolynomial1D myPoly,
psF32  x
 

Evaluates a 1-D polynomial at specific coordinates.

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

psVector* psPolynomial1DEvalVector const psPolynomial1D myPoly,
const psVector x
 

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

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

psPolynomial2D* psPolynomial2DAlloc psS32  nX,
psS32  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

psF32 psPolynomial2DEval const psPolynomial2D myPoly,
psF32  x,
psF32  y
 

Evaluates a 2-D polynomial at specific coordinates.

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

psVector* psPolynomial2DEvalVector const psPolynomial2D myPoly,
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:
myPoly  Coefficients for the polynomial
x  x locations at which to evaluate
y  y locations at which to evaluate

psPolynomial3D* psPolynomial3DAlloc psS32  nX,
psS32  nY,
psS32  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

psF32 psPolynomial3DEval const psPolynomial3D myPoly,
psF32  x,
psF32  y,
psF32  z
 

Evaluates a 3-D polynomial at specific coordinates.

Returns:
psF32 result of polynomial at given location
Parameters:
myPoly  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 myPoly,
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:
myPoly  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 psS32  nW,
psS32  nX,
psS32  nY,
psS32  nZ,
psPolynomialType  type
 

Allocates a 4-D polynomial structure.

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

psF32 psPolynomial4DEval const psPolynomial4D myPoly,
psF32  w,
psF32  x,
psF32  y,
psF32  z
 

Evaluates a 4-D polynomial at specific coordinates.

Returns:
psF32 result of polynomial at given location
Parameters:
myPoly  Coefficients for the polynomial
w  w location at which to evaluate
x  x location at which to evaluate
y  y location at which to evaluate
z  z location at which to evaluate

psVector* psPolynomial4DEvalVector const psPolynomial4D myPoly,
const psVector w,
const psVector x,
const psVector y,
const psVector z
 

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

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

psSpline1D* psSpline1DAlloc psS32  n,
psS32  order,
psF32  min,
psF32  max
 

Upper boundary value of spline polynomials.

Allocator for psSpline1D where the bounds are implicitly specified through specifying min and max values along with the number of splines.

Returns:
psSpline1D* new 1-D spline struct
Parameters:
n  Number of spline polynomials
order  Order of spline polynomials
min  Lower boundary value of spline polynomials

psSpline1D* psSpline1DAllocGeneric const psVector bounds,
psS32  order
 

Order of spline polynomials.

Allocator for psSpline1D where the bounds are explicitly specified.

Returns:
psSpline1D* new 1-D spline struct
Parameters:
bounds  Bounds for spline polynomials

psF32 psSpline1DEval const psSpline1D spline,
psF32  x
 

Evaluates 1-D spline polynomials at a specific coordinate.

Returns:
psF32 result of spline polynomials evaluated at given location
Parameters:
spline  Coefficients for spline polynomials
x  location at which to evaluate

psVector* psSpline1DEvalVector const psSpline1D spline,
const psVector x
 

Evaluates 1-D spline polynomials at a set of specific coordinates.

Returns:
psVector* results of spline polynomials evaluated at given locations
Parameters:
spline  Coefficients of spline polynomials
x  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* psVectorFitPolynomial1D psPolynomial1D myPoly,
const psVector x,
const psVector y,
const psVector yErr
 

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
Parameters:
myPoly  Polynomial to fit
x  Ordinates (or NULL to just use the indices)
y  Coordinates
yErr  Errors in coordinates, or NULL

psSpline1D* psVectorFitSpline1D psSpline1D mySpline,
const psVector x,
const psVector y,
const psVector yErr
 

Parameters:
mySpline  The spline which will be generated.
x  Ordinates (or NULL to just use the indices)
y  Coordinates
yErr  Errors in coordinates, or NULL

psHistogram* psVectorHistogram psHistogram out,
const psVector in,
const psVector errors,
const psVector mask,
psU32  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
in  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,
psU32  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 Jun 15 11:01:15 2005 for Pan-STARRS Foundation Library by  doxygen 1.4.1