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 | |
| psMinimization * | psMinimizationAlloc (int maxIter, float tol) |
| Allocates a psMinimization structure. | |
| bool | psMemCheckMinimization (psPtr ptr) |
| Checks the type of a particular pointer. | |
| psPolynomial1D * | psVectorFitPolynomial1D (psPolynomial1D *poly, const psVector *mask, psMaskType maskValue, const psVector *f, const psVector *fErr, const psVector *x) |
| Derive a 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) |
| 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) |
| 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. | |
| 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. | |
| psPolynomial1D * | psPolynomial1DAlloc (int n, psPolynomialType type) |
| Allocates a psPolynomial1D structure with n terms. | |
| psPolynomial2D * | psPolynomial2DAlloc (int nX, int nY, psPolynomialType type) |
| Allocates a 2-D polynomial structure. | |
| psPolynomial3D * | psPolynomial3DAlloc (int nX, int nY, int nZ, psPolynomialType type) |
| Allocates a 3-D polynomial structure. | |
| psPolynomial4D * | psPolynomial4DAlloc (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. | |
| psVector * | psPolynomial1DEvalVector (const psPolynomial1D *poly, const psVector *x) |
| Evaluates a 1-D polynomial at specific sets of coordinates. | |
| psVector * | psPolynomial2DEvalVector (const psPolynomial2D *poly, const psVector *x, const psVector *y) |
| Evaluates a 2-D polynomial at specific sets of coordinates. | |
| psVector * | psPolynomial3DEvalVector (const psPolynomial3D *poly, const psVector *x, const psVector *y, const psVector *z) |
| Evaluates a 3-D polynomial at specific sets of coordinates. | |
| 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. | |
| 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. | |
| psStats * | psVectorStats (psStats *stats, const psVector *in, const psVector *errors, const psVector *mask, psMaskType maskVal) |
| Performs statistical calculations on a vector. | |
| psStats * | psStatsAlloc (psStatsOptions options) |
| Allocator of the psStats structure. | |
| bool | psMemCheckStats (psPtr ptr) |
| Checks the type of a particular pointer. | |
| 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. | |
| bool | psMemCheckHistogram (psPtr ptr) |
| Checks the type of a particular pointer. | |
| psHistogram * | psHistogramAllocGeneric (const psVector *bounds) |
| Allocator for psHistogram where the bounds of the bins are explicitly specified. | |
| psHistogram * | psVectorHistogram (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. | |
|
|
Specifies the format of a user-defined function that the general Powell chi- squared minimizer routine will accept.
Definition at line 277 of file psMinimize.h. |
|
|
Specifies the format of a user-defined function that the general Levenberg- Marquardt minimizer routine will accept.
Definition at line 184 of file psMinimize.h. |
|
|
Specifies the format of a user-defined function that the general Powell minimizer routine will accept.
Definition at line 254 of file psMinimize.h. |
|
|
Polynomial Type. Enumeration for Polynomial types. Definition at line 65 of file psPolynomial.h. |
|
|
enumeration of statistical calculation options
|
|
||||||||||||||||
|
Produce a vector of random numbers from a Gaussian distribution with the specified mean and sigma.
|
|
||||||||||||
|
Extracts the statistic value specified by stats->options.
|
|
||||||||||||||||||||||||||||||||||||
|
Use specified alpha, beta, params to generate a new guess for Alpha, Beta, Params.
|
|
||||||||||||||||||||||||||||||||||||
|
Function used to set parameters for generating "best guess" in minimizing Chi-Squared value.
|
|
||||||||||||||||
|
Normalize the range of a vector containing F32 values.
|
|
||||||||||||||||
|
Normalize the range of a vector containing F64 values.
|
|
||||||||||||||||
|
Normalize the range of a vector containing S16 values.
|
|
||||||||||||||||
|
Normalize the range of a vector containing S32 values.
|
|
||||||||||||||||
|
Normalize the range of a vector containing S64 values.
|
|
||||||||||||||||
|
Normalize the range of a vector containing S8 values.
|
|
||||||||||||||||
|
Normalize the range of a vector containing U16 values.
|
|
||||||||||||||||
|
Normalize the range of a vector containing U32 values.
|
|
||||||||||||||||
|
Normalize the range of a vector containing U64 values.
|
|
||||||||||||||||
|
Normalize the range of a vector containing U8 values.
|
|
||||||||||||||||||||
|
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:
|
|
||||||||||||
|
Gauss-Jordan numerical solver.
|
|
||||||||||||||||
|
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.
|
|
|
Allocator for psHistogram where the bounds of the bins are explicitly specified.
|
|
|
Checks the type of a particular pointer. Uses the appropriate deallocation function in psMemBlock to check the ptr datatype.
|
|
|
Checks the type of a particular pointer. Uses the appropriate deallocation function in psMemBlock to check the ptr datatype.
|
|
|
Checks the type of a particular pointer. Uses the appropriate deallocation function in psMemBlock to check the ptr datatype.
|
|
|
Checks the type of a particular pointer. Uses the appropriate deallocation function in psMemBlock to check the ptr datatype.
|
|
|
Checks the type of a particular pointer. Uses the appropriate deallocation function in psMemBlock to check the ptr datatype.
|
|
|
Checks the type of a particular pointer. Uses the appropriate deallocation function in psMemBlock to check the ptr datatype.
|
|
|
Checks the type of a particular pointer. Uses the appropriate deallocation function in psMemBlock to check the ptr datatype.
|
|
||||||||||||
|
Allocates a psMinimization structure.
|
|
||||||||||||||||||||||||||||||||
|
Minimizes a specified function based on the Powell chi-squared method.
|
|
||||||||||||||||||||||||||||||||
|
|
|
||||||||||||||||||||||||||||||||||||
|
Minimizes a specified function based on the Levenberg-Marquardt method.
|
|
||||||||||||||||||||||||
|
Minimizes a specified function based on the Powell method.
|
|
||||||||||||
|
Allocates a psPolynomial1D structure with n terms.
|
|
||||||||||||
|
Evaluates a 1-D polynomial at specific coordinates.
|
|
||||||||||||
|
Evaluates a 1-D polynomial at specific sets of coordinates.
|
|
||||||||||||||||
|
Allocates a 2-D polynomial structure.
|
|
||||||||||||||||
|
Evaluates a 2-D polynomial at specific coordinates.
|
|
||||||||||||||||
|
Evaluates a 2-D polynomial at specific sets of coordinates.
|
|
||||||||||||||||||||
|
Allocates a 3-D polynomial structure.
|
|
||||||||||||||||||||
|
Evaluates a 3-D polynomial at specific coordinates.
|
|
||||||||||||||||||||
|
Evaluates a 3-D polynomial at specific sets of coordinates.
|
|
||||||||||||||||||||||||
|
Allocates a 4-D polynomial structure.
|
|
||||||||||||||||||||||||
|
Evaluates a 4-D polynomial at specific coordinates.
|
|
||||||||||||||||||||||||
|
Evaluates a 4-D polynomial at specific sets of coordinates.
|
|
|
Allocator of the psStats structure.
|
|
||||||||||||||||||||||||||||||||
|
|
|
||||||||||||||||||||||||||||||||||||
|
|
|
||||||||||||||||||||||||||||||||||||||||
|
|
|
||||||||||||||||||||||||||||||||||||||||||||
|
|
|
||||||||||||||||||||||||||||
|
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.
|
|
||||||||||||||||||||||||||||||||
|
|
|
||||||||||||||||||||||||||||||||||||
|
|
|
||||||||||||||||||||||||||||||||||||||||
|
|
|
||||||||||||||||||||||||
|
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.
|
|
||||||||||||||||||||||||
|
Performs statistical calculations on a vector.
|
1.4.2