IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 27, 2004, 2:27:24 PM (22 years ago)
Author:
Paul Price
Message:

Minor clarifications following bugs 14 and 15 (questions
about the document from MHPCC).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/doc/pslib/psLibSDRS.tex

    r518 r534  
    1 %%% $Id: psLibSDRS.tex,v 1.38 2004-04-27 00:33:18 eugene Exp $
     1%%% $Id: psLibSDRS.tex,v 1.39 2004-04-28 00:27:24 price Exp $
    22\documentclass[panstarrs]{panstarrs}
    33
     
    10831083example, if $x$ were a vector of 100 elements, but $y$ were a vector
    10841084of 1000 elements, the meaning of the operation $x + y$ is unclear.
    1085 This type of operation should be invalid.
     1085This type of operation should be invalid and should generate an error.
    10861086
    10871087Given that some functions should be able to operate equivalently (or
     
    11151115    PS_DIMEN_VECTOR,                    ///< A vector
    11161116    PS_DIMEN_TRANSV,                    ///< A transposed vector
    1117     PS_DIMEN_MATRIX,                    ///< A matrix
     1117    PS_DIMEN_IMAGE,                     ///< An image (matrix)
    11181118    PS_DIMEN_OTHER                      ///< Something else that's not supported for arithmetic
    11191119} psDimen;
     
    11371137\end{verbatim}
    11381138We discuss the application of \code{psType} in more detail in
    1139 section~\ref{math}. 
     1139section~\ref{arithmetic}. 
    11401140
    11411141\subsection{Arrays of Simple Types}
    11421142
    11431143We require several types of basic one-dimensional arrays: arrays of
    1144 values of type \code{int}, \code{float}, \code{double}, \code{complex float},
    1145 and \code{void *}.  We have defined structures for these types
     1144values of type \code{int}, \code{float}, \code{double}, \code{complex
     1145float}, and \code{void *}.  We have defined structures for these types
    11461146which are all equivalent.  We illustrate them with the example of
    11471147\code{psFloatArray}:
     
    11501150typedef struct {
    11511151    psType type;                        ///< Type of data.  Must be first element
    1152     int nalloc;                         ///< Total number of elements available
     1152    int nAlloc;                         ///< Total number of elements available
    11531153    int n;                              ///< Number of elements in use
    11541154    float *arr;                         ///< The array data
     
    11571157%
    11581158In this structure, the argument \code{n} is the length of the array
    1159 (the number of elements); \code{size} is the number of elements
     1159(the number of elements); \code{nAlloc} is the number of elements
    11601160allocated ($s \ge n$).  The allocated memory is available at
    11611161\code{arr}.  The data type is defined by the first element,
     
    11641164%
    11651165\begin{verbatim}
    1166 psFloatArray *psFloatArrayAlloc(int nalloc);
    1167 psFloatArray *psFloatArrayRealloc(psFloatArray *myArray, int nalloc);
     1166psFloatArray *psFloatArrayAlloc(int nAlloc);
     1167psFloatArray *psFloatArrayRealloc(psFloatArray *myArray, int nAlloc);
    11681168void psFloatArrayFree(psFloatArray *restrict myArray);
    11691169\end{verbatim}
    11701170%
    1171 In these functions, \code{nalloc} is the number of elements to
     1171In these functions, \code{nAlloc} is the number of elements to
    11721172allocate.  For \code{psFloatArrayAlloc}, the value of
    11731173\code{psFloatArray.n} is set to 0.  For \code{psFloatArrayRealloc}, if
    1174 the value of \code{nalloc} is smaller than the current value of
     1174the value of \code{nAlloc} is smaller than the current value of
    11751175\code{psFloatArray.n}, then \code{psFloatArray.n} is set to
    1176 \code{nalloc}, the array is adjusted down to match \code{nalloc}, and
    1177 the extra elements are lost.  If \code{nalloc} is larger than the
     1176\code{nAlloc}, the array is adjusted down to match \code{nAlloc}, and
     1177the extra elements are lost.  If \code{nAlloc} is larger than the
    11781178current value of \code{psFloatArray.n}, \code{psFloatArray.n} is left
    11791179intact.  If the value of \code{myArray} is \code{NULL}, then
     
    11851185appropriate type.  Thus we have:
    11861186\begin{verbatim}
    1187 psIntArray *psIntArrayAlloc(int nalloc);
    1188 psFloatArray *psFloatArrayAlloc(int nalloc);
    1189 psDoubleArray *psDoubleArrayAlloc(int nalloc);
    1190 psComplexArray *psComplexArrayAlloc(int nalloc);
     1187psIntArray *psIntArrayAlloc(int nAlloc);
     1188psFloatArray *psFloatArrayAlloc(int nAlloc);
     1189psDoubleArray *psDoubleArrayAlloc(int nAlloc);
     1190psComplexArray *psComplexArrayAlloc(int nAlloc);
    11911191\end{verbatim}
    11921192and so on for the other functions.  The collection of structures and
     
    12041204typedef struct {
    12051205    psType type;                        ///< Type of data.  Must be first element
    1206     int nalloc;                         ///< Total number of elements available
     1206    int nAlloc;                         ///< Total number of elements available
    12071207    int n;                              ///< Number of elements in use
    12081208    void **arr;                         ///< The array data
     
    12131213%
    12141214\begin{verbatim}
    1215 psVoidPtrArray *psVoidPtrArrayAlloc(int nalloc);
    1216 psVoidPtrArray *psVoidPtrArrayRealloc(psVoidPtrArray *myArray, int nalloc);
     1215psVoidPtrArray *psVoidPtrArrayAlloc(int nAlloc);
     1216psVoidPtrArray *psVoidPtrArrayRealloc(psVoidPtrArray *myArray, int nAlloc);
    12171217void psVoidPtrArrayFree(psVoidPtrArray *restrict myArray, void (*elemFree)(void *));
    12181218\end{verbatim}
     
    15091509psBitset *
    15101510psBitsetSet(psBitset *restrict myBits, ///< Input bitset
    1511              int bit                    ///< Bit to set
     1511             int bit                    ///< Bit to set
    15121512    );
    15131513\end{verbatim}
     
    16191619psStats *
    16201620psArrayStats(const psFloatArray *restrict myArray, ///< Array to be analysed
    1621              const psIntArray *restrict maskArray, ///< Ignore elements where (maskArray & maskVal) != 0
    1622                                                    ///< May be NULL
    1623              unsigned int maskVal,      ///< Only mask elements with one of these bits set in maskArray
    1624              psStats *stats             ///< stats structure defines stats to be calculated and how
     1621             const psIntArray *restrict maskArray, ///< Ignore elements where (maskArray & maskVal) != 0
     1622                                                   ///< May be NULL
     1623             unsigned int maskVal,      ///< Only mask elements with one of these bits set in maskArray
     1624             psStats *stats             ///< stats structure defines stats to be calculated and how
    16251625    );
    16261626\end{verbatim}
     
    16371637/** generic statistics structure */
    16381638typedef struct {
    1639     double sampleMean;                  ///< formal mean of sample
    1640     double sampleMedian;                ///< formal median of sample
    1641     double sampleStdev;                 ///< standard deviation of sample
    1642     double sampleUQ;                    ///< upper quartile of sample
    1643     double sampleLQ;                    ///< lower quartile of sample
    1644     double robustMean;                  ///< robust mean of array
    1645     int    robustMeanNvalues;           ///< number of measurements used for robust mean
    1646     double robustMedian;                ///< robust median of array
    1647     int    robustMedianNvalues;         ///< number of measurements used for robust median
    1648     double robustMode;                  ///< Robust mode of array
    1649     int    robustModeNvalues;           ///< Number of measurements used for robust mode
    1650     double robustStdev;                 ///< robust standard deviation of array
    1651     double robustUQ;                    ///< robust upper quartile
    1652     double robustLQ;                    ///< robust lower quartile
    1653     double clippedMean;                 ///< Nsigma clipped mean
    1654     int    clippedMeanNvalues;          ///< number of data points used for clipped mean
    1655     double clippedStdev;                ///< standard deviation after clipping
    1656     double clipSigma;                   ///< Nsigma used for clipping; user input
    1657     int    clipIter;                    ///< Number of clipping iterations; user input
    1658     double min;                         ///< minimum data value in array
    1659     double max;                         ///< maximum data value in array
    1660     int    nValues;                     ///< number of data values in array
    1661     psStatsOptions options;             ///< bitmask of calculated values
     1639    double sampleMean;                  ///< formal mean of sample
     1640    double sampleMedian;                ///< formal median of sample
     1641    double sampleStdev;                 ///< standard deviation of sample
     1642    double sampleUQ;                    ///< upper quartile of sample
     1643    double sampleLQ;                    ///< lower quartile of sample
     1644    double robustMean;                  ///< robust mean of array
     1645    int    robustMeanNvalues;           ///< number of measurements used for robust mean
     1646    double robustMedian;                ///< robust median of array
     1647    int    robustMedianNvalues;         ///< number of measurements used for robust median
     1648    double robustMode;                  ///< Robust mode of array
     1649    int    robustModeNvalues;           ///< Number of measurements used for robust mode
     1650    double robustStdev;                 ///< robust standard deviation of array
     1651    double robustUQ;                    ///< robust upper quartile
     1652    double robustLQ;                    ///< robust lower quartile
     1653    double clippedMean;                 ///< Nsigma clipped mean
     1654    int    clippedMeanNvalues;          ///< number of data points used for clipped mean
     1655    double clippedStdev;                ///< standard deviation after clipping
     1656    double clipSigma;                   ///< Nsigma used for clipping; user input
     1657    int    clipIter;                    ///< Number of clipping iterations; user input
     1658    double min;                         ///< minimum data value in array
     1659    double max;                         ///< maximum data value in array
     1660    int    nValues;                     ///< number of data values in array
     1661    psStatsOptions options;             ///< bitmask of calculated values
    16621662} psStats;
    16631663\end{verbatim}
     
    16711671    PS_STAT_SAMPLE_MEDIAN         = 0x000002,
    16721672    PS_STAT_SAMPLE_STDEV          = 0x000004,
    1673     PS_STAT_SAMPLE_UQ             = 0x000008,
    1674     PS_STAT_SAMPLE_LQ             = 0x000010,
     1673    PS_STAT_SAMPLE_UQ             = 0x000008,
     1674    PS_STAT_SAMPLE_LQ             = 0x000010,
    16751675    PS_STAT_ROBUST_MEAN           = 0x000020,
    16761676    PS_STAT_ROBUST_MEAN_NVALUES   = 0x000040,
     
    16801680    PS_STAT_ROBUST_MODE_NVALUES   = 0x000400,
    16811681    PS_STAT_ROBUST_STDEV          = 0x000800,
    1682     PS_STAT_ROBUST_UQ             = 0x001000,
    1683     PS_STAT_ROBUST_LQ             = 0x002000,
     1682    PS_STAT_ROBUST_UQ             = 0x001000,
     1683    PS_STAT_ROBUST_LQ             = 0x002000,
    16841684    PS_STAT_CLIPPED_MEAN          = 0x004000,
    16851685    PS_STAT_CLIPPED_MEAN_NVALUES  = 0x008000,
    16861686    PS_STAT_CLIPPED_MEAN_NSIGMA   = 0x010000,
    16871687    PS_STAT_CLIPPED_STDEV         = 0x020000,
    1688     PS_STAT_MAX                   = 0x040000,     
    1689     PS_STAT_MIN                   = 0x080000,
    1690     PS_STAT_NVALUES               = 0x100000
    1691 } psStatsOptions;                        
     1688    PS_STAT_MAX                   = 0x040000,     
     1689    PS_STAT_MIN                   = 0x080000,
     1690    PS_STAT_NVALUES               = 0x100000
     1691} psStatsOptions;                        
    16921692\end{verbatim}
    16931693
     
    16971697/** Constructor */
    16981698psStats *
    1699 psStatsAlloc(psStatsOptions options     ///< Statistics to measure
     1699psStatsAlloc(psStatsOptions options     ///< Statistics to measure
    17001700    );
    17011701
    17021702/** Destructor */
    17031703void
    1704 psStatsFree(psStats *restrict stats     ///< Stats structure to destroy
     1704psStatsFree(psStats *restrict stats     ///< Stats structure to destroy
    17051705    );
    17061706\end{verbatim}
     
    17641764psHistogram *
    17651765psGetArrayHistogram(psHistogram *restrict myHist, ///< Histogram data
    1766                     const psFloatArray *restrict myArray ///< Array to analyse
     1766                    const psFloatArray *restrict myArray ///< Array to analyse
    17671767    );
    17681768\end{verbatim}
     
    17721772\subsection{Matrix operations and linear algebra}
    17731773
    1774 In addition to the ability to perform image arithmetic (\S\ref{sec:arithmetic}),
    1775 we also require the ability to perform basic linear algebra on matrices, in order
    1776 to solve equations.  We use \code{psImage} as a matrix, since it has the correct
    1777 form, and we define the following basic matrix operations:
     1774In addition to the ability to perform image arithmetic
     1775(\S\ref{sec:arithmetic}), we also require the ability to perform basic
     1776linear algebra on matrices, in order to solve equations.  We use
     1777\code{psImage} as a matrix, since it has the correct form; similarly,
     1778we define a vector, \code{psVector} to be an array of floating-point
     1779numbers, \code{psFloatArray}.  We define the following basic matrix
     1780operations:
    17781781\begin{itemize}
    17791782\item $LU$ Decompose a matrix, and solve for $x$ in $Ax = b$;
     
    17891792/** LU Decomposition of a matrix */
    17901793psImage *
    1791 psMatrixLUD(psImage *out,               ///< Matrix to return, or NULL
    1792             psImage *myMatrix           ///< Matrix to decompose
    1793             );
     1794psMatrixLUD(psImage *out,               ///< Matrix to return, or NULL
     1795            psImage *myMatrix           ///< Matrix to decompose
     1796            );
    17941797
    17951798/** LU Solution.  Solves for and returns x in the equation Ax = b */
    17961799psVector *
    1797 psMatrixLUSolve(psVector *out,          ///< Vector to return, or NULL
    1798                 const psImage *luMatrix, ///< LU-decomposed matrix
    1799                 const psVector *rhsVector ///< right-hand-side of the equation
    1800                 );
     1800psMatrixLUSolve(psVector *out,          ///< Vector to return, or NULL
     1801                const psImage *luMatrix, ///< LU-decomposed matrix
     1802                const psVector *rhsVector ///< right-hand-side of the equation
     1803                );
    18011804\end{verbatim}
    18021805
     
    18101813\begin{verbatim}
    18111814/** Invert matrix.  Not using restrict, to allow inversion to be done in-place */
    1812 psMatrix *
    1813 psMatrixInvert(psMatrix *out,           ///< Matrix to return, or NULL
    1814                const psMatrix *myMatrix, ///< Matrix to be inverted
     1815psImage *
     1816psMatrixInvert(psImage *out,           ///< Matrix to return, or NULL
     1817               const psImage *myMatrix, ///< Matrix to be inverted
    18151818               float *restrict determinant ///< Determinant to return, or NULL
    18161819    );
     
    18271830/** Matrix determinant */
    18281831float
    1829 psMatrixDeterminant(const psMatrix *restrict myMatrix //!< Matrix to get determinant for
     1832psMatrixDeterminant(const psImage *restrict myMatrix //!< Matrix to get determinant for
    18301833                    );
    18311834\end{verbatim}
     
    18421845\begin{verbatim}
    18431846/** Matrix operations */
    1844 psMatrix *
    1845 psMatrixOp(psMatrix *out,               ///< Matrix to return, or NULL
    1846            const psMatrix *matrix1,     ///< Matrix 1
     1847psImage *
     1848psMatrixOp(psImage *out,               ///< Matrix to return, or NULL
     1849           const psImage *matrix1,     ///< Matrix 1
    18471850           const char *op,              ///< Operation to perform: "+", "-", "*"
    1848            const psMatrix *matrix2      ///< Matrix 2
     1851           const psImage *matrix2      ///< Matrix 2
    18491852           );
    18501853\end{verbatim}
     
    18551858\begin{verbatim}
    18561859/** Transpose Matrix */
    1857 psMatrix *
    1858 psMatrixTranspose(psMatrix *out,        ///< Matrix to return, or NULL
    1859                   const psMatrix *myMatrix ///< Matrix to transpose
     1860psImage *
     1861psMatrixTranspose(psImage *out,        ///< Matrix to return, or NULL
     1862                  const psImage *myMatrix ///< Matrix to transpose
    18601863                  );
    18611864\end{verbatim}
     
    18691872/** Convert matrix to vector.  Intended for a 1-d matrix. */
    18701873psVector *
    1871 psMatrixToVector(psVector *out,         ///< Vector to return, or NULL
    1872                  psImage *myMatrix      ///< Matrix to convert
     1874psMatrixToVector(psVector *out,         ///< Vector to return, or NULL
     1875                 psImage *myMatrix      ///< Matrix to convert
    18731876    );
    18741877
     
    18951898/** Fast Fourier Transform */
    18961899typedef struct {
    1897     p_psFFTDetails *details;            ///< Details on FFT implementation (private)
    1898     int nx, ny;                         ///< Size in x and y
    1899     float *real;                        ///< Data in real space: a 2D array using the [nx*y + x] stuff
    1900     void *fourier;                      ///< Data in fourier space; implementation dependent
     1900    p_psFFTDetails *details;            ///< Details on FFT implementation (private)
     1901    int nx, ny;                         ///< Size in x and y
     1902    float *real;                        ///< Data in real space: a 2D array using the [nx*y + x] stuff
     1903    void *fourier;                      ///< Data in fourier space; implementation dependent
    19011904} psFFT;
    19021905\end{verbatim}
     
    19441947/** Forward FFT: from real to fourier space */
    19451948psFFT *
    1946 psFFTForward(psFFT *fft                 ///< FFT to apply (input and output)
    1947              );
     1949psFFTForward(psFFT *fft                 ///< FFT to apply (input and output)
     1950             );
    19481951
    19491952/** Reverse FFT: from fourier to real space */
    19501953psFFT *
    1951 psFFTReverse(psFFT *fft                 ///< FFT to apply (input and output)
    1952              );
     1954psFFTReverse(psFFT *fft                 ///< FFT to apply (input and output)
     1955             );
    19531956\end{verbatim}
    19541957
     
    19972000/** Calculate FFT of the convolution.  Straight multiplication of the FFTs */
    19982001psFFT *
    1999 psFFTConvolve(psFFT *out,               ///< Output FFT (or NULL)
    2000               const psFFT *fft1, const psFFT *fft2 ///< FFTs to multiply
    2001               );
     2002psFFTConvolve(psFFT *out,               ///< Output FFT (or NULL)
     2003              const psFFT *fft1, const psFFT *fft2 ///< FFTs to multiply
     2004              );
    20022005\end{verbatim}
    20032006
     
    20082011/** Calculate power spectrum */
    20092012psFloatArray *
    2010 psFFTPowerSpec(psFFT *fft               ///< FFT to use (input and output)
    2011                );
     2013psFFTPowerSpec(psFFT *fft               ///< FFT to use (input and output)
     2014               );
    20122015\end{verbatim}
    20132016
     
    21392142psFloatArray *
    21402143psMinimize(float (*myFunction)(const psFloatArray *restrict), ///< Function to minimize
    2141            psFloatArray *restrict initialGuess, ///< Initial guess
    2142            psIntArray *restrict paramMask //!< 1 = fit for parameter, 0 = hold parameter constant
    2143            );
     2144           psFloatArray *restrict initialGuess, ///< Initial guess
     2145           psIntArray *restrict paramMask //!< 1 = fit for parameter, 0 = hold parameter constant
     2146           );
    21442147\end{verbatim}
    21452148
     
    21542157psFloatArray *
    21552158psMinimizeChi2(float (*evalModel)(const psFloatArray *restrict,
    2156                                   const psFloatArray *restrict), ///< Model to fit; (domain and params)
    2157                const psFloatArray *restrict domain, ///< The domain values for the corresponding measurements
    2158                const psFloatArray *restrict data, ///< Data to fit
    2159                const psFloatArray *restrict errors, ///< Errors in the data
    2160                psFloatArray *restrict initialGuess, ///< Initial guess
    2161                const psIntArray *restrict paramMask ///< 1 = fit for parameter, 0 = hold parameter constant
     2159                                  const psFloatArray *restrict), ///< Model to fit; (domain and params)
     2160               const psFloatArray *restrict domain, ///< The domain values for the corresponding measurements
     2161               const psFloatArray *restrict data, ///< Data to fit
     2162               const psFloatArray *restrict errors, ///< Errors in the data
     2163               psFloatArray *restrict initialGuess, ///< Initial guess
     2164               const psIntArray *restrict paramMask ///< 1 = fit for parameter, 0 = hold parameter constant
    21622165    );
    21632166\end{verbatim}
     
    21752178psPolynomial1D *
    21762179psGetArrayPolynomial(psPolynomial1D myPoly, ///< Polynomial to fit
    2177                      const psFloatArray *restrict x, ///< Ordinates (or NULL to just use the indices)
    2178                      const psFloatArray *restrict y, ///< Coordinates
    2179                      const psFloatArray *restrict yErr ///< Errors in coordinates, or NULL
     2180                     const psFloatArray *restrict x, ///< Ordinates (or NULL to just use the indices)
     2181                     const psFloatArray *restrict y, ///< Coordinates
     2182                     const psFloatArray *restrict yErr ///< Errors in coordinates, or NULL
    21802183    );
    21812184\end{verbatim}
     
    22032206    int x0, y0;                         ///< data region relative to parent
    22042207    union {
    2205         psF32 **rows;                   ///< == rows_f32
    2206         psS8  **rows_s8;                ///< pointers to psS8 data
    2207         psS16 **rows_s16;               ///< pointers to psS16 data
    2208         psS32 **rows_s32;               ///< pointers to psS32 data
    2209         psU8  **rows_u8;                ///< pointers to psU8 data
    2210         psU16 **rows_u16;               ///< pointers to psU16 data
    2211         psU32 **rows_u32;               ///< pointers to psU32 data
    2212         psF32 **rows_f32;               ///< pointers to psF32 data
    2213         psF64 **rows_f64;               ///< pointers to psF64 data
    2214         psComplex **rows_complex;       ///< pointers to psComplex data
     2208        float **rows;                   ///< Pointers to floating-point data (default)
     2209        short int **rows_si;            ///< Pointers to short-integer data
     2210        int **rows_i;                   ///< Pointers to integer data
     2211        long int **rows_li;             ///< Pointers to long-integer data
     2212        unsigned short int **rows_usi;  ///< Pointers to unsigned-short-integer data
     2213        unsigned int **rows_ui;         ///< Pointers to unsigned-integer data
     2214        unsigned long int **rows_uli;   ///< Pointers to unsigned-long-integer data
     2215        float **rows_f;                 ///< Pointers to floating-point data
     2216        double **rows_d;                ///< Pointers to double-precision data
     2217        complex float **rows_complex;   ///< Pointers to complex floating-point data
    22152218    } rows;
    2216     psImage *parent;                    ///< parent, if a subimage
     2219    struct psImage *parent;             ///< parent, if a subimage
    22172220    int Nchildren;                      ///< number of subimages
    2218     psImage *children;                  ///< children of this region; array of Nchildren pointers
     2221    struct psImage *children;           ///< children of this region; array of Nchildren pointers
    22192222} psImage;
    22202223\end{verbatim}
     
    22232226pixels.  The size of this array is given by the elements \code{(nx,
    22242227ny)}.  The data type of the pixel is defined by the \code{psType type}
    2225 entry (see \ref{TBD}).  (n.b. that for FITS images, these values are
    2226 restricted to the datatypes equivalent to the valid BITPIX values 8,
    2227 16, 32, -32, -64).  The image represented in the data structure may
    2228 represent a subset of the pixels in a complete array, in which case
    2229 the image is considered to be the child of that parent array.  The
    2230 offset of the \code{(0,0)} pixel in this array relative to the parent
    2231 array is given by the elements \code{(x0,y0)}.  The structure may
    2232 include references to subrasters (\code{children, Nchildren}) and/or
    2233 to a containing array (\code{parent}).  Unless this is image is a
    2234 child of another image (represents a subset of the pixels of another
    2235 image), the image data is allocated in a contiguous block.
     2228entry (see \ref{arithmetic}).  (n.b. that for FITS images, these
     2229values are restricted to the datatypes equivalent to the valid BITPIX
     2230values 8, 16, 32, -32, -64).  The image represented in the data
     2231structure may represent a subset of the pixels in a complete array, in
     2232which case the image is considered to be the child of that parent
     2233array.  The offset of the \code{(0,0)} pixel in this array relative to
     2234the parent array is given by the elements \code{(x0,y0)}.  The
     2235structure may include references to subrasters (\code{children,
     2236Nchildren}) and/or to a containing array (\code{parent}).  Unless this
     2237is image is a child of another image (represents a subset of the
     2238pixels of another image), the image data is allocated in a contiguous
     2239block.
    22362240
    22372241We require a variety of functions to manipulate these image
     
    25112515expected that the implementation of these functions will employ
    25122516pre-processor macros to perform the onerous task of creating the
    2513 loops.  Also note that \code{psVectors} is equivalent to
    2514 \code{psFloatArray}.
     2517loops.  Also note that \code{psVector} is equivalent to
     2518\code{psFloatArray}.  An attempt to perform an arithmetic operation on
     2519an object of dimension \code{PS_DIMEN_OTHER} should produce an error.
    25152520
    25162521Binary operations between an image and a vector have a potential
     
    29322937/// Add item to the end of the metadata.  Combines psMetadataItemAlloc and psMetadataAppendItem
    29332938psMetadataItem *psMetadataAppend(psMetadata *restrict md, ///< Metadata to add to
    2934                                 int typeFlags ///< type of this piece of metadata + flags
    2935                                 const void *val, ///< value of new item N.b. a pointer even if the item
    2936                                                   ///< is of type e.g. int
    2937                                 const char *comment, ///< comment associated with item
    2938                                 const char *name, ///< name of new item of metadata (may be in sprintf
    2939                                                    ///< format)
    2940                                  ...    ///< possible arguments for name format
     2939                                int typeFlags ///< type of this piece of metadata + flags
     2940                                const void *val, ///< value of new item N.b. a pointer even if the item
     2941                                                  ///< is of type e.g. int
     2942                                const char *comment, ///< comment associated with item
     2943                                const char *name, ///< name of new item of metadata (may be in sprintf
     2944                                                   ///< format)
     2945                                 ...    ///< possible arguments for name format
    29412946    );
    29422947\end{verbatim}
     
    33463351typedef struct {
    33473352    int x0, y0;                         ///< Offset from the lower-left corner
    3348     int nx, ny;                         ///< Image binning
     3353    int nx, ny;                         ///< Image binning
    33493354    psImage *image;                     ///< imaging area of cell
    33503355    psDlist *objects;                   ///< objects derived from cell
     
    34443449    psChip *chips;                      ///< Chips in the Focal Plane Array
    34453450
    3446     psMetadata *md;                  ///< FPA-level metadata
     3451    psMetadata *md;                     ///< FPA-level metadata
    34473452    psDistortion *TPtoFP;               ///< Transformation term from
    34483453    psDistortion *FPtoTP;               ///< Transformation term from
Note: See TracChangeset for help on using the changeset viewer.