IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 1426


Ignore:
Timestamp:
Aug 9, 2004, 12:44:25 PM (22 years ago)
Author:
desonia
Message:

fixed some stupid indent-induced formating problems and added doxygen
comments.

Location:
trunk/psLib/src
Files:
47 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/astro/psCoord.h

    r1407 r1426  
    1111*  @author George Gusciora, MHPCC
    1212*
    13 *  @version $Revision: 1.10 $ $Name: not supported by cvs2svn $
    14 *  @date $Date: 2004-08-07 00:06:06 $
     13*  @version $Revision: 1.11 $ $Name: not supported by cvs2svn $
     14*  @date $Date: 2004-08-09 22:44:25 $
    1515*
    1616*  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    3939typedef struct
    4040{
    41     double x;                   // /< x position
    42     double y;                   // /< y position
    43     double xErr;                // /< Error in x position
    44     double yErr;                // /< Error in y position
     41    double x;                   ///< x position
     42    double y;                   ///< y position
     43    double xErr;                ///< Error in x position
     44    double yErr;                ///< Error in y position
    4545}
    4646psPlane;
     
    5555typedef struct
    5656{
    57     double r;                   // /< RA
    58     double d;                   // /< Dec
    59     double rErr;                // /< Error in RA
    60     double dErr;                // /< Error in Dec
     57    double r;                   ///< RA
     58    double d;                   ///< Dec
     59    double rErr;                ///< Error in RA
     60    double dErr;                ///< Error in Dec
    6161}
    6262psSphere;
     
    7272typedef struct
    7373{
    74     psDPolynomial2D *x;         // /< 2D polynomial transform of X coordinates
    75     psDPolynomial2D *y;         // /< 2D polynomial transform of Y coordinates
     74    psDPolynomial2D *x;         ///< 2D polynomial transform of X coordinates
     75    psDPolynomial2D *y;         ///< 2D polynomial transform of Y coordinates
    7676}
    7777psPlaneTransform;
     
    9191typedef struct
    9292{
    93     psDPolynomial4D *x;         // /< 4D polynomial transform of X coordinates
    94     psDPolynomial4D *y;         // /< 4D polynomial transform of Y coordinates
     93    psDPolynomial4D *x;         ///< 4D polynomial transform of X coordinates
     94    psDPolynomial4D *y;         ///< 4D polynomial transform of Y coordinates
    9595}
    9696psPlaneDistort;
     
    108108typedef struct
    109109{
    110     double sinPhi;              // /< sin of North Pole lattitude
    111     double cosPhi;              // /< cos of North Pole lattitude
    112     double Xo;                  // /< First PT of Ares lon
    113     double xo;                  // /< First PT of Ares equiv lon
     110    double sinPhi;              ///< sin of North Pole lattitude
     111    double cosPhi;              ///< cos of North Pole lattitude
     112    double Xo;                  ///< First PT of Ares lon
     113    double xo;                  ///< First PT of Ares equiv lon
    114114}
    115115psSphereTransform;
     
    121121 */
    122122typedef enum {
    123     PS_PROJ_TAN,                // /< Tangent projection
    124     PS_PROJ_SIN,                // /< Sine projection
    125     PS_PROJ_AIT,                // /< Aitoff projection
    126     PS_PROJ_PAR,                // /< Par projection
    127     PS_PROJ_GLS,                // /< GLS projection
    128     PS_PROJ_CAR,                // /< CAR projection
    129     PS_PROJ_MER,                // /< MER projection
    130     PS_PROJ_NTYPE               // /< Number of types; must be last.
     123    PS_PROJ_TAN,                ///< Tangent projection
     124    PS_PROJ_SIN,                ///< Sine projection
     125    PS_PROJ_AIT,                ///< Aitoff projection
     126    PS_PROJ_PAR,                ///< Par projection
     127    PS_PROJ_GLS,                ///< GLS projection
     128    PS_PROJ_CAR,                ///< CAR projection
     129    PS_PROJ_MER,                ///< MER projection
     130    PS_PROJ_NTYPE               ///< Number of types; must be last.
    131131} psProjectionType;
    132132
     
    138138typedef struct
    139139{
    140     double R;                   // /< Coordinates of projection center
    141     double D;                   // /< Coordinates of projection center
    142     double Xs;                  // /< plate-scale in X direction
    143     double Ys;                  // /< plate-scale in Y direction
    144     psProjectionType type;      // /< Projection type
     140    double R;                   ///< Coordinates of projection center
     141    double D;                   ///< Coordinates of projection center
     142    double Xs;                  ///< plate-scale in X direction
     143    double Ys;                  ///< plate-scale in Y direction
     144    psProjectionType type;      ///< Projection type
    145145}
    146146psProjection;
     
    152152 */
    153153typedef enum {
    154     PS_SPHERICAL,               // /< offset corresponds to an angular offset
    155     PS_LINEAR                   // /< offset corresponds to a linear offset
     154    PS_SPHERICAL,               ///< offset corresponds to an angular offset
     155    PS_LINEAR                   ///< offset corresponds to a linear offset
    156156} psSphereOffsetMode;
    157157
     
    162162 */
    163163typedef enum {
    164     PS_ARCSEC,                  // /< Arcseconds
    165     PS_ARCMIN,                  // /< Arcminutes
    166     PS_DEGREE,                  // /< Degrees
    167     PS_RADIAN                   // /< Radians
     164    PS_ARCSEC,                  ///< Arcseconds
     165    PS_ARCMIN,                  ///< Arcminutes
     166    PS_DEGREE,                  ///< Degrees
     167    PS_RADIAN                   ///< Radians
    168168} psSphereOffsetUnit;
    169169
     
    171171 *
    172172 */
    173 psPlane *psPlaneTransformApply(psPlane * out,   // /< a psPlane to recycle.  If NULL, a new one is generated.
    174                                const psPlaneTransform * transform,      // /< the transform to apply
    175                                const psPlane * coords   // /< the coordinate to apply the transform above.
     173psPlane *psPlaneTransformApply(psPlane * out,   ///< a psPlane to recycle.  If NULL, a new one is generated.
     174                               const psPlaneTransform * transform,      ///< the transform to apply
     175                               const psPlane * coords   ///< the coordinate to apply the transform above.
    176176                              );
    177177
     
    179179 *
    180180 */
    181 psPlane *psPlaneDistortApply(psPlane * out,     // /< a psPlane to recycle.  If NULL, a new one is generated.
    182                              const psPlaneDistort * transform,  // /< the transform to apply
    183                              const psPlane * coords,    // /< the coordinate to apply the transform above.
    184                              float term3,       // /< third term -- maybe magnitude
    185                              float term4        // /< forth term -- maybe color
     181psPlane *psPlaneDistortApply(psPlane * out,     ///< a psPlane to recycle.  If NULL, a new one is generated.
     182                             const psPlaneDistort * transform,  ///< the transform to apply
     183                             const psPlane * coords,    ///< the coordinate to apply the transform above.
     184                             float term3,       ///< third term -- maybe magnitude
     185                             float term4        ///< forth term -- maybe color
    186186                            );
    187187
     
    189189 *
    190190 */
    191 psSphereTransform *psSphereTransformAlloc(double NPlat, // /< north pole latitude
    192         double Xo,    // /< First PT of Ares lon
    193         double xo     // /< First PT of Ares equiv lon
     191psSphereTransform *psSphereTransformAlloc(double NPlat, ///< north pole latitude
     192        double Xo,    ///< First PT of Ares lon
     193        double xo     ///< First PT of Ares equiv lon
    194194                                         );
    195195
     
    197197 *
    198198 */
    199 psSphere *psSphereTransformApply(psSphere * out,        // /< a psSphere to recycle.  If NULL, a new one is
     199psSphere *psSphereTransformApply(psSphere * out,        ///< a psSphere to recycle.  If NULL, a new one is
    200200                                 // generated.
    201                                  const psSphereTransform * transform,   // /< the transform to apply
    202                                  const psSphere * coord // /< the coordinate to apply the transform above.x
     201                                 const psSphereTransform * transform,   ///< the transform to apply
     202                                 const psSphere * coord ///< the coordinate to apply the transform above.x
    203203                                );
    204204
  • trunk/psLib/src/astronomy/psAstrometry.h

    r1407 r1426  
    99*  @author George Gusciora, MHPCC
    1010*
    11 *  @version $Revision: 1.6 $ $Name: not supported by cvs2svn $
    12 *  @date $Date: 2004-08-07 00:06:06 $
     11*  @version $Revision: 1.7 $ $Name: not supported by cvs2svn $
     12*  @date $Date: 2004-08-09 22:44:25 $
    1313*
    1414*  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    4545typedef struct
    4646{
    47     const double latitude;      // /< geodetic latitude (radians)
    48     const double sinLat;        // /< sine of geodetic latitude
    49     const double cosLat;        // /< cosine of geodetic latitude
    50     const double abberationMag; // /< magnitude of diurnal aberration vector
    51     const double height;        // /< height (HM)
    52     const double temperature;   // /< ambient temperature (TDK)
    53     const double pressure;      // /< pressure (PMB)
    54     const double humidity;      // /< relative humidity (RH)
    55     const double wavelength;    // /< wavelength (WL)
    56     const double lapseRate;     // /< lapse rate (TLR)
    57     const double refractA;      // /< refraction constant A (radians)
    58     const double refractB;      // /< refraction constant B (radians)
    59     const double longitudeOffset;       // /< longitude + ... (radians)
    60     const double siderealTime;  // /< local apparent sidereal time (radians)
     47    const double latitude;      ///< geodetic latitude (radians)
     48    const double sinLat;        ///< sine of geodetic latitude
     49    const double cosLat;        ///< cosine of geodetic latitude
     50    const double abberationMag; ///< magnitude of diurnal aberration vector
     51    const double height;        ///< height (HM)
     52    const double temperature;   ///< ambient temperature (TDK)
     53    const double pressure;      ///< pressure (PMB)
     54    const double humidity;      ///< relative humidity (RH)
     55    const double wavelength;    ///< wavelength (WL)
     56    const double lapseRate;     ///< lapse rate (TLR)
     57    const double refractA;      ///< refraction constant A (radians)
     58    const double refractB;      ///< refraction constant B (radians)
     59    const double longitudeOffset;       ///< longitude + ... (radians)
     60    const double siderealTime;  ///< local apparent sidereal time (radians)
    6161}
    6262psGrommit;
     
    7373typedef struct
    7474{
    75     int nX;                     // /< Number of elements in x direction
    76     int nY;                     // /< Number of elements in y direction
    77     double x0;                  // /< X Position of 0,0 corner on focal plane
    78     double y0;                  // /< Y Position of 0,0 corner on focal plane
    79     double xScale;              // /< Scale of the grid in x direction
    80     double yScale;              // /< Scale of the grid in x direction
    81     double **x;                 // /< The grid of offsets in x
    82     double **y;                 // /< The grid of offsets in y
     75    int nX;                     ///< Number of elements in x direction
     76    int nY;                     ///< Number of elements in y direction
     77    double x0;                  ///< X Position of 0,0 corner on focal plane
     78    double y0;                  ///< Y Position of 0,0 corner on focal plane
     79    double xScale;              ///< Scale of the grid in x direction
     80    double yScale;              ///< Scale of the grid in x direction
     81    double **x;                 ///< The grid of offsets in x
     82    double **y;                 ///< The grid of offsets in y
    8383}
    8484psFixedPattern;
     
    9595typedef struct
    9696{
    97     const unsigned int colBins; // /< Amount of binning in x-dimension
    98     const unsigned int rowBins; // /< Amount of binning in y-dimension
    99     const int col0;             // /< Offset from the left of chip.
    100     const int row0;             // /< Offset from the bottom of chip.
    101 
    102     psImage *image;             // /< imaging area of Readout
    103     psList *objects;            // /< objects derived from Readout
    104     psMetadata *metadata;       // /< readout-level metadata
     97    const unsigned int colBins; ///< Amount of binning in x-dimension
     98    const unsigned int rowBins; ///< Amount of binning in y-dimension
     99    const int col0;             ///< Offset from the left of chip.
     100    const int row0;             ///< Offset from the bottom of chip.
     101
     102    psImage *image;             ///< imaging area of Readout
     103    psList *objects;            ///< objects derived from Readout
     104    psMetadata *metadata;       ///< readout-level metadata
    105105}
    106106psReadout;
     
    117117typedef struct psCell
    118118{
    119     psArray *readouts;          // /< readouts from the cell
    120     psMetadata *metadata;       // /< cell-level metadata
    121 
    122     psPlaneTransform *toChip;   // /< transformations from cell to chip coordinates
    123     psPlaneTransform *fromChip; // /< transformations from chip to cell coordinates
    124     psPlaneTransform *toFPA;    // /< transformations from cell to FPA coordinates
    125     psPlaneTransform *toSky;    // /< transformations from cell to sky coordinates
    126 
    127     struct psChip *parent;      // /< chip in which contains this cell
     119    psArray *readouts;          ///< readouts from the cell
     120    psMetadata *metadata;       ///< cell-level metadata
     121
     122    psPlaneTransform *toChip;   ///< transformations from cell to chip coordinates
     123    psPlaneTransform *fromChip; ///< transformations from chip to cell coordinates
     124    psPlaneTransform *toFPA;    ///< transformations from cell to FPA coordinates
     125    psPlaneTransform *toSky;    ///< transformations from cell to sky coordinates
     126
     127    struct psChip *parent;      ///< chip in which contains this cell
    128128}
    129129psCell;
     
    139139typedef struct psChip
    140140{
    141     psArray *cells;             // /< cells in the chip
    142     psMetadata *metadata;       // /< chip-level metadata
    143 
    144     psPlaneTransform *toFPA;    // /< transformation from chip to FPA coordinates
    145     psPlaneTransform *fromFPA;  // /< transformation from FPA to chip coordinates
    146 
    147     struct psFPA *parent;       // /< FPA which contains this chip
     141    psArray *cells;             ///< cells in the chip
     142    psMetadata *metadata;       ///< chip-level metadata
     143
     144    psPlaneTransform *toFPA;    ///< transformation from chip to FPA coordinates
     145    psPlaneTransform *fromFPA;  ///< transformation from FPA to chip coordinates
     146
     147    struct psFPA *parent;       ///< FPA which contains this chip
    148148}
    149149psChip;
     
    164164typedef struct psFPA
    165165{
    166     psArray *chips;             // /< chips in the focal plane array
    167     psMetadata *metadata;       // /< focal-plane's metadata
    168 
    169     psPlaneDistort *fromTangentPlane;   // /< transformation from tangent plane to focal plane
    170     psPlaneDistort *toTangentPlane;     // /< transformation from focal plane to tangent plane
    171     psFixedPattern *pattern;    // /< fixed pattern residual offsets
    172 
    173     const struct psExposure *exposure;  // /< information about this exposure
    174 
    175     psPhotSystem *colorPlus;    // /< Color reference
    176     psPhotSystem *colorMinus;   // /< Color reference
    177 
    178     float rmsX;                 // /< RMS for x transformation fits
    179     float rmsY;                 // /< RMS for y transformation fits
    180     float chi2;                 // /< chi^2 of astrometric solution
     166    psArray *chips;             ///< chips in the focal plane array
     167    psMetadata *metadata;       ///< focal-plane's metadata
     168
     169    psPlaneDistort *fromTangentPlane;   ///< transformation from tangent plane to focal plane
     170    psPlaneDistort *toTangentPlane;     ///< transformation from focal plane to tangent plane
     171    psFixedPattern *pattern;    ///< fixed pattern residual offsets
     172
     173    const struct psExposure *exposure;  ///< information about this exposure
     174
     175    psPhotSystem *colorPlus;    ///< Color reference
     176    psPhotSystem *colorMinus;   ///< Color reference
     177
     178    float rmsX;                 ///< RMS for x transformation fits
     179    float rmsY;                 ///< RMS for y transformation fits
     180    float chi2;                 ///< chi^2 of astrometric solution
    181181}
    182182psFPA;
     
    191191typedef struct psExposure
    192192{
    193     const double ra;            // /< Telescope boresight, right ascention
    194     const double dec;           // /< Telescope boresight, declination
    195     const double hourAngle;     // /< Hour angle
    196     const double zenith;        // /< Zenith distance
    197     const double azimuth;       // /< Azimuth
    198     const double localTime;     // /< Local Sidereal Time
    199     const float date;           // /< Modified Jullian Date of observation
    200     const float rotAngle;       // /< Rotator position angle
    201     const float temperature;    // /< Air temperature, for estimating refraction
    202     const float pressure;       // /< Air pressure, for calculating refraction
    203     const float humidity;       // /< Relative humidity, for refraction
    204     const float exposureTime;   // /< Exposure time
     193    const double ra;            ///< Telescope boresight, right ascention
     194    const double dec;           ///< Telescope boresight, declination
     195    const double hourAngle;     ///< Hour angle
     196    const double zenith;        ///< Zenith distance
     197    const double azimuth;       ///< Azimuth
     198    const double localTime;     ///< Local Sidereal Time
     199    const float date;           ///< Modified Jullian Date of observation
     200    const float rotAngle;       ///< Rotator position angle
     201    const float temperature;    ///< Air temperature, for estimating refraction
     202    const float pressure;       ///< Air pressure, for calculating refraction
     203    const float humidity;       ///< Relative humidity, for refraction
     204    const float exposureTime;   ///< Exposure time
    205205
    206206    /* Derived quantities */
    207     const float positionAngle;  // /< Position angle
    208     const float parallacticAngle;       // /< Parallactic angle
    209     const float airmass;        // /< Airmass, calculated from zenith distance
    210     const float parallacticFactor;      // /< Parallactic factor
    211     const char *cameraName;     // /< name of camera which provided exposure
    212     const char *telescopeName;  // /< name of telescope which provided exposure
     207    const float positionAngle;  ///< Position angle
     208    const float parallacticAngle;       ///< Parallactic angle
     209    const float airmass;        ///< Airmass, calculated from zenith distance
     210    const float parallacticFactor;      ///< Parallactic factor
     211    const char *cameraName;     ///< name of camera which provided exposure
     212    const char *telescopeName;  ///< name of telescope which provided exposure
    213213}
    214214psExposure;
    215215
    216 psExposure *psExposureAlloc(double ra,  // /< Telescope boresight, right ascention
    217                             double dec, // /< Telescope boresight, declination
    218                             double hourAngle,   // /< Hour angle
    219                             double zenith,      // /< Zenith distance
    220                             double azimuth,     // /< Azimuth
    221                             double localTime,   // /< Local Sidereal Time
    222                             float date, // /< MJD
    223                             float rotAngle,     // /< Rotator position angle
    224                             float temperature,  // /< Temperature
    225                             float pressure,     // /< Pressure
    226                             float humidity,     // /< Relative humidity
    227                             float exposureTime  // /< Exposure time
     216psExposure *psExposureAlloc(double ra,  ///< Telescope boresight, right ascention
     217                            double dec, ///< Telescope boresight, declination
     218                            double hourAngle,   ///< Hour angle
     219                            double zenith,      ///< Zenith distance
     220                            double azimuth,     ///< Azimuth
     221                            double localTime,   ///< Local Sidereal Time
     222                            float date, ///< MJD
     223                            float rotAngle,     ///< Rotator position angle
     224                            float temperature,  ///< Temperature
     225                            float pressure,     ///< Pressure
     226                            float humidity,     ///< Relative humidity
     227                            float exposureTime  ///< Exposure time
    228228                           );
    229229
     
    235235 *  @return psGrommit*     New grommit structure.
    236236 */
    237 psGrommit *psGrommitAlloc(const psExposure * exp        // /< the cooresponding exposure structure.
     237psGrommit *psGrommitAlloc(const psExposure * exp        ///< the cooresponding exposure structure.
    238238                         );
    239239
  • trunk/psLib/src/astronomy/psCoord.h

    r1407 r1426  
    1111*  @author George Gusciora, MHPCC
    1212*
    13 *  @version $Revision: 1.10 $ $Name: not supported by cvs2svn $
    14 *  @date $Date: 2004-08-07 00:06:06 $
     13*  @version $Revision: 1.11 $ $Name: not supported by cvs2svn $
     14*  @date $Date: 2004-08-09 22:44:25 $
    1515*
    1616*  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    3939typedef struct
    4040{
    41     double x;                   // /< x position
    42     double y;                   // /< y position
    43     double xErr;                // /< Error in x position
    44     double yErr;                // /< Error in y position
     41    double x;                   ///< x position
     42    double y;                   ///< y position
     43    double xErr;                ///< Error in x position
     44    double yErr;                ///< Error in y position
    4545}
    4646psPlane;
     
    5555typedef struct
    5656{
    57     double r;                   // /< RA
    58     double d;                   // /< Dec
    59     double rErr;                // /< Error in RA
    60     double dErr;                // /< Error in Dec
     57    double r;                   ///< RA
     58    double d;                   ///< Dec
     59    double rErr;                ///< Error in RA
     60    double dErr;                ///< Error in Dec
    6161}
    6262psSphere;
     
    7272typedef struct
    7373{
    74     psDPolynomial2D *x;         // /< 2D polynomial transform of X coordinates
    75     psDPolynomial2D *y;         // /< 2D polynomial transform of Y coordinates
     74    psDPolynomial2D *x;         ///< 2D polynomial transform of X coordinates
     75    psDPolynomial2D *y;         ///< 2D polynomial transform of Y coordinates
    7676}
    7777psPlaneTransform;
     
    9191typedef struct
    9292{
    93     psDPolynomial4D *x;         // /< 4D polynomial transform of X coordinates
    94     psDPolynomial4D *y;         // /< 4D polynomial transform of Y coordinates
     93    psDPolynomial4D *x;         ///< 4D polynomial transform of X coordinates
     94    psDPolynomial4D *y;         ///< 4D polynomial transform of Y coordinates
    9595}
    9696psPlaneDistort;
     
    108108typedef struct
    109109{
    110     double sinPhi;              // /< sin of North Pole lattitude
    111     double cosPhi;              // /< cos of North Pole lattitude
    112     double Xo;                  // /< First PT of Ares lon
    113     double xo;                  // /< First PT of Ares equiv lon
     110    double sinPhi;              ///< sin of North Pole lattitude
     111    double cosPhi;              ///< cos of North Pole lattitude
     112    double Xo;                  ///< First PT of Ares lon
     113    double xo;                  ///< First PT of Ares equiv lon
    114114}
    115115psSphereTransform;
     
    121121 */
    122122typedef enum {
    123     PS_PROJ_TAN,                // /< Tangent projection
    124     PS_PROJ_SIN,                // /< Sine projection
    125     PS_PROJ_AIT,                // /< Aitoff projection
    126     PS_PROJ_PAR,                // /< Par projection
    127     PS_PROJ_GLS,                // /< GLS projection
    128     PS_PROJ_CAR,                // /< CAR projection
    129     PS_PROJ_MER,                // /< MER projection
    130     PS_PROJ_NTYPE               // /< Number of types; must be last.
     123    PS_PROJ_TAN,                ///< Tangent projection
     124    PS_PROJ_SIN,                ///< Sine projection
     125    PS_PROJ_AIT,                ///< Aitoff projection
     126    PS_PROJ_PAR,                ///< Par projection
     127    PS_PROJ_GLS,                ///< GLS projection
     128    PS_PROJ_CAR,                ///< CAR projection
     129    PS_PROJ_MER,                ///< MER projection
     130    PS_PROJ_NTYPE               ///< Number of types; must be last.
    131131} psProjectionType;
    132132
     
    138138typedef struct
    139139{
    140     double R;                   // /< Coordinates of projection center
    141     double D;                   // /< Coordinates of projection center
    142     double Xs;                  // /< plate-scale in X direction
    143     double Ys;                  // /< plate-scale in Y direction
    144     psProjectionType type;      // /< Projection type
     140    double R;                   ///< Coordinates of projection center
     141    double D;                   ///< Coordinates of projection center
     142    double Xs;                  ///< plate-scale in X direction
     143    double Ys;                  ///< plate-scale in Y direction
     144    psProjectionType type;      ///< Projection type
    145145}
    146146psProjection;
     
    152152 */
    153153typedef enum {
    154     PS_SPHERICAL,               // /< offset corresponds to an angular offset
    155     PS_LINEAR                   // /< offset corresponds to a linear offset
     154    PS_SPHERICAL,               ///< offset corresponds to an angular offset
     155    PS_LINEAR                   ///< offset corresponds to a linear offset
    156156} psSphereOffsetMode;
    157157
     
    162162 */
    163163typedef enum {
    164     PS_ARCSEC,                  // /< Arcseconds
    165     PS_ARCMIN,                  // /< Arcminutes
    166     PS_DEGREE,                  // /< Degrees
    167     PS_RADIAN                   // /< Radians
     164    PS_ARCSEC,                  ///< Arcseconds
     165    PS_ARCMIN,                  ///< Arcminutes
     166    PS_DEGREE,                  ///< Degrees
     167    PS_RADIAN                   ///< Radians
    168168} psSphereOffsetUnit;
    169169
     
    171171 *
    172172 */
    173 psPlane *psPlaneTransformApply(psPlane * out,   // /< a psPlane to recycle.  If NULL, a new one is generated.
    174                                const psPlaneTransform * transform,      // /< the transform to apply
    175                                const psPlane * coords   // /< the coordinate to apply the transform above.
     173psPlane *psPlaneTransformApply(psPlane * out,   ///< a psPlane to recycle.  If NULL, a new one is generated.
     174                               const psPlaneTransform * transform,      ///< the transform to apply
     175                               const psPlane * coords   ///< the coordinate to apply the transform above.
    176176                              );
    177177
     
    179179 *
    180180 */
    181 psPlane *psPlaneDistortApply(psPlane * out,     // /< a psPlane to recycle.  If NULL, a new one is generated.
    182                              const psPlaneDistort * transform,  // /< the transform to apply
    183                              const psPlane * coords,    // /< the coordinate to apply the transform above.
    184                              float term3,       // /< third term -- maybe magnitude
    185                              float term4        // /< forth term -- maybe color
     181psPlane *psPlaneDistortApply(psPlane * out,     ///< a psPlane to recycle.  If NULL, a new one is generated.
     182                             const psPlaneDistort * transform,  ///< the transform to apply
     183                             const psPlane * coords,    ///< the coordinate to apply the transform above.
     184                             float term3,       ///< third term -- maybe magnitude
     185                             float term4        ///< forth term -- maybe color
    186186                            );
    187187
     
    189189 *
    190190 */
    191 psSphereTransform *psSphereTransformAlloc(double NPlat, // /< north pole latitude
    192         double Xo,    // /< First PT of Ares lon
    193         double xo     // /< First PT of Ares equiv lon
     191psSphereTransform *psSphereTransformAlloc(double NPlat, ///< north pole latitude
     192        double Xo,    ///< First PT of Ares lon
     193        double xo     ///< First PT of Ares equiv lon
    194194                                         );
    195195
     
    197197 *
    198198 */
    199 psSphere *psSphereTransformApply(psSphere * out,        // /< a psSphere to recycle.  If NULL, a new one is
     199psSphere *psSphereTransformApply(psSphere * out,        ///< a psSphere to recycle.  If NULL, a new one is
    200200                                 // generated.
    201                                  const psSphereTransform * transform,   // /< the transform to apply
    202                                  const psSphere * coord // /< the coordinate to apply the transform above.x
     201                                 const psSphereTransform * transform,   ///< the transform to apply
     202                                 const psSphere * coord ///< the coordinate to apply the transform above.x
    203203                                );
    204204
  • trunk/psLib/src/astronomy/psMetadata.h

    r1407 r1426  
    1111*  @author Ross Harman, MHPCC
    1212*
    13 *  @version $Revision: 1.16 $ $Name: not supported by cvs2svn $
    14 *  @date $Date: 2004-08-07 00:06:06 $
     13*  @version $Revision: 1.17 $ $Name: not supported by cvs2svn $
     14*  @date $Date: 2004-08-09 22:44:25 $
    1515*
    1616*  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    3434 */
    3535typedef enum {
    36     PS_META_ITEM_SET = 0,       // /< Null. Metadata is in psMetadataItem.items
    37     PS_META_BOOL,                          // /< Boolean data.
    38     PS_META_S32,                           // /< Signed 32-bit integer data.
    39     PS_META_F32,                           // /< Single-precision float data.
    40     PS_META_F64,                           // /< Double-precision float data.
    41     PS_META_STR,                           // /< String data (Stored in as void *).
    42     PS_META_IMG,                           // /< Image data (Stored in as void *).
    43     PS_META_JPEG,                          // /< JPEG data (Stored in as void .
    44     PS_META_PNG,                           // /< PNG data (Stored in as void *).
    45     PS_META_ASTROM,                        // /< Astrometric coefficients (Stored in as void *).
    46     PS_META_UNKNOWN,                       // /< Other data (Stored in as void *).
    47     PS_META_NTYPE                          // /< Number of types. Must be last.
     36    PS_META_ITEM_SET = 0,       ///< Null. Metadata is in psMetadataItem.items
     37    PS_META_BOOL,                          ///< Boolean data.
     38    PS_META_S32,                           ///< Signed 32-bit integer data.
     39    PS_META_F32,                           ///< Single-precision float data.
     40    PS_META_F64,                           ///< Double-precision float data.
     41    PS_META_STR,                           ///< String data (Stored in as void *).
     42    PS_META_IMG,                           ///< Image data (Stored in as void *).
     43    PS_META_JPEG,                          ///< JPEG data (Stored in as void .
     44    PS_META_PNG,                           ///< PNG data (Stored in as void *).
     45    PS_META_ASTROM,                        ///< Astrometric coefficients (Stored in as void *).
     46    PS_META_UNKNOWN,                       ///< Other data (Stored in as void *).
     47    PS_META_NTYPE                          ///< Number of types. Must be last.
    4848} psMetadataType;
    4949
     
    5555typedef struct psMetadataItem
    5656{
    57     const int id;               // /< Unique ID for metadata item.
    58     char *restrict name;        // /< Name of metadata item.
    59     psMetadataType type;        // /< Type of metadata item.
     57    const int id;               ///< Unique ID for metadata item.
     58    char *restrict name;        ///< Name of metadata item.
     59    psMetadataType type;        ///< Type of metadata item.
    6060    union {
    6161        bool B;
    62         psS32 S32;              // /< Signed 32-bit integer data.
    63         psF32 F32;              // /< Single-precision float data.
    64         psF64 F64;              // /< Double-precision float data.
    65         psPTR V;                // /< Pointer to other type of data.
    66     } data;                     // /< Union for data types.
    67     char *comment;              // /< Optional comment ("", not NULL).
    68     psList *restrict items;     // /< List of psMetadataItems with same name.
     62        psS32 S32;              ///< Signed 32-bit integer data.
     63        psF32 F32;              ///< Single-precision float data.
     64        psF64 F64;              ///< Double-precision float data.
     65        psPTR V;                ///< Pointer to other type of data.
     66    } data;                     ///< Union for data types.
     67    char *comment;              ///< Optional comment ("", not NULL).
     68    psList *restrict items;     ///< List of psMetadataItems with same name.
    6969}
    7070psMetadataItem;
     
    102102 * @return psMetadataItem*: Pointer metadata item.
    103103 */
    104 psMetadataItem *psMetadataItemAlloc(const char *name,   // /< Name of metadata item.
    105                                     psMetadataType type,        // /< Type of metadata item.
    106                                     const char *comment,        // /< Comment for metadata item.
    107                                     ... // /< Arguments for name formatting and metadata item data.
     104psMetadataItem *psMetadataItemAlloc(const char *name,   ///< Name of metadata item.
     105                                    psMetadataType type,        ///< Type of metadata item.
     106                                    const char *comment,        ///< Comment for metadata item.
     107                                    ... ///< Arguments for name formatting and metadata item data.
    108108                                   );
    109109
     
    121121 * @return psMetadataItem*: Pointer metadata item.
    122122 */
    123 psMetadataItem *psMetadataItemAllocV(const char *name,  // /< Name of metadata item.
    124                                      psMetadataType type,       // /< Type of metadata item.
    125                                      const char *comment,       // /< Comment for metadata item.
    126                                      va_list list       // /< Arguments for name formatting and metadata item
     123psMetadataItem *psMetadataItemAllocV(const char *name,  ///< Name of metadata item.
     124                                     psMetadataType type,       ///< Type of metadata item.
     125                                     const char *comment,       ///< Comment for metadata item.
     126                                     va_list list       ///< Arguments for name formatting and metadata item
    127127                                     // data.
    128128                                    );
     
    134134 * @return psMetadata*: Pointer metadata.
    135135 */
    136 psMetadata *psMetadataAlloc(void        // /< Void.
     136psMetadata *psMetadataAlloc(void        ///< Void.
    137137                           );
    138138
     
    143143 * @return bool: True for success, false for failure.
    144144 */
    145 bool psMetadataAddItem(psMetadata * restrict md,        // /< Metadata collection to insert metadat item.
    146                        int where,       // /< Location to be added.
    147                        psMetadataItem * restrict item   // /< Metadata item to be added.
     145bool psMetadataAddItem(psMetadata * restrict md,        ///< Metadata collection to insert metadat item.
     146                       int where,       ///< Location to be added.
     147                       psMetadataItem * restrict item   ///< Metadata item to be added.
    148148                      );
    149149
     
    154154 * @return bool: True for success, false for failure.
    155155 */
    156 bool psMetadataAdd(psMetadata * restrict md,    // /< Metadata collection to insert metadat item.
    157                    int where,   // /< Location to be added.
    158                    const char *name,    // /< Name of metadata item.
    159                    psMetadataType type, // /< Type of metadata item.
    160                    const char *comment, // /< Comment for metadata item.
    161                    ...          // /< Arguments for name formatting and metadata item data.
     156bool psMetadataAdd(psMetadata * restrict md,    ///< Metadata collection to insert metadat item.
     157                   int where,   ///< Location to be added.
     158                   const char *name,    ///< Name of metadata item.
     159                   psMetadataType type, ///< Type of metadata item.
     160                   const char *comment, ///< Comment for metadata item.
     161                   ...          ///< Arguments for name formatting and metadata item data.
    162162                  );
    163163
     
    171171 * @return bool: True for success, false for failure.
    172172 */
    173 bool psMetadataRemove(psMetadata * restrict md, // /< Metadata collection to insert metadat item.
    174                       int where,        // /< Location to be removed.
    175                       const char *restrict key  // /< Name of metadata key.
     173bool psMetadataRemove(psMetadata * restrict md, ///< Metadata collection to insert metadat item.
     174                      int where,        ///< Location to be removed.
     175                      const char *restrict key  ///< Name of metadata key.
    176176                     );
    177177
     
    183183 * @return psMetadataItem*: Pointer metadata item.
    184184 */
    185 psMetadataItem *psMetadataLookup(psMetadata * restrict md,      // /< Metadata collection to insert metadat
     185psMetadataItem *psMetadataLookup(psMetadata * restrict md,      ///< Metadata collection to insert metadat
    186186                                 // item.
    187                                  const char *restrict key       // /< Name of metadata key.
     187                                 const char *restrict key       ///< Name of metadata key.
    188188                                );
    189189
     
    194194 * @return psMetadataItem*: Pointer metadata item.
    195195 */
    196 psMetadataItem *psMetadataGet(psMetadata * restrict md, // /< Metadata collection to insert metadat item.
    197                               int where // /< Location to be retrieved.
     196psMetadataItem *psMetadataGet(psMetadata * restrict md, ///< Metadata collection to insert metadat item.
     197                              int where ///< Location to be retrieved.
    198198                             );
    199199
     
    204204 * @return void: void.
    205205 */
    206 bool psMetadataSetIterator(psMetadata * restrict md,    // /< Metadata collection to iterate.
    207                            int where    // /< Location of iterator.
     206bool psMetadataSetIterator(psMetadata * restrict md,    ///< Metadata collection to iterate.
     207                           int where    ///< Location of iterator.
    208208                          );
    209209
     
    214214 * @return psMetadataItem*: Pointer metadata item.
    215215 */
    216 psMetadataItem *psMetadataGetNext(psMetadata * restrict md,     // /< Metadata collection to iterate.
    217                                   const char *restrict match,   // /< Beginning of key name.
    218                                   int which     // /< Iterator to be used.
     216psMetadataItem *psMetadataGetNext(psMetadata * restrict md,     ///< Metadata collection to iterate.
     217                                  const char *restrict match,   ///< Beginning of key name.
     218                                  int which     ///< Iterator to be used.
    219219                                 );
    220220
     
    225225 * @return psMetadataItem*: Pointer metadata item.
    226226 */
    227 psMetadataItem *psMetadataGetPrevious(psMetadata * restrict md, // /< Metadata collection to iterate.
    228                                       const char *restrict match,       // /< Beginning of key name.
    229                                       int which // /< Iterator to be used.
     227psMetadataItem *psMetadataGetPrevious(psMetadata * restrict md, ///< Metadata collection to iterate.
     228                                      const char *restrict match,       ///< Beginning of key name.
     229                                      int which ///< Iterator to be used.
    230230                                     );
    231231
     
    240240 * @return psMetadataItem*: Pointer metadata item.
    241241 */
    242 void psMetadataItemPrint(FILE * fd,     // /< Pointer to file to write metadata item.
    243                          const char *format,    // /< Format to print metadata item.
    244                          const psMetadataItem * restrict metadataItem   // /< Metadata item to print.
     242void psMetadataItemPrint(FILE * fd,     ///< Pointer to file to write metadata item.
     243                         const char *format,    ///< Format to print metadata item.
     244                         const psMetadataItem * restrict metadataItem   ///< Metadata item to print.
    245245                        );
    246246
     
    252252 * @return psMetadata*: Pointer metadata.
    253253 */
    254 psMetadata *psMetadataReadHeader(psMetadata * output,   // /< Resulting metadata from read.
    255                                  char *extname, // /< File name extension string.
    256                                  int extnum,    // /< File name extension number. Starts at 1.
    257                                  char *filename // /< Name of file to read.
     254psMetadata *psMetadataReadHeader(psMetadata * output,   ///< Resulting metadata from read.
     255                                 char *extname, ///< File name extension string.
     256                                 int extnum,    ///< File name extension number. Starts at 1.
     257                                 char *filename ///< Name of file to read.
    258258                                );
    259259
     
    264264 * @return psMetadata*: Pointer metadata.
    265265 */
    266 psMetadata *psMetadataFReadHeader(psMetadata * output,  // /< Resulting metadata from read.
    267                                   char *extName,        // /< File name extension string.
    268                                   int extNum,   // /< File name extension number.
    269                                   fitsfile * fd // /< Pointer to file to read.
     266psMetadata *psMetadataFReadHeader(psMetadata * output,  ///< Resulting metadata from read.
     267                                  char *extName,        ///< File name extension string.
     268                                  int extNum,   ///< File name extension number.
     269                                  fitsfile * fd ///< Pointer to file to read.
    270270                                 );
    271271
  • trunk/psLib/src/astronomy/psPhotometry.h

    r1407 r1426  
    1010*  @author George Gusciora, MHPCC
    1111*
    12 *  @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
    13 *  @date $Date: 2004-08-07 00:06:06 $
     12*  @version $Revision: 1.6 $ $Name: not supported by cvs2svn $
     13*  @date $Date: 2004-08-09 22:44:25 $
    1414*
    1515*  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    4343typedef struct
    4444{
    45     const int ID;               // /< ID number for this photometric system
    46     const char *name;           // /< Name of photometric system
    47     const char *camera;         // /< Camera for photometric system
    48     const char *filter;         // /< Filter used for photometric system
    49     const char *detector;       // /< Detector used for photometric system
     45    const int ID;               ///< ID number for this photometric system
     46    const char *name;           ///< Name of photometric system
     47    const char *camera;         ///< Camera for photometric system
     48    const char *filter;         ///< Filter used for photometric system
     49    const char *detector;       ///< Detector used for photometric system
    5050}
    5151psPhotSystem;
     
    5959typedef struct
    6060{
    61     psPhotSystem src;           // /< Source photometric system
    62     psPhotSystem dst;           // /< Destination photometric system
    63     psPhotSystem pP;            // /< Primary color reference
    64     psPhotSystem pM;            // /< Primary color reference
    65     psPhotSystem sP;            // /< Secondary color reference
    66     psPhotSystem sM;            // /< Secondary color reference
    67     float pA;                   // /< Color offset for references
    68     float sA;                   // /< Color offset for references
    69     psPolynomial3D transform;   // /< Transformation from source to destination
     61    psPhotSystem src;           ///< Source photometric system
     62    psPhotSystem dst;           ///< Destination photometric system
     63    psPhotSystem pP;            ///< Primary color reference
     64    psPhotSystem pM;            ///< Primary color reference
     65    psPhotSystem sP;            ///< Secondary color reference
     66    psPhotSystem sM;            ///< Secondary color reference
     67    float pA;                   ///< Color offset for references
     68    float sA;                   ///< Color offset for references
     69    psPolynomial3D transform;   ///< Transformation from source to destination
    7070}
    7171psPhotTransform;
  • trunk/psLib/src/collections/psArray.h

    r1407 r1426  
    1212 *  @author Ross Harman, MHPCC
    1313 *
    14  *  @version $Revision: 1.12 $ $Name: not supported by cvs2svn $
    15  *  @date $Date: 2004-08-07 00:06:06 $
     14 *  @version $Revision: 1.13 $ $Name: not supported by cvs2svn $
     15 *  @date $Date: 2004-08-09 22:44:25 $
    1616 *
    1717 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    3434typedef struct
    3535{
    36     unsigned int nalloc;        // /< Total number of elements available.
    37     unsigned int n;             // /< Number of elements in use.
    38     psPTR *data;                // /< An Array of pointer elements
     36    unsigned int nalloc;        ///< Total number of elements available.
     37    unsigned int n;             ///< Number of elements in use.
     38    psPTR *data;                ///< An Array of pointer elements
    3939}
    4040psArray;
     
    5454 *
    5555 */
    56 psArray *psArrayAlloc(unsigned int nalloc       // /< Total number of elements to make available.
     56psArray *psArrayAlloc(unsigned int nalloc       ///< Total number of elements to make available.
    5757                     );
    5858
     
    6565 *
    6666 */
    67 psArray *psArrayRealloc(unsigned int nalloc,    // /< Total number of elements to make available.
    68                         psArray * restrict psArr        // /< array to reallocate.
     67psArray *psArrayRealloc(unsigned int nalloc,    ///< Total number of elements to make available.
     68                        psArray * restrict psArr        ///< array to reallocate.
    6969                       );
    7070
     
    7676 *
    7777 */
    78 void psArrayElementFree(psArray * restrict psArr        // /< Void pointer array to destroy.
     78void psArrayElementFree(psArray * restrict psArr        ///< Void pointer array to destroy.
    7979                       );
    8080
  • trunk/psLib/src/collections/psHash.h

    r1420 r1426  
    1111 *  @author George Gusciora, MHPCC
    1212 *   
    13  *  @version $Revision: 1.1 $ $Name: not supported by cvs2svn $
    14  *  @date $Date: 2004-08-09 20:29:43 $
     13 *  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
     14 *  @date $Date: 2004-08-09 22:44:25 $
    1515 *
    1616 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    2929typedef struct psHashBucket
    3030{
    31     char *key;                  // /< key for this item of data
    32     void *data;                 // /< the data itself
    33     struct psHashBucket *next;  // /< list of other possible keys
     31    char *key;                  ///< key for this item of data
     32    void *data;                 ///< the data itself
     33    struct psHashBucket *next;  ///< list of other possible keys
    3434}
    3535psHashBucket;
     
    4040typedef struct psHash
    4141{
    42     int nbucket;                // /< Number of buckets in hash table.
    43     psHashBucket **buckets;     // /< The bucket data.
     42    int nbucket;                ///< Number of buckets in hash table.
     43    psHashBucket **buckets;     ///< The bucket data.
    4444}
    4545psHash;
    4646
    4747/// Allocate hash buckets in table.
    48 psHash *psHashAlloc(int nbucket // /< The number of buckets to allocate.
     48psHash *psHashAlloc(int nbucket ///< The number of buckets to allocate.
    4949                   );
    5050
    5151/// Insert entry into table.
    52 bool psHashAdd(psHash * table,  // /< table to insert in
    53                const char *key, // /< key to use
    54                void *data       // /< data to insert
     52bool psHashAdd(psHash * table,  ///< table to insert in
     53               const char *key, ///< key to use
     54               void *data       ///< data to insert
    5555              );
    5656
    5757/// Lookup key in table.
    58 void *psHashLookup(psHash * table,      // /< table to lookup key in
    59                    const char *key      // /< key to lookup
     58void *psHashLookup(psHash * table,      ///< table to lookup key in
     59                   const char *key      ///< key to lookup
    6060                  );
    6161
    6262/// Remove key from table.
    63 bool psHashRemove(psHash * table,       // /< table to lookup key in
    64                   const char *key       // /< key to lookup
     63bool psHashRemove(psHash * table,       ///< table to lookup key in
     64                  const char *key       ///< key to lookup
    6565                 );
    6666
    6767/// List all keys in table.
    68 psList *psHashKeyList(psHash * table    // /< table to list keys from.
     68psList *psHashKeyList(psHash * table    ///< table to list keys from.
    6969                     );
    7070
  • trunk/psLib/src/collections/psList.h

    r1407 r1426  
    1010 *  @ingroup LinkedList
    1111 *
    12  *  @version $Revision: 1.10 $ $Name: not supported by cvs2svn $
    13  *  @date $Date: 2004-08-07 00:06:06 $
     12 *  @version $Revision: 1.11 $ $Name: not supported by cvs2svn $
     13 *  @date $Date: 2004-08-09 22:44:25 $
    1414 *
    1515 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    3333 */
    3434enum {
    35     PS_LIST_HEAD = 0,           // /< at head
    36     PS_LIST_TAIL = -1,                     // /< at tail
    37     PS_LIST_PREVIOUS = -2,                 // /< previous element
    38     PS_LIST_CURRENT = -3,                  // /< current element
    39     PS_LIST_NEXT = -4,                     // /< next element
    40     PS_LIST_UNKNOWN = -5                   // /< unknown position (should be last in enum list)
     35    PS_LIST_HEAD = 0,           ///< at head
     36    PS_LIST_TAIL = -1,                     ///< at tail
     37    PS_LIST_PREVIOUS = -2,                 ///< previous element
     38    PS_LIST_CURRENT = -3,                  ///< current element
     39    PS_LIST_NEXT = -4,                     ///< next element
     40    PS_LIST_UNKNOWN = -5                   ///< unknown position (should be last in enum list)
    4141};
    4242
     
    4444typedef struct psListElem
    4545{
    46     struct psListElem *prev;    // /< previous link in list
    47     struct psListElem *next;    // /< next link in list
    48     void *data;                 // /< real data item
     46    struct psListElem *prev;    ///< previous link in list
     47    struct psListElem *next;    ///< next link in list
     48    void *data;                 ///< real data item
    4949}
    5050psListElem;
     
    5757typedef struct
    5858{
    59     unsigned int size;          // /< number of elements on list
    60     psListElem *head;           // /< first element on list (may be NULL)
    61     psListElem *tail;           // /< last element on list (may be NULL)
    62     psListElem *iter;           // /< iteration cursor
    63     unsigned int iterIndex;     // /< the numeric position of the iteration cursor in the list
    64     pthread_mutex_t lock;       // /< mutex to lock a node during changes
     59    unsigned int size;          ///< number of elements on list
     60    psListElem *head;           ///< first element on list (may be NULL)
     61    psListElem *tail;           ///< last element on list (may be NULL)
     62    psListElem *iter;           ///< iteration cursor
     63    unsigned int iterIndex;     ///< the numeric position of the iteration cursor in the list
     64    pthread_mutex_t lock;       ///< mutex to lock a node during changes
    6565}
    6666psList;
     
    7171 */
    7272psList *psListAlloc(void *data
    73                     // /< initial data item; may be NULL if no an empty psList is desired
     73                    ///< initial data item; may be NULL if no an empty psList is desired
    7474                   )
    7575;
     
    8080 *                      NULL, the return value will also be NULL.
    8181 */
    82 bool psListAdd(psList * restrict list,  // /< list to add to (if NULL, nothing is done)
    83                void *data,      // /< data item to add.  If NULL, list is not modified.
    84                int where        // /< index, PS_LIST_HEAD, PS_LIST_TAIL, or numbered location.
     82bool psListAdd(psList * restrict list,  ///< list to add to (if NULL, nothing is done)
     83               void *data,      ///< data item to add.  If NULL, list is not modified.
     84               int where        ///< index, PS_LIST_HEAD, PS_LIST_TAIL, or numbered location.
    8585              );
    8686
     
    9090 */
    9191bool psListRemove(psList * restrict list,
    92                   // /< list to remove element from
     92                  ///< list to remove element from
    9393                  void *data,
    94                   // /< if which is PS_LIST_UNKNOWN, data item to find and remove, otherwise this is ignored.
     94                  ///< if which is PS_LIST_UNKNOWN, data item to find and remove, otherwise this is ignored.
    9595                  int which
    96                   // /< index of item, or PS_LIST_UNKNOWN, PS_LIST_NEXT, PS_LIST_PREV, or numbered location.
     96                  ///< index of item, or PS_LIST_UNKNOWN, PS_LIST_NEXT, PS_LIST_PREV, or numbered location.
    9797                 );
    9898
     
    104104 *                      NULL is returned.
    105105 */
    106 void *psListGet(psList * restrict list, // /< list to retrieve element from
    107                 int which       // /< index number, or PS_LIST_NEXT, PS_LIST_PREV, PS_LIST_UNKNOWN
     106void *psListGet(psList * restrict list, ///< list to retrieve element from
     107                int which       ///< index number, or PS_LIST_NEXT, PS_LIST_PREV, PS_LIST_UNKNOWN
    108108               );
    109109
     
    112112 *
    113113 */
    114 void psListSetIterator(psList * restrict list,  // /< list to retrieve element from
    115                        int where        // /< index number, PS_LIST_HEAD, or PS_LIST_TAIL
     114void psListSetIterator(psList * restrict list,  ///< list to retrieve element from
     115                       int where        ///< index number, PS_LIST_HEAD, or PS_LIST_TAIL
    116116                      );
    117117
     
    123123 *                      parameter was NULL.
    124124 */
    125 void *psListGetNext(psList * restrict list      // /< list to retrieve element from
     125void *psListGetNext(psList * restrict list      ///< list to retrieve element from
    126126                   );
    127127
     
    133133 *                      iterator is not valid or list parameter was NULL.
    134134 */
    135 void *psListGetCurrent(psList * restrict list   // /< list to retrieve element from
     135void *psListGetCurrent(psList * restrict list   ///< list to retrieve element from
    136136                      );
    137137
     
    143143 *                      parameter was NULL.
    144144 */
    145 void *psListGetPrevious(psList * restrict list  // /< list to retrieve element from
     145void *psListGetPrevious(psList * restrict list  ///< list to retrieve element from
    146146                       );
    147147
     
    151151 *                      or NULL if the given dlist parameter is NULL.
    152152 */
    153 psArray *psListToArray(psList * dlist   // /< List to convert
     153psArray *psListToArray(psList * dlist   ///< List to convert
    154154                      );
    155155
     
    159159 *                      or NULL is the given arr parameter is NULL.
    160160 */
    161 psList *psArrayToList(psArray * arr     // /< vector to convert
     161psList *psArrayToList(psArray * arr     ///< vector to convert
    162162                     );
    163163
  • trunk/psLib/src/collections/psMetadata.h

    r1407 r1426  
    1111*  @author Ross Harman, MHPCC
    1212*
    13 *  @version $Revision: 1.16 $ $Name: not supported by cvs2svn $
    14 *  @date $Date: 2004-08-07 00:06:06 $
     13*  @version $Revision: 1.17 $ $Name: not supported by cvs2svn $
     14*  @date $Date: 2004-08-09 22:44:25 $
    1515*
    1616*  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    3434 */
    3535typedef enum {
    36     PS_META_ITEM_SET = 0,       // /< Null. Metadata is in psMetadataItem.items
    37     PS_META_BOOL,                          // /< Boolean data.
    38     PS_META_S32,                           // /< Signed 32-bit integer data.
    39     PS_META_F32,                           // /< Single-precision float data.
    40     PS_META_F64,                           // /< Double-precision float data.
    41     PS_META_STR,                           // /< String data (Stored in as void *).
    42     PS_META_IMG,                           // /< Image data (Stored in as void *).
    43     PS_META_JPEG,                          // /< JPEG data (Stored in as void .
    44     PS_META_PNG,                           // /< PNG data (Stored in as void *).
    45     PS_META_ASTROM,                        // /< Astrometric coefficients (Stored in as void *).
    46     PS_META_UNKNOWN,                       // /< Other data (Stored in as void *).
    47     PS_META_NTYPE                          // /< Number of types. Must be last.
     36    PS_META_ITEM_SET = 0,       ///< Null. Metadata is in psMetadataItem.items
     37    PS_META_BOOL,                          ///< Boolean data.
     38    PS_META_S32,                           ///< Signed 32-bit integer data.
     39    PS_META_F32,                           ///< Single-precision float data.
     40    PS_META_F64,                           ///< Double-precision float data.
     41    PS_META_STR,                           ///< String data (Stored in as void *).
     42    PS_META_IMG,                           ///< Image data (Stored in as void *).
     43    PS_META_JPEG,                          ///< JPEG data (Stored in as void .
     44    PS_META_PNG,                           ///< PNG data (Stored in as void *).
     45    PS_META_ASTROM,                        ///< Astrometric coefficients (Stored in as void *).
     46    PS_META_UNKNOWN,                       ///< Other data (Stored in as void *).
     47    PS_META_NTYPE                          ///< Number of types. Must be last.
    4848} psMetadataType;
    4949
     
    5555typedef struct psMetadataItem
    5656{
    57     const int id;               // /< Unique ID for metadata item.
    58     char *restrict name;        // /< Name of metadata item.
    59     psMetadataType type;        // /< Type of metadata item.
     57    const int id;               ///< Unique ID for metadata item.
     58    char *restrict name;        ///< Name of metadata item.
     59    psMetadataType type;        ///< Type of metadata item.
    6060    union {
    6161        bool B;
    62         psS32 S32;              // /< Signed 32-bit integer data.
    63         psF32 F32;              // /< Single-precision float data.
    64         psF64 F64;              // /< Double-precision float data.
    65         psPTR V;                // /< Pointer to other type of data.
    66     } data;                     // /< Union for data types.
    67     char *comment;              // /< Optional comment ("", not NULL).
    68     psList *restrict items;     // /< List of psMetadataItems with same name.
     62        psS32 S32;              ///< Signed 32-bit integer data.
     63        psF32 F32;              ///< Single-precision float data.
     64        psF64 F64;              ///< Double-precision float data.
     65        psPTR V;                ///< Pointer to other type of data.
     66    } data;                     ///< Union for data types.
     67    char *comment;              ///< Optional comment ("", not NULL).
     68    psList *restrict items;     ///< List of psMetadataItems with same name.
    6969}
    7070psMetadataItem;
     
    102102 * @return psMetadataItem*: Pointer metadata item.
    103103 */
    104 psMetadataItem *psMetadataItemAlloc(const char *name,   // /< Name of metadata item.
    105                                     psMetadataType type,        // /< Type of metadata item.
    106                                     const char *comment,        // /< Comment for metadata item.
    107                                     ... // /< Arguments for name formatting and metadata item data.
     104psMetadataItem *psMetadataItemAlloc(const char *name,   ///< Name of metadata item.
     105                                    psMetadataType type,        ///< Type of metadata item.
     106                                    const char *comment,        ///< Comment for metadata item.
     107                                    ... ///< Arguments for name formatting and metadata item data.
    108108                                   );
    109109
     
    121121 * @return psMetadataItem*: Pointer metadata item.
    122122 */
    123 psMetadataItem *psMetadataItemAllocV(const char *name,  // /< Name of metadata item.
    124                                      psMetadataType type,       // /< Type of metadata item.
    125                                      const char *comment,       // /< Comment for metadata item.
    126                                      va_list list       // /< Arguments for name formatting and metadata item
     123psMetadataItem *psMetadataItemAllocV(const char *name,  ///< Name of metadata item.
     124                                     psMetadataType type,       ///< Type of metadata item.
     125                                     const char *comment,       ///< Comment for metadata item.
     126                                     va_list list       ///< Arguments for name formatting and metadata item
    127127                                     // data.
    128128                                    );
     
    134134 * @return psMetadata*: Pointer metadata.
    135135 */
    136 psMetadata *psMetadataAlloc(void        // /< Void.
     136psMetadata *psMetadataAlloc(void        ///< Void.
    137137                           );
    138138
     
    143143 * @return bool: True for success, false for failure.
    144144 */
    145 bool psMetadataAddItem(psMetadata * restrict md,        // /< Metadata collection to insert metadat item.
    146                        int where,       // /< Location to be added.
    147                        psMetadataItem * restrict item   // /< Metadata item to be added.
     145bool psMetadataAddItem(psMetadata * restrict md,        ///< Metadata collection to insert metadat item.
     146                       int where,       ///< Location to be added.
     147                       psMetadataItem * restrict item   ///< Metadata item to be added.
    148148                      );
    149149
     
    154154 * @return bool: True for success, false for failure.
    155155 */
    156 bool psMetadataAdd(psMetadata * restrict md,    // /< Metadata collection to insert metadat item.
    157                    int where,   // /< Location to be added.
    158                    const char *name,    // /< Name of metadata item.
    159                    psMetadataType type, // /< Type of metadata item.
    160                    const char *comment, // /< Comment for metadata item.
    161                    ...          // /< Arguments for name formatting and metadata item data.
     156bool psMetadataAdd(psMetadata * restrict md,    ///< Metadata collection to insert metadat item.
     157                   int where,   ///< Location to be added.
     158                   const char *name,    ///< Name of metadata item.
     159                   psMetadataType type, ///< Type of metadata item.
     160                   const char *comment, ///< Comment for metadata item.
     161                   ...          ///< Arguments for name formatting and metadata item data.
    162162                  );
    163163
     
    171171 * @return bool: True for success, false for failure.
    172172 */
    173 bool psMetadataRemove(psMetadata * restrict md, // /< Metadata collection to insert metadat item.
    174                       int where,        // /< Location to be removed.
    175                       const char *restrict key  // /< Name of metadata key.
     173bool psMetadataRemove(psMetadata * restrict md, ///< Metadata collection to insert metadat item.
     174                      int where,        ///< Location to be removed.
     175                      const char *restrict key  ///< Name of metadata key.
    176176                     );
    177177
     
    183183 * @return psMetadataItem*: Pointer metadata item.
    184184 */
    185 psMetadataItem *psMetadataLookup(psMetadata * restrict md,      // /< Metadata collection to insert metadat
     185psMetadataItem *psMetadataLookup(psMetadata * restrict md,      ///< Metadata collection to insert metadat
    186186                                 // item.
    187                                  const char *restrict key       // /< Name of metadata key.
     187                                 const char *restrict key       ///< Name of metadata key.
    188188                                );
    189189
     
    194194 * @return psMetadataItem*: Pointer metadata item.
    195195 */
    196 psMetadataItem *psMetadataGet(psMetadata * restrict md, // /< Metadata collection to insert metadat item.
    197                               int where // /< Location to be retrieved.
     196psMetadataItem *psMetadataGet(psMetadata * restrict md, ///< Metadata collection to insert metadat item.
     197                              int where ///< Location to be retrieved.
    198198                             );
    199199
     
    204204 * @return void: void.
    205205 */
    206 bool psMetadataSetIterator(psMetadata * restrict md,    // /< Metadata collection to iterate.
    207                            int where    // /< Location of iterator.
     206bool psMetadataSetIterator(psMetadata * restrict md,    ///< Metadata collection to iterate.
     207                           int where    ///< Location of iterator.
    208208                          );
    209209
     
    214214 * @return psMetadataItem*: Pointer metadata item.
    215215 */
    216 psMetadataItem *psMetadataGetNext(psMetadata * restrict md,     // /< Metadata collection to iterate.
    217                                   const char *restrict match,   // /< Beginning of key name.
    218                                   int which     // /< Iterator to be used.
     216psMetadataItem *psMetadataGetNext(psMetadata * restrict md,     ///< Metadata collection to iterate.
     217                                  const char *restrict match,   ///< Beginning of key name.
     218                                  int which     ///< Iterator to be used.
    219219                                 );
    220220
     
    225225 * @return psMetadataItem*: Pointer metadata item.
    226226 */
    227 psMetadataItem *psMetadataGetPrevious(psMetadata * restrict md, // /< Metadata collection to iterate.
    228                                       const char *restrict match,       // /< Beginning of key name.
    229                                       int which // /< Iterator to be used.
     227psMetadataItem *psMetadataGetPrevious(psMetadata * restrict md, ///< Metadata collection to iterate.
     228                                      const char *restrict match,       ///< Beginning of key name.
     229                                      int which ///< Iterator to be used.
    230230                                     );
    231231
     
    240240 * @return psMetadataItem*: Pointer metadata item.
    241241 */
    242 void psMetadataItemPrint(FILE * fd,     // /< Pointer to file to write metadata item.
    243                          const char *format,    // /< Format to print metadata item.
    244                          const psMetadataItem * restrict metadataItem   // /< Metadata item to print.
     242void psMetadataItemPrint(FILE * fd,     ///< Pointer to file to write metadata item.
     243                         const char *format,    ///< Format to print metadata item.
     244                         const psMetadataItem * restrict metadataItem   ///< Metadata item to print.
    245245                        );
    246246
     
    252252 * @return psMetadata*: Pointer metadata.
    253253 */
    254 psMetadata *psMetadataReadHeader(psMetadata * output,   // /< Resulting metadata from read.
    255                                  char *extname, // /< File name extension string.
    256                                  int extnum,    // /< File name extension number. Starts at 1.
    257                                  char *filename // /< Name of file to read.
     254psMetadata *psMetadataReadHeader(psMetadata * output,   ///< Resulting metadata from read.
     255                                 char *extname, ///< File name extension string.
     256                                 int extnum,    ///< File name extension number. Starts at 1.
     257                                 char *filename ///< Name of file to read.
    258258                                );
    259259
     
    264264 * @return psMetadata*: Pointer metadata.
    265265 */
    266 psMetadata *psMetadataFReadHeader(psMetadata * output,  // /< Resulting metadata from read.
    267                                   char *extName,        // /< File name extension string.
    268                                   int extNum,   // /< File name extension number.
    269                                   fitsfile * fd // /< Pointer to file to read.
     266psMetadata *psMetadataFReadHeader(psMetadata * output,  ///< Resulting metadata from read.
     267                                  char *extName,        ///< File name extension string.
     268                                  int extNum,   ///< File name extension number.
     269                                  fitsfile * fd ///< Pointer to file to read.
    270270                                 );
    271271
  • trunk/psLib/src/collections/psScalar.h

    r1407 r1426  
    1111 *  @author Ross Harman, MHPCC
    1212 *
    13  *  @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
    14  *  @date $Date: 2004-08-07 00:06:06 $
     13 *  @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
     14 *  @date $Date: 2004-08-09 22:44:25 $
    1515 *
    1616 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    3232typedef struct
    3333{
    34     psType type;                // /< Type of data.
     34    psType type;                ///< Type of data.
    3535
    3636    union {
    37         psU8 U8;                // /< Unsigned 8-bit integer data.
    38         psU16 U16;              // /< Unsigned 16-bit integer data.
    39         psU32 U32;              // /< Unsigned 32-bit integer data.
    40         psU64 U64;              // /< Unsigned 64-bit integer data.
    41         psS8 S8;                // /< Signed 8-bit integer data.
    42         psS16 S16;              // /< Signed 16-bit integer data.
    43         psS32 S32;              // /< Signed 32-bit integer data.
    44         psS64 S64;              // /< Signed 64-bit integer data.
    45         psF32 F32;              // /< Single-precision float data.
    46         psF64 F64;              // /< Double-precision float data.
    47         psC32 C32;              // /< Single-precision complex data.
    48         psC64 C64;              // /< Double-precision complex data.
    49     } data;                     // /< Union for data types.
     37        psU8 U8;                ///< Unsigned 8-bit integer data.
     38        psU16 U16;              ///< Unsigned 16-bit integer data.
     39        psU32 U32;              ///< Unsigned 32-bit integer data.
     40        psU64 U64;              ///< Unsigned 64-bit integer data.
     41        psS8 S8;                ///< Signed 8-bit integer data.
     42        psS16 S16;              ///< Signed 16-bit integer data.
     43        psS32 S32;              ///< Signed 32-bit integer data.
     44        psS64 S64;              ///< Signed 64-bit integer data.
     45        psF32 F32;              ///< Single-precision float data.
     46        psF64 F64;              ///< Double-precision float data.
     47        psC32 C32;              ///< Single-precision complex data.
     48        psC64 C64;              ///< Double-precision complex data.
     49    } data;                     ///< Union for data types.
    5050}
    5151psScalar;
     
    6565 *
    6666 */
    67 psScalar *psScalarAlloc(psC64 value,    // /< Data to be put into psScalar.
    68                         psElemType dataType     // /< Type of data to be held by psScalar.
     67psScalar *psScalarAlloc(psC64 value,    ///< Data to be put into psScalar.
     68                        psElemType dataType     ///< Type of data to be held by psScalar.
    6969                       );
    7070
     
    7676 *
    7777 */
    78 void psScalarFree(psScalar * restrict scalar    // /< Scalar to free.
     78void psScalarFree(psScalar * restrict scalar    ///< Scalar to free.
    7979                 );
    8080
  • trunk/psLib/src/collections/psVector.h

    r1407 r1426  
    1212 *  @author Ross Harman, MHPCC
    1313 *
    14  *  @version $Revision: 1.16 $ $Name: not supported by cvs2svn $
    15  *  @date $Date: 2004-08-07 00:06:06 $
     14 *  @version $Revision: 1.17 $ $Name: not supported by cvs2svn $
     15 *  @date $Date: 2004-08-09 22:44:25 $
    1616 *
    1717 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    3333typedef struct
    3434{
    35     psType type;                // /< Type of data.
    36     unsigned int nalloc;        // /< Total number of elements available.
    37     unsigned int n;             // /< Number of elements in use.
     35    psType type;                ///< Type of data.
     36    unsigned int nalloc;        ///< Total number of elements available.
     37    unsigned int n;             ///< Number of elements in use.
    3838
    3939    union {
    40         psU8 *U8;               // /< Unsigned 8-bit integer data.
    41         psU16 *U16;             // /< Unsigned 16-bit integer data.
    42         psU32 *U32;             // /< Unsigned 32-bit integer data.
    43         psU64 *U64;             // /< Unsigned 64-bit integer data.
    44         psS8 *S8;               // /< Signed 8-bit integer data.
    45         psS16 *S16;             // /< Signed 16-bit integer data.
    46         psS32 *S32;             // /< Signed 32-bit integer data.
    47         psS64 *S64;             // /< Signed 64-bit integer data.
    48         psF32 *F32;             // /< Single-precision float data.
    49         psF64 *F64;             // /< Double-precision float data.
    50         psC32 *C32;             // /< Single-precision complex data.
    51         psC64 *C64;             // /< Double-precision complex data.
    52         psPTR V;                // /< Pointer to data.
    53     } data;                     // /< Union for data types.
     40        psU8 *U8;               ///< Unsigned 8-bit integer data.
     41        psU16 *U16;             ///< Unsigned 16-bit integer data.
     42        psU32 *U32;             ///< Unsigned 32-bit integer data.
     43        psU64 *U64;             ///< Unsigned 64-bit integer data.
     44        psS8 *S8;               ///< Signed 8-bit integer data.
     45        psS16 *S16;             ///< Signed 16-bit integer data.
     46        psS32 *S32;             ///< Signed 32-bit integer data.
     47        psS64 *S64;             ///< Signed 64-bit integer data.
     48        psF32 *F32;             ///< Single-precision float data.
     49        psF64 *F64;             ///< Double-precision float data.
     50        psC32 *C32;             ///< Single-precision complex data.
     51        psC64 *C64;             ///< Double-precision complex data.
     52        psPTR V;                ///< Pointer to data.
     53    } data;                     ///< Union for data types.
    5454}
    5555psVector;
     
    6868 *
    6969 */
    70 psVector *psVectorAlloc(unsigned int nalloc,    // /< Total number of elements to make available.
    71                         psElemType dataType     // /< Type of data to be held by vector.
     70psVector *psVectorAlloc(unsigned int nalloc,    ///< Total number of elements to make available.
     71                        psElemType dataType     ///< Type of data to be held by vector.
    7272                       );
    7373
     
    8080 *
    8181 */
    82 psVector *psVectorRealloc(unsigned int nalloc,  // /< Total number of elements to make available.
    83                           psVector * restrict psVec     // /< Vector to reallocate.
     82psVector *psVectorRealloc(unsigned int nalloc,  ///< Total number of elements to make available.
     83                          psVector * restrict psVec     ///< Vector to reallocate.
    8484                         );
    8585
     
    9393 */
    9494psVector *psVectorRecycle(psVector * restrict psVec,
    95                           // /< Vector to recycle.  If NULL, a new vector is created.  No effort taken to
     95                          ///< Vector to recycle.  If NULL, a new vector is created.  No effort taken to
    9696                          // preserve the values.
    97                           unsigned int nalloc,  // /< Total number of elements to make available.
    98                           psElemType type       // /< the datatype of the returned vector
     97                          unsigned int nalloc,  ///< Total number of elements to make available.
     98                          psElemType type       ///< the datatype of the returned vector
    9999                         );
    100100
     
    107107 */
    108108
    109 psVector *psVectorSort(psVector * restrict outVector,   // /< the output vector to recycle, or NULL if new
     109psVector *psVectorSort(psVector * restrict outVector,   ///< the output vector to recycle, or NULL if new
    110110                       // vector desired.
    111                        const psVector * restrict inVector       // /< the vector to sort.
     111                       const psVector * restrict inVector       ///< the vector to sort.
    112112                      );
    113113
  • trunk/psLib/src/dataManip/psFFT.h

    r1407 r1426  
    88 *  @author Robert DeSonia, MHPCC
    99 *
    10  *  @version $Revision: 1.9 $ $Name: not supported by cvs2svn $
    11  *  @date $Date: 2004-08-07 00:06:06 $
     10 *  @version $Revision: 1.10 $ $Name: not supported by cvs2svn $
     11 *  @date $Date: 2004-08-09 22:44:25 $
    1212 *
    1313 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    2929    PS_FFT_FORWARD = (-1),
    3030
    31     // /< psImageFFT/psVectorFFT should perform a reverse FFT.
     31    ///< psImageFFT/psVectorFFT should perform a reverse FFT.
    3232    PS_FFT_REVERSE = (+1)
    3333} psFftDirection;
  • trunk/psLib/src/dataManip/psFunctions.h

    r1407 r1426  
    1313*  @author George Gusciora, MHPCC
    1414*
    15 *  @version $Revision: 1.15 $ $Name: not supported by cvs2svn $
    16 *  @date $Date: 2004-08-07 00:06:06 $
     15*  @version $Revision: 1.16 $ $Name: not supported by cvs2svn $
     16*  @date $Date: 2004-08-09 22:44:25 $
    1717*
    1818*  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    3434    evaluated Gaussian is: \f[ exp(-\frac{(x-mean)^2}{2\sigma^2}) \f] */
    3535
    36 float psGaussian(float x,       // /< Value at which to evaluate
    37                  float mean,    // /< Mean for the Gaussian
    38                  float stddev,  // /< Standard deviation for the Gaussian
    39                  bool normal    // /< Indicates whether result should be normalized
     36float psGaussian(float x,       ///< Value at which to evaluate
     37                 float mean,    ///< Mean for the Gaussian
     38                 float stddev,  ///< Standard deviation for the Gaussian
     39                 bool normal    ///< Indicates whether result should be normalized
    4040                );
    4141
    4242/** Produce a vector of random numbers from a Gaussian distribution with
    4343    the specified mean and sigma */
    44 psVector *psGaussianDev(float mean,     // /< The mean of the Gaussian
    45                         float sigma,    // /< The sigma of the Gaussian
    46                         int Npts);      // /< The size of the vector
     44psVector *psGaussianDev(float mean,     ///< The mean of the Gaussian
     45                        float sigma,    ///< The sigma of the Gaussian
     46                        int Npts);      ///< The size of the vector
    4747
    4848/** One-dimensional polynomial */
    4949typedef struct
    5050{
    51     int n;                      // /< Number of terms
    52     float *coeff;               // /< Coefficients
    53     float *coeffErr;            // /< Error in coefficients
    54     char *mask;                 // /< Coefficient mask
     51    int n;                      ///< Number of terms
     52    float *coeff;               ///< Coefficients
     53    float *coeffErr;            ///< Error in coefficients
     54    char *mask;                 ///< Coefficient mask
    5555}
    5656psPolynomial1D;
     
    6060{
    6161    int nX,
    62     nY;                       // /< Number of terms in x and y
    63     float **coeff;              // /< Coefficients
    64     float **coeffErr;           // /< Error in coefficients
    65     char **mask;                // /< Coefficients mask
     62    nY;                       ///< Number of terms in x and y
     63    float **coeff;              ///< Coefficients
     64    float **coeffErr;           ///< Error in coefficients
     65    char **mask;                ///< Coefficients mask
    6666}
    6767psPolynomial2D;
     
    7272    int nX,
    7373    nY,
    74     nZ;                       // /< Number of terms in x, y and z
    75     float ***coeff;             // /< Coefficients
    76     float ***coeffErr;          // /< Error in coefficients
    77     char ***mask;               // /< Coefficients mask
     74    nZ;                       ///< Number of terms in x, y and z
     75    float ***coeff;             ///< Coefficients
     76    float ***coeffErr;          ///< Error in coefficients
     77    char ***mask;               ///< Coefficients mask
    7878}
    7979psPolynomial3D;
     
    8585    nX,
    8686    nY,
    87     nZ;                       // /< Number of terms in w, x, y and z
    88     float ****coeff;            // /< Coefficients
    89     float ****coeffErr;         // /< Error in coefficients
    90     char ****mask;              // /< Coefficients mask
     87    nZ;                       ///< Number of terms in w, x, y and z
     88    float ****coeff;            ///< Coefficients
     89    float ****coeffErr;         ///< Error in coefficients
     90    char ****mask;              ///< Coefficients mask
    9191}
    9292psPolynomial4D;
     
    9595
    9696/** Constructor */
    97 psPolynomial1D *psPolynomial1DAlloc(int n       // /< Number of terms
    98                                    );
    99 
    100 /** Constructor */
    101 psPolynomial2D *psPolynomial2DAlloc(int nX, int nY      // /< Number of terms in x and y
    102                                    );
    103 
    104 /** Constructor */
    105 psPolynomial3D *psPolynomial3DAlloc(int nX, int nY, int nZ      // /< Number of terms in x, y and z
    106                                    );
    107 
    108 /** Constructor */
    109 psPolynomial4D *psPolynomial4DAlloc(int nW, int nX, int nY, int nZ      // /< Number of terms in w, x, y and
     97psPolynomial1D *psPolynomial1DAlloc(int n       ///< Number of terms
     98                                   );
     99
     100/** Constructor */
     101psPolynomial2D *psPolynomial2DAlloc(int nX, int nY      ///< Number of terms in x and y
     102                                   );
     103
     104/** Constructor */
     105psPolynomial3D *psPolynomial3DAlloc(int nX, int nY, int nZ      ///< Number of terms in x, y and z
     106                                   );
     107
     108/** Constructor */
     109psPolynomial4D *psPolynomial4DAlloc(int nW, int nX, int nY, int nZ      ///< Number of terms in w, x, y and
    110110                                    // z
    111111                                   );
    112112
    113113/** Evaluate 1D polynomial */
    114 float psPolynomial1DEval(float x,       // /< Value at which to evaluate
    115                          const psPolynomial1D * myPoly  // /< Coefficients for the polynomial
     114float psPolynomial1DEval(float x,       ///< Value at which to evaluate
     115                         const psPolynomial1D * myPoly  ///< Coefficients for the polynomial
    116116                        );
    117117
    118118/** Evaluate 2D polynomial */
    119 float psPolynomial2DEval(float x,       // /< Value x at which to evaluate
    120                          float y,       // /< Value y at which to evaluate
    121                          const psPolynomial2D * myPoly  // /< Coefficients for the polynomial
     119float psPolynomial2DEval(float x,       ///< Value x at which to evaluate
     120                         float y,       ///< Value y at which to evaluate
     121                         const psPolynomial2D * myPoly  ///< Coefficients for the polynomial
    122122                        );
    123123
    124124/** Evaluate 3D polynomial */
    125 float psPolynomial3DEval(float x,       // /< Value x at which to evaluate
    126                          float y,       // /< Value y at which to evaluate
    127                          float z,       // /< Value z at which to evaluate
    128                          const psPolynomial3D * myPoly  // /< Coefficients for the polynomial
     125float psPolynomial3DEval(float x,       ///< Value x at which to evaluate
     126                         float y,       ///< Value y at which to evaluate
     127                         float z,       ///< Value z at which to evaluate
     128                         const psPolynomial3D * myPoly  ///< Coefficients for the polynomial
    129129                        );
    130130
    131131/** Evaluate 4D polynomial */
    132 float psPolynomial4DEval(float w,       // /< Value w at which to evaluate
    133                          float x,       // /< Value x at which to evaluate
    134                          float y,       // /< Value y at which to evaluate
    135                          float z,       // /< Value z at which to evaluate
    136                          const psPolynomial4D * myPoly  // /< Coefficients for the polynomial
     132float psPolynomial4DEval(float w,       ///< Value w at which to evaluate
     133                         float x,       ///< Value x at which to evaluate
     134                         float y,       ///< Value y at which to evaluate
     135                         float z,       ///< Value z at which to evaluate
     136                         const psPolynomial4D * myPoly  ///< Coefficients for the polynomial
    137137                        );
    138138
     
    144144typedef struct
    145145{
    146     int n;                      // /< Number of terms
    147     double *coeff;              // /< Coefficients
    148     double *coeffErr;           // /< Error in coefficients
    149     char *mask;                 // /< Coefficient mask
     146    int n;                      ///< Number of terms
     147    double *coeff;              ///< Coefficients
     148    double *coeffErr;           ///< Error in coefficients
     149    char *mask;                 ///< Coefficient mask
    150150}
    151151psDPolynomial1D;
     
    155155{
    156156    int nX,
    157     nY;                       // /< Number of terms in x and y
    158     double **coeff;             // /< Coefficients
    159     double **coeffErr;          // /< Error in coefficients
    160     char **mask;                // /< Coefficients mask
     157    nY;                       ///< Number of terms in x and y
     158    double **coeff;             ///< Coefficients
     159    double **coeffErr;          ///< Error in coefficients
     160    char **mask;                ///< Coefficients mask
    161161}
    162162psDPolynomial2D;
     
    167167    int nX,
    168168    nY,
    169     nZ;                       // /< Number of terms in x, y and z
    170     double ***coeff;            // /< Coefficients
    171     double ***coeffErr;         // /< Error in coefficients
    172     char ***mask;               // /< Coefficient mask
     169    nZ;                       ///< Number of terms in x, y and z
     170    double ***coeff;            ///< Coefficients
     171    double ***coeffErr;         ///< Error in coefficients
     172    char ***mask;               ///< Coefficient mask
    173173}
    174174psDPolynomial3D;
     
    180180    nX,
    181181    nY,
    182     nZ;                       // /< Number of terms in w, x, y and z
    183     double ****coeff;           // /< Coefficients
    184     double ****coeffErr;        // /< Error in coefficients
    185     char ****mask;              // /< Coefficients mask
     182    nZ;                       ///< Number of terms in w, x, y and z
     183    double ****coeff;           ///< Coefficients
     184    double ****coeffErr;        ///< Error in coefficients
     185    char ****mask;              ///< Coefficients mask
    186186}
    187187psDPolynomial4D;
    188188
    189189/** Constructor */
    190 psDPolynomial1D *psDPolynomial1DAlloc(int n     // /< Number of terms
    191                                      );
    192 
    193 /** Constructor */
    194 psDPolynomial2D *psDPolynomial2DAlloc(int nX, int nY    // /< Number of terms in x and y
    195                                      );
    196 
    197 /** Constructor */
    198 psDPolynomial3D *psDPolynomial3DAlloc(int nX, int nY, int nZ    // /< Number of terms in x, y and z
    199                                      );
    200 
    201 /** Constructor */
    202 psDPolynomial4D *psDPolynomial4DAlloc(int nW, int nX, int nY, int nZ    // /< Number of terms in w, x, y and
     190psDPolynomial1D *psDPolynomial1DAlloc(int n     ///< Number of terms
     191                                     );
     192
     193/** Constructor */
     194psDPolynomial2D *psDPolynomial2DAlloc(int nX, int nY    ///< Number of terms in x and y
     195                                     );
     196
     197/** Constructor */
     198psDPolynomial3D *psDPolynomial3DAlloc(int nX, int nY, int nZ    ///< Number of terms in x, y and z
     199                                     );
     200
     201/** Constructor */
     202psDPolynomial4D *psDPolynomial4DAlloc(int nW, int nX, int nY, int nZ    ///< Number of terms in w, x, y and
    203203                                      // z
    204204                                     );
    205205
    206206/** Evaluate 1D polynomial (double precision) */
    207 double psDPolynomial1DEval(double x,    // /< Value at which to evaluate
    208                            const psDPolynomial1D * myPoly       // /< Coefficients for the polynomial
     207double psDPolynomial1DEval(double x,    ///< Value at which to evaluate
     208                           const psDPolynomial1D * myPoly       ///< Coefficients for the polynomial
    209209                          );
    210210
    211211/** Evaluate 2D polynomial (double precision) */
    212 double psDPolynomial2DEval(double x,    // /< Value x at which to evaluate
    213                            double y,    // /< Value y at which to evaluate
    214                            const psDPolynomial2D * myPoly       // /< Coefficients for the polynomial
     212double psDPolynomial2DEval(double x,    ///< Value x at which to evaluate
     213                           double y,    ///< Value y at which to evaluate
     214                           const psDPolynomial2D * myPoly       ///< Coefficients for the polynomial
    215215                          );
    216216
    217217/** Evaluate 3D polynomial (double precision) */
    218 double psDPolynomial3DEval(double x,    // /< Value x at which to evaluate
    219                            double y,    // /< Value y at which to evaluate
    220                            double z,    // /< Value z at which to evaluate
    221                            const psDPolynomial3D * myPoly       // /< Coefficients for the polynomial
     218double psDPolynomial3DEval(double x,    ///< Value x at which to evaluate
     219                           double y,    ///< Value y at which to evaluate
     220                           double z,    ///< Value z at which to evaluate
     221                           const psDPolynomial3D * myPoly       ///< Coefficients for the polynomial
    222222                          );
    223223
    224224/** Evaluate 4D polynomial (double precision) */
    225 double psDPolynomial4DEval(double w,    // /< Value w at which to evaluate
    226                            double x,    // /< Value x at which to evaluate
    227                            double y,    // /< Value y at which to evaluate
    228                            double z,    // /< Value z at which to evaluate
    229                            const psDPolynomial4D * myPoly       // /< Coefficients for the polynomial
     225double psDPolynomial4DEval(double w,    ///< Value w at which to evaluate
     226                           double x,    ///< Value x at which to evaluate
     227                           double y,    ///< Value y at which to evaluate
     228                           double z,    ///< Value z at which to evaluate
     229                           const psDPolynomial4D * myPoly       ///< Coefficients for the polynomial
    230230                          );
    231231
  • trunk/psLib/src/dataManip/psMatrix.h

    r1407 r1426  
    2222 *  @author Ross Harman, MHPCC
    2323 *
    24  *  @version $Revision: 1.7 $ $Name: not supported by cvs2svn $
    25  *  @date $Date: 2004-08-07 00:06:06 $
     24 *  @version $Revision: 1.8 $ $Name: not supported by cvs2svn $
     25 *  @date $Date: 2004-08-09 22:44:25 $
    2626 *
    2727 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    4343 *  @return  psImage*: Pointer to LU decomposed psImage.
    4444 */
    45 psImage *psMatrixLUD(psImage * outImage,        // /< Image to return, or NULL.
    46                      psVector * outPerm,        // /< Output permutation vector used by psMatrixLUSolve.
    47                      psImage * inImage  // /< Image to decompose.
     45psImage *psMatrixLUD(psImage * outImage,        ///< Image to return, or NULL.
     46                     psVector * outPerm,        ///< Output permutation vector used by psMatrixLUSolve.
     47                     psImage * inImage  ///< Image to decompose.
    4848                    );
    4949
     
    5757 *  @return  psVector*: Pointer to psVector solution of matrix equation.
    5858 */
    59 psVector *psMatrixLUSolve(psVector * outVector, // /< Vector to return, or NULL.
    60                           const psImage * luImage,      // /< LU-decomposed matrix.
    61                           const psVector * inVector,    // /< Vector right-hand-side of equation.
    62                           const psVector * inPerm       // /< Permutation vector resulting from psMatrixLUD
     59psVector *psMatrixLUSolve(psVector * outVector, ///< Vector to return, or NULL.
     60                          const psImage * luImage,      ///< LU-decomposed matrix.
     61                          const psVector * inVector,    ///< Vector right-hand-side of equation.
     62                          const psVector * inPerm       ///< Permutation vector resulting from psMatrixLUD
    6363                          // function.
    6464                         );
     
    7373 *  @return  psImage*: Pointer to inverted psImage.
    7474 */
    75 psImage *psMatrixInvert(psImage * outImage,     // /< Image to return, or NULL for in-place substitution.
    76                         const psImage * inImage,        // /< Image to be inverted
    77                         float *restrict det     // /< Determinant to return, or NULL
     75psImage *psMatrixInvert(psImage * outImage,     ///< Image to return, or NULL for in-place substitution.
     76                        const psImage * inImage,        ///< Image to be inverted
     77                        float *restrict det     ///< Determinant to return, or NULL
    7878                       );
    7979
     
    8686 *  @return  float: Determinant from psImage.
    8787 */
    88 float *psMatrixDeterminant(const psImage * restrict inMatrix    // /< Image used to calculate determinant.
     88float *psMatrixDeterminant(const psImage * restrict inMatrix    ///< Image used to calculate determinant.
    8989                          );
    9090
     
    9898 *  @return  psImage*: Pointer to resulting psImage.
    9999 */
    100 psImage *psMatrixMultiply(psImage * outImage,   // /< Matrix to return, or NULL.
    101                           psImage * inImage1,   // /< First input image.
    102                           psImage * inImage2    // /< Second input image.
     100psImage *psMatrixMultiply(psImage * outImage,   ///< Matrix to return, or NULL.
     101                          psImage * inImage1,   ///< First input image.
     102                          psImage * inImage2    ///< Second input image.
    103103                         );
    104104
     
    112112 *  @return  psImage*: Pointer to transposed psImage.
    113113 */
    114 psImage *psMatrixTranspose(psImage * outImage,  // /< Image to return, or NULL
    115                            const psImage * inImage      // /< Image to transpose
     114psImage *psMatrixTranspose(psImage * outImage,  ///< Image to return, or NULL
     115                           const psImage * inImage      ///< Image to transpose
    116116                          );
    117117
     
    124124 *  @return  psImage*: Pointer to matrix of Eigenvectors.
    125125 */
    126 psImage *psMatrixEigenvectors(psImage * outImage,       // /< Eigenvectors to return, or NULL.
    127                               psImage * inImage // /< Input image.
     126psImage *psMatrixEigenvectors(psImage * outImage,       ///< Eigenvectors to return, or NULL.
     127                              psImage * inImage ///< Input image.
    128128                             );
    129129
     
    137137 *  @return  psVector*: Pointer to psVector.
    138138 */
    139 psVector *psMatrixToVector(psVector * outVector,        // /< Vector to return, or NULL.
    140                            psImage * inImage    // /< Image to convert.
     139psVector *psMatrixToVector(psVector * outVector,        ///< Vector to return, or NULL.
     140                           psImage * inImage    ///< Image to convert.
    141141                          );
    142142
     
    150150 *  @return  psVector*: Pointer to psIamge.
    151151 */
    152 psImage *psVectorToMatrix(psImage * outImage,   // /< Matrix to return, or NULL.
    153                           psVector * inVector   // /< Vector to convert.
     152psImage *psVectorToMatrix(psImage * outImage,   ///< Matrix to return, or NULL.
     153                          psVector * inVector   ///< Vector to convert.
    154154                         );
    155155
  • trunk/psLib/src/dataManip/psMinimize.h

    r1407 r1426  
    2222
    2323/** Minimize chi^2 for input data */
    24 psVector *psMinimizeChi2(float (*evalModel) (const psVector * restrict, const psVector * restrict),     // /<
     24psVector *psMinimizeChi2(float (*evalModel) (const psVector * restrict, const psVector * restrict),     ///<
    2525                         // Model
    2626                         // to
     
    2929                         // and
    3030                         // params)
    31                          float (*DevalModel) (const psVector * restrict, const psVector * restrict, int),       // /<
     31                         float (*DevalModel) (const psVector * restrict, const psVector * restrict, int),       ///<
    3232                         // Derivative
    3333                         // of
     
    3838                         // and
    3939                         // params)
    40                          const psImage * restrict domain,       // /< The domain values for the corresponding
     40                         const psImage * restrict domain,       ///< The domain values for the corresponding
    4141                         // measurements
    42                          const psVector * restrict data,        // /< Data to fit
    43                          const psVector * restrict errors,      // /< Errors in the data
    44                          psVector * restrict initialGuess,      // /< Initial guess
    45                          const psVector * restrict paramMask,   // /< 1 = fit for parameter, 0 = hold
     42                         const psVector * restrict data,        ///< Data to fit
     43                         const psVector * restrict errors,      ///< Errors in the data
     44                         psVector * restrict initialGuess,      ///< Initial guess
     45                         const psVector * restrict paramMask,   ///< 1 = fit for parameter, 0 = hold
    4646                         // parameter constant
    4747                         float *chiSq);
    4848
    4949/** Derive a polynomial fit by chi^2 minimisation (analytically) */
    50 psPolynomial1D *psVectorFitPolynomial1D(psPolynomial1D * myPoly,        // /< Polynomial to fit
    51                                         const psVector * restrict x,    // /< Ordinates (or NULL to just use
     50psPolynomial1D *psVectorFitPolynomial1D(psPolynomial1D * myPoly,        ///< Polynomial to fit
     51                                        const psVector * restrict x,    ///< Ordinates (or NULL to just use
    5252                                        // the indices)
    53                                         const psVector * restrict y,    // /< Coordinates
    54                                         const psVector * restrict yErr  // /< Errors in coordinates, or NULL
     53                                        const psVector * restrict y,    ///< Coordinates
     54                                        const psVector * restrict yErr  ///< Errors in coordinates, or NULL
    5555                                       );
    5656
  • trunk/psLib/src/dataManip/psStats.h

    r1407 r1426  
    1010 *  @author George Gusciora, MHPCC
    1111 *
    12  *  @version $Revision: 1.21 $ $Name: not supported by cvs2svn $
    13  *  @date $Date: 2004-08-07 00:06:06 $
     12 *  @version $Revision: 1.22 $ $Name: not supported by cvs2svn $
     13 *  @date $Date: 2004-08-09 22:44:25 $
    1414 *
    1515 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    5050typedef struct
    5151{
    52     double sampleMean;          // /< formal mean of sample
    53     double sampleMedian;        // /< formal median of sample
    54     double sampleStdev;         // /< standard deviation of sample
    55     double sampleUQ;            // /< upper quartile of sample
    56     double sampleLQ;            // /< lower quartile of sample
    57     double sampleLimit;         // /<
    58     double robustMean;          // /< robust mean of array
    59     double robustMedian;        // /< robust median of array
    60     double robustMode;          // /< Robust mode of array
    61     double robustStdev;         // /< robust standard deviation of array
    62     double robustUQ;            // /< robust upper quartile
    63     double robustLQ;            // /< robust lower quartile
     52    double sampleMean;          ///< formal mean of sample
     53    double sampleMedian;        ///< formal median of sample
     54    double sampleStdev;         ///< standard deviation of sample
     55    double sampleUQ;            ///< upper quartile of sample
     56    double sampleLQ;            ///< lower quartile of sample
     57    double sampleLimit;         ///<
     58    double robustMean;          ///< robust mean of array
     59    double robustMedian;        ///< robust median of array
     60    double robustMode;          ///< Robust mode of array
     61    double robustStdev;         ///< robust standard deviation of array
     62    double robustUQ;            ///< robust upper quartile
     63    double robustLQ;            ///< robust lower quartile
    6464    double XXX;
    65     double robustN50;           // /<
    66     double robustNfit;          // /<
    67     double clippedMean;         // /< Nsigma clipped mean
    68     double clippedStdev;        // /< standard deviation after clipping
    69     double clipSigma;           // /< Nsigma used for clipping; user input
    70     int clipIter;               // /< Number of clipping iterations; user input
    71     double min;                 // /< minimum data value in array
    72     double max;                 // /< maximum data value in array
    73     double binsize;             // /<
    74     psStatsOptions options;     // /< bitmask of calculated values
     65    double robustN50;           ///<
     66    double robustNfit;          ///<
     67    double clippedMean;         ///< Nsigma clipped mean
     68    double clippedStdev;        ///< standard deviation after clipping
     69    double clipSigma;           ///< Nsigma used for clipping; user input
     70    int clipIter;               ///< Number of clipping iterations; user input
     71    double min;                 ///< minimum data value in array
     72    double max;                 ///< maximum data value in array
     73    double binsize;             ///<
     74    psStatsOptions options;     ///< bitmask of calculated values
    7575}
    7676psStats;
    7777
    7878/** Do Statistics on an array.  Returns a status value. \ingroup MathGroup */
    79 psStats *psVectorStats(psStats * stats, // /< stats structure defines stats to be calculated and how
    80                        psVector * in,   // /< Vector to be analysed: must be F32
    81                        psVector * mask, // /< Ignore elements where (maskVector & maskVal) != 0: must be INT
     79psStats *psVectorStats(psStats * stats, ///< stats structure defines stats to be calculated and how
     80                       psVector * in,   ///< Vector to be analysed: must be F32
     81                       psVector * mask, ///< Ignore elements where (maskVector & maskVal) != 0: must be INT
    8282                       // or NULL
    83                        unsigned int maskVal     // /< Only mask elements with one of these bits set in
     83                       unsigned int maskVal     ///< Only mask elements with one of these bits set in
    8484                       // maskVector
    8585                      );
    8686
    8787/** A constructor for the stats structure.*/
    88 psStats *psStatsAlloc(psStatsOptions options);  // /< Statistics to measure
     88psStats *psStatsAlloc(psStatsOptions options);  ///< Statistics to measure
    8989
    9090/******************************************************************************
     
    9595typedef struct
    9696{
    97     psVector *bounds;           // /< Bounds for the bins (type F32)
    98     psVector *nums;             // /< Number in each of the bins (INT)
    99     int minNum;                 // /< Number below the minimum
    100     int maxNum;                 // /< Number above the maximum
    101     bool uniform;               // /< Is it a uniform distribution?
     97    psVector *bounds;           ///< Bounds for the bins (type F32)
     98    psVector *nums;             ///< Number in each of the bins (INT)
     99    int minNum;                 ///< Number below the minimum
     100    int maxNum;                 ///< Number above the maximum
     101    bool uniform;               ///< Is it a uniform distribution?
    102102}
    103103psHistogram;
    104104
    105105/** Constructor \ingroup MathGroup */
    106 psHistogram *psHistogramAlloc(float lower,      // /< Lower limit for the bins
    107                               float upper,      // /< Upper limit for the bins
    108                               int n);   // /< Number of bins
     106psHistogram *psHistogramAlloc(float lower,      ///< Lower limit for the bins
     107                              float upper,      ///< Upper limit for the bins
     108                              int n);   ///< Number of bins
    109109
    110110/** Generic constructor \ingroup MathGroup */
    111 psHistogram *psHistogramAllocGeneric(const psVector * restrict bounds); // /< Bounds for the bins
     111psHistogram *psHistogramAllocGeneric(const psVector * restrict bounds); ///< Bounds for the bins
    112112
    113113/** Calculate a histogram \ingroup MathGroup **/
    114 psHistogram *psVectorHistogram(psHistogram * out,       // /< Histogram data
    115                                const psVector * restrict in,    // /< Vector to analyse
    116                                const psVector * restrict mask,  // /< Mask dat for input vector
    117                                unsigned int maskVal);   // /< Mask value
     114psHistogram *psVectorHistogram(psHistogram * out,       ///< Histogram data
     115                               const psVector * restrict in,    ///< Vector to analyse
     116                               const psVector * restrict mask,  ///< Mask dat for input vector
     117                               unsigned int maskVal);   ///< Mask value
    118118
    119119bool p_psGetStatValue(const psStats * stats, double *value);
  • trunk/psLib/src/dataManip/psVectorFFT.h

    r1407 r1426  
    88 *  @author Robert DeSonia, MHPCC
    99 *
    10  *  @version $Revision: 1.9 $ $Name: not supported by cvs2svn $
    11  *  @date $Date: 2004-08-07 00:06:06 $
     10 *  @version $Revision: 1.10 $ $Name: not supported by cvs2svn $
     11 *  @date $Date: 2004-08-09 22:44:25 $
    1212 *
    1313 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    2929    PS_FFT_FORWARD = (-1),
    3030
    31     // /< psImageFFT/psVectorFFT should perform a reverse FFT.
     31    ///< psImageFFT/psVectorFFT should perform a reverse FFT.
    3232    PS_FFT_REVERSE = (+1)
    3333} psFftDirection;
  • trunk/psLib/src/fft/psVectorFFT.h

    r1407 r1426  
    88 *  @author Robert DeSonia, MHPCC
    99 *
    10  *  @version $Revision: 1.9 $ $Name: not supported by cvs2svn $
    11  *  @date $Date: 2004-08-07 00:06:06 $
     10 *  @version $Revision: 1.10 $ $Name: not supported by cvs2svn $
     11 *  @date $Date: 2004-08-09 22:44:25 $
    1212 *
    1313 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    2929    PS_FFT_FORWARD = (-1),
    3030
    31     // /< psImageFFT/psVectorFFT should perform a reverse FFT.
     31    ///< psImageFFT/psVectorFFT should perform a reverse FFT.
    3232    PS_FFT_REVERSE = (+1)
    3333} psFftDirection;
  • trunk/psLib/src/image/psImage.h

    r1407 r1426  
    1212 *  @author Ross Harman, MHPCC
    1313 *
    14  *  @version $Revision: 1.28 $ $Name: not supported by cvs2svn $
    15  *  @date $Date: 2004-08-07 00:06:06 $
     14 *  @version $Revision: 1.29 $ $Name: not supported by cvs2svn $
     15 *  @date $Date: 2004-08-09 22:44:25 $
    1616 *
    1717 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
    1818 */
    1919#ifndef PS_IMAGE_H
    20 #    define PS_IMAGE_H
     20#define PS_IMAGE_H
    2121
    22 #    include <complex.h>
     22#include <complex.h>
    2323
    24 #    include "psType.h"
     24#include "psType.h"
    2525
    2626/// @addtogroup Image
    2727/// @{
    2828
     29/** enumeration of options in interpolation
     30 *
     31 */
    2932typedef enum {
    30     PS_INTERPOLATE_FLAT,
    31     PS_INTERPOLATE_BILINEAR
     33    PS_INTERPOLATE_FLAT,               ///< 'flat' interpolation (nearest pixel)
     34    PS_INTERPOLATE_BILINEAR            ///< bi-linear interpolation
    3235} psImageInterpolateMode;
    3336
     
    4043typedef struct psImage
    4144{
    42     const psType type;          // /< Image data type and dimension.
    43     const unsigned int numCols; // /< Number of columns in image
    44     const unsigned int numRows; // /< Number of rows in image.
    45     const int col0;             // /< Column position relative to parent.
    46     const int row0;             // /< Row position relative to parent.
     45    const psType type;          ///< Image data type and dimension.
     46    const unsigned int numCols; ///< Number of columns in image
     47    const unsigned int numRows; ///< Number of rows in image.
     48    const int col0;             ///< Column position relative to parent.
     49    const int row0;             ///< Row position relative to parent.
    4750
    4851    union {
    49         psU8 **U8;              // /< Unsigned 8-bit integer data.
    50         psU16 **U16;            // /< Unsigned 16-bit integer data.
    51         psU32 **U32;            // /< Unsigned 32-bit integer data.
    52         psU64 **U64;            // /< Unsigned 64-bit integer data.
    53         psS8 **S8;              // /< Signed 8-bit integer data.
    54         psS16 **S16;            // /< Signed 16-bit integer data.
    55         psS32 **S32;            // /< Signed 32-bit integer data.
    56         psS64 **S64;            // /< Signed 64-bit integer data.
    57         psF32 **F32;            // /< Single-precision float data.
    58         psF64 **F64;            // /< Double-precision float data.
    59         psC32 **C32;            // /< Single-precision complex data.
    60         psC64 **C64;            // /< Double-precision complex data.
    61         psPTR **PTR;            // /< Void pointers.
    62         psPTR *V;               // /< Pointer to data.
    63     } data;                     // /< Union for data types.
    64     const struct psImage *parent;       // /< Parent, if a subimage.
    65     int nChildren;              // /< Number of subimages.
    66     struct psImage **children;  // /< Children of this region.
     52        psU8 **U8;              ///< Unsigned 8-bit integer data.
     53        psU16 **U16;            ///< Unsigned 16-bit integer data.
     54        psU32 **U32;            ///< Unsigned 32-bit integer data.
     55        psU64 **U64;            ///< Unsigned 64-bit integer data.
     56        psS8 **S8;              ///< Signed 8-bit integer data.
     57        psS16 **S16;            ///< Signed 16-bit integer data.
     58        psS32 **S32;            ///< Signed 32-bit integer data.
     59        psS64 **S64;            ///< Signed 64-bit integer data.
     60        psF32 **F32;            ///< Single-precision float data.
     61        psF64 **F64;            ///< Double-precision float data.
     62        psC32 **C32;            ///< Single-precision complex data.
     63        psC64 **C64;            ///< Double-precision complex data.
     64        psPTR **PTR;            ///< Void pointers.
     65        psPTR *V;               ///< Pointer to data.
     66    } data;                     ///< Union for data types.
     67    const struct psImage *parent;       ///< Parent, if a subimage.
     68    int nChildren;              ///< Number of subimages.
     69    struct psImage **children;  ///< Children of this region.
    6770}
    6871psImage;
     
    8285 *
    8386 */
    84 psImage *psImageAlloc(unsigned int numCols,     // /< Number of rows in image.
    85                       unsigned int numRows,     // /< Number of columns in image.
    86                       const psElemType type     // /< Type of data for image.
     87psImage *psImageAlloc(unsigned int numCols,     ///< Number of rows in image.
     88                      unsigned int numRows,     ///< Number of columns in image.
     89                      const psElemType type     ///< Type of data for image.
    8790                     );
    8891
     
    9295 *
    9396 */
    94 psImage *psImageRecycle(psImage * old,  // /< the psImage to recycle by resizing image buffer
    95                         unsigned int numCols,   // /< the desired number of columns in image
    96                         unsigned int numRows,   // /< the desired number of rows in image
    97                         const psElemType type   // /< the desired datatype of the image
     97psImage *psImageRecycle(psImage * old,  ///< the psImage to recycle by resizing image buffer
     98                        unsigned int numCols,   ///< the desired number of columns in image
     99                        unsigned int numRows,   ///< the desired number of rows in image
     100                        const psElemType type   ///< the desired datatype of the image
    98101                       );
    99102
  • trunk/psLib/src/image/psImageExtraction.h

    r1407 r1426  
    1010*  @author Robert DeSonia, MHPCC
    1111*
    12 *  @version $Revision: 1.6 $ $Name: not supported by cvs2svn $
    13 *  @date $Date: 2004-08-07 00:06:06 $
     12*  @version $Revision: 1.7 $ $Name: not supported by cvs2svn $
     13*  @date $Date: 2004-08-09 22:44:25 $
    1414*
    1515*  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    2626/// @{
    2727
     28/* Cut direction flag.  Used with psImageCut function.
     29 */
    2830typedef enum {
    29     PS_CUT_X_POS,
    30     PS_CUT_X_NEG,
    31     PS_CUT_Y_POS,
    32     PS_CUT_Y_NEG,
     31    PS_CUT_X_POS,                      ///< Cut in the x dimension from left to right
     32    PS_CUT_X_NEG,                      ///< Cut in the x dimension from rigth to left
     33    PS_CUT_Y_POS,                      ///< Cut in the y dimension from bottom up
     34    PS_CUT_Y_NEG,                      ///< Cut in the y dimension from top down.
    3335} psImageCutDirection;
    3436
    3537/** Create a subimage of the specified area.
    36 *
    37 * Uses psLib memory allocation functions to create an image based on a larger
    38 * one.
    39 *
    40 * @return psImage*: Pointer to psImage.
    41 *
    42 */
    43 psImage *psImageSubset(psImage * out,   // /< Subimage to return, or NULL.
    44                        psImage * image, // /< Parent image.
    45                        unsigned int numCols,    // /< Subimage width (<= image.nCols - col0).
    46                        unsigned int numRows,    // /< Subimage height (<= image.nRows - row0).
    47                        unsigned int col0,       // /< Subimage col-offset (0 <= col0 < nCol).
    48                        unsigned int row0        // /< Subimage row-offset (0 <= row0 < nCol).
    49                       );
     38 *
     39 * Uses psLib memory allocation functions to create an image based on a larger
     40 * one.
     41 *
     42 * @return psImage*: Pointer to psImage.
     43 *
     44 */
     45psImage* psImageSubset(
     46    psImage* out,                      ///< image to recycle, or NULL.
     47    psImage* image,                    ///< Parent image.
     48    unsigned int numCols,              ///< Subimage width (<= image.nCols - col0).
     49    unsigned int numRows,              ///< Subimage height (<= image.nRows - row0).
     50    unsigned int col0,                 ///< Subimage col-offset (0 <= col0 < nCol).
     51    unsigned int row0                  ///< Subimage row-offset (0 <= row0 < nCol).
     52);
    5053
    5154/** Makes a copy of a psImage
     
    5558 *
    5659 */
    57 psImage *psImageCopy(psImage * restrict output,
     60psImage* psImageCopy(
     61    psImage* restrict output,          ///< if not NULL, a psImage that could be recycled.
     62    const psImage* input,              ///< the psImage to copy
     63    psElemType type                    ///< the desired datatype of the returned copy
     64);
    5865
    59                      /**< if not NULL, a psImage that could be recycled.  If it can not be used,
    60                       *   it will be freed via psImageFree
    61                       */
    62                      const psImage * input,
    6366
    64                      /**< the psImage to copy */
    65                      psElemType type
     67/** Extract pixels from rectlinear region to a vector (array of floats).
     68 *
     69 *  The output vector contains either nx or ny elements, based on the value of
     70 *  the direction: e.g., if direction is PS_CUT_X_POS, there are nx elements.
     71 *  The input region is collapsed in the perpendicular direction, and each
     72 *  element of the output vectors is derived from the statistics of the pixels
     73 *  at that direction coordinate. The statistic used to derive the output
     74 *  vector value is specified by stats. Only one of the statistics choices may
     75 *  be specified, otherwise the function must return an error. This function
     76 *  must be defined for the following types: psS8, psU16, psF32, psF64.
     77 *
     78 * @return psVector    the resulting vector
     79 */
     80psVector *psImageSlice(
     81    psVector* out,                     ///< psVector to recycle, or NULL.
     82    psVector* slicePositions,
     83    ///< If not NULL, it is populated with the coordinate in the slice dimension
     84    ///< coorsponding to the output vector's value of the same position in the
     85    ///< vector.  This vector maybe resized and retyped as appropriate.
     86    const psImage* restrict input,     ///< the input image in which to perform the slice
     87    const psImage* restrict mask,      ///< the mask for the input image.
     88    unsigned int maskVal,              ///< the mask value to apply to the mask
     89    unsigned int col,                  ///< the leftmost column of the slice region
     90    unsigned int row,                  ///< the bottommost row of the slice region
     91    unsigned int numCols,              ///< the number of columns in the slice region
     92    unsigned int numRows,              ///< the number of rows in the slice region
     93    psImageCutDirection direction,     ///< the slice dimension and direction
     94    const psStats* stats               ///< the statistic to perform in slice operation
     95);
    6696
    67                      /**< the desired datatype of the returned copy */
    68                     );
     97/** Extract pixels from an image along a line to a vector (array of floats).
     98 *
     99 *  The vector (xs,ys) - (xe,ye) forms the basis of the output vector. Pixels
     100 *  are considered in a rectangular region of width dw about this vector. The
     101 *  input region is collapsed in the perpendicular direction, and each element
     102 *  of the output vector represents pixel-sized boxes, where the value is
     103 *  derived from the statistics of the pixels interpolated along the
     104 *  perpendicular direction. The specific algorithm which must be used is
     105 *  described in the PSLib ADD (PSDC-430-006). The statistic used to derive
     106 *  the output vector value is specified by stats. Only one of the statistics
     107 *  choices may be specified, otherwise the function must return an error.
     108 *  This function must be defined for the following types: psS8, psU16, psF32,
     109 *  psF64.
     110 *
     111 *  @return psVector    resulting vector
     112 */
     113psVector *psImageCut(
     114    psVector* out,                     ///< psVector to recycle, or NULL.
     115    const psImage* input,              ///< the input image in which to perform the cut
     116    const psImage* restrict mask,      ///< the mask for the input image.
     117    unsigned int maskVal,              ///< the mask value to apply to the mask
     118    float startCol,                    ///< the column of the start of the cut line
     119    float startRow,                    ///< the row of the start of the cut line
     120    float endCol,                      ///< the column of the end of the cut line
     121    float endRow,                      ///< the row of the end of the cut line
     122    float width,                       ///< the distance about the line to perform the statistics
     123    const psStats* stats               ///< the statistic to perform in operation
     124);
    69125
    70 psVector *psImageSlice(psVector * out,
    71                        psVector * slicePositions,
    72                        const psImage * restrict input,
    73                        const psImage * restrict mask,
    74                        unsigned int maskVal,
    75                        unsigned int col,
    76                        unsigned int row,
    77                        unsigned int numCols,
    78                        unsigned int numRows, psImageCutDirection direction, const psStats * stats);
    79 
    80 psVector *psImageCut(psVector * out,
    81                      const psImage * input,
    82                      const psImage * restrict mask,
    83                      unsigned int maskVal,
    84                      float startCol,
    85                      float startRow, float endCol, float endRow, float width, const psStats * stats);
    86 
    87 psVector *psImageRadialCut(psVector * out,
    88                            const psImage * input,
    89                            const psImage * restrict mask,
    90                            unsigned int maskVal,
    91                            float centerCol, float centerRow, const psVector * radii, const psStats * stats);
     126/** Extract radial region data to a vector. A vector is constructed where each
     127 *  vector elements is derived from the statistics of the pixels which land
     128 *  within one of a sequence of radii. The radii are centered on the image
     129 *  pixel coordinate x,y, and are defined by the sequence of values in the
     130 *  vector radii. The specific algorithm which must be used is described in
     131 *  the PSLib ADD (PSDC-430-006). The statistic used to derive the output
     132 *  vector value is specified by stats. Only one of the statistics choices
     133 *  may be specified, otherwise the function must return an error. This
     134 *  function must be defined for the following types: psS8, psU16, psF32,
     135 *  psF64.
     136 *
     137 *  @return psVector    resulting vector
     138 */
     139psVector* psImageRadialCut(
     140    psVector* out,                     ///< psVector to recycle, or NULL.
     141    const psImage* input,              ///< the input image in which to perform the cut
     142    const psImage* restrict mask,      ///< the mask for the input image.
     143    unsigned int maskVal,              ///< the mask value to apply to the mask
     144    float centerCol,                   ///< the column of the center of the cut circle
     145    float centerRow,                   ///< the row of the center of the cut circle
     146    const psVector* radii,             ///< the radii of the cut circle
     147    const psStats* stats               ///< the statistic to perform in operation
     148);
    92149
    93150/// @}
  • trunk/psLib/src/image/psImageManip.h

    r1407 r1426  
    1111 *  @author Ross Harman, MHPCC
    1212 *
    13  *  @version $Revision: 1.7 $ $Name: not supported by cvs2svn $
    14  *  @date $Date: 2004-08-07 00:06:06 $
     13 *  @version $Revision: 1.8 $ $Name: not supported by cvs2svn $
     14 *  @date $Date: 2004-08-09 22:44:25 $
    1515 *
    1616 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    3232 *  @return int     The number of clipped pixels
    3333 */
    34 int psImageClip(psImage * input,        // /< the image to clip
    35                 psF64 min,      // /< the minimum image value allowed
    36                 psF64 vmin,     // /< the value pixels < min are set to
    37                 psF64 max,      // /< the maximum image value allowed
    38                 psF64 vmax      // /< the value pixels > max are set to
     34int psImageClip(psImage * input,        ///< the image to clip
     35                psF64 min,      ///< the minimum image value allowed
     36                psF64 vmin,     ///< the value pixels < min are set to
     37                psF64 max,      ///< the maximum image value allowed
     38                psF64 vmax      ///< the value pixels > max are set to
    3939               );
    4040
     
    4848 *  @return int     The number of clipped pixels
    4949 */
    50 int psImageClipComplexRegion(psImage * input,   // /< the image to clip
    51                              psC64 min, // /< the minimum image value allowed
    52                              psC64 vmin,        // /< the value pixels < min are set to
    53                              psC64 max, // /< the maximum image value allowed
    54                              psC64 vmax // /< the value pixels > max are set to
     50int psImageClipComplexRegion(psImage * input,   ///< the image to clip
     51                             psC64 min, ///< the minimum image value allowed
     52                             psC64 vmin,        ///< the value pixels < min are set to
     53                             psC64 max, ///< the maximum image value allowed
     54                             psC64 vmax ///< the value pixels > max are set to
    5555                            );
    5656
     
    6262 *  @return int     The number of clipped pixels
    6363 */
    64 int psImageClipNaN(psImage * input,     // /< the image to clip
    65                    psF64 value  // /< the value to set all NaN/Inf values to
     64int psImageClipNaN(psImage * input,     ///< the image to clip
     65                   psF64 value  ///< the value to set all NaN/Inf values to
    6666                  );
    6767
     
    7777 *  @return int         0 if success, non-zero if failed.
    7878 */
    79 int psImageOverlaySection(psImage * image,      // /< target image
    80                           const psImage * overlay,      // /< the overlay image
    81                           int col0,     // /< the column to start overlay
    82                           int row0,     // /< the row to start overlay
    83                           const char *op        // /< the operation to perform for overlay
     79int psImageOverlaySection(psImage * image,      ///< target image
     80                          const psImage * overlay,      ///< the overlay image
     81                          int col0,     ///< the column to start overlay
     82                          int row0,     ///< the row to start overlay
     83                          const char *op        ///< the operation to perform for overlay
    8484                         );
    8585
     
    9494 *  @return psImage    new image formed by rebinning input image.
    9595 */
    96 psImage *psImageRebin(psImage * out,    // /< an psImage to recycle.  If NULL, a new image is created
    97                       const psImage * in,       // /< input image
    98                       unsigned int scale,       // /< the scale to rebin for each dimension
    99                       const psStats * stats     // /< the statistic to perform when rebinning.  Only one
     96psImage *psImageRebin(psImage * out,    ///< an psImage to recycle.  If NULL, a new image is created
     97                      const psImage * in,       ///< input image
     98                      unsigned int scale,       ///< the scale to rebin for each dimension
     99                      const psStats * stats     ///< the statistic to perform when rebinning.  Only one
    100100                      // method should be set.
    101101                     );
    102102
    103 psImage *psImageResample(psImage * out, // /< an psImage to recycle.  If NULL, a new image is created
    104                          const psImage * in,    // /< input image
     103psImage *psImageResample(psImage * out, ///< an psImage to recycle.  If NULL, a new image is created
     104                         const psImage * in,    ///< input image
    105105                         int scale, psImageInterpolateMode mode);
    106106
    107 psImage *psImageRotate(psImage * out,   // /< an psImage to recycle.  If NULL, a new image is created
    108                        const psImage * in,      // /< input image
     107psImage *psImageRotate(psImage * out,   ///< an psImage to recycle.  If NULL, a new image is created
     108                       const psImage * in,      ///< input image
    109109                       float angle, float unexposedValue, psImageInterpolateMode mode);
    110110
    111 psImage *psImageShift(psImage * out,    // /< an psImage to recycle.  If NULL, a new image is created
    112                       const psImage * in,       // /< input image
     111psImage *psImageShift(psImage * out,    ///< an psImage to recycle.  If NULL, a new image is created
     112                      const psImage * in,       ///< input image
    113113                      float dx, float dy, float unexposedValue, psImageInterpolateMode mode);
    114114
     
    121121 *  @return psImage*    the rolled version of the input image.
    122122 */
    123 psImage *psImageRoll(psImage * out,     // /< an psImage to recycle.  If NULL, a new image is created
    124                      const psImage * in,        // /< input image
    125                      int dx,    // /< number of pixels to roll in the x-dimension
    126                      int dy     // /< number of pixels to roll in the y-dimension
     123psImage *psImageRoll(psImage * out,     ///< an psImage to recycle.  If NULL, a new image is created
     124                     const psImage * in,        ///< input image
     125                     int dx,    ///< number of pixels to roll in the x-dimension
     126                     int dy     ///< number of pixels to roll in the y-dimension
    127127                    );
    128128
  • trunk/psLib/src/image/psImageStats.h

    r1407 r1426  
    1010*  @author George Gusciora, MHPCC
    1111*
    12 *  @version $Revision: 1.11 $ $Name: not supported by cvs2svn $
    13 *  @date $Date: 2004-08-07 00:06:06 $
     12*  @version $Revision: 1.12 $ $Name: not supported by cvs2svn $
     13*  @date $Date: 2004-08-09 22:44:25 $
    1414*
    1515*  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    2828
    2929/// This routine must determine the various statistics for the image.
    30 psStats *psImageStats(psStats * stats,  // /< defines statistics to be calculated
    31                       psImage * in,     // /< image (or subimage) to calculate stats
    32                       psImage * mask,   // /< mask data for image (NULL ok)
    33                       int maskVal);     // /< mask Mask for mask
     30psStats *psImageStats(psStats * stats,  ///< defines statistics to be calculated
     31                      psImage * in,     ///< image (or subimage) to calculate stats
     32                      psImage * mask,   ///< mask data for image (NULL ok)
     33                      int maskVal);     ///< mask Mask for mask
    3434
    35 psHistogram *psImageHistogram(psHistogram * out,        // /< input histogram description & target
    36                               psImage * in,     // /< Image data to be histogramed.
    37                               psImage * mask,   // /< mask data for image (NULL ok)
    38                               unsigned int maskVal);    // /< mask Mask for mask
     35psHistogram *psImageHistogram(psHistogram * out,        ///< input histogram description & target
     36                              psImage * in,     ///< Image data to be histogramed.
     37                              psImage * mask,   ///< mask data for image (NULL ok)
     38                              unsigned int maskVal);    ///< mask Mask for mask
    3939
    4040/// Fit a 2-D polynomial surface to an image.
    41 psPolynomial2D *psImageFitPolynomial(const psImage * input,     // /< image to fit
    42                                      psPolynomial2D * coeffs    // /< coefficient structure carries in
     41psPolynomial2D *psImageFitPolynomial(const psImage * input,     ///< image to fit
     42                                     psPolynomial2D * coeffs    ///< coefficient structure carries in
    4343                                     // desired terms & target
    4444                                    );
    4545
    4646/// Evaluate a 2-D polynomial surface to image pixels.
    47 int psImageEvalPolynomial(const psImage * input,        // /< image to fit
    48                           const psPolynomial2D * coeffs // /< coefficient structure carries in desired terms
     47int psImageEvalPolynomial(const psImage * input,        ///< image to fit
     48                          const psPolynomial2D * coeffs ///< coefficient structure carries in desired terms
    4949                         );
    5050
  • trunk/psLib/src/imageops/psImageStats.h

    r1407 r1426  
    1010*  @author George Gusciora, MHPCC
    1111*
    12 *  @version $Revision: 1.11 $ $Name: not supported by cvs2svn $
    13 *  @date $Date: 2004-08-07 00:06:06 $
     12*  @version $Revision: 1.12 $ $Name: not supported by cvs2svn $
     13*  @date $Date: 2004-08-09 22:44:25 $
    1414*
    1515*  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    2828
    2929/// This routine must determine the various statistics for the image.
    30 psStats *psImageStats(psStats * stats,  // /< defines statistics to be calculated
    31                       psImage * in,     // /< image (or subimage) to calculate stats
    32                       psImage * mask,   // /< mask data for image (NULL ok)
    33                       int maskVal);     // /< mask Mask for mask
     30psStats *psImageStats(psStats * stats,  ///< defines statistics to be calculated
     31                      psImage * in,     ///< image (or subimage) to calculate stats
     32                      psImage * mask,   ///< mask data for image (NULL ok)
     33                      int maskVal);     ///< mask Mask for mask
    3434
    35 psHistogram *psImageHistogram(psHistogram * out,        // /< input histogram description & target
    36                               psImage * in,     // /< Image data to be histogramed.
    37                               psImage * mask,   // /< mask data for image (NULL ok)
    38                               unsigned int maskVal);    // /< mask Mask for mask
     35psHistogram *psImageHistogram(psHistogram * out,        ///< input histogram description & target
     36                              psImage * in,     ///< Image data to be histogramed.
     37                              psImage * mask,   ///< mask data for image (NULL ok)
     38                              unsigned int maskVal);    ///< mask Mask for mask
    3939
    4040/// Fit a 2-D polynomial surface to an image.
    41 psPolynomial2D *psImageFitPolynomial(const psImage * input,     // /< image to fit
    42                                      psPolynomial2D * coeffs    // /< coefficient structure carries in
     41psPolynomial2D *psImageFitPolynomial(const psImage * input,     ///< image to fit
     42                                     psPolynomial2D * coeffs    ///< coefficient structure carries in
    4343                                     // desired terms & target
    4444                                    );
    4545
    4646/// Evaluate a 2-D polynomial surface to image pixels.
    47 int psImageEvalPolynomial(const psImage * input,        // /< image to fit
    48                           const psPolynomial2D * coeffs // /< coefficient structure carries in desired terms
     47int psImageEvalPolynomial(const psImage * input,        ///< image to fit
     48                          const psPolynomial2D * coeffs ///< coefficient structure carries in desired terms
    4949                         );
    5050
  • trunk/psLib/src/math/psMatrix.h

    r1407 r1426  
    2222 *  @author Ross Harman, MHPCC
    2323 *
    24  *  @version $Revision: 1.7 $ $Name: not supported by cvs2svn $
    25  *  @date $Date: 2004-08-07 00:06:06 $
     24 *  @version $Revision: 1.8 $ $Name: not supported by cvs2svn $
     25 *  @date $Date: 2004-08-09 22:44:25 $
    2626 *
    2727 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    4343 *  @return  psImage*: Pointer to LU decomposed psImage.
    4444 */
    45 psImage *psMatrixLUD(psImage * outImage,        // /< Image to return, or NULL.
    46                      psVector * outPerm,        // /< Output permutation vector used by psMatrixLUSolve.
    47                      psImage * inImage  // /< Image to decompose.
     45psImage *psMatrixLUD(psImage * outImage,        ///< Image to return, or NULL.
     46                     psVector * outPerm,        ///< Output permutation vector used by psMatrixLUSolve.
     47                     psImage * inImage  ///< Image to decompose.
    4848                    );
    4949
     
    5757 *  @return  psVector*: Pointer to psVector solution of matrix equation.
    5858 */
    59 psVector *psMatrixLUSolve(psVector * outVector, // /< Vector to return, or NULL.
    60                           const psImage * luImage,      // /< LU-decomposed matrix.
    61                           const psVector * inVector,    // /< Vector right-hand-side of equation.
    62                           const psVector * inPerm       // /< Permutation vector resulting from psMatrixLUD
     59psVector *psMatrixLUSolve(psVector * outVector, ///< Vector to return, or NULL.
     60                          const psImage * luImage,      ///< LU-decomposed matrix.
     61                          const psVector * inVector,    ///< Vector right-hand-side of equation.
     62                          const psVector * inPerm       ///< Permutation vector resulting from psMatrixLUD
    6363                          // function.
    6464                         );
     
    7373 *  @return  psImage*: Pointer to inverted psImage.
    7474 */
    75 psImage *psMatrixInvert(psImage * outImage,     // /< Image to return, or NULL for in-place substitution.
    76                         const psImage * inImage,        // /< Image to be inverted
    77                         float *restrict det     // /< Determinant to return, or NULL
     75psImage *psMatrixInvert(psImage * outImage,     ///< Image to return, or NULL for in-place substitution.
     76                        const psImage * inImage,        ///< Image to be inverted
     77                        float *restrict det     ///< Determinant to return, or NULL
    7878                       );
    7979
     
    8686 *  @return  float: Determinant from psImage.
    8787 */
    88 float *psMatrixDeterminant(const psImage * restrict inMatrix    // /< Image used to calculate determinant.
     88float *psMatrixDeterminant(const psImage * restrict inMatrix    ///< Image used to calculate determinant.
    8989                          );
    9090
     
    9898 *  @return  psImage*: Pointer to resulting psImage.
    9999 */
    100 psImage *psMatrixMultiply(psImage * outImage,   // /< Matrix to return, or NULL.
    101                           psImage * inImage1,   // /< First input image.
    102                           psImage * inImage2    // /< Second input image.
     100psImage *psMatrixMultiply(psImage * outImage,   ///< Matrix to return, or NULL.
     101                          psImage * inImage1,   ///< First input image.
     102                          psImage * inImage2    ///< Second input image.
    103103                         );
    104104
     
    112112 *  @return  psImage*: Pointer to transposed psImage.
    113113 */
    114 psImage *psMatrixTranspose(psImage * outImage,  // /< Image to return, or NULL
    115                            const psImage * inImage      // /< Image to transpose
     114psImage *psMatrixTranspose(psImage * outImage,  ///< Image to return, or NULL
     115                           const psImage * inImage      ///< Image to transpose
    116116                          );
    117117
     
    124124 *  @return  psImage*: Pointer to matrix of Eigenvectors.
    125125 */
    126 psImage *psMatrixEigenvectors(psImage * outImage,       // /< Eigenvectors to return, or NULL.
    127                               psImage * inImage // /< Input image.
     126psImage *psMatrixEigenvectors(psImage * outImage,       ///< Eigenvectors to return, or NULL.
     127                              psImage * inImage ///< Input image.
    128128                             );
    129129
     
    137137 *  @return  psVector*: Pointer to psVector.
    138138 */
    139 psVector *psMatrixToVector(psVector * outVector,        // /< Vector to return, or NULL.
    140                            psImage * inImage    // /< Image to convert.
     139psVector *psMatrixToVector(psVector * outVector,        ///< Vector to return, or NULL.
     140                           psImage * inImage    ///< Image to convert.
    141141                          );
    142142
     
    150150 *  @return  psVector*: Pointer to psIamge.
    151151 */
    152 psImage *psVectorToMatrix(psImage * outImage,   // /< Matrix to return, or NULL.
    153                           psVector * inVector   // /< Vector to convert.
     152psImage *psVectorToMatrix(psImage * outImage,   ///< Matrix to return, or NULL.
     153                          psVector * inVector   ///< Vector to convert.
    154154                         );
    155155
  • trunk/psLib/src/math/psMinimize.h

    r1407 r1426  
    2222
    2323/** Minimize chi^2 for input data */
    24 psVector *psMinimizeChi2(float (*evalModel) (const psVector * restrict, const psVector * restrict),     // /<
     24psVector *psMinimizeChi2(float (*evalModel) (const psVector * restrict, const psVector * restrict),     ///<
    2525                         // Model
    2626                         // to
     
    2929                         // and
    3030                         // params)
    31                          float (*DevalModel) (const psVector * restrict, const psVector * restrict, int),       // /<
     31                         float (*DevalModel) (const psVector * restrict, const psVector * restrict, int),       ///<
    3232                         // Derivative
    3333                         // of
     
    3838                         // and
    3939                         // params)
    40                          const psImage * restrict domain,       // /< The domain values for the corresponding
     40                         const psImage * restrict domain,       ///< The domain values for the corresponding
    4141                         // measurements
    42                          const psVector * restrict data,        // /< Data to fit
    43                          const psVector * restrict errors,      // /< Errors in the data
    44                          psVector * restrict initialGuess,      // /< Initial guess
    45                          const psVector * restrict paramMask,   // /< 1 = fit for parameter, 0 = hold
     42                         const psVector * restrict data,        ///< Data to fit
     43                         const psVector * restrict errors,      ///< Errors in the data
     44                         psVector * restrict initialGuess,      ///< Initial guess
     45                         const psVector * restrict paramMask,   ///< 1 = fit for parameter, 0 = hold
    4646                         // parameter constant
    4747                         float *chiSq);
    4848
    4949/** Derive a polynomial fit by chi^2 minimisation (analytically) */
    50 psPolynomial1D *psVectorFitPolynomial1D(psPolynomial1D * myPoly,        // /< Polynomial to fit
    51                                         const psVector * restrict x,    // /< Ordinates (or NULL to just use
     50psPolynomial1D *psVectorFitPolynomial1D(psPolynomial1D * myPoly,        ///< Polynomial to fit
     51                                        const psVector * restrict x,    ///< Ordinates (or NULL to just use
    5252                                        // the indices)
    53                                         const psVector * restrict y,    // /< Coordinates
    54                                         const psVector * restrict yErr  // /< Errors in coordinates, or NULL
     53                                        const psVector * restrict y,    ///< Coordinates
     54                                        const psVector * restrict yErr  ///< Errors in coordinates, or NULL
    5555                                       );
    5656
  • trunk/psLib/src/math/psPolynomial.h

    r1407 r1426  
    1313*  @author George Gusciora, MHPCC
    1414*
    15 *  @version $Revision: 1.15 $ $Name: not supported by cvs2svn $
    16 *  @date $Date: 2004-08-07 00:06:06 $
     15*  @version $Revision: 1.16 $ $Name: not supported by cvs2svn $
     16*  @date $Date: 2004-08-09 22:44:25 $
    1717*
    1818*  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    3434    evaluated Gaussian is: \f[ exp(-\frac{(x-mean)^2}{2\sigma^2}) \f] */
    3535
    36 float psGaussian(float x,       // /< Value at which to evaluate
    37                  float mean,    // /< Mean for the Gaussian
    38                  float stddev,  // /< Standard deviation for the Gaussian
    39                  bool normal    // /< Indicates whether result should be normalized
     36float psGaussian(float x,       ///< Value at which to evaluate
     37                 float mean,    ///< Mean for the Gaussian
     38                 float stddev,  ///< Standard deviation for the Gaussian
     39                 bool normal    ///< Indicates whether result should be normalized
    4040                );
    4141
    4242/** Produce a vector of random numbers from a Gaussian distribution with
    4343    the specified mean and sigma */
    44 psVector *psGaussianDev(float mean,     // /< The mean of the Gaussian
    45                         float sigma,    // /< The sigma of the Gaussian
    46                         int Npts);      // /< The size of the vector
     44psVector *psGaussianDev(float mean,     ///< The mean of the Gaussian
     45                        float sigma,    ///< The sigma of the Gaussian
     46                        int Npts);      ///< The size of the vector
    4747
    4848/** One-dimensional polynomial */
    4949typedef struct
    5050{
    51     int n;                      // /< Number of terms
    52     float *coeff;               // /< Coefficients
    53     float *coeffErr;            // /< Error in coefficients
    54     char *mask;                 // /< Coefficient mask
     51    int n;                      ///< Number of terms
     52    float *coeff;               ///< Coefficients
     53    float *coeffErr;            ///< Error in coefficients
     54    char *mask;                 ///< Coefficient mask
    5555}
    5656psPolynomial1D;
     
    6060{
    6161    int nX,
    62     nY;                       // /< Number of terms in x and y
    63     float **coeff;              // /< Coefficients
    64     float **coeffErr;           // /< Error in coefficients
    65     char **mask;                // /< Coefficients mask
     62    nY;                       ///< Number of terms in x and y
     63    float **coeff;              ///< Coefficients
     64    float **coeffErr;           ///< Error in coefficients
     65    char **mask;                ///< Coefficients mask
    6666}
    6767psPolynomial2D;
     
    7272    int nX,
    7373    nY,
    74     nZ;                       // /< Number of terms in x, y and z
    75     float ***coeff;             // /< Coefficients
    76     float ***coeffErr;          // /< Error in coefficients
    77     char ***mask;               // /< Coefficients mask
     74    nZ;                       ///< Number of terms in x, y and z
     75    float ***coeff;             ///< Coefficients
     76    float ***coeffErr;          ///< Error in coefficients
     77    char ***mask;               ///< Coefficients mask
    7878}
    7979psPolynomial3D;
     
    8585    nX,
    8686    nY,
    87     nZ;                       // /< Number of terms in w, x, y and z
    88     float ****coeff;            // /< Coefficients
    89     float ****coeffErr;         // /< Error in coefficients
    90     char ****mask;              // /< Coefficients mask
     87    nZ;                       ///< Number of terms in w, x, y and z
     88    float ****coeff;            ///< Coefficients
     89    float ****coeffErr;         ///< Error in coefficients
     90    char ****mask;              ///< Coefficients mask
    9191}
    9292psPolynomial4D;
     
    9595
    9696/** Constructor */
    97 psPolynomial1D *psPolynomial1DAlloc(int n       // /< Number of terms
    98                                    );
    99 
    100 /** Constructor */
    101 psPolynomial2D *psPolynomial2DAlloc(int nX, int nY      // /< Number of terms in x and y
    102                                    );
    103 
    104 /** Constructor */
    105 psPolynomial3D *psPolynomial3DAlloc(int nX, int nY, int nZ      // /< Number of terms in x, y and z
    106                                    );
    107 
    108 /** Constructor */
    109 psPolynomial4D *psPolynomial4DAlloc(int nW, int nX, int nY, int nZ      // /< Number of terms in w, x, y and
     97psPolynomial1D *psPolynomial1DAlloc(int n       ///< Number of terms
     98                                   );
     99
     100/** Constructor */
     101psPolynomial2D *psPolynomial2DAlloc(int nX, int nY      ///< Number of terms in x and y
     102                                   );
     103
     104/** Constructor */
     105psPolynomial3D *psPolynomial3DAlloc(int nX, int nY, int nZ      ///< Number of terms in x, y and z
     106                                   );
     107
     108/** Constructor */
     109psPolynomial4D *psPolynomial4DAlloc(int nW, int nX, int nY, int nZ      ///< Number of terms in w, x, y and
    110110                                    // z
    111111                                   );
    112112
    113113/** Evaluate 1D polynomial */
    114 float psPolynomial1DEval(float x,       // /< Value at which to evaluate
    115                          const psPolynomial1D * myPoly  // /< Coefficients for the polynomial
     114float psPolynomial1DEval(float x,       ///< Value at which to evaluate
     115                         const psPolynomial1D * myPoly  ///< Coefficients for the polynomial
    116116                        );
    117117
    118118/** Evaluate 2D polynomial */
    119 float psPolynomial2DEval(float x,       // /< Value x at which to evaluate
    120                          float y,       // /< Value y at which to evaluate
    121                          const psPolynomial2D * myPoly  // /< Coefficients for the polynomial
     119float psPolynomial2DEval(float x,       ///< Value x at which to evaluate
     120                         float y,       ///< Value y at which to evaluate
     121                         const psPolynomial2D * myPoly  ///< Coefficients for the polynomial
    122122                        );
    123123
    124124/** Evaluate 3D polynomial */
    125 float psPolynomial3DEval(float x,       // /< Value x at which to evaluate
    126                          float y,       // /< Value y at which to evaluate
    127                          float z,       // /< Value z at which to evaluate
    128                          const psPolynomial3D * myPoly  // /< Coefficients for the polynomial
     125float psPolynomial3DEval(float x,       ///< Value x at which to evaluate
     126                         float y,       ///< Value y at which to evaluate
     127                         float z,       ///< Value z at which to evaluate
     128                         const psPolynomial3D * myPoly  ///< Coefficients for the polynomial
    129129                        );
    130130
    131131/** Evaluate 4D polynomial */
    132 float psPolynomial4DEval(float w,       // /< Value w at which to evaluate
    133                          float x,       // /< Value x at which to evaluate
    134                          float y,       // /< Value y at which to evaluate
    135                          float z,       // /< Value z at which to evaluate
    136                          const psPolynomial4D * myPoly  // /< Coefficients for the polynomial
     132float psPolynomial4DEval(float w,       ///< Value w at which to evaluate
     133                         float x,       ///< Value x at which to evaluate
     134                         float y,       ///< Value y at which to evaluate
     135                         float z,       ///< Value z at which to evaluate
     136                         const psPolynomial4D * myPoly  ///< Coefficients for the polynomial
    137137                        );
    138138
     
    144144typedef struct
    145145{
    146     int n;                      // /< Number of terms
    147     double *coeff;              // /< Coefficients
    148     double *coeffErr;           // /< Error in coefficients
    149     char *mask;                 // /< Coefficient mask
     146    int n;                      ///< Number of terms
     147    double *coeff;              ///< Coefficients
     148    double *coeffErr;           ///< Error in coefficients
     149    char *mask;                 ///< Coefficient mask
    150150}
    151151psDPolynomial1D;
     
    155155{
    156156    int nX,
    157     nY;                       // /< Number of terms in x and y
    158     double **coeff;             // /< Coefficients
    159     double **coeffErr;          // /< Error in coefficients
    160     char **mask;                // /< Coefficients mask
     157    nY;                       ///< Number of terms in x and y
     158    double **coeff;             ///< Coefficients
     159    double **coeffErr;          ///< Error in coefficients
     160    char **mask;                ///< Coefficients mask
    161161}
    162162psDPolynomial2D;
     
    167167    int nX,
    168168    nY,
    169     nZ;                       // /< Number of terms in x, y and z
    170     double ***coeff;            // /< Coefficients
    171     double ***coeffErr;         // /< Error in coefficients
    172     char ***mask;               // /< Coefficient mask
     169    nZ;                       ///< Number of terms in x, y and z
     170    double ***coeff;            ///< Coefficients
     171    double ***coeffErr;         ///< Error in coefficients
     172    char ***mask;               ///< Coefficient mask
    173173}
    174174psDPolynomial3D;
     
    180180    nX,
    181181    nY,
    182     nZ;                       // /< Number of terms in w, x, y and z
    183     double ****coeff;           // /< Coefficients
    184     double ****coeffErr;        // /< Error in coefficients
    185     char ****mask;              // /< Coefficients mask
     182    nZ;                       ///< Number of terms in w, x, y and z
     183    double ****coeff;           ///< Coefficients
     184    double ****coeffErr;        ///< Error in coefficients
     185    char ****mask;              ///< Coefficients mask
    186186}
    187187psDPolynomial4D;
    188188
    189189/** Constructor */
    190 psDPolynomial1D *psDPolynomial1DAlloc(int n     // /< Number of terms
    191                                      );
    192 
    193 /** Constructor */
    194 psDPolynomial2D *psDPolynomial2DAlloc(int nX, int nY    // /< Number of terms in x and y
    195                                      );
    196 
    197 /** Constructor */
    198 psDPolynomial3D *psDPolynomial3DAlloc(int nX, int nY, int nZ    // /< Number of terms in x, y and z
    199                                      );
    200 
    201 /** Constructor */
    202 psDPolynomial4D *psDPolynomial4DAlloc(int nW, int nX, int nY, int nZ    // /< Number of terms in w, x, y and
     190psDPolynomial1D *psDPolynomial1DAlloc(int n     ///< Number of terms
     191                                     );
     192
     193/** Constructor */
     194psDPolynomial2D *psDPolynomial2DAlloc(int nX, int nY    ///< Number of terms in x and y
     195                                     );
     196
     197/** Constructor */
     198psDPolynomial3D *psDPolynomial3DAlloc(int nX, int nY, int nZ    ///< Number of terms in x, y and z
     199                                     );
     200
     201/** Constructor */
     202psDPolynomial4D *psDPolynomial4DAlloc(int nW, int nX, int nY, int nZ    ///< Number of terms in w, x, y and
    203203                                      // z
    204204                                     );
    205205
    206206/** Evaluate 1D polynomial (double precision) */
    207 double psDPolynomial1DEval(double x,    // /< Value at which to evaluate
    208                            const psDPolynomial1D * myPoly       // /< Coefficients for the polynomial
     207double psDPolynomial1DEval(double x,    ///< Value at which to evaluate
     208                           const psDPolynomial1D * myPoly       ///< Coefficients for the polynomial
    209209                          );
    210210
    211211/** Evaluate 2D polynomial (double precision) */
    212 double psDPolynomial2DEval(double x,    // /< Value x at which to evaluate
    213                            double y,    // /< Value y at which to evaluate
    214                            const psDPolynomial2D * myPoly       // /< Coefficients for the polynomial
     212double psDPolynomial2DEval(double x,    ///< Value x at which to evaluate
     213                           double y,    ///< Value y at which to evaluate
     214                           const psDPolynomial2D * myPoly       ///< Coefficients for the polynomial
    215215                          );
    216216
    217217/** Evaluate 3D polynomial (double precision) */
    218 double psDPolynomial3DEval(double x,    // /< Value x at which to evaluate
    219                            double y,    // /< Value y at which to evaluate
    220                            double z,    // /< Value z at which to evaluate
    221                            const psDPolynomial3D * myPoly       // /< Coefficients for the polynomial
     218double psDPolynomial3DEval(double x,    ///< Value x at which to evaluate
     219                           double y,    ///< Value y at which to evaluate
     220                           double z,    ///< Value z at which to evaluate
     221                           const psDPolynomial3D * myPoly       ///< Coefficients for the polynomial
    222222                          );
    223223
    224224/** Evaluate 4D polynomial (double precision) */
    225 double psDPolynomial4DEval(double w,    // /< Value w at which to evaluate
    226                            double x,    // /< Value x at which to evaluate
    227                            double y,    // /< Value y at which to evaluate
    228                            double z,    // /< Value z at which to evaluate
    229                            const psDPolynomial4D * myPoly       // /< Coefficients for the polynomial
     225double psDPolynomial4DEval(double w,    ///< Value w at which to evaluate
     226                           double x,    ///< Value x at which to evaluate
     227                           double y,    ///< Value y at which to evaluate
     228                           double z,    ///< Value z at which to evaluate
     229                           const psDPolynomial4D * myPoly       ///< Coefficients for the polynomial
    230230                          );
    231231
  • trunk/psLib/src/math/psSpline.h

    r1407 r1426  
    1313*  @author George Gusciora, MHPCC
    1414*
    15 *  @version $Revision: 1.15 $ $Name: not supported by cvs2svn $
    16 *  @date $Date: 2004-08-07 00:06:06 $
     15*  @version $Revision: 1.16 $ $Name: not supported by cvs2svn $
     16*  @date $Date: 2004-08-09 22:44:25 $
    1717*
    1818*  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    3434    evaluated Gaussian is: \f[ exp(-\frac{(x-mean)^2}{2\sigma^2}) \f] */
    3535
    36 float psGaussian(float x,       // /< Value at which to evaluate
    37                  float mean,    // /< Mean for the Gaussian
    38                  float stddev,  // /< Standard deviation for the Gaussian
    39                  bool normal    // /< Indicates whether result should be normalized
     36float psGaussian(float x,       ///< Value at which to evaluate
     37                 float mean,    ///< Mean for the Gaussian
     38                 float stddev,  ///< Standard deviation for the Gaussian
     39                 bool normal    ///< Indicates whether result should be normalized
    4040                );
    4141
    4242/** Produce a vector of random numbers from a Gaussian distribution with
    4343    the specified mean and sigma */
    44 psVector *psGaussianDev(float mean,     // /< The mean of the Gaussian
    45                         float sigma,    // /< The sigma of the Gaussian
    46                         int Npts);      // /< The size of the vector
     44psVector *psGaussianDev(float mean,     ///< The mean of the Gaussian
     45                        float sigma,    ///< The sigma of the Gaussian
     46                        int Npts);      ///< The size of the vector
    4747
    4848/** One-dimensional polynomial */
    4949typedef struct
    5050{
    51     int n;                      // /< Number of terms
    52     float *coeff;               // /< Coefficients
    53     float *coeffErr;            // /< Error in coefficients
    54     char *mask;                 // /< Coefficient mask
     51    int n;                      ///< Number of terms
     52    float *coeff;               ///< Coefficients
     53    float *coeffErr;            ///< Error in coefficients
     54    char *mask;                 ///< Coefficient mask
    5555}
    5656psPolynomial1D;
     
    6060{
    6161    int nX,
    62     nY;                       // /< Number of terms in x and y
    63     float **coeff;              // /< Coefficients
    64     float **coeffErr;           // /< Error in coefficients
    65     char **mask;                // /< Coefficients mask
     62    nY;                       ///< Number of terms in x and y
     63    float **coeff;              ///< Coefficients
     64    float **coeffErr;           ///< Error in coefficients
     65    char **mask;                ///< Coefficients mask
    6666}
    6767psPolynomial2D;
     
    7272    int nX,
    7373    nY,
    74     nZ;                       // /< Number of terms in x, y and z
    75     float ***coeff;             // /< Coefficients
    76     float ***coeffErr;          // /< Error in coefficients
    77     char ***mask;               // /< Coefficients mask
     74    nZ;                       ///< Number of terms in x, y and z
     75    float ***coeff;             ///< Coefficients
     76    float ***coeffErr;          ///< Error in coefficients
     77    char ***mask;               ///< Coefficients mask
    7878}
    7979psPolynomial3D;
     
    8585    nX,
    8686    nY,
    87     nZ;                       // /< Number of terms in w, x, y and z
    88     float ****coeff;            // /< Coefficients
    89     float ****coeffErr;         // /< Error in coefficients
    90     char ****mask;              // /< Coefficients mask
     87    nZ;                       ///< Number of terms in w, x, y and z
     88    float ****coeff;            ///< Coefficients
     89    float ****coeffErr;         ///< Error in coefficients
     90    char ****mask;              ///< Coefficients mask
    9191}
    9292psPolynomial4D;
     
    9595
    9696/** Constructor */
    97 psPolynomial1D *psPolynomial1DAlloc(int n       // /< Number of terms
    98                                    );
    99 
    100 /** Constructor */
    101 psPolynomial2D *psPolynomial2DAlloc(int nX, int nY      // /< Number of terms in x and y
    102                                    );
    103 
    104 /** Constructor */
    105 psPolynomial3D *psPolynomial3DAlloc(int nX, int nY, int nZ      // /< Number of terms in x, y and z
    106                                    );
    107 
    108 /** Constructor */
    109 psPolynomial4D *psPolynomial4DAlloc(int nW, int nX, int nY, int nZ      // /< Number of terms in w, x, y and
     97psPolynomial1D *psPolynomial1DAlloc(int n       ///< Number of terms
     98                                   );
     99
     100/** Constructor */
     101psPolynomial2D *psPolynomial2DAlloc(int nX, int nY      ///< Number of terms in x and y
     102                                   );
     103
     104/** Constructor */
     105psPolynomial3D *psPolynomial3DAlloc(int nX, int nY, int nZ      ///< Number of terms in x, y and z
     106                                   );
     107
     108/** Constructor */
     109psPolynomial4D *psPolynomial4DAlloc(int nW, int nX, int nY, int nZ      ///< Number of terms in w, x, y and
    110110                                    // z
    111111                                   );
    112112
    113113/** Evaluate 1D polynomial */
    114 float psPolynomial1DEval(float x,       // /< Value at which to evaluate
    115                          const psPolynomial1D * myPoly  // /< Coefficients for the polynomial
     114float psPolynomial1DEval(float x,       ///< Value at which to evaluate
     115                         const psPolynomial1D * myPoly  ///< Coefficients for the polynomial
    116116                        );
    117117
    118118/** Evaluate 2D polynomial */
    119 float psPolynomial2DEval(float x,       // /< Value x at which to evaluate
    120                          float y,       // /< Value y at which to evaluate
    121                          const psPolynomial2D * myPoly  // /< Coefficients for the polynomial
     119float psPolynomial2DEval(float x,       ///< Value x at which to evaluate
     120                         float y,       ///< Value y at which to evaluate
     121                         const psPolynomial2D * myPoly  ///< Coefficients for the polynomial
    122122                        );
    123123
    124124/** Evaluate 3D polynomial */
    125 float psPolynomial3DEval(float x,       // /< Value x at which to evaluate
    126                          float y,       // /< Value y at which to evaluate
    127                          float z,       // /< Value z at which to evaluate
    128                          const psPolynomial3D * myPoly  // /< Coefficients for the polynomial
     125float psPolynomial3DEval(float x,       ///< Value x at which to evaluate
     126                         float y,       ///< Value y at which to evaluate
     127                         float z,       ///< Value z at which to evaluate
     128                         const psPolynomial3D * myPoly  ///< Coefficients for the polynomial
    129129                        );
    130130
    131131/** Evaluate 4D polynomial */
    132 float psPolynomial4DEval(float w,       // /< Value w at which to evaluate
    133                          float x,       // /< Value x at which to evaluate
    134                          float y,       // /< Value y at which to evaluate
    135                          float z,       // /< Value z at which to evaluate
    136                          const psPolynomial4D * myPoly  // /< Coefficients for the polynomial
     132float psPolynomial4DEval(float w,       ///< Value w at which to evaluate
     133                         float x,       ///< Value x at which to evaluate
     134                         float y,       ///< Value y at which to evaluate
     135                         float z,       ///< Value z at which to evaluate
     136                         const psPolynomial4D * myPoly  ///< Coefficients for the polynomial
    137137                        );
    138138
     
    144144typedef struct
    145145{
    146     int n;                      // /< Number of terms
    147     double *coeff;              // /< Coefficients
    148     double *coeffErr;           // /< Error in coefficients
    149     char *mask;                 // /< Coefficient mask
     146    int n;                      ///< Number of terms
     147    double *coeff;              ///< Coefficients
     148    double *coeffErr;           ///< Error in coefficients
     149    char *mask;                 ///< Coefficient mask
    150150}
    151151psDPolynomial1D;
     
    155155{
    156156    int nX,
    157     nY;                       // /< Number of terms in x and y
    158     double **coeff;             // /< Coefficients
    159     double **coeffErr;          // /< Error in coefficients
    160     char **mask;                // /< Coefficients mask
     157    nY;                       ///< Number of terms in x and y
     158    double **coeff;             ///< Coefficients
     159    double **coeffErr;          ///< Error in coefficients
     160    char **mask;                ///< Coefficients mask
    161161}
    162162psDPolynomial2D;
     
    167167    int nX,
    168168    nY,
    169     nZ;                       // /< Number of terms in x, y and z
    170     double ***coeff;            // /< Coefficients
    171     double ***coeffErr;         // /< Error in coefficients
    172     char ***mask;               // /< Coefficient mask
     169    nZ;                       ///< Number of terms in x, y and z
     170    double ***coeff;            ///< Coefficients
     171    double ***coeffErr;         ///< Error in coefficients
     172    char ***mask;               ///< Coefficient mask
    173173}
    174174psDPolynomial3D;
     
    180180    nX,
    181181    nY,
    182     nZ;                       // /< Number of terms in w, x, y and z
    183     double ****coeff;           // /< Coefficients
    184     double ****coeffErr;        // /< Error in coefficients
    185     char ****mask;              // /< Coefficients mask
     182    nZ;                       ///< Number of terms in w, x, y and z
     183    double ****coeff;           ///< Coefficients
     184    double ****coeffErr;        ///< Error in coefficients
     185    char ****mask;              ///< Coefficients mask
    186186}
    187187psDPolynomial4D;
    188188
    189189/** Constructor */
    190 psDPolynomial1D *psDPolynomial1DAlloc(int n     // /< Number of terms
    191                                      );
    192 
    193 /** Constructor */
    194 psDPolynomial2D *psDPolynomial2DAlloc(int nX, int nY    // /< Number of terms in x and y
    195                                      );
    196 
    197 /** Constructor */
    198 psDPolynomial3D *psDPolynomial3DAlloc(int nX, int nY, int nZ    // /< Number of terms in x, y and z
    199                                      );
    200 
    201 /** Constructor */
    202 psDPolynomial4D *psDPolynomial4DAlloc(int nW, int nX, int nY, int nZ    // /< Number of terms in w, x, y and
     190psDPolynomial1D *psDPolynomial1DAlloc(int n     ///< Number of terms
     191                                     );
     192
     193/** Constructor */
     194psDPolynomial2D *psDPolynomial2DAlloc(int nX, int nY    ///< Number of terms in x and y
     195                                     );
     196
     197/** Constructor */
     198psDPolynomial3D *psDPolynomial3DAlloc(int nX, int nY, int nZ    ///< Number of terms in x, y and z
     199                                     );
     200
     201/** Constructor */
     202psDPolynomial4D *psDPolynomial4DAlloc(int nW, int nX, int nY, int nZ    ///< Number of terms in w, x, y and
    203203                                      // z
    204204                                     );
    205205
    206206/** Evaluate 1D polynomial (double precision) */
    207 double psDPolynomial1DEval(double x,    // /< Value at which to evaluate
    208                            const psDPolynomial1D * myPoly       // /< Coefficients for the polynomial
     207double psDPolynomial1DEval(double x,    ///< Value at which to evaluate
     208                           const psDPolynomial1D * myPoly       ///< Coefficients for the polynomial
    209209                          );
    210210
    211211/** Evaluate 2D polynomial (double precision) */
    212 double psDPolynomial2DEval(double x,    // /< Value x at which to evaluate
    213                            double y,    // /< Value y at which to evaluate
    214                            const psDPolynomial2D * myPoly       // /< Coefficients for the polynomial
     212double psDPolynomial2DEval(double x,    ///< Value x at which to evaluate
     213                           double y,    ///< Value y at which to evaluate
     214                           const psDPolynomial2D * myPoly       ///< Coefficients for the polynomial
    215215                          );
    216216
    217217/** Evaluate 3D polynomial (double precision) */
    218 double psDPolynomial3DEval(double x,    // /< Value x at which to evaluate
    219                            double y,    // /< Value y at which to evaluate
    220                            double z,    // /< Value z at which to evaluate
    221                            const psDPolynomial3D * myPoly       // /< Coefficients for the polynomial
     218double psDPolynomial3DEval(double x,    ///< Value x at which to evaluate
     219                           double y,    ///< Value y at which to evaluate
     220                           double z,    ///< Value z at which to evaluate
     221                           const psDPolynomial3D * myPoly       ///< Coefficients for the polynomial
    222222                          );
    223223
    224224/** Evaluate 4D polynomial (double precision) */
    225 double psDPolynomial4DEval(double w,    // /< Value w at which to evaluate
    226                            double x,    // /< Value x at which to evaluate
    227                            double y,    // /< Value y at which to evaluate
    228                            double z,    // /< Value z at which to evaluate
    229                            const psDPolynomial4D * myPoly       // /< Coefficients for the polynomial
     225double psDPolynomial4DEval(double w,    ///< Value w at which to evaluate
     226                           double x,    ///< Value x at which to evaluate
     227                           double y,    ///< Value y at which to evaluate
     228                           double z,    ///< Value z at which to evaluate
     229                           const psDPolynomial4D * myPoly       ///< Coefficients for the polynomial
    230230                          );
    231231
  • trunk/psLib/src/math/psStats.h

    r1407 r1426  
    1010 *  @author George Gusciora, MHPCC
    1111 *
    12  *  @version $Revision: 1.21 $ $Name: not supported by cvs2svn $
    13  *  @date $Date: 2004-08-07 00:06:06 $
     12 *  @version $Revision: 1.22 $ $Name: not supported by cvs2svn $
     13 *  @date $Date: 2004-08-09 22:44:25 $
    1414 *
    1515 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    5050typedef struct
    5151{
    52     double sampleMean;          // /< formal mean of sample
    53     double sampleMedian;        // /< formal median of sample
    54     double sampleStdev;         // /< standard deviation of sample
    55     double sampleUQ;            // /< upper quartile of sample
    56     double sampleLQ;            // /< lower quartile of sample
    57     double sampleLimit;         // /<
    58     double robustMean;          // /< robust mean of array
    59     double robustMedian;        // /< robust median of array
    60     double robustMode;          // /< Robust mode of array
    61     double robustStdev;         // /< robust standard deviation of array
    62     double robustUQ;            // /< robust upper quartile
    63     double robustLQ;            // /< robust lower quartile
     52    double sampleMean;          ///< formal mean of sample
     53    double sampleMedian;        ///< formal median of sample
     54    double sampleStdev;         ///< standard deviation of sample
     55    double sampleUQ;            ///< upper quartile of sample
     56    double sampleLQ;            ///< lower quartile of sample
     57    double sampleLimit;         ///<
     58    double robustMean;          ///< robust mean of array
     59    double robustMedian;        ///< robust median of array
     60    double robustMode;          ///< Robust mode of array
     61    double robustStdev;         ///< robust standard deviation of array
     62    double robustUQ;            ///< robust upper quartile
     63    double robustLQ;            ///< robust lower quartile
    6464    double XXX;
    65     double robustN50;           // /<
    66     double robustNfit;          // /<
    67     double clippedMean;         // /< Nsigma clipped mean
    68     double clippedStdev;        // /< standard deviation after clipping
    69     double clipSigma;           // /< Nsigma used for clipping; user input
    70     int clipIter;               // /< Number of clipping iterations; user input
    71     double min;                 // /< minimum data value in array
    72     double max;                 // /< maximum data value in array
    73     double binsize;             // /<
    74     psStatsOptions options;     // /< bitmask of calculated values
     65    double robustN50;           ///<
     66    double robustNfit;          ///<
     67    double clippedMean;         ///< Nsigma clipped mean
     68    double clippedStdev;        ///< standard deviation after clipping
     69    double clipSigma;           ///< Nsigma used for clipping; user input
     70    int clipIter;               ///< Number of clipping iterations; user input
     71    double min;                 ///< minimum data value in array
     72    double max;                 ///< maximum data value in array
     73    double binsize;             ///<
     74    psStatsOptions options;     ///< bitmask of calculated values
    7575}
    7676psStats;
    7777
    7878/** Do Statistics on an array.  Returns a status value. \ingroup MathGroup */
    79 psStats *psVectorStats(psStats * stats, // /< stats structure defines stats to be calculated and how
    80                        psVector * in,   // /< Vector to be analysed: must be F32
    81                        psVector * mask, // /< Ignore elements where (maskVector & maskVal) != 0: must be INT
     79psStats *psVectorStats(psStats * stats, ///< stats structure defines stats to be calculated and how
     80                       psVector * in,   ///< Vector to be analysed: must be F32
     81                       psVector * mask, ///< Ignore elements where (maskVector & maskVal) != 0: must be INT
    8282                       // or NULL
    83                        unsigned int maskVal     // /< Only mask elements with one of these bits set in
     83                       unsigned int maskVal     ///< Only mask elements with one of these bits set in
    8484                       // maskVector
    8585                      );
    8686
    8787/** A constructor for the stats structure.*/
    88 psStats *psStatsAlloc(psStatsOptions options);  // /< Statistics to measure
     88psStats *psStatsAlloc(psStatsOptions options);  ///< Statistics to measure
    8989
    9090/******************************************************************************
     
    9595typedef struct
    9696{
    97     psVector *bounds;           // /< Bounds for the bins (type F32)
    98     psVector *nums;             // /< Number in each of the bins (INT)
    99     int minNum;                 // /< Number below the minimum
    100     int maxNum;                 // /< Number above the maximum
    101     bool uniform;               // /< Is it a uniform distribution?
     97    psVector *bounds;           ///< Bounds for the bins (type F32)
     98    psVector *nums;             ///< Number in each of the bins (INT)
     99    int minNum;                 ///< Number below the minimum
     100    int maxNum;                 ///< Number above the maximum
     101    bool uniform;               ///< Is it a uniform distribution?
    102102}
    103103psHistogram;
    104104
    105105/** Constructor \ingroup MathGroup */
    106 psHistogram *psHistogramAlloc(float lower,      // /< Lower limit for the bins
    107                               float upper,      // /< Upper limit for the bins
    108                               int n);   // /< Number of bins
     106psHistogram *psHistogramAlloc(float lower,      ///< Lower limit for the bins
     107                              float upper,      ///< Upper limit for the bins
     108                              int n);   ///< Number of bins
    109109
    110110/** Generic constructor \ingroup MathGroup */
    111 psHistogram *psHistogramAllocGeneric(const psVector * restrict bounds); // /< Bounds for the bins
     111psHistogram *psHistogramAllocGeneric(const psVector * restrict bounds); ///< Bounds for the bins
    112112
    113113/** Calculate a histogram \ingroup MathGroup **/
    114 psHistogram *psVectorHistogram(psHistogram * out,       // /< Histogram data
    115                                const psVector * restrict in,    // /< Vector to analyse
    116                                const psVector * restrict mask,  // /< Mask dat for input vector
    117                                unsigned int maskVal);   // /< Mask value
     114psHistogram *psVectorHistogram(psHistogram * out,       ///< Histogram data
     115                               const psVector * restrict in,    ///< Vector to analyse
     116                               const psVector * restrict mask,  ///< Mask dat for input vector
     117                               unsigned int maskVal);   ///< Mask value
    118118
    119119bool p_psGetStatValue(const psStats * stats, double *value);
  • trunk/psLib/src/mathtypes/psImage.h

    r1407 r1426  
    1212 *  @author Ross Harman, MHPCC
    1313 *
    14  *  @version $Revision: 1.28 $ $Name: not supported by cvs2svn $
    15  *  @date $Date: 2004-08-07 00:06:06 $
     14 *  @version $Revision: 1.29 $ $Name: not supported by cvs2svn $
     15 *  @date $Date: 2004-08-09 22:44:25 $
    1616 *
    1717 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
    1818 */
    1919#ifndef PS_IMAGE_H
    20 #    define PS_IMAGE_H
     20#define PS_IMAGE_H
    2121
    22 #    include <complex.h>
     22#include <complex.h>
    2323
    24 #    include "psType.h"
     24#include "psType.h"
    2525
    2626/// @addtogroup Image
    2727/// @{
    2828
     29/** enumeration of options in interpolation
     30 *
     31 */
    2932typedef enum {
    30     PS_INTERPOLATE_FLAT,
    31     PS_INTERPOLATE_BILINEAR
     33    PS_INTERPOLATE_FLAT,               ///< 'flat' interpolation (nearest pixel)
     34    PS_INTERPOLATE_BILINEAR            ///< bi-linear interpolation
    3235} psImageInterpolateMode;
    3336
     
    4043typedef struct psImage
    4144{
    42     const psType type;          // /< Image data type and dimension.
    43     const unsigned int numCols; // /< Number of columns in image
    44     const unsigned int numRows; // /< Number of rows in image.
    45     const int col0;             // /< Column position relative to parent.
    46     const int row0;             // /< Row position relative to parent.
     45    const psType type;          ///< Image data type and dimension.
     46    const unsigned int numCols; ///< Number of columns in image
     47    const unsigned int numRows; ///< Number of rows in image.
     48    const int col0;             ///< Column position relative to parent.
     49    const int row0;             ///< Row position relative to parent.
    4750
    4851    union {
    49         psU8 **U8;              // /< Unsigned 8-bit integer data.
    50         psU16 **U16;            // /< Unsigned 16-bit integer data.
    51         psU32 **U32;            // /< Unsigned 32-bit integer data.
    52         psU64 **U64;            // /< Unsigned 64-bit integer data.
    53         psS8 **S8;              // /< Signed 8-bit integer data.
    54         psS16 **S16;            // /< Signed 16-bit integer data.
    55         psS32 **S32;            // /< Signed 32-bit integer data.
    56         psS64 **S64;            // /< Signed 64-bit integer data.
    57         psF32 **F32;            // /< Single-precision float data.
    58         psF64 **F64;            // /< Double-precision float data.
    59         psC32 **C32;            // /< Single-precision complex data.
    60         psC64 **C64;            // /< Double-precision complex data.
    61         psPTR **PTR;            // /< Void pointers.
    62         psPTR *V;               // /< Pointer to data.
    63     } data;                     // /< Union for data types.
    64     const struct psImage *parent;       // /< Parent, if a subimage.
    65     int nChildren;              // /< Number of subimages.
    66     struct psImage **children;  // /< Children of this region.
     52        psU8 **U8;              ///< Unsigned 8-bit integer data.
     53        psU16 **U16;            ///< Unsigned 16-bit integer data.
     54        psU32 **U32;            ///< Unsigned 32-bit integer data.
     55        psU64 **U64;            ///< Unsigned 64-bit integer data.
     56        psS8 **S8;              ///< Signed 8-bit integer data.
     57        psS16 **S16;            ///< Signed 16-bit integer data.
     58        psS32 **S32;            ///< Signed 32-bit integer data.
     59        psS64 **S64;            ///< Signed 64-bit integer data.
     60        psF32 **F32;            ///< Single-precision float data.
     61        psF64 **F64;            ///< Double-precision float data.
     62        psC32 **C32;            ///< Single-precision complex data.
     63        psC64 **C64;            ///< Double-precision complex data.
     64        psPTR **PTR;            ///< Void pointers.
     65        psPTR *V;               ///< Pointer to data.
     66    } data;                     ///< Union for data types.
     67    const struct psImage *parent;       ///< Parent, if a subimage.
     68    int nChildren;              ///< Number of subimages.
     69    struct psImage **children;  ///< Children of this region.
    6770}
    6871psImage;
     
    8285 *
    8386 */
    84 psImage *psImageAlloc(unsigned int numCols,     // /< Number of rows in image.
    85                       unsigned int numRows,     // /< Number of columns in image.
    86                       const psElemType type     // /< Type of data for image.
     87psImage *psImageAlloc(unsigned int numCols,     ///< Number of rows in image.
     88                      unsigned int numRows,     ///< Number of columns in image.
     89                      const psElemType type     ///< Type of data for image.
    8790                     );
    8891
     
    9295 *
    9396 */
    94 psImage *psImageRecycle(psImage * old,  // /< the psImage to recycle by resizing image buffer
    95                         unsigned int numCols,   // /< the desired number of columns in image
    96                         unsigned int numRows,   // /< the desired number of rows in image
    97                         const psElemType type   // /< the desired datatype of the image
     97psImage *psImageRecycle(psImage * old,  ///< the psImage to recycle by resizing image buffer
     98                        unsigned int numCols,   ///< the desired number of columns in image
     99                        unsigned int numRows,   ///< the desired number of rows in image
     100                        const psElemType type   ///< the desired datatype of the image
    98101                       );
    99102
  • trunk/psLib/src/mathtypes/psScalar.h

    r1407 r1426  
    1111 *  @author Ross Harman, MHPCC
    1212 *
    13  *  @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
    14  *  @date $Date: 2004-08-07 00:06:06 $
     13 *  @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
     14 *  @date $Date: 2004-08-09 22:44:25 $
    1515 *
    1616 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    3232typedef struct
    3333{
    34     psType type;                // /< Type of data.
     34    psType type;                ///< Type of data.
    3535
    3636    union {
    37         psU8 U8;                // /< Unsigned 8-bit integer data.
    38         psU16 U16;              // /< Unsigned 16-bit integer data.
    39         psU32 U32;              // /< Unsigned 32-bit integer data.
    40         psU64 U64;              // /< Unsigned 64-bit integer data.
    41         psS8 S8;                // /< Signed 8-bit integer data.
    42         psS16 S16;              // /< Signed 16-bit integer data.
    43         psS32 S32;              // /< Signed 32-bit integer data.
    44         psS64 S64;              // /< Signed 64-bit integer data.
    45         psF32 F32;              // /< Single-precision float data.
    46         psF64 F64;              // /< Double-precision float data.
    47         psC32 C32;              // /< Single-precision complex data.
    48         psC64 C64;              // /< Double-precision complex data.
    49     } data;                     // /< Union for data types.
     37        psU8 U8;                ///< Unsigned 8-bit integer data.
     38        psU16 U16;              ///< Unsigned 16-bit integer data.
     39        psU32 U32;              ///< Unsigned 32-bit integer data.
     40        psU64 U64;              ///< Unsigned 64-bit integer data.
     41        psS8 S8;                ///< Signed 8-bit integer data.
     42        psS16 S16;              ///< Signed 16-bit integer data.
     43        psS32 S32;              ///< Signed 32-bit integer data.
     44        psS64 S64;              ///< Signed 64-bit integer data.
     45        psF32 F32;              ///< Single-precision float data.
     46        psF64 F64;              ///< Double-precision float data.
     47        psC32 C32;              ///< Single-precision complex data.
     48        psC64 C64;              ///< Double-precision complex data.
     49    } data;                     ///< Union for data types.
    5050}
    5151psScalar;
     
    6565 *
    6666 */
    67 psScalar *psScalarAlloc(psC64 value,    // /< Data to be put into psScalar.
    68                         psElemType dataType     // /< Type of data to be held by psScalar.
     67psScalar *psScalarAlloc(psC64 value,    ///< Data to be put into psScalar.
     68                        psElemType dataType     ///< Type of data to be held by psScalar.
    6969                       );
    7070
     
    7676 *
    7777 */
    78 void psScalarFree(psScalar * restrict scalar    // /< Scalar to free.
     78void psScalarFree(psScalar * restrict scalar    ///< Scalar to free.
    7979                 );
    8080
  • trunk/psLib/src/mathtypes/psVector.h

    r1407 r1426  
    1212 *  @author Ross Harman, MHPCC
    1313 *
    14  *  @version $Revision: 1.16 $ $Name: not supported by cvs2svn $
    15  *  @date $Date: 2004-08-07 00:06:06 $
     14 *  @version $Revision: 1.17 $ $Name: not supported by cvs2svn $
     15 *  @date $Date: 2004-08-09 22:44:25 $
    1616 *
    1717 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    3333typedef struct
    3434{
    35     psType type;                // /< Type of data.
    36     unsigned int nalloc;        // /< Total number of elements available.
    37     unsigned int n;             // /< Number of elements in use.
     35    psType type;                ///< Type of data.
     36    unsigned int nalloc;        ///< Total number of elements available.
     37    unsigned int n;             ///< Number of elements in use.
    3838
    3939    union {
    40         psU8 *U8;               // /< Unsigned 8-bit integer data.
    41         psU16 *U16;             // /< Unsigned 16-bit integer data.
    42         psU32 *U32;             // /< Unsigned 32-bit integer data.
    43         psU64 *U64;             // /< Unsigned 64-bit integer data.
    44         psS8 *S8;               // /< Signed 8-bit integer data.
    45         psS16 *S16;             // /< Signed 16-bit integer data.
    46         psS32 *S32;             // /< Signed 32-bit integer data.
    47         psS64 *S64;             // /< Signed 64-bit integer data.
    48         psF32 *F32;             // /< Single-precision float data.
    49         psF64 *F64;             // /< Double-precision float data.
    50         psC32 *C32;             // /< Single-precision complex data.
    51         psC64 *C64;             // /< Double-precision complex data.
    52         psPTR V;                // /< Pointer to data.
    53     } data;                     // /< Union for data types.
     40        psU8 *U8;               ///< Unsigned 8-bit integer data.
     41        psU16 *U16;             ///< Unsigned 16-bit integer data.
     42        psU32 *U32;             ///< Unsigned 32-bit integer data.
     43        psU64 *U64;             ///< Unsigned 64-bit integer data.
     44        psS8 *S8;               ///< Signed 8-bit integer data.
     45        psS16 *S16;             ///< Signed 16-bit integer data.
     46        psS32 *S32;             ///< Signed 32-bit integer data.
     47        psS64 *S64;             ///< Signed 64-bit integer data.
     48        psF32 *F32;             ///< Single-precision float data.
     49        psF64 *F64;             ///< Double-precision float data.
     50        psC32 *C32;             ///< Single-precision complex data.
     51        psC64 *C64;             ///< Double-precision complex data.
     52        psPTR V;                ///< Pointer to data.
     53    } data;                     ///< Union for data types.
    5454}
    5555psVector;
     
    6868 *
    6969 */
    70 psVector *psVectorAlloc(unsigned int nalloc,    // /< Total number of elements to make available.
    71                         psElemType dataType     // /< Type of data to be held by vector.
     70psVector *psVectorAlloc(unsigned int nalloc,    ///< Total number of elements to make available.
     71                        psElemType dataType     ///< Type of data to be held by vector.
    7272                       );
    7373
     
    8080 *
    8181 */
    82 psVector *psVectorRealloc(unsigned int nalloc,  // /< Total number of elements to make available.
    83                           psVector * restrict psVec     // /< Vector to reallocate.
     82psVector *psVectorRealloc(unsigned int nalloc,  ///< Total number of elements to make available.
     83                          psVector * restrict psVec     ///< Vector to reallocate.
    8484                         );
    8585
     
    9393 */
    9494psVector *psVectorRecycle(psVector * restrict psVec,
    95                           // /< Vector to recycle.  If NULL, a new vector is created.  No effort taken to
     95                          ///< Vector to recycle.  If NULL, a new vector is created.  No effort taken to
    9696                          // preserve the values.
    97                           unsigned int nalloc,  // /< Total number of elements to make available.
    98                           psElemType type       // /< the datatype of the returned vector
     97                          unsigned int nalloc,  ///< Total number of elements to make available.
     98                          psElemType type       ///< the datatype of the returned vector
    9999                         );
    100100
     
    107107 */
    108108
    109 psVector *psVectorSort(psVector * restrict outVector,   // /< the output vector to recycle, or NULL if new
     109psVector *psVectorSort(psVector * restrict outVector,   ///< the output vector to recycle, or NULL if new
    110110                       // vector desired.
    111                        const psVector * restrict inVector       // /< the vector to sort.
     111                       const psVector * restrict inVector       ///< the vector to sort.
    112112                      );
    113113
  • trunk/psLib/src/sys/psAbort.h

    r1407 r1426  
    1212 *  @author Eric Van Alst, MHPCC
    1313 *
    14  *  @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
    15  *  @date $Date: 2004-08-07 00:06:06 $
     14 *  @version $Revision: 1.6 $ $Name: not supported by cvs2svn $
     15 *  @date $Date: 2004-08-09 22:44:25 $
    1616 *
    1717 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    3737 *
    3838 */
    39 void psAbort(const char *name,  // /< Source of abort such as file or function detected
    40              const char *fmt,   // /< A printf style formatting statement defining msg
     39void psAbort(const char *name,  ///< Source of abort such as file or function detected
     40             const char *fmt,   ///< A printf style formatting statement defining msg
    4141             ...
    4242            );
  • trunk/psLib/src/sys/psError.h

    r1407 r1426  
    1313 *  @author Eric Van Alst, MHPCC
    1414 *
    15  *  @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
    16  *  @date $Date: 2004-08-07 00:06:06 $
     15 *  @version $Revision: 1.6 $ $Name: not supported by cvs2svn $
     16 *  @date $Date: 2004-08-09 22:44:25 $
    1717 *
    1818 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    3535 *
    3636 */
    37 void psError(const char *name,  // /< Source of error such as file or function detected
    38              const char *fmt,   // /< A printf style formatting statement defining msg
     37void psError(const char *name,  ///< Source of error such as file or function detected
     38             const char *fmt,   ///< A printf style formatting statement defining msg
    3939             ...
    4040            );
  • trunk/psLib/src/sys/psLogMsg.h

    r1407 r1426  
    1212 *  @author George Gusciora, MHPCC
    1313 *
    14  *  @version $Revision: 1.13 $ $Name: not supported by cvs2svn $
    15  *  @date $Date: 2004-08-07 00:06:06 $
     14 *  @version $Revision: 1.14 $ $Name: not supported by cvs2svn $
     15 *  @date $Date: 2004-08-09 22:44:25 $
    1616 *
    1717 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    3030/// In future versions, this procedure will take a character string as an
    3131/// argument which can specify more general log destinations.
    32 int psLogSetDestination(const char *dest        // /< Specifies where to send messages.
     32int psLogSetDestination(const char *dest        ///< Specifies where to send messages.
    3333                       );
    3434
     
    3838/// Ie. higher values set by this procedure will cause more log messages to
    3939/// be displayed.
    40 int psLogSetLevel(int level     // /< Specifies the system log level
     40int psLogSetLevel(int level     ///< Specifies the system log level
    4141                 );
    4242
     
    4646/// Deleting a letter from the string will cause the associated information
    4747/// to not be logged.
    48 void psLogSetFormat(const char *fmt     // /< Specifies the system log format
     48void psLogSetFormat(const char *fmt     ///< Specifies the system log format
    4949                   );
    5050
     
    5353/// specified by a prior call to psLogSetLevel().  The message is specified
    5454/// with a printf-stype string an arguments.
    55 void psLogMsg(const char *name, // /< name of the log source
    56               int myLevel,      // /< severity level of this log message
    57               const char *fmt, ...      // /< printf-style format command
     55void psLogMsg(const char *name, ///< name of the log source
     56              int myLevel,      ///< severity level of this log message
     57              const char *fmt, ...      ///< printf-style format command
    5858             );
    5959
    6060/// This procedure is functionally equivalent to psLogMsg(), except that
    6161/// it takes a va_list as the message parameter, not a printf-style string.
    62 void psLogMsgV(const char *name,        // /< name of the log source
    63                int myLevel,     // /< severity level of this log message
    64                const char *fmt, // /< printf-style format command
    65                va_list ap       // /< varargs argument list
     62void psLogMsgV(const char *name,        ///< name of the log source
     63               int myLevel,     ///< severity level of this log message
     64               const char *fmt, ///< printf-style format command
     65               va_list ap       ///< varargs argument list
    6666              );
    6767
  • trunk/psLib/src/sys/psMemory.h

    r1407 r1426  
    1515 *  @ingroup MemoryManagement
    1616 *
    17  *  @version $Revision: 1.24 $ $Name: not supported by cvs2svn $
    18  *  @date $Date: 2004-08-07 00:06:06 $
     17 *  @version $Revision: 1.25 $ $Name: not supported by cvs2svn $
     18 *  @date $Date: 2004-08-09 22:44:25 $
    1919 *
    2020 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    6363typedef struct psMemBlock
    6464{
    65     const void *startblock;     // /< initialised to p_psMEMMAGIC
    66     struct psMemBlock *previousBlock;   // /< previous block in allocation list
    67     struct psMemBlock *nextBlock;       // /< next block allocation list
    68     psFreeFcn freeFcn;          // /< deallocator.  If NULL, use generic deallocation.
    69     size_t userMemorySize;      // /< the size of the user-portion of the memory block
    70     const psMemoryId id;        // /< a unique ID for this allocation
    71     const char *file;           // /< set from __FILE__ in e.g. p_psAlloc
    72     const int lineno;           // /< set from __LINE__ in e.g. p_psAlloc
    73     pthread_mutex_t refCounterMutex;    // /< mutex to ensure exclusive access to reference counter
    74     psReferenceCount refCounter;        // /< how many times pointer is referenced
    75     const void *endblock;       // /< initialised to p_psMEMMAGIC
     65    const void *startblock;     ///< initialised to p_psMEMMAGIC
     66    struct psMemBlock *previousBlock;   ///< previous block in allocation list
     67    struct psMemBlock *nextBlock;       ///< next block allocation list
     68    psFreeFcn freeFcn;          ///< deallocator.  If NULL, use generic deallocation.
     69    size_t userMemorySize;      ///< the size of the user-portion of the memory block
     70    const psMemoryId id;        ///< a unique ID for this allocation
     71    const char *file;           ///< set from __FILE__ in e.g. p_psAlloc
     72    const int lineno;           ///< set from __LINE__ in e.g. p_psAlloc
     73    pthread_mutex_t refCounterMutex;    ///< mutex to ensure exclusive access to reference counter
     74    psReferenceCount refCounter;        ///< how many times pointer is referenced
     75    const void *endblock;       ///< initialised to p_psMEMMAGIC
    7676}
    7777psMemBlock;
     
    8282 *  @ingroup memCallback
    8383 */
    84 typedef psMemoryId(*psMemAllocateCallback) (const psMemBlock * ptr      // /< the psMemBlock just allocated
     84typedef psMemoryId(*psMemAllocateCallback) (const psMemBlock * ptr      ///< the psMemBlock just allocated
    8585                                           );
    8686
     
    9090 *  @ingroup memCallback
    9191 */
    92 typedef psMemoryId(*psMemFreeCallback) (const psMemBlock * ptr  // /< the psMemBlock being freed
     92typedef psMemoryId(*psMemFreeCallback) (const psMemBlock * ptr  ///< the psMemBlock being freed
    9393                                       );
    9494
     
    100100 *  @ingroup memCallback
    101101 */
    102 typedef void (*psMemProblemCallback) (const psMemBlock * ptr,   // /< the pointer to the problematic memory
     102typedef void (*psMemProblemCallback) (const psMemBlock * ptr,   ///< the pointer to the problematic memory
    103103                                      // block.
    104                                       const char *file, // /< the file in which the problem originated
    105                                       int lineno        // /< the line number in which the problem originated
     104                                      const char *file, ///< the file in which the problem originated
     105                                      int lineno        ///< the line number in which the problem originated
    106106                                     );
    107107
     
    123123 */
    124124#    ifdef DOXYGEN
    125 void *psAlloc(size_t size       // /< Size required
     125void *psAlloc(size_t size       ///< Size required
    126126             );
    127127#    else
    128     void *p_psAlloc(size_t size,    // /< Size required
    129                     const char *file,       // /< File of call
    130                     int lineno      // /< Line number of call
     128
     129    void *p_psAlloc(size_t size,    ///< Size required
     130                    const char *file,       ///< File of call
     131                    int lineno      ///< Line number of call
    131132                   );
    132133
     
    144145 */
    145146#    ifdef DOXYGEN
    146 void *psRealloc(void *ptr       // /< Pointer to re-allocate
    147                 size_t size,    // /< Size required
     147void *psRealloc(void *ptr       ///< Pointer to re-allocate
     148                size_t size,    ///< Size required
    148149               );
    149150#    else
    150     void *p_psRealloc(void *ptr,    // /< Pointer to re-allocate
    151                       size_t size,  // /< Size required
    152                       const char *file,     // /< File of call
    153                       int lineno    // /< Line number of call
     151
     152    void *p_psRealloc(void *ptr,    ///< Pointer to re-allocate
     153                      size_t size,  ///< Size required
     154                      const char *file,     ///< File of call
     155                      int lineno    ///< Line number of call
    154156                     );
    155157
     
    164166 */
    165167#    ifdef DOXYGEN
    166 void psFree(void *ptr,          // /< Pointer to free, if NULL, function returns immediately.
     168void psFree(void *ptr,          ///< Pointer to free, if NULL, function returns immediately.
    167169           );
    168170#    else
    169     void p_psFree(void *ptr,        // /< Pointer to free
    170                   const char *file, // /< File of call
    171                   int lineno        // /< Line number of call
     171
     172    void p_psFree(void *ptr,        ///< Pointer to free
     173                  const char *file, ///< File of call
     174                  int lineno        ///< Line number of call
    172175                 );
    173176
     
    191194 *  @ingroup memTracing
    192195 */
    193 int psMemCheckLeaks(psMemoryId id0,     // /< don't list blocks with id < id0
    194                     psMemBlock *** arr, // /< pointer to array of pointers to leaked blocks, or NULL
    195                     FILE * fd   // /< print list of leaks to fd (or NULL)
     196int psMemCheckLeaks(psMemoryId id0,     ///< don't list blocks with id < id0
     197                    psMemBlock *** arr, ///< pointer to array of pointers to leaked blocks, or NULL
     198                    FILE * fd   ///< print list of leaks to fd (or NULL)
    196199                   );
    197200
     
    201204 *  @ingroup memTracing
    202205 */
    203 int psMemCheckCorruption(bool abort_on_error    // /< Abort on detecting corruption?
     206int psMemCheckCorruption(bool abort_on_error    ///< Abort on detecting corruption?
    204207                        );
    205208
     
    208211 *  @ingroup memRefCount
    209212 */
    210 psReferenceCount psMemGetRefCounter(void *vptr  // /< Pointer to get refCounter for
     213psReferenceCount psMemGetRefCounter(void *vptr  ///< Pointer to get refCounter for
    211214                                   );
    212215
     
    216219 */
    217220#    ifdef DOXYGEN
    218 void *psMemIncrRefCounter(void *vptr    // /< Pointer to increment refCounter, and return
     221void *psMemIncrRefCounter(void *vptr    ///< Pointer to increment refCounter, and return
    219222                         );
    220223#    else
    221     void *p_psMemIncrRefCounter(void *vptr, // /< Pointer to increment refCounter, and return
    222                                 const char *file,   // /< File of call
    223                                 int lineno  // /< Line number of call
     224
     225    void *p_psMemIncrRefCounter(void *vptr, ///< Pointer to increment refCounter, and return
     226                                const char *file,   ///< File of call
     227                                int lineno  ///< Line number of call
    224228                               );
    225229
     
    232236 */
    233237#    ifdef DOXYGEN
    234 void *psMemDecrRefCounter(void *vptr    // /< Pointer to decrement refCounter, and return
     238void *psMemDecrRefCounter(void *vptr    ///< Pointer to decrement refCounter, and return
    235239                         );
    236240#    else
    237     void *p_psMemDecrRefCounter(void *vptr, // /< Pointer to decrement refCounter, and return
    238                                 const char *file,   // /< File of call
    239                                 int lineno  // /< Line number of call
     241
     242    void *p_psMemDecrRefCounter(void *vptr, ///< Pointer to decrement refCounter, and return
     243                                const char *file,   ///< File of call
     244                                int lineno  ///< Line number of call
    240245                               );
    241246
     
    246251 *  @ingroup memCallback
    247252 */
    248 psMemProblemCallback psMemProblemCallbackSet(psMemProblemCallback func  // /< Function to run
     253psMemProblemCallback psMemProblemCallbackSet(psMemProblemCallback func  ///< Function to run
    249254                                            );
    250255
     
    253258 *  @ingroup memCallback
    254259 */
    255 psMemExhaustedCallback psMemExhaustedCallbackSet(psMemExhaustedCallback func    // /< Function to run
     260psMemExhaustedCallback psMemExhaustedCallbackSet(psMemExhaustedCallback func    ///< Function to run
    256261                                                );
    257262
     
    260265 *  @ingroup memCallback
    261266 */
    262 psMemAllocateCallback psMemAllocateCallbackSet(psMemAllocateCallback func       // /< Function to run
     267psMemAllocateCallback psMemAllocateCallbackSet(psMemAllocateCallback func       ///< Function to run
    263268                                              );
    264269
     
    267272 *  @ingroup memCallback
    268273 */
    269 psMemFreeCallback psMemFreeCallbackSet(psMemFreeCallback func   // /< Function to run
     274psMemFreeCallback psMemFreeCallbackSet(psMemFreeCallback func   ///< Function to run
    270275                                      );
    271276
     
    280285 *  @ingroup memCallback
    281286 */
    282 psMemoryId psMemAllocateCallbackSetID(psMemoryId id     // /< ID to set
     287psMemoryId psMemAllocateCallbackSetID(psMemoryId id     ///< ID to set
    283288                                     );
    284289
     
    287292 *  @ingroup memCallback
    288293 */
    289 psMemoryId psMemFreeCallbackSetID(psMemoryId id // /< ID to set
     294psMemoryId psMemFreeCallbackSetID(psMemoryId id ///< ID to set
    290295                                 );
    291296
  • trunk/psLib/src/sys/psTrace.h

    r1407 r1426  
    1010 *  @author George Gusciora, MHPCC
    1111 *
    12  *  @version $Revision: 1.12 $ $Name: not supported by cvs2svn $
    13  *  @date $Date: 2004-08-07 00:06:06 $
     12 *  @version $Revision: 1.13 $ $Name: not supported by cvs2svn $
     13 *  @date $Date: 2004-08-09 22:44:25 $
    1414 *
    1515 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    5959#        ifndef DOXYGEN
    6060/// Send a trace message
    61 void p_psTrace(const char *facil,       // /< facilty of interest
    62                int myLevel,     // /< desired trace level
    63                ...)             // /< trace message arguments
     61void p_psTrace(const char *facil,       ///< facilty of interest
     62               int myLevel,     ///< desired trace level
     63               ...)             ///< trace message arguments
    6464;
    6565#        endif
    6666
    6767/// Set trace level
    68 int psTraceSetLevel(const char *facil,     // /< facilty of interest
    69                     int level)     // /< desired trace level
     68int psTraceSetLevel(const char *facil,     ///< facilty of interest
     69                    int level)     ///< desired trace level
    7070;
    7171
    7272/// Get the trace level
    73 int psTraceGetLevel(const char *facil)     // /< facilty of interest
     73int psTraceGetLevel(const char *facil)     ///< facilty of interest
    7474;
    7575
  • trunk/psLib/src/sys/psType.h

    r1407 r1426  
    1111*  @author Ross Harman, MHPCC
    1212*
    13 *  @version $Revision: 1.17 $ $Name: not supported by cvs2svn $
    14 *  @date $Date: 2004-08-07 00:06:06 $
     13*  @version $Revision: 1.18 $ $Name: not supported by cvs2svn $
     14*  @date $Date: 2004-08-09 22:44:25 $
    1515*
    1616*  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    4040 */
    4141
    42 typedef uint8_t psU8;           // /< 8-bit unsigned int
    43 typedef uint16_t psU16;         // /< 16-bit unsigned int
    44 typedef uint32_t psU32;         // /< 32-bit unsigned int
    45 typedef uint64_t psU64;         // /< 64-bit unsigned int
    46 typedef int8_t psS8;            // /< 8-bit signed int
    47 typedef int16_t psS16;          // /< 16-bit signed int
    48 typedef int32_t psS32;          // /< 32-bit signed int
    49 typedef int64_t psS64;          // /< 64-bit signed int
    50 typedef float psF32;            // /< 32-bit floating point
    51 typedef double psF64;           // /< 64-bit floating point
    52 typedef complex float psC32;    // /< complex with 32-bit floating point Real and Imagary numbers
    53 typedef complex double psC64;   // /< complex with 64-bit floating point Real and Imagary numbers
    54 typedef void *psPTR;            // /< void pointer
     42typedef uint8_t psU8;           ///< 8-bit unsigned int
     43typedef uint16_t psU16;         ///< 16-bit unsigned int
     44typedef uint32_t psU32;         ///< 32-bit unsigned int
     45typedef uint64_t psU64;         ///< 64-bit unsigned int
     46typedef int8_t psS8;            ///< 8-bit signed int
     47typedef int16_t psS16;          ///< 16-bit signed int
     48typedef int32_t psS32;          ///< 32-bit signed int
     49typedef int64_t psS64;          ///< 64-bit signed int
     50typedef float psF32;            ///< 32-bit floating point
     51typedef double psF64;           ///< 64-bit floating point
     52typedef complex float psC32;    ///< complex with 32-bit floating point Real and Imagary numbers
     53typedef complex double psC64;   ///< complex with 64-bit floating point Real and Imagary numbers
     54typedef void *psPTR;            ///< void pointer
    5555
    5656typedef enum {
    57     PS_TYPE_S8 = 0x0101,        // /< Character.
    58     PS_TYPE_S16 = 0x0102,                  // /< Short integer.
    59     PS_TYPE_S32 = 0x0104,                  // /< Integer.
    60     PS_TYPE_S64 = 0x0108,                  // /< Long integer.
    61     PS_TYPE_U8 = 0x0301,                   // /< Unsigned character.
    62     PS_TYPE_U16 = 0x0302,                  // /< Unsigned short integer.
    63     PS_TYPE_U32 = 0x0304,                  // /< Unsigned integer.
    64     PS_TYPE_U64 = 0x0308,                  // /< Unsigned long integer.
    65     PS_TYPE_F32 = 0x0404,                  // /< Single-precision Floating point.
    66     PS_TYPE_F64 = 0x0408,                  // /< Double-precision floating point.
    67     PS_TYPE_C32 = 0x0808,                  // /< Complex numbers consisting of single-precision floating
     57    PS_TYPE_S8 = 0x0101,        ///< Character.
     58    PS_TYPE_S16 = 0x0102,                  ///< Short integer.
     59    PS_TYPE_S32 = 0x0104,                  ///< Integer.
     60    PS_TYPE_S64 = 0x0108,                  ///< Long integer.
     61    PS_TYPE_U8 = 0x0301,                   ///< Unsigned character.
     62    PS_TYPE_U16 = 0x0302,                  ///< Unsigned short integer.
     63    PS_TYPE_U32 = 0x0304,                  ///< Unsigned integer.
     64    PS_TYPE_U64 = 0x0308,                  ///< Unsigned long integer.
     65    PS_TYPE_F32 = 0x0404,                  ///< Single-precision Floating point.
     66    PS_TYPE_F64 = 0x0408,                  ///< Double-precision floating point.
     67    PS_TYPE_C32 = 0x0808,                  ///< Complex numbers consisting of single-precision floating
    6868    // point.
    69     PS_TYPE_C64 = 0x0810,                  // /< Complex numbers consisting of double-precision floating
     69    PS_TYPE_C64 = 0x0810,                  ///< Complex numbers consisting of double-precision floating
    7070    // point.
    71     PS_TYPE_PTR = 0x0000                   // /< Something else that's not supported for arithmetic.
     71    PS_TYPE_PTR = 0x0000                   ///< Something else that's not supported for arithmetic.
    7272} psElemType;
    7373
    74 #    define PS_TYPE_MASK PS_TYPE_U8        // /< the psElemType to use for mask image
    75 #    define PS_TYPE_MASK_DATA U8           // /< the data member to use for mask image
     74#    define PS_TYPE_MASK PS_TYPE_U8        ///< the psElemType to use for mask image
     75#    define PS_TYPE_MASK_DATA U8           ///< the data member to use for mask image
    7676#    define PS_TYPE_MASK_NAME "psU8"
    77 typedef psU8 psMaskType;        // /< the C datatype for a mask image
     77typedef psU8 psMaskType;        ///< the C datatype for a mask image
    7878
    7979#    define PS_MIN_S8        INT8_MIN
     
    132132 */
    133133typedef enum {
    134     PS_DIMEN_SCALAR,            // /< Scalar.
    135     PS_DIMEN_VECTOR,            // /< Vector.
    136     PS_DIMEN_TRANSV,            // /< Transposed vector.
    137     PS_DIMEN_IMAGE,             // /< Image.
    138     PS_DIMEN_OTHER              // /< Something else that's not supported for arithmetic.
     134    PS_DIMEN_SCALAR,            ///< Scalar.
     135    PS_DIMEN_VECTOR,            ///< Vector.
     136    PS_DIMEN_TRANSV,            ///< Transposed vector.
     137    PS_DIMEN_IMAGE,             ///< Image.
     138    PS_DIMEN_OTHER              ///< Something else that's not supported for arithmetic.
    139139} psDimen;
    140140
     
    147147typedef struct
    148148{
    149     psElemType type;            // /< Primitive type.
    150     psDimen dimen;              // /< Dimensionality.
     149    psElemType type;            ///< Primitive type.
     150    psDimen dimen;              ///< Dimensionality.
    151151}
    152152psType;
  • trunk/psLib/src/sysUtils/psAbort.h

    r1407 r1426  
    1212 *  @author Eric Van Alst, MHPCC
    1313 *
    14  *  @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
    15  *  @date $Date: 2004-08-07 00:06:06 $
     14 *  @version $Revision: 1.6 $ $Name: not supported by cvs2svn $
     15 *  @date $Date: 2004-08-09 22:44:25 $
    1616 *
    1717 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    3737 *
    3838 */
    39 void psAbort(const char *name,  // /< Source of abort such as file or function detected
    40              const char *fmt,   // /< A printf style formatting statement defining msg
     39void psAbort(const char *name,  ///< Source of abort such as file or function detected
     40             const char *fmt,   ///< A printf style formatting statement defining msg
    4141             ...
    4242            );
  • trunk/psLib/src/sysUtils/psError.h

    r1407 r1426  
    1313 *  @author Eric Van Alst, MHPCC
    1414 *
    15  *  @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
    16  *  @date $Date: 2004-08-07 00:06:06 $
     15 *  @version $Revision: 1.6 $ $Name: not supported by cvs2svn $
     16 *  @date $Date: 2004-08-09 22:44:25 $
    1717 *
    1818 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    3535 *
    3636 */
    37 void psError(const char *name,  // /< Source of error such as file or function detected
    38              const char *fmt,   // /< A printf style formatting statement defining msg
     37void psError(const char *name,  ///< Source of error such as file or function detected
     38             const char *fmt,   ///< A printf style formatting statement defining msg
    3939             ...
    4040            );
  • trunk/psLib/src/sysUtils/psLogMsg.h

    r1407 r1426  
    1212 *  @author George Gusciora, MHPCC
    1313 *
    14  *  @version $Revision: 1.13 $ $Name: not supported by cvs2svn $
    15  *  @date $Date: 2004-08-07 00:06:06 $
     14 *  @version $Revision: 1.14 $ $Name: not supported by cvs2svn $
     15 *  @date $Date: 2004-08-09 22:44:25 $
    1616 *
    1717 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    3030/// In future versions, this procedure will take a character string as an
    3131/// argument which can specify more general log destinations.
    32 int psLogSetDestination(const char *dest        // /< Specifies where to send messages.
     32int psLogSetDestination(const char *dest        ///< Specifies where to send messages.
    3333                       );
    3434
     
    3838/// Ie. higher values set by this procedure will cause more log messages to
    3939/// be displayed.
    40 int psLogSetLevel(int level     // /< Specifies the system log level
     40int psLogSetLevel(int level     ///< Specifies the system log level
    4141                 );
    4242
     
    4646/// Deleting a letter from the string will cause the associated information
    4747/// to not be logged.
    48 void psLogSetFormat(const char *fmt     // /< Specifies the system log format
     48void psLogSetFormat(const char *fmt     ///< Specifies the system log format
    4949                   );
    5050
     
    5353/// specified by a prior call to psLogSetLevel().  The message is specified
    5454/// with a printf-stype string an arguments.
    55 void psLogMsg(const char *name, // /< name of the log source
    56               int myLevel,      // /< severity level of this log message
    57               const char *fmt, ...      // /< printf-style format command
     55void psLogMsg(const char *name, ///< name of the log source
     56              int myLevel,      ///< severity level of this log message
     57              const char *fmt, ...      ///< printf-style format command
    5858             );
    5959
    6060/// This procedure is functionally equivalent to psLogMsg(), except that
    6161/// it takes a va_list as the message parameter, not a printf-style string.
    62 void psLogMsgV(const char *name,        // /< name of the log source
    63                int myLevel,     // /< severity level of this log message
    64                const char *fmt, // /< printf-style format command
    65                va_list ap       // /< varargs argument list
     62void psLogMsgV(const char *name,        ///< name of the log source
     63               int myLevel,     ///< severity level of this log message
     64               const char *fmt, ///< printf-style format command
     65               va_list ap       ///< varargs argument list
    6666              );
    6767
  • trunk/psLib/src/sysUtils/psMemory.h

    r1407 r1426  
    1515 *  @ingroup MemoryManagement
    1616 *
    17  *  @version $Revision: 1.24 $ $Name: not supported by cvs2svn $
    18  *  @date $Date: 2004-08-07 00:06:06 $
     17 *  @version $Revision: 1.25 $ $Name: not supported by cvs2svn $
     18 *  @date $Date: 2004-08-09 22:44:25 $
    1919 *
    2020 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    6363typedef struct psMemBlock
    6464{
    65     const void *startblock;     // /< initialised to p_psMEMMAGIC
    66     struct psMemBlock *previousBlock;   // /< previous block in allocation list
    67     struct psMemBlock *nextBlock;       // /< next block allocation list
    68     psFreeFcn freeFcn;          // /< deallocator.  If NULL, use generic deallocation.
    69     size_t userMemorySize;      // /< the size of the user-portion of the memory block
    70     const psMemoryId id;        // /< a unique ID for this allocation
    71     const char *file;           // /< set from __FILE__ in e.g. p_psAlloc
    72     const int lineno;           // /< set from __LINE__ in e.g. p_psAlloc
    73     pthread_mutex_t refCounterMutex;    // /< mutex to ensure exclusive access to reference counter
    74     psReferenceCount refCounter;        // /< how many times pointer is referenced
    75     const void *endblock;       // /< initialised to p_psMEMMAGIC
     65    const void *startblock;     ///< initialised to p_psMEMMAGIC
     66    struct psMemBlock *previousBlock;   ///< previous block in allocation list
     67    struct psMemBlock *nextBlock;       ///< next block allocation list
     68    psFreeFcn freeFcn;          ///< deallocator.  If NULL, use generic deallocation.
     69    size_t userMemorySize;      ///< the size of the user-portion of the memory block
     70    const psMemoryId id;        ///< a unique ID for this allocation
     71    const char *file;           ///< set from __FILE__ in e.g. p_psAlloc
     72    const int lineno;           ///< set from __LINE__ in e.g. p_psAlloc
     73    pthread_mutex_t refCounterMutex;    ///< mutex to ensure exclusive access to reference counter
     74    psReferenceCount refCounter;        ///< how many times pointer is referenced
     75    const void *endblock;       ///< initialised to p_psMEMMAGIC
    7676}
    7777psMemBlock;
     
    8282 *  @ingroup memCallback
    8383 */
    84 typedef psMemoryId(*psMemAllocateCallback) (const psMemBlock * ptr      // /< the psMemBlock just allocated
     84typedef psMemoryId(*psMemAllocateCallback) (const psMemBlock * ptr      ///< the psMemBlock just allocated
    8585                                           );
    8686
     
    9090 *  @ingroup memCallback
    9191 */
    92 typedef psMemoryId(*psMemFreeCallback) (const psMemBlock * ptr  // /< the psMemBlock being freed
     92typedef psMemoryId(*psMemFreeCallback) (const psMemBlock * ptr  ///< the psMemBlock being freed
    9393                                       );
    9494
     
    100100 *  @ingroup memCallback
    101101 */
    102 typedef void (*psMemProblemCallback) (const psMemBlock * ptr,   // /< the pointer to the problematic memory
     102typedef void (*psMemProblemCallback) (const psMemBlock * ptr,   ///< the pointer to the problematic memory
    103103                                      // block.
    104                                       const char *file, // /< the file in which the problem originated
    105                                       int lineno        // /< the line number in which the problem originated
     104                                      const char *file, ///< the file in which the problem originated
     105                                      int lineno        ///< the line number in which the problem originated
    106106                                     );
    107107
     
    123123 */
    124124#    ifdef DOXYGEN
    125 void *psAlloc(size_t size       // /< Size required
     125void *psAlloc(size_t size       ///< Size required
    126126             );
    127127#    else
    128     void *p_psAlloc(size_t size,    // /< Size required
    129                     const char *file,       // /< File of call
    130                     int lineno      // /< Line number of call
     128
     129    void *p_psAlloc(size_t size,    ///< Size required
     130                    const char *file,       ///< File of call
     131                    int lineno      ///< Line number of call
    131132                   );
    132133
     
    144145 */
    145146#    ifdef DOXYGEN
    146 void *psRealloc(void *ptr       // /< Pointer to re-allocate
    147                 size_t size,    // /< Size required
     147void *psRealloc(void *ptr       ///< Pointer to re-allocate
     148                size_t size,    ///< Size required
    148149               );
    149150#    else
    150     void *p_psRealloc(void *ptr,    // /< Pointer to re-allocate
    151                       size_t size,  // /< Size required
    152                       const char *file,     // /< File of call
    153                       int lineno    // /< Line number of call
     151
     152    void *p_psRealloc(void *ptr,    ///< Pointer to re-allocate
     153                      size_t size,  ///< Size required
     154                      const char *file,     ///< File of call
     155                      int lineno    ///< Line number of call
    154156                     );
    155157
     
    164166 */
    165167#    ifdef DOXYGEN
    166 void psFree(void *ptr,          // /< Pointer to free, if NULL, function returns immediately.
     168void psFree(void *ptr,          ///< Pointer to free, if NULL, function returns immediately.
    167169           );
    168170#    else
    169     void p_psFree(void *ptr,        // /< Pointer to free
    170                   const char *file, // /< File of call
    171                   int lineno        // /< Line number of call
     171
     172    void p_psFree(void *ptr,        ///< Pointer to free
     173                  const char *file, ///< File of call
     174                  int lineno        ///< Line number of call
    172175                 );
    173176
     
    191194 *  @ingroup memTracing
    192195 */
    193 int psMemCheckLeaks(psMemoryId id0,     // /< don't list blocks with id < id0
    194                     psMemBlock *** arr, // /< pointer to array of pointers to leaked blocks, or NULL
    195                     FILE * fd   // /< print list of leaks to fd (or NULL)
     196int psMemCheckLeaks(psMemoryId id0,     ///< don't list blocks with id < id0
     197                    psMemBlock *** arr, ///< pointer to array of pointers to leaked blocks, or NULL
     198                    FILE * fd   ///< print list of leaks to fd (or NULL)
    196199                   );
    197200
     
    201204 *  @ingroup memTracing
    202205 */
    203 int psMemCheckCorruption(bool abort_on_error    // /< Abort on detecting corruption?
     206int psMemCheckCorruption(bool abort_on_error    ///< Abort on detecting corruption?
    204207                        );
    205208
     
    208211 *  @ingroup memRefCount
    209212 */
    210 psReferenceCount psMemGetRefCounter(void *vptr  // /< Pointer to get refCounter for
     213psReferenceCount psMemGetRefCounter(void *vptr  ///< Pointer to get refCounter for
    211214                                   );
    212215
     
    216219 */
    217220#    ifdef DOXYGEN
    218 void *psMemIncrRefCounter(void *vptr    // /< Pointer to increment refCounter, and return
     221void *psMemIncrRefCounter(void *vptr    ///< Pointer to increment refCounter, and return
    219222                         );
    220223#    else
    221     void *p_psMemIncrRefCounter(void *vptr, // /< Pointer to increment refCounter, and return
    222                                 const char *file,   // /< File of call
    223                                 int lineno  // /< Line number of call
     224
     225    void *p_psMemIncrRefCounter(void *vptr, ///< Pointer to increment refCounter, and return
     226                                const char *file,   ///< File of call
     227                                int lineno  ///< Line number of call
    224228                               );
    225229
     
    232236 */
    233237#    ifdef DOXYGEN
    234 void *psMemDecrRefCounter(void *vptr    // /< Pointer to decrement refCounter, and return
     238void *psMemDecrRefCounter(void *vptr    ///< Pointer to decrement refCounter, and return
    235239                         );
    236240#    else
    237     void *p_psMemDecrRefCounter(void *vptr, // /< Pointer to decrement refCounter, and return
    238                                 const char *file,   // /< File of call
    239                                 int lineno  // /< Line number of call
     241
     242    void *p_psMemDecrRefCounter(void *vptr, ///< Pointer to decrement refCounter, and return
     243                                const char *file,   ///< File of call
     244                                int lineno  ///< Line number of call
    240245                               );
    241246
     
    246251 *  @ingroup memCallback
    247252 */
    248 psMemProblemCallback psMemProblemCallbackSet(psMemProblemCallback func  // /< Function to run
     253psMemProblemCallback psMemProblemCallbackSet(psMemProblemCallback func  ///< Function to run
    249254                                            );
    250255
     
    253258 *  @ingroup memCallback
    254259 */
    255 psMemExhaustedCallback psMemExhaustedCallbackSet(psMemExhaustedCallback func    // /< Function to run
     260psMemExhaustedCallback psMemExhaustedCallbackSet(psMemExhaustedCallback func    ///< Function to run
    256261                                                );
    257262
     
    260265 *  @ingroup memCallback
    261266 */
    262 psMemAllocateCallback psMemAllocateCallbackSet(psMemAllocateCallback func       // /< Function to run
     267psMemAllocateCallback psMemAllocateCallbackSet(psMemAllocateCallback func       ///< Function to run
    263268                                              );
    264269
     
    267272 *  @ingroup memCallback
    268273 */
    269 psMemFreeCallback psMemFreeCallbackSet(psMemFreeCallback func   // /< Function to run
     274psMemFreeCallback psMemFreeCallbackSet(psMemFreeCallback func   ///< Function to run
    270275                                      );
    271276
     
    280285 *  @ingroup memCallback
    281286 */
    282 psMemoryId psMemAllocateCallbackSetID(psMemoryId id     // /< ID to set
     287psMemoryId psMemAllocateCallbackSetID(psMemoryId id     ///< ID to set
    283288                                     );
    284289
     
    287292 *  @ingroup memCallback
    288293 */
    289 psMemoryId psMemFreeCallbackSetID(psMemoryId id // /< ID to set
     294psMemoryId psMemFreeCallbackSetID(psMemoryId id ///< ID to set
    290295                                 );
    291296
  • trunk/psLib/src/sysUtils/psTrace.h

    r1407 r1426  
    1010 *  @author George Gusciora, MHPCC
    1111 *
    12  *  @version $Revision: 1.12 $ $Name: not supported by cvs2svn $
    13  *  @date $Date: 2004-08-07 00:06:06 $
     12 *  @version $Revision: 1.13 $ $Name: not supported by cvs2svn $
     13 *  @date $Date: 2004-08-09 22:44:25 $
    1414 *
    1515 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    5959#        ifndef DOXYGEN
    6060/// Send a trace message
    61 void p_psTrace(const char *facil,       // /< facilty of interest
    62                int myLevel,     // /< desired trace level
    63                ...)             // /< trace message arguments
     61void p_psTrace(const char *facil,       ///< facilty of interest
     62               int myLevel,     ///< desired trace level
     63               ...)             ///< trace message arguments
    6464;
    6565#        endif
    6666
    6767/// Set trace level
    68 int psTraceSetLevel(const char *facil,     // /< facilty of interest
    69                     int level)     // /< desired trace level
     68int psTraceSetLevel(const char *facil,     ///< facilty of interest
     69                    int level)     ///< desired trace level
    7070;
    7171
    7272/// Get the trace level
    73 int psTraceGetLevel(const char *facil)     // /< facilty of interest
     73int psTraceGetLevel(const char *facil)     ///< facilty of interest
    7474;
    7575
  • trunk/psLib/src/sysUtils/psType.h

    r1407 r1426  
    1111*  @author Ross Harman, MHPCC
    1212*
    13 *  @version $Revision: 1.17 $ $Name: not supported by cvs2svn $
    14 *  @date $Date: 2004-08-07 00:06:06 $
     13*  @version $Revision: 1.18 $ $Name: not supported by cvs2svn $
     14*  @date $Date: 2004-08-09 22:44:25 $
    1515*
    1616*  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    4040 */
    4141
    42 typedef uint8_t psU8;           // /< 8-bit unsigned int
    43 typedef uint16_t psU16;         // /< 16-bit unsigned int
    44 typedef uint32_t psU32;         // /< 32-bit unsigned int
    45 typedef uint64_t psU64;         // /< 64-bit unsigned int
    46 typedef int8_t psS8;            // /< 8-bit signed int
    47 typedef int16_t psS16;          // /< 16-bit signed int
    48 typedef int32_t psS32;          // /< 32-bit signed int
    49 typedef int64_t psS64;          // /< 64-bit signed int
    50 typedef float psF32;            // /< 32-bit floating point
    51 typedef double psF64;           // /< 64-bit floating point
    52 typedef complex float psC32;    // /< complex with 32-bit floating point Real and Imagary numbers
    53 typedef complex double psC64;   // /< complex with 64-bit floating point Real and Imagary numbers
    54 typedef void *psPTR;            // /< void pointer
     42typedef uint8_t psU8;           ///< 8-bit unsigned int
     43typedef uint16_t psU16;         ///< 16-bit unsigned int
     44typedef uint32_t psU32;         ///< 32-bit unsigned int
     45typedef uint64_t psU64;         ///< 64-bit unsigned int
     46typedef int8_t psS8;            ///< 8-bit signed int
     47typedef int16_t psS16;          ///< 16-bit signed int
     48typedef int32_t psS32;          ///< 32-bit signed int
     49typedef int64_t psS64;          ///< 64-bit signed int
     50typedef float psF32;            ///< 32-bit floating point
     51typedef double psF64;           ///< 64-bit floating point
     52typedef complex float psC32;    ///< complex with 32-bit floating point Real and Imagary numbers
     53typedef complex double psC64;   ///< complex with 64-bit floating point Real and Imagary numbers
     54typedef void *psPTR;            ///< void pointer
    5555
    5656typedef enum {
    57     PS_TYPE_S8 = 0x0101,        // /< Character.
    58     PS_TYPE_S16 = 0x0102,                  // /< Short integer.
    59     PS_TYPE_S32 = 0x0104,                  // /< Integer.
    60     PS_TYPE_S64 = 0x0108,                  // /< Long integer.
    61     PS_TYPE_U8 = 0x0301,                   // /< Unsigned character.
    62     PS_TYPE_U16 = 0x0302,                  // /< Unsigned short integer.
    63     PS_TYPE_U32 = 0x0304,                  // /< Unsigned integer.
    64     PS_TYPE_U64 = 0x0308,                  // /< Unsigned long integer.
    65     PS_TYPE_F32 = 0x0404,                  // /< Single-precision Floating point.
    66     PS_TYPE_F64 = 0x0408,                  // /< Double-precision floating point.
    67     PS_TYPE_C32 = 0x0808,                  // /< Complex numbers consisting of single-precision floating
     57    PS_TYPE_S8 = 0x0101,        ///< Character.
     58    PS_TYPE_S16 = 0x0102,                  ///< Short integer.
     59    PS_TYPE_S32 = 0x0104,                  ///< Integer.
     60    PS_TYPE_S64 = 0x0108,                  ///< Long integer.
     61    PS_TYPE_U8 = 0x0301,                   ///< Unsigned character.
     62    PS_TYPE_U16 = 0x0302,                  ///< Unsigned short integer.
     63    PS_TYPE_U32 = 0x0304,                  ///< Unsigned integer.
     64    PS_TYPE_U64 = 0x0308,                  ///< Unsigned long integer.
     65    PS_TYPE_F32 = 0x0404,                  ///< Single-precision Floating point.
     66    PS_TYPE_F64 = 0x0408,                  ///< Double-precision floating point.
     67    PS_TYPE_C32 = 0x0808,                  ///< Complex numbers consisting of single-precision floating
    6868    // point.
    69     PS_TYPE_C64 = 0x0810,                  // /< Complex numbers consisting of double-precision floating
     69    PS_TYPE_C64 = 0x0810,                  ///< Complex numbers consisting of double-precision floating
    7070    // point.
    71     PS_TYPE_PTR = 0x0000                   // /< Something else that's not supported for arithmetic.
     71    PS_TYPE_PTR = 0x0000                   ///< Something else that's not supported for arithmetic.
    7272} psElemType;
    7373
    74 #    define PS_TYPE_MASK PS_TYPE_U8        // /< the psElemType to use for mask image
    75 #    define PS_TYPE_MASK_DATA U8           // /< the data member to use for mask image
     74#    define PS_TYPE_MASK PS_TYPE_U8        ///< the psElemType to use for mask image
     75#    define PS_TYPE_MASK_DATA U8           ///< the data member to use for mask image
    7676#    define PS_TYPE_MASK_NAME "psU8"
    77 typedef psU8 psMaskType;        // /< the C datatype for a mask image
     77typedef psU8 psMaskType;        ///< the C datatype for a mask image
    7878
    7979#    define PS_MIN_S8        INT8_MIN
     
    132132 */
    133133typedef enum {
    134     PS_DIMEN_SCALAR,            // /< Scalar.
    135     PS_DIMEN_VECTOR,            // /< Vector.
    136     PS_DIMEN_TRANSV,            // /< Transposed vector.
    137     PS_DIMEN_IMAGE,             // /< Image.
    138     PS_DIMEN_OTHER              // /< Something else that's not supported for arithmetic.
     134    PS_DIMEN_SCALAR,            ///< Scalar.
     135    PS_DIMEN_VECTOR,            ///< Vector.
     136    PS_DIMEN_TRANSV,            ///< Transposed vector.
     137    PS_DIMEN_IMAGE,             ///< Image.
     138    PS_DIMEN_OTHER              ///< Something else that's not supported for arithmetic.
    139139} psDimen;
    140140
     
    147147typedef struct
    148148{
    149     psElemType type;            // /< Primitive type.
    150     psDimen dimen;              // /< Dimensionality.
     149    psElemType type;            ///< Primitive type.
     150    psDimen dimen;              ///< Dimensionality.
    151151}
    152152psType;
  • trunk/psLib/src/types/psArray.h

    r1407 r1426  
    1212 *  @author Ross Harman, MHPCC
    1313 *
    14  *  @version $Revision: 1.12 $ $Name: not supported by cvs2svn $
    15  *  @date $Date: 2004-08-07 00:06:06 $
     14 *  @version $Revision: 1.13 $ $Name: not supported by cvs2svn $
     15 *  @date $Date: 2004-08-09 22:44:25 $
    1616 *
    1717 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    3434typedef struct
    3535{
    36     unsigned int nalloc;        // /< Total number of elements available.
    37     unsigned int n;             // /< Number of elements in use.
    38     psPTR *data;                // /< An Array of pointer elements
     36    unsigned int nalloc;        ///< Total number of elements available.
     37    unsigned int n;             ///< Number of elements in use.
     38    psPTR *data;                ///< An Array of pointer elements
    3939}
    4040psArray;
     
    5454 *
    5555 */
    56 psArray *psArrayAlloc(unsigned int nalloc       // /< Total number of elements to make available.
     56psArray *psArrayAlloc(unsigned int nalloc       ///< Total number of elements to make available.
    5757                     );
    5858
     
    6565 *
    6666 */
    67 psArray *psArrayRealloc(unsigned int nalloc,    // /< Total number of elements to make available.
    68                         psArray * restrict psArr        // /< array to reallocate.
     67psArray *psArrayRealloc(unsigned int nalloc,    ///< Total number of elements to make available.
     68                        psArray * restrict psArr        ///< array to reallocate.
    6969                       );
    7070
     
    7676 *
    7777 */
    78 void psArrayElementFree(psArray * restrict psArr        // /< Void pointer array to destroy.
     78void psArrayElementFree(psArray * restrict psArr        ///< Void pointer array to destroy.
    7979                       );
    8080
  • trunk/psLib/src/types/psHash.h

    r1420 r1426  
    1111 *  @author George Gusciora, MHPCC
    1212 *   
    13  *  @version $Revision: 1.1 $ $Name: not supported by cvs2svn $
    14  *  @date $Date: 2004-08-09 20:29:43 $
     13 *  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
     14 *  @date $Date: 2004-08-09 22:44:25 $
    1515 *
    1616 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    2929typedef struct psHashBucket
    3030{
    31     char *key;                  // /< key for this item of data
    32     void *data;                 // /< the data itself
    33     struct psHashBucket *next;  // /< list of other possible keys
     31    char *key;                  ///< key for this item of data
     32    void *data;                 ///< the data itself
     33    struct psHashBucket *next;  ///< list of other possible keys
    3434}
    3535psHashBucket;
     
    4040typedef struct psHash
    4141{
    42     int nbucket;                // /< Number of buckets in hash table.
    43     psHashBucket **buckets;     // /< The bucket data.
     42    int nbucket;                ///< Number of buckets in hash table.
     43    psHashBucket **buckets;     ///< The bucket data.
    4444}
    4545psHash;
    4646
    4747/// Allocate hash buckets in table.
    48 psHash *psHashAlloc(int nbucket // /< The number of buckets to allocate.
     48psHash *psHashAlloc(int nbucket ///< The number of buckets to allocate.
    4949                   );
    5050
    5151/// Insert entry into table.
    52 bool psHashAdd(psHash * table,  // /< table to insert in
    53                const char *key, // /< key to use
    54                void *data       // /< data to insert
     52bool psHashAdd(psHash * table,  ///< table to insert in
     53               const char *key, ///< key to use
     54               void *data       ///< data to insert
    5555              );
    5656
    5757/// Lookup key in table.
    58 void *psHashLookup(psHash * table,      // /< table to lookup key in
    59                    const char *key      // /< key to lookup
     58void *psHashLookup(psHash * table,      ///< table to lookup key in
     59                   const char *key      ///< key to lookup
    6060                  );
    6161
    6262/// Remove key from table.
    63 bool psHashRemove(psHash * table,       // /< table to lookup key in
    64                   const char *key       // /< key to lookup
     63bool psHashRemove(psHash * table,       ///< table to lookup key in
     64                  const char *key       ///< key to lookup
    6565                 );
    6666
    6767/// List all keys in table.
    68 psList *psHashKeyList(psHash * table    // /< table to list keys from.
     68psList *psHashKeyList(psHash * table    ///< table to list keys from.
    6969                     );
    7070
  • trunk/psLib/src/types/psList.h

    r1407 r1426  
    1010 *  @ingroup LinkedList
    1111 *
    12  *  @version $Revision: 1.10 $ $Name: not supported by cvs2svn $
    13  *  @date $Date: 2004-08-07 00:06:06 $
     12 *  @version $Revision: 1.11 $ $Name: not supported by cvs2svn $
     13 *  @date $Date: 2004-08-09 22:44:25 $
    1414 *
    1515 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    3333 */
    3434enum {
    35     PS_LIST_HEAD = 0,           // /< at head
    36     PS_LIST_TAIL = -1,                     // /< at tail
    37     PS_LIST_PREVIOUS = -2,                 // /< previous element
    38     PS_LIST_CURRENT = -3,                  // /< current element
    39     PS_LIST_NEXT = -4,                     // /< next element
    40     PS_LIST_UNKNOWN = -5                   // /< unknown position (should be last in enum list)
     35    PS_LIST_HEAD = 0,           ///< at head
     36    PS_LIST_TAIL = -1,                     ///< at tail
     37    PS_LIST_PREVIOUS = -2,                 ///< previous element
     38    PS_LIST_CURRENT = -3,                  ///< current element
     39    PS_LIST_NEXT = -4,                     ///< next element
     40    PS_LIST_UNKNOWN = -5                   ///< unknown position (should be last in enum list)
    4141};
    4242
     
    4444typedef struct psListElem
    4545{
    46     struct psListElem *prev;    // /< previous link in list
    47     struct psListElem *next;    // /< next link in list
    48     void *data;                 // /< real data item
     46    struct psListElem *prev;    ///< previous link in list
     47    struct psListElem *next;    ///< next link in list
     48    void *data;                 ///< real data item
    4949}
    5050psListElem;
     
    5757typedef struct
    5858{
    59     unsigned int size;          // /< number of elements on list
    60     psListElem *head;           // /< first element on list (may be NULL)
    61     psListElem *tail;           // /< last element on list (may be NULL)
    62     psListElem *iter;           // /< iteration cursor
    63     unsigned int iterIndex;     // /< the numeric position of the iteration cursor in the list
    64     pthread_mutex_t lock;       // /< mutex to lock a node during changes
     59    unsigned int size;          ///< number of elements on list
     60    psListElem *head;           ///< first element on list (may be NULL)
     61    psListElem *tail;           ///< last element on list (may be NULL)
     62    psListElem *iter;           ///< iteration cursor
     63    unsigned int iterIndex;     ///< the numeric position of the iteration cursor in the list
     64    pthread_mutex_t lock;       ///< mutex to lock a node during changes
    6565}
    6666psList;
     
    7171 */
    7272psList *psListAlloc(void *data
    73                     // /< initial data item; may be NULL if no an empty psList is desired
     73                    ///< initial data item; may be NULL if no an empty psList is desired
    7474                   )
    7575;
     
    8080 *                      NULL, the return value will also be NULL.
    8181 */
    82 bool psListAdd(psList * restrict list,  // /< list to add to (if NULL, nothing is done)
    83                void *data,      // /< data item to add.  If NULL, list is not modified.
    84                int where        // /< index, PS_LIST_HEAD, PS_LIST_TAIL, or numbered location.
     82bool psListAdd(psList * restrict list,  ///< list to add to (if NULL, nothing is done)
     83               void *data,      ///< data item to add.  If NULL, list is not modified.
     84               int where        ///< index, PS_LIST_HEAD, PS_LIST_TAIL, or numbered location.
    8585              );
    8686
     
    9090 */
    9191bool psListRemove(psList * restrict list,
    92                   // /< list to remove element from
     92                  ///< list to remove element from
    9393                  void *data,
    94                   // /< if which is PS_LIST_UNKNOWN, data item to find and remove, otherwise this is ignored.
     94                  ///< if which is PS_LIST_UNKNOWN, data item to find and remove, otherwise this is ignored.
    9595                  int which
    96                   // /< index of item, or PS_LIST_UNKNOWN, PS_LIST_NEXT, PS_LIST_PREV, or numbered location.
     96                  ///< index of item, or PS_LIST_UNKNOWN, PS_LIST_NEXT, PS_LIST_PREV, or numbered location.
    9797                 );
    9898
     
    104104 *                      NULL is returned.
    105105 */
    106 void *psListGet(psList * restrict list, // /< list to retrieve element from
    107                 int which       // /< index number, or PS_LIST_NEXT, PS_LIST_PREV, PS_LIST_UNKNOWN
     106void *psListGet(psList * restrict list, ///< list to retrieve element from
     107                int which       ///< index number, or PS_LIST_NEXT, PS_LIST_PREV, PS_LIST_UNKNOWN
    108108               );
    109109
     
    112112 *
    113113 */
    114 void psListSetIterator(psList * restrict list,  // /< list to retrieve element from
    115                        int where        // /< index number, PS_LIST_HEAD, or PS_LIST_TAIL
     114void psListSetIterator(psList * restrict list,  ///< list to retrieve element from
     115                       int where        ///< index number, PS_LIST_HEAD, or PS_LIST_TAIL
    116116                      );
    117117
     
    123123 *                      parameter was NULL.
    124124 */
    125 void *psListGetNext(psList * restrict list      // /< list to retrieve element from
     125void *psListGetNext(psList * restrict list      ///< list to retrieve element from
    126126                   );
    127127
     
    133133 *                      iterator is not valid or list parameter was NULL.
    134134 */
    135 void *psListGetCurrent(psList * restrict list   // /< list to retrieve element from
     135void *psListGetCurrent(psList * restrict list   ///< list to retrieve element from
    136136                      );
    137137
     
    143143 *                      parameter was NULL.
    144144 */
    145 void *psListGetPrevious(psList * restrict list  // /< list to retrieve element from
     145void *psListGetPrevious(psList * restrict list  ///< list to retrieve element from
    146146                       );
    147147
     
    151151 *                      or NULL if the given dlist parameter is NULL.
    152152 */
    153 psArray *psListToArray(psList * dlist   // /< List to convert
     153psArray *psListToArray(psList * dlist   ///< List to convert
    154154                      );
    155155
     
    159159 *                      or NULL is the given arr parameter is NULL.
    160160 */
    161 psList *psArrayToList(psArray * arr     // /< vector to convert
     161psList *psArrayToList(psArray * arr     ///< vector to convert
    162162                     );
    163163
  • trunk/psLib/src/types/psMetadata.h

    r1407 r1426  
    1111*  @author Ross Harman, MHPCC
    1212*
    13 *  @version $Revision: 1.16 $ $Name: not supported by cvs2svn $
    14 *  @date $Date: 2004-08-07 00:06:06 $
     13*  @version $Revision: 1.17 $ $Name: not supported by cvs2svn $
     14*  @date $Date: 2004-08-09 22:44:25 $
    1515*
    1616*  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    3434 */
    3535typedef enum {
    36     PS_META_ITEM_SET = 0,       // /< Null. Metadata is in psMetadataItem.items
    37     PS_META_BOOL,                          // /< Boolean data.
    38     PS_META_S32,                           // /< Signed 32-bit integer data.
    39     PS_META_F32,                           // /< Single-precision float data.
    40     PS_META_F64,                           // /< Double-precision float data.
    41     PS_META_STR,                           // /< String data (Stored in as void *).
    42     PS_META_IMG,                           // /< Image data (Stored in as void *).
    43     PS_META_JPEG,                          // /< JPEG data (Stored in as void .
    44     PS_META_PNG,                           // /< PNG data (Stored in as void *).
    45     PS_META_ASTROM,                        // /< Astrometric coefficients (Stored in as void *).
    46     PS_META_UNKNOWN,                       // /< Other data (Stored in as void *).
    47     PS_META_NTYPE                          // /< Number of types. Must be last.
     36    PS_META_ITEM_SET = 0,       ///< Null. Metadata is in psMetadataItem.items
     37    PS_META_BOOL,                          ///< Boolean data.
     38    PS_META_S32,                           ///< Signed 32-bit integer data.
     39    PS_META_F32,                           ///< Single-precision float data.
     40    PS_META_F64,                           ///< Double-precision float data.
     41    PS_META_STR,                           ///< String data (Stored in as void *).
     42    PS_META_IMG,                           ///< Image data (Stored in as void *).
     43    PS_META_JPEG,                          ///< JPEG data (Stored in as void .
     44    PS_META_PNG,                           ///< PNG data (Stored in as void *).
     45    PS_META_ASTROM,                        ///< Astrometric coefficients (Stored in as void *).
     46    PS_META_UNKNOWN,                       ///< Other data (Stored in as void *).
     47    PS_META_NTYPE                          ///< Number of types. Must be last.
    4848} psMetadataType;
    4949
     
    5555typedef struct psMetadataItem
    5656{
    57     const int id;               // /< Unique ID for metadata item.
    58     char *restrict name;        // /< Name of metadata item.
    59     psMetadataType type;        // /< Type of metadata item.
     57    const int id;               ///< Unique ID for metadata item.
     58    char *restrict name;        ///< Name of metadata item.
     59    psMetadataType type;        ///< Type of metadata item.
    6060    union {
    6161        bool B;
    62         psS32 S32;              // /< Signed 32-bit integer data.
    63         psF32 F32;              // /< Single-precision float data.
    64         psF64 F64;              // /< Double-precision float data.
    65         psPTR V;                // /< Pointer to other type of data.
    66     } data;                     // /< Union for data types.
    67     char *comment;              // /< Optional comment ("", not NULL).
    68     psList *restrict items;     // /< List of psMetadataItems with same name.
     62        psS32 S32;              ///< Signed 32-bit integer data.
     63        psF32 F32;              ///< Single-precision float data.
     64        psF64 F64;              ///< Double-precision float data.
     65        psPTR V;                ///< Pointer to other type of data.
     66    } data;                     ///< Union for data types.
     67    char *comment;              ///< Optional comment ("", not NULL).
     68    psList *restrict items;     ///< List of psMetadataItems with same name.
    6969}
    7070psMetadataItem;
     
    102102 * @return psMetadataItem*: Pointer metadata item.
    103103 */
    104 psMetadataItem *psMetadataItemAlloc(const char *name,   // /< Name of metadata item.
    105                                     psMetadataType type,        // /< Type of metadata item.
    106                                     const char *comment,        // /< Comment for metadata item.
    107                                     ... // /< Arguments for name formatting and metadata item data.
     104psMetadataItem *psMetadataItemAlloc(const char *name,   ///< Name of metadata item.
     105                                    psMetadataType type,        ///< Type of metadata item.
     106                                    const char *comment,        ///< Comment for metadata item.
     107                                    ... ///< Arguments for name formatting and metadata item data.
    108108                                   );
    109109
     
    121121 * @return psMetadataItem*: Pointer metadata item.
    122122 */
    123 psMetadataItem *psMetadataItemAllocV(const char *name,  // /< Name of metadata item.
    124                                      psMetadataType type,       // /< Type of metadata item.
    125                                      const char *comment,       // /< Comment for metadata item.
    126                                      va_list list       // /< Arguments for name formatting and metadata item
     123psMetadataItem *psMetadataItemAllocV(const char *name,  ///< Name of metadata item.
     124                                     psMetadataType type,       ///< Type of metadata item.
     125                                     const char *comment,       ///< Comment for metadata item.
     126                                     va_list list       ///< Arguments for name formatting and metadata item
    127127                                     // data.
    128128                                    );
     
    134134 * @return psMetadata*: Pointer metadata.
    135135 */
    136 psMetadata *psMetadataAlloc(void        // /< Void.
     136psMetadata *psMetadataAlloc(void        ///< Void.
    137137                           );
    138138
     
    143143 * @return bool: True for success, false for failure.
    144144 */
    145 bool psMetadataAddItem(psMetadata * restrict md,        // /< Metadata collection to insert metadat item.
    146                        int where,       // /< Location to be added.
    147                        psMetadataItem * restrict item   // /< Metadata item to be added.
     145bool psMetadataAddItem(psMetadata * restrict md,        ///< Metadata collection to insert metadat item.
     146                       int where,       ///< Location to be added.
     147                       psMetadataItem * restrict item   ///< Metadata item to be added.
    148148                      );
    149149
     
    154154 * @return bool: True for success, false for failure.
    155155 */
    156 bool psMetadataAdd(psMetadata * restrict md,    // /< Metadata collection to insert metadat item.
    157                    int where,   // /< Location to be added.
    158                    const char *name,    // /< Name of metadata item.
    159                    psMetadataType type, // /< Type of metadata item.
    160                    const char *comment, // /< Comment for metadata item.
    161                    ...          // /< Arguments for name formatting and metadata item data.
     156bool psMetadataAdd(psMetadata * restrict md,    ///< Metadata collection to insert metadat item.
     157                   int where,   ///< Location to be added.
     158                   const char *name,    ///< Name of metadata item.
     159                   psMetadataType type, ///< Type of metadata item.
     160                   const char *comment, ///< Comment for metadata item.
     161                   ...          ///< Arguments for name formatting and metadata item data.
    162162                  );
    163163
     
    171171 * @return bool: True for success, false for failure.
    172172 */
    173 bool psMetadataRemove(psMetadata * restrict md, // /< Metadata collection to insert metadat item.
    174                       int where,        // /< Location to be removed.
    175                       const char *restrict key  // /< Name of metadata key.
     173bool psMetadataRemove(psMetadata * restrict md, ///< Metadata collection to insert metadat item.
     174                      int where,        ///< Location to be removed.
     175                      const char *restrict key  ///< Name of metadata key.
    176176                     );
    177177
     
    183183 * @return psMetadataItem*: Pointer metadata item.
    184184 */
    185 psMetadataItem *psMetadataLookup(psMetadata * restrict md,      // /< Metadata collection to insert metadat
     185psMetadataItem *psMetadataLookup(psMetadata * restrict md,      ///< Metadata collection to insert metadat
    186186                                 // item.
    187                                  const char *restrict key       // /< Name of metadata key.
     187                                 const char *restrict key       ///< Name of metadata key.
    188188                                );
    189189
     
    194194 * @return psMetadataItem*: Pointer metadata item.
    195195 */
    196 psMetadataItem *psMetadataGet(psMetadata * restrict md, // /< Metadata collection to insert metadat item.
    197                               int where // /< Location to be retrieved.
     196psMetadataItem *psMetadataGet(psMetadata * restrict md, ///< Metadata collection to insert metadat item.
     197                              int where ///< Location to be retrieved.
    198198                             );
    199199
     
    204204 * @return void: void.
    205205 */
    206 bool psMetadataSetIterator(psMetadata * restrict md,    // /< Metadata collection to iterate.
    207                            int where    // /< Location of iterator.
     206bool psMetadataSetIterator(psMetadata * restrict md,    ///< Metadata collection to iterate.
     207                           int where    ///< Location of iterator.
    208208                          );
    209209
     
    214214 * @return psMetadataItem*: Pointer metadata item.
    215215 */
    216 psMetadataItem *psMetadataGetNext(psMetadata * restrict md,     // /< Metadata collection to iterate.
    217                                   const char *restrict match,   // /< Beginning of key name.
    218                                   int which     // /< Iterator to be used.
     216psMetadataItem *psMetadataGetNext(psMetadata * restrict md,     ///< Metadata collection to iterate.
     217                                  const char *restrict match,   ///< Beginning of key name.
     218                                  int which     ///< Iterator to be used.
    219219                                 );
    220220
     
    225225 * @return psMetadataItem*: Pointer metadata item.
    226226 */
    227 psMetadataItem *psMetadataGetPrevious(psMetadata * restrict md, // /< Metadata collection to iterate.
    228                                       const char *restrict match,       // /< Beginning of key name.
    229                                       int which // /< Iterator to be used.
     227psMetadataItem *psMetadataGetPrevious(psMetadata * restrict md, ///< Metadata collection to iterate.
     228                                      const char *restrict match,       ///< Beginning of key name.
     229                                      int which ///< Iterator to be used.
    230230                                     );
    231231
     
    240240 * @return psMetadataItem*: Pointer metadata item.
    241241 */
    242 void psMetadataItemPrint(FILE * fd,     // /< Pointer to file to write metadata item.
    243                          const char *format,    // /< Format to print metadata item.
    244                          const psMetadataItem * restrict metadataItem   // /< Metadata item to print.
     242void psMetadataItemPrint(FILE * fd,     ///< Pointer to file to write metadata item.
     243                         const char *format,    ///< Format to print metadata item.
     244                         const psMetadataItem * restrict metadataItem   ///< Metadata item to print.
    245245                        );
    246246
     
    252252 * @return psMetadata*: Pointer metadata.
    253253 */
    254 psMetadata *psMetadataReadHeader(psMetadata * output,   // /< Resulting metadata from read.
    255                                  char *extname, // /< File name extension string.
    256                                  int extnum,    // /< File name extension number. Starts at 1.
    257                                  char *filename // /< Name of file to read.
     254psMetadata *psMetadataReadHeader(psMetadata * output,   ///< Resulting metadata from read.
     255                                 char *extname, ///< File name extension string.
     256                                 int extnum,    ///< File name extension number. Starts at 1.
     257                                 char *filename ///< Name of file to read.
    258258                                );
    259259
     
    264264 * @return psMetadata*: Pointer metadata.
    265265 */
    266 psMetadata *psMetadataFReadHeader(psMetadata * output,  // /< Resulting metadata from read.
    267                                   char *extName,        // /< File name extension string.
    268                                   int extNum,   // /< File name extension number.
    269                                   fitsfile * fd // /< Pointer to file to read.
     266psMetadata *psMetadataFReadHeader(psMetadata * output,  ///< Resulting metadata from read.
     267                                  char *extName,        ///< File name extension string.
     268                                  int extNum,   ///< File name extension number.
     269                                  fitsfile * fd ///< Pointer to file to read.
    270270                                 );
    271271
Note: See TracChangeset for help on using the changeset viewer.