Changeset 1426
- Timestamp:
- Aug 9, 2004, 12:44:25 PM (22 years ago)
- Location:
- trunk/psLib/src
- Files:
-
- 47 edited
-
astro/psCoord.h (modified) (14 diffs)
-
astronomy/psAstrometry.h (modified) (9 diffs)
-
astronomy/psCoord.h (modified) (14 diffs)
-
astronomy/psMetadata.h (modified) (17 diffs)
-
astronomy/psPhotometry.h (modified) (3 diffs)
-
collections/psArray.h (modified) (5 diffs)
-
collections/psHash.h (modified) (3 diffs)
-
collections/psList.h (modified) (14 diffs)
-
collections/psMetadata.h (modified) (17 diffs)
-
collections/psScalar.h (modified) (4 diffs)
-
collections/psVector.h (modified) (6 diffs)
-
dataManip/psFFT.h (modified) (2 diffs)
-
dataManip/psFunctions.h (modified) (10 diffs)
-
dataManip/psMatrix.h (modified) (10 diffs)
-
dataManip/psMinimize.h (modified) (3 diffs)
-
dataManip/psStats.h (modified) (3 diffs)
-
dataManip/psVectorFFT.h (modified) (2 diffs)
-
fft/psVectorFFT.h (modified) (2 diffs)
-
image/psImage.h (modified) (4 diffs)
-
image/psImageExtraction.h (modified) (3 diffs)
-
image/psImageManip.h (modified) (7 diffs)
-
image/psImageStats.h (modified) (2 diffs)
-
imageops/psImageStats.h (modified) (2 diffs)
-
math/psMatrix.h (modified) (10 diffs)
-
math/psMinimize.h (modified) (3 diffs)
-
math/psPolynomial.h (modified) (10 diffs)
-
math/psSpline.h (modified) (10 diffs)
-
math/psStats.h (modified) (3 diffs)
-
mathtypes/psImage.h (modified) (4 diffs)
-
mathtypes/psScalar.h (modified) (4 diffs)
-
mathtypes/psVector.h (modified) (6 diffs)
-
sys/psAbort.h (modified) (2 diffs)
-
sys/psError.h (modified) (2 diffs)
-
sys/psLogMsg.h (modified) (5 diffs)
-
sys/psMemory.h (modified) (19 diffs)
-
sys/psTrace.h (modified) (2 diffs)
-
sys/psType.h (modified) (4 diffs)
-
sysUtils/psAbort.h (modified) (2 diffs)
-
sysUtils/psError.h (modified) (2 diffs)
-
sysUtils/psLogMsg.h (modified) (5 diffs)
-
sysUtils/psMemory.h (modified) (19 diffs)
-
sysUtils/psTrace.h (modified) (2 diffs)
-
sysUtils/psType.h (modified) (4 diffs)
-
types/psArray.h (modified) (5 diffs)
-
types/psHash.h (modified) (3 diffs)
-
types/psList.h (modified) (14 diffs)
-
types/psMetadata.h (modified) (17 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/astro/psCoord.h
r1407 r1426 11 11 * @author George Gusciora, MHPCC 12 12 * 13 * @version $Revision: 1.1 0$ $Name: not supported by cvs2svn $14 * @date $Date: 2004-08-0 7 00:06:06$13 * @version $Revision: 1.11 $ $Name: not supported by cvs2svn $ 14 * @date $Date: 2004-08-09 22:44:25 $ 15 15 * 16 16 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 39 39 typedef struct 40 40 { 41 double x; // /< x position42 double y; // /< y position43 double xErr; // /< Error in x position44 double yErr; // /< Error in y position41 double x; ///< x position 42 double y; ///< y position 43 double xErr; ///< Error in x position 44 double yErr; ///< Error in y position 45 45 } 46 46 psPlane; … … 55 55 typedef struct 56 56 { 57 double r; // /< RA58 double d; // /< Dec59 double rErr; // /< Error in RA60 double dErr; // /< Error in Dec57 double r; ///< RA 58 double d; ///< Dec 59 double rErr; ///< Error in RA 60 double dErr; ///< Error in Dec 61 61 } 62 62 psSphere; … … 72 72 typedef struct 73 73 { 74 psDPolynomial2D *x; // /< 2D polynomial transform of X coordinates75 psDPolynomial2D *y; // /< 2D polynomial transform of Y coordinates74 psDPolynomial2D *x; ///< 2D polynomial transform of X coordinates 75 psDPolynomial2D *y; ///< 2D polynomial transform of Y coordinates 76 76 } 77 77 psPlaneTransform; … … 91 91 typedef struct 92 92 { 93 psDPolynomial4D *x; // /< 4D polynomial transform of X coordinates94 psDPolynomial4D *y; // /< 4D polynomial transform of Y coordinates93 psDPolynomial4D *x; ///< 4D polynomial transform of X coordinates 94 psDPolynomial4D *y; ///< 4D polynomial transform of Y coordinates 95 95 } 96 96 psPlaneDistort; … … 108 108 typedef struct 109 109 { 110 double sinPhi; // /< sin of North Pole lattitude111 double cosPhi; // /< cos of North Pole lattitude112 double Xo; // /< First PT of Ares lon113 double xo; // /< First PT of Ares equiv lon110 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 114 114 } 115 115 psSphereTransform; … … 121 121 */ 122 122 typedef enum { 123 PS_PROJ_TAN, // /< Tangent projection124 PS_PROJ_SIN, // /< Sine projection125 PS_PROJ_AIT, // /< Aitoff projection126 PS_PROJ_PAR, // /< Par projection127 PS_PROJ_GLS, // /< GLS projection128 PS_PROJ_CAR, // /< CAR projection129 PS_PROJ_MER, // /< MER projection130 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. 131 131 } psProjectionType; 132 132 … … 138 138 typedef struct 139 139 { 140 double R; // /< Coordinates of projection center141 double D; // /< Coordinates of projection center142 double Xs; // /< plate-scale in X direction143 double Ys; // /< plate-scale in Y direction144 psProjectionType type; // /< Projection type140 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 145 145 } 146 146 psProjection; … … 152 152 */ 153 153 typedef enum { 154 PS_SPHERICAL, // /< offset corresponds to an angular offset155 PS_LINEAR // /< offset corresponds to a linear offset154 PS_SPHERICAL, ///< offset corresponds to an angular offset 155 PS_LINEAR ///< offset corresponds to a linear offset 156 156 } psSphereOffsetMode; 157 157 … … 162 162 */ 163 163 typedef enum { 164 PS_ARCSEC, // /< Arcseconds165 PS_ARCMIN, // /< Arcminutes166 PS_DEGREE, // /< Degrees167 PS_RADIAN // /< Radians164 PS_ARCSEC, ///< Arcseconds 165 PS_ARCMIN, ///< Arcminutes 166 PS_DEGREE, ///< Degrees 167 PS_RADIAN ///< Radians 168 168 } psSphereOffsetUnit; 169 169 … … 171 171 * 172 172 */ 173 psPlane *psPlaneTransformApply(psPlane * out, // /< a psPlane to recycle. If NULL, a new one is generated.174 const psPlaneTransform * transform, // /< the transform to apply175 const psPlane * coords // /< the coordinate to apply the transform above.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. 176 176 ); 177 177 … … 179 179 * 180 180 */ 181 psPlane *psPlaneDistortApply(psPlane * out, // /< a psPlane to recycle. If NULL, a new one is generated.182 const psPlaneDistort * transform, // /< the transform to apply183 const psPlane * coords, // /< the coordinate to apply the transform above.184 float term3, // /< third term -- maybe magnitude185 float term4 // /< forth term -- maybe color181 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 186 186 ); 187 187 … … 189 189 * 190 190 */ 191 psSphereTransform *psSphereTransformAlloc(double NPlat, // /< north pole latitude192 double Xo, // /< First PT of Ares lon193 double xo // /< First PT of Ares equiv lon191 psSphereTransform *psSphereTransformAlloc(double NPlat, ///< north pole latitude 192 double Xo, ///< First PT of Ares lon 193 double xo ///< First PT of Ares equiv lon 194 194 ); 195 195 … … 197 197 * 198 198 */ 199 psSphere *psSphereTransformApply(psSphere * out, // /< a psSphere to recycle. If NULL, a new one is199 psSphere *psSphereTransformApply(psSphere * out, ///< a psSphere to recycle. If NULL, a new one is 200 200 // generated. 201 const psSphereTransform * transform, // /< the transform to apply202 const psSphere * coord // /< the coordinate to apply the transform above.x201 const psSphereTransform * transform, ///< the transform to apply 202 const psSphere * coord ///< the coordinate to apply the transform above.x 203 203 ); 204 204 -
trunk/psLib/src/astronomy/psAstrometry.h
r1407 r1426 9 9 * @author George Gusciora, MHPCC 10 10 * 11 * @version $Revision: 1. 6$ $Name: not supported by cvs2svn $12 * @date $Date: 2004-08-0 7 00:06:06$11 * @version $Revision: 1.7 $ $Name: not supported by cvs2svn $ 12 * @date $Date: 2004-08-09 22:44:25 $ 13 13 * 14 14 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 45 45 typedef struct 46 46 { 47 const double latitude; // /< geodetic latitude (radians)48 const double sinLat; // /< sine of geodetic latitude49 const double cosLat; // /< cosine of geodetic latitude50 const double abberationMag; // /< magnitude of diurnal aberration vector51 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) 61 61 } 62 62 psGrommit; … … 73 73 typedef struct 74 74 { 75 int nX; // /< Number of elements in x direction76 int nY; // /< Number of elements in y direction77 double x0; // /< X Position of 0,0 corner on focal plane78 double y0; // /< Y Position of 0,0 corner on focal plane79 double xScale; // /< Scale of the grid in x direction80 double yScale; // /< Scale of the grid in x direction81 double **x; // /< The grid of offsets in x82 double **y; // /< The grid of offsets in y75 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 83 83 } 84 84 psFixedPattern; … … 95 95 typedef struct 96 96 { 97 const unsigned int colBins; // /< Amount of binning in x-dimension98 const unsigned int rowBins; // /< Amount of binning in y-dimension99 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 Readout103 psList *objects; // /< objects derived from Readout104 psMetadata *metadata; // /< readout-level metadata97 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 105 105 } 106 106 psReadout; … … 117 117 typedef struct psCell 118 118 { 119 psArray *readouts; // /< readouts from the cell120 psMetadata *metadata; // /< cell-level metadata121 122 psPlaneTransform *toChip; // /< transformations from cell to chip coordinates123 psPlaneTransform *fromChip; // /< transformations from chip to cell coordinates124 psPlaneTransform *toFPA; // /< transformations from cell to FPA coordinates125 psPlaneTransform *toSky; // /< transformations from cell to sky coordinates126 127 struct psChip *parent; // /< chip in which contains this cell119 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 128 128 } 129 129 psCell; … … 139 139 typedef struct psChip 140 140 { 141 psArray *cells; // /< cells in the chip142 psMetadata *metadata; // /< chip-level metadata143 144 psPlaneTransform *toFPA; // /< transformation from chip to FPA coordinates145 psPlaneTransform *fromFPA; // /< transformation from FPA to chip coordinates146 147 struct psFPA *parent; // /< FPA which contains this chip141 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 148 148 } 149 149 psChip; … … 164 164 typedef struct psFPA 165 165 { 166 psArray *chips; // /< chips in the focal plane array167 psMetadata *metadata; // /< focal-plane's metadata168 169 psPlaneDistort *fromTangentPlane; // /< transformation from tangent plane to focal plane170 psPlaneDistort *toTangentPlane; // /< transformation from focal plane to tangent plane171 psFixedPattern *pattern; // /< fixed pattern residual offsets172 173 const struct psExposure *exposure; // /< information about this exposure174 175 psPhotSystem *colorPlus; // /< Color reference176 psPhotSystem *colorMinus; // /< Color reference177 178 float rmsX; // /< RMS for x transformation fits179 float rmsY; // /< RMS for y transformation fits180 float chi2; // /< chi^2 of astrometric solution166 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 181 181 } 182 182 psFPA; … … 191 191 typedef struct psExposure 192 192 { 193 const double ra; // /< Telescope boresight, right ascention194 const double dec; // /< Telescope boresight, declination195 const double hourAngle; // /< Hour angle196 const double zenith; // /< Zenith distance197 const double azimuth; // /< Azimuth198 const double localTime; // /< Local Sidereal Time199 const float date; // /< Modified Jullian Date of observation200 const float rotAngle; // /< Rotator position angle201 const float temperature; // /< Air temperature, for estimating refraction202 const float pressure; // /< Air pressure, for calculating refraction203 const float humidity; // /< Relative humidity, for refraction204 const float exposureTime; // /< Exposure time193 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 205 205 206 206 /* Derived quantities */ 207 const float positionAngle; // /< Position angle208 const float parallacticAngle; // /< Parallactic angle209 const float airmass; // /< Airmass, calculated from zenith distance210 const float parallacticFactor; // /< Parallactic factor211 const char *cameraName; // /< name of camera which provided exposure212 const char *telescopeName; // /< name of telescope which provided exposure207 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 213 213 } 214 214 psExposure; 215 215 216 psExposure *psExposureAlloc(double ra, // /< Telescope boresight, right ascention217 double dec, // /< Telescope boresight, declination218 double hourAngle, // /< Hour angle219 double zenith, // /< Zenith distance220 double azimuth, // /< Azimuth221 double localTime, // /< Local Sidereal Time222 float date, // /< MJD223 float rotAngle, // /< Rotator position angle224 float temperature, // /< Temperature225 float pressure, // /< Pressure226 float humidity, // /< Relative humidity227 float exposureTime // /< Exposure time216 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 228 228 ); 229 229 … … 235 235 * @return psGrommit* New grommit structure. 236 236 */ 237 psGrommit *psGrommitAlloc(const psExposure * exp // /< the cooresponding exposure structure.237 psGrommit *psGrommitAlloc(const psExposure * exp ///< the cooresponding exposure structure. 238 238 ); 239 239 -
trunk/psLib/src/astronomy/psCoord.h
r1407 r1426 11 11 * @author George Gusciora, MHPCC 12 12 * 13 * @version $Revision: 1.1 0$ $Name: not supported by cvs2svn $14 * @date $Date: 2004-08-0 7 00:06:06$13 * @version $Revision: 1.11 $ $Name: not supported by cvs2svn $ 14 * @date $Date: 2004-08-09 22:44:25 $ 15 15 * 16 16 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 39 39 typedef struct 40 40 { 41 double x; // /< x position42 double y; // /< y position43 double xErr; // /< Error in x position44 double yErr; // /< Error in y position41 double x; ///< x position 42 double y; ///< y position 43 double xErr; ///< Error in x position 44 double yErr; ///< Error in y position 45 45 } 46 46 psPlane; … … 55 55 typedef struct 56 56 { 57 double r; // /< RA58 double d; // /< Dec59 double rErr; // /< Error in RA60 double dErr; // /< Error in Dec57 double r; ///< RA 58 double d; ///< Dec 59 double rErr; ///< Error in RA 60 double dErr; ///< Error in Dec 61 61 } 62 62 psSphere; … … 72 72 typedef struct 73 73 { 74 psDPolynomial2D *x; // /< 2D polynomial transform of X coordinates75 psDPolynomial2D *y; // /< 2D polynomial transform of Y coordinates74 psDPolynomial2D *x; ///< 2D polynomial transform of X coordinates 75 psDPolynomial2D *y; ///< 2D polynomial transform of Y coordinates 76 76 } 77 77 psPlaneTransform; … … 91 91 typedef struct 92 92 { 93 psDPolynomial4D *x; // /< 4D polynomial transform of X coordinates94 psDPolynomial4D *y; // /< 4D polynomial transform of Y coordinates93 psDPolynomial4D *x; ///< 4D polynomial transform of X coordinates 94 psDPolynomial4D *y; ///< 4D polynomial transform of Y coordinates 95 95 } 96 96 psPlaneDistort; … … 108 108 typedef struct 109 109 { 110 double sinPhi; // /< sin of North Pole lattitude111 double cosPhi; // /< cos of North Pole lattitude112 double Xo; // /< First PT of Ares lon113 double xo; // /< First PT of Ares equiv lon110 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 114 114 } 115 115 psSphereTransform; … … 121 121 */ 122 122 typedef enum { 123 PS_PROJ_TAN, // /< Tangent projection124 PS_PROJ_SIN, // /< Sine projection125 PS_PROJ_AIT, // /< Aitoff projection126 PS_PROJ_PAR, // /< Par projection127 PS_PROJ_GLS, // /< GLS projection128 PS_PROJ_CAR, // /< CAR projection129 PS_PROJ_MER, // /< MER projection130 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. 131 131 } psProjectionType; 132 132 … … 138 138 typedef struct 139 139 { 140 double R; // /< Coordinates of projection center141 double D; // /< Coordinates of projection center142 double Xs; // /< plate-scale in X direction143 double Ys; // /< plate-scale in Y direction144 psProjectionType type; // /< Projection type140 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 145 145 } 146 146 psProjection; … … 152 152 */ 153 153 typedef enum { 154 PS_SPHERICAL, // /< offset corresponds to an angular offset155 PS_LINEAR // /< offset corresponds to a linear offset154 PS_SPHERICAL, ///< offset corresponds to an angular offset 155 PS_LINEAR ///< offset corresponds to a linear offset 156 156 } psSphereOffsetMode; 157 157 … … 162 162 */ 163 163 typedef enum { 164 PS_ARCSEC, // /< Arcseconds165 PS_ARCMIN, // /< Arcminutes166 PS_DEGREE, // /< Degrees167 PS_RADIAN // /< Radians164 PS_ARCSEC, ///< Arcseconds 165 PS_ARCMIN, ///< Arcminutes 166 PS_DEGREE, ///< Degrees 167 PS_RADIAN ///< Radians 168 168 } psSphereOffsetUnit; 169 169 … … 171 171 * 172 172 */ 173 psPlane *psPlaneTransformApply(psPlane * out, // /< a psPlane to recycle. If NULL, a new one is generated.174 const psPlaneTransform * transform, // /< the transform to apply175 const psPlane * coords // /< the coordinate to apply the transform above.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. 176 176 ); 177 177 … … 179 179 * 180 180 */ 181 psPlane *psPlaneDistortApply(psPlane * out, // /< a psPlane to recycle. If NULL, a new one is generated.182 const psPlaneDistort * transform, // /< the transform to apply183 const psPlane * coords, // /< the coordinate to apply the transform above.184 float term3, // /< third term -- maybe magnitude185 float term4 // /< forth term -- maybe color181 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 186 186 ); 187 187 … … 189 189 * 190 190 */ 191 psSphereTransform *psSphereTransformAlloc(double NPlat, // /< north pole latitude192 double Xo, // /< First PT of Ares lon193 double xo // /< First PT of Ares equiv lon191 psSphereTransform *psSphereTransformAlloc(double NPlat, ///< north pole latitude 192 double Xo, ///< First PT of Ares lon 193 double xo ///< First PT of Ares equiv lon 194 194 ); 195 195 … … 197 197 * 198 198 */ 199 psSphere *psSphereTransformApply(psSphere * out, // /< a psSphere to recycle. If NULL, a new one is199 psSphere *psSphereTransformApply(psSphere * out, ///< a psSphere to recycle. If NULL, a new one is 200 200 // generated. 201 const psSphereTransform * transform, // /< the transform to apply202 const psSphere * coord // /< the coordinate to apply the transform above.x201 const psSphereTransform * transform, ///< the transform to apply 202 const psSphere * coord ///< the coordinate to apply the transform above.x 203 203 ); 204 204 -
trunk/psLib/src/astronomy/psMetadata.h
r1407 r1426 11 11 * @author Ross Harman, MHPCC 12 12 * 13 * @version $Revision: 1.1 6$ $Name: not supported by cvs2svn $14 * @date $Date: 2004-08-0 7 00:06:06$13 * @version $Revision: 1.17 $ $Name: not supported by cvs2svn $ 14 * @date $Date: 2004-08-09 22:44:25 $ 15 15 * 16 16 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 34 34 */ 35 35 typedef enum { 36 PS_META_ITEM_SET = 0, // /< Null. Metadata is in psMetadataItem.items37 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. 48 48 } psMetadataType; 49 49 … … 55 55 typedef struct psMetadataItem 56 56 { 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. 60 60 union { 61 61 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. 69 69 } 70 70 psMetadataItem; … … 102 102 * @return psMetadataItem*: Pointer metadata item. 103 103 */ 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.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. 108 108 ); 109 109 … … 121 121 * @return psMetadataItem*: Pointer metadata item. 122 122 */ 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 item123 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 127 127 // data. 128 128 ); … … 134 134 * @return psMetadata*: Pointer metadata. 135 135 */ 136 psMetadata *psMetadataAlloc(void // /< Void.136 psMetadata *psMetadataAlloc(void ///< Void. 137 137 ); 138 138 … … 143 143 * @return bool: True for success, false for failure. 144 144 */ 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.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. 148 148 ); 149 149 … … 154 154 * @return bool: True for success, false for failure. 155 155 */ 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.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. 162 162 ); 163 163 … … 171 171 * @return bool: True for success, false for failure. 172 172 */ 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.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. 176 176 ); 177 177 … … 183 183 * @return psMetadataItem*: Pointer metadata item. 184 184 */ 185 psMetadataItem *psMetadataLookup(psMetadata * restrict md, // /< Metadata collection to insert metadat185 psMetadataItem *psMetadataLookup(psMetadata * restrict md, ///< Metadata collection to insert metadat 186 186 // item. 187 const char *restrict key // /< Name of metadata key.187 const char *restrict key ///< Name of metadata key. 188 188 ); 189 189 … … 194 194 * @return psMetadataItem*: Pointer metadata item. 195 195 */ 196 psMetadataItem *psMetadataGet(psMetadata * restrict md, // /< Metadata collection to insert metadat item.197 int where // /< Location to be retrieved.196 psMetadataItem *psMetadataGet(psMetadata * restrict md, ///< Metadata collection to insert metadat item. 197 int where ///< Location to be retrieved. 198 198 ); 199 199 … … 204 204 * @return void: void. 205 205 */ 206 bool psMetadataSetIterator(psMetadata * restrict md, // /< Metadata collection to iterate.207 int where // /< Location of iterator.206 bool psMetadataSetIterator(psMetadata * restrict md, ///< Metadata collection to iterate. 207 int where ///< Location of iterator. 208 208 ); 209 209 … … 214 214 * @return psMetadataItem*: Pointer metadata item. 215 215 */ 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.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. 219 219 ); 220 220 … … 225 225 * @return psMetadataItem*: Pointer metadata item. 226 226 */ 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.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. 230 230 ); 231 231 … … 240 240 * @return psMetadataItem*: Pointer metadata item. 241 241 */ 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.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. 245 245 ); 246 246 … … 252 252 * @return psMetadata*: Pointer metadata. 253 253 */ 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.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. 258 258 ); 259 259 … … 264 264 * @return psMetadata*: Pointer metadata. 265 265 */ 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.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. 270 270 ); 271 271 -
trunk/psLib/src/astronomy/psPhotometry.h
r1407 r1426 10 10 * @author George Gusciora, MHPCC 11 11 * 12 * @version $Revision: 1. 5$ $Name: not supported by cvs2svn $13 * @date $Date: 2004-08-0 7 00:06:06$12 * @version $Revision: 1.6 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2004-08-09 22:44:25 $ 14 14 * 15 15 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 43 43 typedef struct 44 44 { 45 const int ID; // /< ID number for this photometric system46 const char *name; // /< Name of photometric system47 const char *camera; // /< Camera for photometric system48 const char *filter; // /< Filter used for photometric system49 const char *detector; // /< Detector used for photometric system45 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 50 50 } 51 51 psPhotSystem; … … 59 59 typedef struct 60 60 { 61 psPhotSystem src; // /< Source photometric system62 psPhotSystem dst; // /< Destination photometric system63 psPhotSystem pP; // /< Primary color reference64 psPhotSystem pM; // /< Primary color reference65 psPhotSystem sP; // /< Secondary color reference66 psPhotSystem sM; // /< Secondary color reference67 float pA; // /< Color offset for references68 float sA; // /< Color offset for references69 psPolynomial3D transform; // /< Transformation from source to destination61 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 70 70 } 71 71 psPhotTransform; -
trunk/psLib/src/collections/psArray.h
r1407 r1426 12 12 * @author Ross Harman, MHPCC 13 13 * 14 * @version $Revision: 1.1 2$ $Name: not supported by cvs2svn $15 * @date $Date: 2004-08-0 7 00:06:06$14 * @version $Revision: 1.13 $ $Name: not supported by cvs2svn $ 15 * @date $Date: 2004-08-09 22:44:25 $ 16 16 * 17 17 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 34 34 typedef struct 35 35 { 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 elements36 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 39 39 } 40 40 psArray; … … 54 54 * 55 55 */ 56 psArray *psArrayAlloc(unsigned int nalloc // /< Total number of elements to make available.56 psArray *psArrayAlloc(unsigned int nalloc ///< Total number of elements to make available. 57 57 ); 58 58 … … 65 65 * 66 66 */ 67 psArray *psArrayRealloc(unsigned int nalloc, // /< Total number of elements to make available.68 psArray * restrict psArr // /< array to reallocate.67 psArray *psArrayRealloc(unsigned int nalloc, ///< Total number of elements to make available. 68 psArray * restrict psArr ///< array to reallocate. 69 69 ); 70 70 … … 76 76 * 77 77 */ 78 void psArrayElementFree(psArray * restrict psArr // /< Void pointer array to destroy.78 void psArrayElementFree(psArray * restrict psArr ///< Void pointer array to destroy. 79 79 ); 80 80 -
trunk/psLib/src/collections/psHash.h
r1420 r1426 11 11 * @author George Gusciora, MHPCC 12 12 * 13 * @version $Revision: 1. 1$ $Name: not supported by cvs2svn $14 * @date $Date: 2004-08-09 2 0:29:43$13 * @version $Revision: 1.2 $ $Name: not supported by cvs2svn $ 14 * @date $Date: 2004-08-09 22:44:25 $ 15 15 * 16 16 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 29 29 typedef struct psHashBucket 30 30 { 31 char *key; // /< key for this item of data32 void *data; // /< the data itself33 struct psHashBucket *next; // /< list of other possible keys31 char *key; ///< key for this item of data 32 void *data; ///< the data itself 33 struct psHashBucket *next; ///< list of other possible keys 34 34 } 35 35 psHashBucket; … … 40 40 typedef struct psHash 41 41 { 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. 44 44 } 45 45 psHash; 46 46 47 47 /// Allocate hash buckets in table. 48 psHash *psHashAlloc(int nbucket // /< The number of buckets to allocate.48 psHash *psHashAlloc(int nbucket ///< The number of buckets to allocate. 49 49 ); 50 50 51 51 /// Insert entry into table. 52 bool psHashAdd(psHash * table, // /< table to insert in53 const char *key, // /< key to use54 void *data // /< data to insert52 bool psHashAdd(psHash * table, ///< table to insert in 53 const char *key, ///< key to use 54 void *data ///< data to insert 55 55 ); 56 56 57 57 /// Lookup key in table. 58 void *psHashLookup(psHash * table, // /< table to lookup key in59 const char *key // /< key to lookup58 void *psHashLookup(psHash * table, ///< table to lookup key in 59 const char *key ///< key to lookup 60 60 ); 61 61 62 62 /// Remove key from table. 63 bool psHashRemove(psHash * table, // /< table to lookup key in64 const char *key // /< key to lookup63 bool psHashRemove(psHash * table, ///< table to lookup key in 64 const char *key ///< key to lookup 65 65 ); 66 66 67 67 /// List all keys in table. 68 psList *psHashKeyList(psHash * table // /< table to list keys from.68 psList *psHashKeyList(psHash * table ///< table to list keys from. 69 69 ); 70 70 -
trunk/psLib/src/collections/psList.h
r1407 r1426 10 10 * @ingroup LinkedList 11 11 * 12 * @version $Revision: 1.1 0$ $Name: not supported by cvs2svn $13 * @date $Date: 2004-08-0 7 00:06:06$12 * @version $Revision: 1.11 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2004-08-09 22:44:25 $ 14 14 * 15 15 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 33 33 */ 34 34 enum { 35 PS_LIST_HEAD = 0, // /< at head36 PS_LIST_TAIL = -1, // /< at tail37 PS_LIST_PREVIOUS = -2, // /< previous element38 PS_LIST_CURRENT = -3, // /< current element39 PS_LIST_NEXT = -4, // /< next element40 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) 41 41 }; 42 42 … … 44 44 typedef struct psListElem 45 45 { 46 struct psListElem *prev; // /< previous link in list47 struct psListElem *next; // /< next link in list48 void *data; // /< real data item46 struct psListElem *prev; ///< previous link in list 47 struct psListElem *next; ///< next link in list 48 void *data; ///< real data item 49 49 } 50 50 psListElem; … … 57 57 typedef struct 58 58 { 59 unsigned int size; // /< number of elements on list60 psListElem *head; // /< first element on list (may be NULL)61 psListElem *tail; // /< last element on list (may be NULL)62 psListElem *iter; // /< iteration cursor63 unsigned int iterIndex; // /< the numeric position of the iteration cursor in the list64 pthread_mutex_t lock; // /< mutex to lock a node during changes59 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 65 65 } 66 66 psList; … … 71 71 */ 72 72 psList *psListAlloc(void *data 73 // /< initial data item; may be NULL if no an empty psList is desired73 ///< initial data item; may be NULL if no an empty psList is desired 74 74 ) 75 75 ; … … 80 80 * NULL, the return value will also be NULL. 81 81 */ 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.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. 85 85 ); 86 86 … … 90 90 */ 91 91 bool psListRemove(psList * restrict list, 92 // /< list to remove element from92 ///< list to remove element from 93 93 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. 95 95 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. 97 97 ); 98 98 … … 104 104 * NULL is returned. 105 105 */ 106 void *psListGet(psList * restrict list, // /< list to retrieve element from107 int which // /< index number, or PS_LIST_NEXT, PS_LIST_PREV, PS_LIST_UNKNOWN106 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 108 108 ); 109 109 … … 112 112 * 113 113 */ 114 void psListSetIterator(psList * restrict list, // /< list to retrieve element from115 int where // /< index number, PS_LIST_HEAD, or PS_LIST_TAIL114 void psListSetIterator(psList * restrict list, ///< list to retrieve element from 115 int where ///< index number, PS_LIST_HEAD, or PS_LIST_TAIL 116 116 ); 117 117 … … 123 123 * parameter was NULL. 124 124 */ 125 void *psListGetNext(psList * restrict list // /< list to retrieve element from125 void *psListGetNext(psList * restrict list ///< list to retrieve element from 126 126 ); 127 127 … … 133 133 * iterator is not valid or list parameter was NULL. 134 134 */ 135 void *psListGetCurrent(psList * restrict list // /< list to retrieve element from135 void *psListGetCurrent(psList * restrict list ///< list to retrieve element from 136 136 ); 137 137 … … 143 143 * parameter was NULL. 144 144 */ 145 void *psListGetPrevious(psList * restrict list // /< list to retrieve element from145 void *psListGetPrevious(psList * restrict list ///< list to retrieve element from 146 146 ); 147 147 … … 151 151 * or NULL if the given dlist parameter is NULL. 152 152 */ 153 psArray *psListToArray(psList * dlist // /< List to convert153 psArray *psListToArray(psList * dlist ///< List to convert 154 154 ); 155 155 … … 159 159 * or NULL is the given arr parameter is NULL. 160 160 */ 161 psList *psArrayToList(psArray * arr // /< vector to convert161 psList *psArrayToList(psArray * arr ///< vector to convert 162 162 ); 163 163 -
trunk/psLib/src/collections/psMetadata.h
r1407 r1426 11 11 * @author Ross Harman, MHPCC 12 12 * 13 * @version $Revision: 1.1 6$ $Name: not supported by cvs2svn $14 * @date $Date: 2004-08-0 7 00:06:06$13 * @version $Revision: 1.17 $ $Name: not supported by cvs2svn $ 14 * @date $Date: 2004-08-09 22:44:25 $ 15 15 * 16 16 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 34 34 */ 35 35 typedef enum { 36 PS_META_ITEM_SET = 0, // /< Null. Metadata is in psMetadataItem.items37 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. 48 48 } psMetadataType; 49 49 … … 55 55 typedef struct psMetadataItem 56 56 { 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. 60 60 union { 61 61 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. 69 69 } 70 70 psMetadataItem; … … 102 102 * @return psMetadataItem*: Pointer metadata item. 103 103 */ 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.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. 108 108 ); 109 109 … … 121 121 * @return psMetadataItem*: Pointer metadata item. 122 122 */ 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 item123 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 127 127 // data. 128 128 ); … … 134 134 * @return psMetadata*: Pointer metadata. 135 135 */ 136 psMetadata *psMetadataAlloc(void // /< Void.136 psMetadata *psMetadataAlloc(void ///< Void. 137 137 ); 138 138 … … 143 143 * @return bool: True for success, false for failure. 144 144 */ 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.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. 148 148 ); 149 149 … … 154 154 * @return bool: True for success, false for failure. 155 155 */ 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.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. 162 162 ); 163 163 … … 171 171 * @return bool: True for success, false for failure. 172 172 */ 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.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. 176 176 ); 177 177 … … 183 183 * @return psMetadataItem*: Pointer metadata item. 184 184 */ 185 psMetadataItem *psMetadataLookup(psMetadata * restrict md, // /< Metadata collection to insert metadat185 psMetadataItem *psMetadataLookup(psMetadata * restrict md, ///< Metadata collection to insert metadat 186 186 // item. 187 const char *restrict key // /< Name of metadata key.187 const char *restrict key ///< Name of metadata key. 188 188 ); 189 189 … … 194 194 * @return psMetadataItem*: Pointer metadata item. 195 195 */ 196 psMetadataItem *psMetadataGet(psMetadata * restrict md, // /< Metadata collection to insert metadat item.197 int where // /< Location to be retrieved.196 psMetadataItem *psMetadataGet(psMetadata * restrict md, ///< Metadata collection to insert metadat item. 197 int where ///< Location to be retrieved. 198 198 ); 199 199 … … 204 204 * @return void: void. 205 205 */ 206 bool psMetadataSetIterator(psMetadata * restrict md, // /< Metadata collection to iterate.207 int where // /< Location of iterator.206 bool psMetadataSetIterator(psMetadata * restrict md, ///< Metadata collection to iterate. 207 int where ///< Location of iterator. 208 208 ); 209 209 … … 214 214 * @return psMetadataItem*: Pointer metadata item. 215 215 */ 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.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. 219 219 ); 220 220 … … 225 225 * @return psMetadataItem*: Pointer metadata item. 226 226 */ 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.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. 230 230 ); 231 231 … … 240 240 * @return psMetadataItem*: Pointer metadata item. 241 241 */ 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.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. 245 245 ); 246 246 … … 252 252 * @return psMetadata*: Pointer metadata. 253 253 */ 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.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. 258 258 ); 259 259 … … 264 264 * @return psMetadata*: Pointer metadata. 265 265 */ 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.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. 270 270 ); 271 271 -
trunk/psLib/src/collections/psScalar.h
r1407 r1426 11 11 * @author Ross Harman, MHPCC 12 12 * 13 * @version $Revision: 1. 4$ $Name: not supported by cvs2svn $14 * @date $Date: 2004-08-0 7 00:06:06$13 * @version $Revision: 1.5 $ $Name: not supported by cvs2svn $ 14 * @date $Date: 2004-08-09 22:44:25 $ 15 15 * 16 16 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 32 32 typedef struct 33 33 { 34 psType type; // /< Type of data.34 psType type; ///< Type of data. 35 35 36 36 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. 50 50 } 51 51 psScalar; … … 65 65 * 66 66 */ 67 psScalar *psScalarAlloc(psC64 value, // /< Data to be put into psScalar.68 psElemType dataType // /< Type of data to be held by psScalar.67 psScalar *psScalarAlloc(psC64 value, ///< Data to be put into psScalar. 68 psElemType dataType ///< Type of data to be held by psScalar. 69 69 ); 70 70 … … 76 76 * 77 77 */ 78 void psScalarFree(psScalar * restrict scalar // /< Scalar to free.78 void psScalarFree(psScalar * restrict scalar ///< Scalar to free. 79 79 ); 80 80 -
trunk/psLib/src/collections/psVector.h
r1407 r1426 12 12 * @author Ross Harman, MHPCC 13 13 * 14 * @version $Revision: 1.1 6$ $Name: not supported by cvs2svn $15 * @date $Date: 2004-08-0 7 00:06:06$14 * @version $Revision: 1.17 $ $Name: not supported by cvs2svn $ 15 * @date $Date: 2004-08-09 22:44:25 $ 16 16 * 17 17 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 33 33 typedef struct 34 34 { 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. 38 38 39 39 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. 54 54 } 55 55 psVector; … … 68 68 * 69 69 */ 70 psVector *psVectorAlloc(unsigned int nalloc, // /< Total number of elements to make available.71 psElemType dataType // /< Type of data to be held by vector.70 psVector *psVectorAlloc(unsigned int nalloc, ///< Total number of elements to make available. 71 psElemType dataType ///< Type of data to be held by vector. 72 72 ); 73 73 … … 80 80 * 81 81 */ 82 psVector *psVectorRealloc(unsigned int nalloc, // /< Total number of elements to make available.83 psVector * restrict psVec // /< Vector to reallocate.82 psVector *psVectorRealloc(unsigned int nalloc, ///< Total number of elements to make available. 83 psVector * restrict psVec ///< Vector to reallocate. 84 84 ); 85 85 … … 93 93 */ 94 94 psVector *psVectorRecycle(psVector * restrict psVec, 95 // /< Vector to recycle. If NULL, a new vector is created. No effort taken to95 ///< Vector to recycle. If NULL, a new vector is created. No effort taken to 96 96 // preserve the values. 97 unsigned int nalloc, // /< Total number of elements to make available.98 psElemType type // /< the datatype of the returned vector97 unsigned int nalloc, ///< Total number of elements to make available. 98 psElemType type ///< the datatype of the returned vector 99 99 ); 100 100 … … 107 107 */ 108 108 109 psVector *psVectorSort(psVector * restrict outVector, // /< the output vector to recycle, or NULL if new109 psVector *psVectorSort(psVector * restrict outVector, ///< the output vector to recycle, or NULL if new 110 110 // vector desired. 111 const psVector * restrict inVector // /< the vector to sort.111 const psVector * restrict inVector ///< the vector to sort. 112 112 ); 113 113 -
trunk/psLib/src/dataManip/psFFT.h
r1407 r1426 8 8 * @author Robert DeSonia, MHPCC 9 9 * 10 * @version $Revision: 1. 9$ $Name: not supported by cvs2svn $11 * @date $Date: 2004-08-0 7 00:06:06$10 * @version $Revision: 1.10 $ $Name: not supported by cvs2svn $ 11 * @date $Date: 2004-08-09 22:44:25 $ 12 12 * 13 13 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 29 29 PS_FFT_FORWARD = (-1), 30 30 31 // /< psImageFFT/psVectorFFT should perform a reverse FFT.31 ///< psImageFFT/psVectorFFT should perform a reverse FFT. 32 32 PS_FFT_REVERSE = (+1) 33 33 } psFftDirection; -
trunk/psLib/src/dataManip/psFunctions.h
r1407 r1426 13 13 * @author George Gusciora, MHPCC 14 14 * 15 * @version $Revision: 1.1 5$ $Name: not supported by cvs2svn $16 * @date $Date: 2004-08-0 7 00:06:06$15 * @version $Revision: 1.16 $ $Name: not supported by cvs2svn $ 16 * @date $Date: 2004-08-09 22:44:25 $ 17 17 * 18 18 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 34 34 evaluated Gaussian is: \f[ exp(-\frac{(x-mean)^2}{2\sigma^2}) \f] */ 35 35 36 float psGaussian(float x, // /< Value at which to evaluate37 float mean, // /< Mean for the Gaussian38 float stddev, // /< Standard deviation for the Gaussian39 bool normal // /< Indicates whether result should be normalized36 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 40 40 ); 41 41 42 42 /** Produce a vector of random numbers from a Gaussian distribution with 43 43 the specified mean and sigma */ 44 psVector *psGaussianDev(float mean, // /< The mean of the Gaussian45 float sigma, // /< The sigma of the Gaussian46 int Npts); // /< The size of the vector44 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 47 47 48 48 /** One-dimensional polynomial */ 49 49 typedef struct 50 50 { 51 int n; // /< Number of terms52 float *coeff; // /< Coefficients53 float *coeffErr; // /< Error in coefficients54 char *mask; // /< Coefficient mask51 int n; ///< Number of terms 52 float *coeff; ///< Coefficients 53 float *coeffErr; ///< Error in coefficients 54 char *mask; ///< Coefficient mask 55 55 } 56 56 psPolynomial1D; … … 60 60 { 61 61 int nX, 62 nY; // /< Number of terms in x and y63 float **coeff; // /< Coefficients64 float **coeffErr; // /< Error in coefficients65 char **mask; // /< Coefficients mask62 nY; ///< Number of terms in x and y 63 float **coeff; ///< Coefficients 64 float **coeffErr; ///< Error in coefficients 65 char **mask; ///< Coefficients mask 66 66 } 67 67 psPolynomial2D; … … 72 72 int nX, 73 73 nY, 74 nZ; // /< Number of terms in x, y and z75 float ***coeff; // /< Coefficients76 float ***coeffErr; // /< Error in coefficients77 char ***mask; // /< Coefficients mask74 nZ; ///< Number of terms in x, y and z 75 float ***coeff; ///< Coefficients 76 float ***coeffErr; ///< Error in coefficients 77 char ***mask; ///< Coefficients mask 78 78 } 79 79 psPolynomial3D; … … 85 85 nX, 86 86 nY, 87 nZ; // /< Number of terms in w, x, y and z88 float ****coeff; // /< Coefficients89 float ****coeffErr; // /< Error in coefficients90 char ****mask; // /< Coefficients mask87 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 91 91 } 92 92 psPolynomial4D; … … 95 95 96 96 /** Constructor */ 97 psPolynomial1D *psPolynomial1DAlloc(int n // /< Number of terms98 ); 99 100 /** Constructor */ 101 psPolynomial2D *psPolynomial2DAlloc(int nX, int nY // /< Number of terms in x and y102 ); 103 104 /** Constructor */ 105 psPolynomial3D *psPolynomial3DAlloc(int nX, int nY, int nZ // /< Number of terms in x, y and z106 ); 107 108 /** Constructor */ 109 psPolynomial4D *psPolynomial4DAlloc(int nW, int nX, int nY, int nZ // /< Number of terms in w, x, y and97 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 110 110 // z 111 111 ); 112 112 113 113 /** Evaluate 1D polynomial */ 114 float psPolynomial1DEval(float x, // /< Value at which to evaluate115 const psPolynomial1D * myPoly // /< Coefficients for the polynomial114 float psPolynomial1DEval(float x, ///< Value at which to evaluate 115 const psPolynomial1D * myPoly ///< Coefficients for the polynomial 116 116 ); 117 117 118 118 /** Evaluate 2D polynomial */ 119 float psPolynomial2DEval(float x, // /< Value x at which to evaluate120 float y, // /< Value y at which to evaluate121 const psPolynomial2D * myPoly // /< Coefficients for the polynomial119 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 122 122 ); 123 123 124 124 /** Evaluate 3D polynomial */ 125 float psPolynomial3DEval(float x, // /< Value x at which to evaluate126 float y, // /< Value y at which to evaluate127 float z, // /< Value z at which to evaluate128 const psPolynomial3D * myPoly // /< Coefficients for the polynomial125 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 129 129 ); 130 130 131 131 /** Evaluate 4D polynomial */ 132 float psPolynomial4DEval(float w, // /< Value w at which to evaluate133 float x, // /< Value x at which to evaluate134 float y, // /< Value y at which to evaluate135 float z, // /< Value z at which to evaluate136 const psPolynomial4D * myPoly // /< Coefficients for the polynomial132 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 137 137 ); 138 138 … … 144 144 typedef struct 145 145 { 146 int n; // /< Number of terms147 double *coeff; // /< Coefficients148 double *coeffErr; // /< Error in coefficients149 char *mask; // /< Coefficient mask146 int n; ///< Number of terms 147 double *coeff; ///< Coefficients 148 double *coeffErr; ///< Error in coefficients 149 char *mask; ///< Coefficient mask 150 150 } 151 151 psDPolynomial1D; … … 155 155 { 156 156 int nX, 157 nY; // /< Number of terms in x and y158 double **coeff; // /< Coefficients159 double **coeffErr; // /< Error in coefficients160 char **mask; // /< Coefficients mask157 nY; ///< Number of terms in x and y 158 double **coeff; ///< Coefficients 159 double **coeffErr; ///< Error in coefficients 160 char **mask; ///< Coefficients mask 161 161 } 162 162 psDPolynomial2D; … … 167 167 int nX, 168 168 nY, 169 nZ; // /< Number of terms in x, y and z170 double ***coeff; // /< Coefficients171 double ***coeffErr; // /< Error in coefficients172 char ***mask; // /< Coefficient mask169 nZ; ///< Number of terms in x, y and z 170 double ***coeff; ///< Coefficients 171 double ***coeffErr; ///< Error in coefficients 172 char ***mask; ///< Coefficient mask 173 173 } 174 174 psDPolynomial3D; … … 180 180 nX, 181 181 nY, 182 nZ; // /< Number of terms in w, x, y and z183 double ****coeff; // /< Coefficients184 double ****coeffErr; // /< Error in coefficients185 char ****mask; // /< Coefficients mask182 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 186 186 } 187 187 psDPolynomial4D; 188 188 189 189 /** Constructor */ 190 psDPolynomial1D *psDPolynomial1DAlloc(int n // /< Number of terms191 ); 192 193 /** Constructor */ 194 psDPolynomial2D *psDPolynomial2DAlloc(int nX, int nY // /< Number of terms in x and y195 ); 196 197 /** Constructor */ 198 psDPolynomial3D *psDPolynomial3DAlloc(int nX, int nY, int nZ // /< Number of terms in x, y and z199 ); 200 201 /** Constructor */ 202 psDPolynomial4D *psDPolynomial4DAlloc(int nW, int nX, int nY, int nZ // /< Number of terms in w, x, y and190 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 203 203 // z 204 204 ); 205 205 206 206 /** Evaluate 1D polynomial (double precision) */ 207 double psDPolynomial1DEval(double x, // /< Value at which to evaluate208 const psDPolynomial1D * myPoly // /< Coefficients for the polynomial207 double psDPolynomial1DEval(double x, ///< Value at which to evaluate 208 const psDPolynomial1D * myPoly ///< Coefficients for the polynomial 209 209 ); 210 210 211 211 /** Evaluate 2D polynomial (double precision) */ 212 double psDPolynomial2DEval(double x, // /< Value x at which to evaluate213 double y, // /< Value y at which to evaluate214 const psDPolynomial2D * myPoly // /< Coefficients for the polynomial212 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 215 215 ); 216 216 217 217 /** Evaluate 3D polynomial (double precision) */ 218 double psDPolynomial3DEval(double x, // /< Value x at which to evaluate219 double y, // /< Value y at which to evaluate220 double z, // /< Value z at which to evaluate221 const psDPolynomial3D * myPoly // /< Coefficients for the polynomial218 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 222 222 ); 223 223 224 224 /** Evaluate 4D polynomial (double precision) */ 225 double psDPolynomial4DEval(double w, // /< Value w at which to evaluate226 double x, // /< Value x at which to evaluate227 double y, // /< Value y at which to evaluate228 double z, // /< Value z at which to evaluate229 const psDPolynomial4D * myPoly // /< Coefficients for the polynomial225 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 230 230 ); 231 231 -
trunk/psLib/src/dataManip/psMatrix.h
r1407 r1426 22 22 * @author Ross Harman, MHPCC 23 23 * 24 * @version $Revision: 1. 7$ $Name: not supported by cvs2svn $25 * @date $Date: 2004-08-0 7 00:06:06$24 * @version $Revision: 1.8 $ $Name: not supported by cvs2svn $ 25 * @date $Date: 2004-08-09 22:44:25 $ 26 26 * 27 27 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 43 43 * @return psImage*: Pointer to LU decomposed psImage. 44 44 */ 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.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. 48 48 ); 49 49 … … 57 57 * @return psVector*: Pointer to psVector solution of matrix equation. 58 58 */ 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 psMatrixLUD59 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 63 63 // function. 64 64 ); … … 73 73 * @return psImage*: Pointer to inverted psImage. 74 74 */ 75 psImage *psMatrixInvert(psImage * outImage, // /< Image to return, or NULL for in-place substitution.76 const psImage * inImage, // /< Image to be inverted77 float *restrict det // /< Determinant to return, or NULL75 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 78 78 ); 79 79 … … 86 86 * @return float: Determinant from psImage. 87 87 */ 88 float *psMatrixDeterminant(const psImage * restrict inMatrix // /< Image used to calculate determinant.88 float *psMatrixDeterminant(const psImage * restrict inMatrix ///< Image used to calculate determinant. 89 89 ); 90 90 … … 98 98 * @return psImage*: Pointer to resulting psImage. 99 99 */ 100 psImage *psMatrixMultiply(psImage * outImage, // /< Matrix to return, or NULL.101 psImage * inImage1, // /< First input image.102 psImage * inImage2 // /< Second input image.100 psImage *psMatrixMultiply(psImage * outImage, ///< Matrix to return, or NULL. 101 psImage * inImage1, ///< First input image. 102 psImage * inImage2 ///< Second input image. 103 103 ); 104 104 … … 112 112 * @return psImage*: Pointer to transposed psImage. 113 113 */ 114 psImage *psMatrixTranspose(psImage * outImage, // /< Image to return, or NULL115 const psImage * inImage // /< Image to transpose114 psImage *psMatrixTranspose(psImage * outImage, ///< Image to return, or NULL 115 const psImage * inImage ///< Image to transpose 116 116 ); 117 117 … … 124 124 * @return psImage*: Pointer to matrix of Eigenvectors. 125 125 */ 126 psImage *psMatrixEigenvectors(psImage * outImage, // /< Eigenvectors to return, or NULL.127 psImage * inImage // /< Input image.126 psImage *psMatrixEigenvectors(psImage * outImage, ///< Eigenvectors to return, or NULL. 127 psImage * inImage ///< Input image. 128 128 ); 129 129 … … 137 137 * @return psVector*: Pointer to psVector. 138 138 */ 139 psVector *psMatrixToVector(psVector * outVector, // /< Vector to return, or NULL.140 psImage * inImage // /< Image to convert.139 psVector *psMatrixToVector(psVector * outVector, ///< Vector to return, or NULL. 140 psImage * inImage ///< Image to convert. 141 141 ); 142 142 … … 150 150 * @return psVector*: Pointer to psIamge. 151 151 */ 152 psImage *psVectorToMatrix(psImage * outImage, // /< Matrix to return, or NULL.153 psVector * inVector // /< Vector to convert.152 psImage *psVectorToMatrix(psImage * outImage, ///< Matrix to return, or NULL. 153 psVector * inVector ///< Vector to convert. 154 154 ); 155 155 -
trunk/psLib/src/dataManip/psMinimize.h
r1407 r1426 22 22 23 23 /** Minimize chi^2 for input data */ 24 psVector *psMinimizeChi2(float (*evalModel) (const psVector * restrict, const psVector * restrict), // /<24 psVector *psMinimizeChi2(float (*evalModel) (const psVector * restrict, const psVector * restrict), ///< 25 25 // Model 26 26 // to … … 29 29 // and 30 30 // params) 31 float (*DevalModel) (const psVector * restrict, const psVector * restrict, int), // /<31 float (*DevalModel) (const psVector * restrict, const psVector * restrict, int), ///< 32 32 // Derivative 33 33 // of … … 38 38 // and 39 39 // params) 40 const psImage * restrict domain, // /< The domain values for the corresponding40 const psImage * restrict domain, ///< The domain values for the corresponding 41 41 // measurements 42 const psVector * restrict data, // /< Data to fit43 const psVector * restrict errors, // /< Errors in the data44 psVector * restrict initialGuess, // /< Initial guess45 const psVector * restrict paramMask, // /< 1 = fit for parameter, 0 = hold42 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 46 46 // parameter constant 47 47 float *chiSq); 48 48 49 49 /** Derive a polynomial fit by chi^2 minimisation (analytically) */ 50 psPolynomial1D *psVectorFitPolynomial1D(psPolynomial1D * myPoly, // /< Polynomial to fit51 const psVector * restrict x, // /< Ordinates (or NULL to just use50 psPolynomial1D *psVectorFitPolynomial1D(psPolynomial1D * myPoly, ///< Polynomial to fit 51 const psVector * restrict x, ///< Ordinates (or NULL to just use 52 52 // the indices) 53 const psVector * restrict y, // /< Coordinates54 const psVector * restrict yErr // /< Errors in coordinates, or NULL53 const psVector * restrict y, ///< Coordinates 54 const psVector * restrict yErr ///< Errors in coordinates, or NULL 55 55 ); 56 56 -
trunk/psLib/src/dataManip/psStats.h
r1407 r1426 10 10 * @author George Gusciora, MHPCC 11 11 * 12 * @version $Revision: 1.2 1$ $Name: not supported by cvs2svn $13 * @date $Date: 2004-08-0 7 00:06:06$12 * @version $Revision: 1.22 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2004-08-09 22:44:25 $ 14 14 * 15 15 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 50 50 typedef struct 51 51 { 52 double sampleMean; // /< formal mean of sample53 double sampleMedian; // /< formal median of sample54 double sampleStdev; // /< standard deviation of sample55 double sampleUQ; // /< upper quartile of sample56 double sampleLQ; // /< lower quartile of sample57 double sampleLimit; // /<58 double robustMean; // /< robust mean of array59 double robustMedian; // /< robust median of array60 double robustMode; // /< Robust mode of array61 double robustStdev; // /< robust standard deviation of array62 double robustUQ; // /< robust upper quartile63 double robustLQ; // /< robust lower quartile52 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 64 64 double XXX; 65 double robustN50; // /<66 double robustNfit; // /<67 double clippedMean; // /< Nsigma clipped mean68 double clippedStdev; // /< standard deviation after clipping69 double clipSigma; // /< Nsigma used for clipping; user input70 int clipIter; // /< Number of clipping iterations; user input71 double min; // /< minimum data value in array72 double max; // /< maximum data value in array73 double binsize; // /<74 psStatsOptions options; // /< bitmask of calculated values65 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 75 75 } 76 76 psStats; 77 77 78 78 /** Do Statistics on an array. Returns a status value. \ingroup MathGroup */ 79 psStats *psVectorStats(psStats * stats, // /< stats structure defines stats to be calculated and how80 psVector * in, // /< Vector to be analysed: must be F3281 psVector * mask, // /< Ignore elements where (maskVector & maskVal) != 0: must be INT79 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 82 82 // or NULL 83 unsigned int maskVal // /< Only mask elements with one of these bits set in83 unsigned int maskVal ///< Only mask elements with one of these bits set in 84 84 // maskVector 85 85 ); 86 86 87 87 /** A constructor for the stats structure.*/ 88 psStats *psStatsAlloc(psStatsOptions options); // /< Statistics to measure88 psStats *psStatsAlloc(psStatsOptions options); ///< Statistics to measure 89 89 90 90 /****************************************************************************** … … 95 95 typedef struct 96 96 { 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 minimum100 int maxNum; // /< Number above the maximum101 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? 102 102 } 103 103 psHistogram; 104 104 105 105 /** Constructor \ingroup MathGroup */ 106 psHistogram *psHistogramAlloc(float lower, // /< Lower limit for the bins107 float upper, // /< Upper limit for the bins108 int n); // /< Number of bins106 psHistogram *psHistogramAlloc(float lower, ///< Lower limit for the bins 107 float upper, ///< Upper limit for the bins 108 int n); ///< Number of bins 109 109 110 110 /** Generic constructor \ingroup MathGroup */ 111 psHistogram *psHistogramAllocGeneric(const psVector * restrict bounds); // /< Bounds for the bins111 psHistogram *psHistogramAllocGeneric(const psVector * restrict bounds); ///< Bounds for the bins 112 112 113 113 /** Calculate a histogram \ingroup MathGroup **/ 114 psHistogram *psVectorHistogram(psHistogram * out, // /< Histogram data115 const psVector * restrict in, // /< Vector to analyse116 const psVector * restrict mask, // /< Mask dat for input vector117 unsigned int maskVal); // /< Mask value114 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 118 118 119 119 bool p_psGetStatValue(const psStats * stats, double *value); -
trunk/psLib/src/dataManip/psVectorFFT.h
r1407 r1426 8 8 * @author Robert DeSonia, MHPCC 9 9 * 10 * @version $Revision: 1. 9$ $Name: not supported by cvs2svn $11 * @date $Date: 2004-08-0 7 00:06:06$10 * @version $Revision: 1.10 $ $Name: not supported by cvs2svn $ 11 * @date $Date: 2004-08-09 22:44:25 $ 12 12 * 13 13 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 29 29 PS_FFT_FORWARD = (-1), 30 30 31 // /< psImageFFT/psVectorFFT should perform a reverse FFT.31 ///< psImageFFT/psVectorFFT should perform a reverse FFT. 32 32 PS_FFT_REVERSE = (+1) 33 33 } psFftDirection; -
trunk/psLib/src/fft/psVectorFFT.h
r1407 r1426 8 8 * @author Robert DeSonia, MHPCC 9 9 * 10 * @version $Revision: 1. 9$ $Name: not supported by cvs2svn $11 * @date $Date: 2004-08-0 7 00:06:06$10 * @version $Revision: 1.10 $ $Name: not supported by cvs2svn $ 11 * @date $Date: 2004-08-09 22:44:25 $ 12 12 * 13 13 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 29 29 PS_FFT_FORWARD = (-1), 30 30 31 // /< psImageFFT/psVectorFFT should perform a reverse FFT.31 ///< psImageFFT/psVectorFFT should perform a reverse FFT. 32 32 PS_FFT_REVERSE = (+1) 33 33 } psFftDirection; -
trunk/psLib/src/image/psImage.h
r1407 r1426 12 12 * @author Ross Harman, MHPCC 13 13 * 14 * @version $Revision: 1.2 8$ $Name: not supported by cvs2svn $15 * @date $Date: 2004-08-0 7 00:06:06$14 * @version $Revision: 1.29 $ $Name: not supported by cvs2svn $ 15 * @date $Date: 2004-08-09 22:44:25 $ 16 16 * 17 17 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii 18 18 */ 19 19 #ifndef PS_IMAGE_H 20 # define PS_IMAGE_H20 #define PS_IMAGE_H 21 21 22 # include <complex.h>22 #include <complex.h> 23 23 24 # include "psType.h"24 #include "psType.h" 25 25 26 26 /// @addtogroup Image 27 27 /// @{ 28 28 29 /** enumeration of options in interpolation 30 * 31 */ 29 32 typedef enum { 30 PS_INTERPOLATE_FLAT, 31 PS_INTERPOLATE_BILINEAR 33 PS_INTERPOLATE_FLAT, ///< 'flat' interpolation (nearest pixel) 34 PS_INTERPOLATE_BILINEAR ///< bi-linear interpolation 32 35 } psImageInterpolateMode; 33 36 … … 40 43 typedef struct psImage 41 44 { 42 const psType type; // /< Image data type and dimension.43 const unsigned int numCols; // /< Number of columns in image44 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. 47 50 48 51 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. 67 70 } 68 71 psImage; … … 82 85 * 83 86 */ 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.87 psImage *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. 87 90 ); 88 91 … … 92 95 * 93 96 */ 94 psImage *psImageRecycle(psImage * old, // /< the psImage to recycle by resizing image buffer95 unsigned int numCols, // /< the desired number of columns in image96 unsigned int numRows, // /< the desired number of rows in image97 const psElemType type // /< the desired datatype of the image97 psImage *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 98 101 ); 99 102 -
trunk/psLib/src/image/psImageExtraction.h
r1407 r1426 10 10 * @author Robert DeSonia, MHPCC 11 11 * 12 * @version $Revision: 1. 6$ $Name: not supported by cvs2svn $13 * @date $Date: 2004-08-0 7 00:06:06$12 * @version $Revision: 1.7 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2004-08-09 22:44:25 $ 14 14 * 15 15 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 26 26 /// @{ 27 27 28 /* Cut direction flag. Used with psImageCut function. 29 */ 28 30 typedef 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. 33 35 } psImageCutDirection; 34 36 35 37 /** 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 */ 45 psImage* 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 ); 50 53 51 54 /** Makes a copy of a psImage … … 55 58 * 56 59 */ 57 psImage *psImageCopy(psImage * restrict output, 60 psImage* 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 ); 58 65 59 /**< if not NULL, a psImage that could be recycled. If it can not be used,60 * it will be freed via psImageFree61 */62 const psImage * input,63 66 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 */ 80 psVector *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 ); 66 96 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 */ 113 psVector *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 ); 69 125 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 */ 139 psVector* 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 ); 92 149 93 150 /// @} -
trunk/psLib/src/image/psImageManip.h
r1407 r1426 11 11 * @author Ross Harman, MHPCC 12 12 * 13 * @version $Revision: 1. 7$ $Name: not supported by cvs2svn $14 * @date $Date: 2004-08-0 7 00:06:06$13 * @version $Revision: 1.8 $ $Name: not supported by cvs2svn $ 14 * @date $Date: 2004-08-09 22:44:25 $ 15 15 * 16 16 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 32 32 * @return int The number of clipped pixels 33 33 */ 34 int psImageClip(psImage * input, // /< the image to clip35 psF64 min, // /< the minimum image value allowed36 psF64 vmin, // /< the value pixels < min are set to37 psF64 max, // /< the maximum image value allowed38 psF64 vmax // /< the value pixels > max are set to34 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 39 39 ); 40 40 … … 48 48 * @return int The number of clipped pixels 49 49 */ 50 int psImageClipComplexRegion(psImage * input, // /< the image to clip51 psC64 min, // /< the minimum image value allowed52 psC64 vmin, // /< the value pixels < min are set to53 psC64 max, // /< the maximum image value allowed54 psC64 vmax // /< the value pixels > max are set to50 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 55 55 ); 56 56 … … 62 62 * @return int The number of clipped pixels 63 63 */ 64 int psImageClipNaN(psImage * input, // /< the image to clip65 psF64 value // /< the value to set all NaN/Inf values to64 int psImageClipNaN(psImage * input, ///< the image to clip 65 psF64 value ///< the value to set all NaN/Inf values to 66 66 ); 67 67 … … 77 77 * @return int 0 if success, non-zero if failed. 78 78 */ 79 int psImageOverlaySection(psImage * image, // /< target image80 const psImage * overlay, // /< the overlay image81 int col0, // /< the column to start overlay82 int row0, // /< the row to start overlay83 const char *op // /< the operation to perform for overlay79 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 84 84 ); 85 85 … … 94 94 * @return psImage new image formed by rebinning input image. 95 95 */ 96 psImage *psImageRebin(psImage * out, // /< an psImage to recycle. If NULL, a new image is created97 const psImage * in, // /< input image98 unsigned int scale, // /< the scale to rebin for each dimension99 const psStats * stats // /< the statistic to perform when rebinning. Only one96 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 100 100 // method should be set. 101 101 ); 102 102 103 psImage *psImageResample(psImage * out, // /< an psImage to recycle. If NULL, a new image is created104 const psImage * in, // /< input image103 psImage *psImageResample(psImage * out, ///< an psImage to recycle. If NULL, a new image is created 104 const psImage * in, ///< input image 105 105 int scale, psImageInterpolateMode mode); 106 106 107 psImage *psImageRotate(psImage * out, // /< an psImage to recycle. If NULL, a new image is created108 const psImage * in, // /< input image107 psImage *psImageRotate(psImage * out, ///< an psImage to recycle. If NULL, a new image is created 108 const psImage * in, ///< input image 109 109 float angle, float unexposedValue, psImageInterpolateMode mode); 110 110 111 psImage *psImageShift(psImage * out, // /< an psImage to recycle. If NULL, a new image is created112 const psImage * in, // /< input image111 psImage *psImageShift(psImage * out, ///< an psImage to recycle. If NULL, a new image is created 112 const psImage * in, ///< input image 113 113 float dx, float dy, float unexposedValue, psImageInterpolateMode mode); 114 114 … … 121 121 * @return psImage* the rolled version of the input image. 122 122 */ 123 psImage *psImageRoll(psImage * out, // /< an psImage to recycle. If NULL, a new image is created124 const psImage * in, // /< input image125 int dx, // /< number of pixels to roll in the x-dimension126 int dy // /< number of pixels to roll in the y-dimension123 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 127 127 ); 128 128 -
trunk/psLib/src/image/psImageStats.h
r1407 r1426 10 10 * @author George Gusciora, MHPCC 11 11 * 12 * @version $Revision: 1.1 1$ $Name: not supported by cvs2svn $13 * @date $Date: 2004-08-0 7 00:06:06$12 * @version $Revision: 1.12 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2004-08-09 22:44:25 $ 14 14 * 15 15 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 28 28 29 29 /// This routine must determine the various statistics for the image. 30 psStats *psImageStats(psStats * stats, // /< defines statistics to be calculated31 psImage * in, // /< image (or subimage) to calculate stats32 psImage * mask, // /< mask data for image (NULL ok)33 int maskVal); // /< mask Mask for mask30 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 34 34 35 psHistogram *psImageHistogram(psHistogram * out, // /< input histogram description & target36 psImage * in, // /< Image data to be histogramed.37 psImage * mask, // /< mask data for image (NULL ok)38 unsigned int maskVal); // /< mask Mask for mask35 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 39 39 40 40 /// Fit a 2-D polynomial surface to an image. 41 psPolynomial2D *psImageFitPolynomial(const psImage * input, // /< image to fit42 psPolynomial2D * coeffs // /< coefficient structure carries in41 psPolynomial2D *psImageFitPolynomial(const psImage * input, ///< image to fit 42 psPolynomial2D * coeffs ///< coefficient structure carries in 43 43 // desired terms & target 44 44 ); 45 45 46 46 /// Evaluate a 2-D polynomial surface to image pixels. 47 int psImageEvalPolynomial(const psImage * input, // /< image to fit48 const psPolynomial2D * coeffs // /< coefficient structure carries in desired terms47 int psImageEvalPolynomial(const psImage * input, ///< image to fit 48 const psPolynomial2D * coeffs ///< coefficient structure carries in desired terms 49 49 ); 50 50 -
trunk/psLib/src/imageops/psImageStats.h
r1407 r1426 10 10 * @author George Gusciora, MHPCC 11 11 * 12 * @version $Revision: 1.1 1$ $Name: not supported by cvs2svn $13 * @date $Date: 2004-08-0 7 00:06:06$12 * @version $Revision: 1.12 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2004-08-09 22:44:25 $ 14 14 * 15 15 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 28 28 29 29 /// This routine must determine the various statistics for the image. 30 psStats *psImageStats(psStats * stats, // /< defines statistics to be calculated31 psImage * in, // /< image (or subimage) to calculate stats32 psImage * mask, // /< mask data for image (NULL ok)33 int maskVal); // /< mask Mask for mask30 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 34 34 35 psHistogram *psImageHistogram(psHistogram * out, // /< input histogram description & target36 psImage * in, // /< Image data to be histogramed.37 psImage * mask, // /< mask data for image (NULL ok)38 unsigned int maskVal); // /< mask Mask for mask35 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 39 39 40 40 /// Fit a 2-D polynomial surface to an image. 41 psPolynomial2D *psImageFitPolynomial(const psImage * input, // /< image to fit42 psPolynomial2D * coeffs // /< coefficient structure carries in41 psPolynomial2D *psImageFitPolynomial(const psImage * input, ///< image to fit 42 psPolynomial2D * coeffs ///< coefficient structure carries in 43 43 // desired terms & target 44 44 ); 45 45 46 46 /// Evaluate a 2-D polynomial surface to image pixels. 47 int psImageEvalPolynomial(const psImage * input, // /< image to fit48 const psPolynomial2D * coeffs // /< coefficient structure carries in desired terms47 int psImageEvalPolynomial(const psImage * input, ///< image to fit 48 const psPolynomial2D * coeffs ///< coefficient structure carries in desired terms 49 49 ); 50 50 -
trunk/psLib/src/math/psMatrix.h
r1407 r1426 22 22 * @author Ross Harman, MHPCC 23 23 * 24 * @version $Revision: 1. 7$ $Name: not supported by cvs2svn $25 * @date $Date: 2004-08-0 7 00:06:06$24 * @version $Revision: 1.8 $ $Name: not supported by cvs2svn $ 25 * @date $Date: 2004-08-09 22:44:25 $ 26 26 * 27 27 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 43 43 * @return psImage*: Pointer to LU decomposed psImage. 44 44 */ 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.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. 48 48 ); 49 49 … … 57 57 * @return psVector*: Pointer to psVector solution of matrix equation. 58 58 */ 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 psMatrixLUD59 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 63 63 // function. 64 64 ); … … 73 73 * @return psImage*: Pointer to inverted psImage. 74 74 */ 75 psImage *psMatrixInvert(psImage * outImage, // /< Image to return, or NULL for in-place substitution.76 const psImage * inImage, // /< Image to be inverted77 float *restrict det // /< Determinant to return, or NULL75 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 78 78 ); 79 79 … … 86 86 * @return float: Determinant from psImage. 87 87 */ 88 float *psMatrixDeterminant(const psImage * restrict inMatrix // /< Image used to calculate determinant.88 float *psMatrixDeterminant(const psImage * restrict inMatrix ///< Image used to calculate determinant. 89 89 ); 90 90 … … 98 98 * @return psImage*: Pointer to resulting psImage. 99 99 */ 100 psImage *psMatrixMultiply(psImage * outImage, // /< Matrix to return, or NULL.101 psImage * inImage1, // /< First input image.102 psImage * inImage2 // /< Second input image.100 psImage *psMatrixMultiply(psImage * outImage, ///< Matrix to return, or NULL. 101 psImage * inImage1, ///< First input image. 102 psImage * inImage2 ///< Second input image. 103 103 ); 104 104 … … 112 112 * @return psImage*: Pointer to transposed psImage. 113 113 */ 114 psImage *psMatrixTranspose(psImage * outImage, // /< Image to return, or NULL115 const psImage * inImage // /< Image to transpose114 psImage *psMatrixTranspose(psImage * outImage, ///< Image to return, or NULL 115 const psImage * inImage ///< Image to transpose 116 116 ); 117 117 … … 124 124 * @return psImage*: Pointer to matrix of Eigenvectors. 125 125 */ 126 psImage *psMatrixEigenvectors(psImage * outImage, // /< Eigenvectors to return, or NULL.127 psImage * inImage // /< Input image.126 psImage *psMatrixEigenvectors(psImage * outImage, ///< Eigenvectors to return, or NULL. 127 psImage * inImage ///< Input image. 128 128 ); 129 129 … … 137 137 * @return psVector*: Pointer to psVector. 138 138 */ 139 psVector *psMatrixToVector(psVector * outVector, // /< Vector to return, or NULL.140 psImage * inImage // /< Image to convert.139 psVector *psMatrixToVector(psVector * outVector, ///< Vector to return, or NULL. 140 psImage * inImage ///< Image to convert. 141 141 ); 142 142 … … 150 150 * @return psVector*: Pointer to psIamge. 151 151 */ 152 psImage *psVectorToMatrix(psImage * outImage, // /< Matrix to return, or NULL.153 psVector * inVector // /< Vector to convert.152 psImage *psVectorToMatrix(psImage * outImage, ///< Matrix to return, or NULL. 153 psVector * inVector ///< Vector to convert. 154 154 ); 155 155 -
trunk/psLib/src/math/psMinimize.h
r1407 r1426 22 22 23 23 /** Minimize chi^2 for input data */ 24 psVector *psMinimizeChi2(float (*evalModel) (const psVector * restrict, const psVector * restrict), // /<24 psVector *psMinimizeChi2(float (*evalModel) (const psVector * restrict, const psVector * restrict), ///< 25 25 // Model 26 26 // to … … 29 29 // and 30 30 // params) 31 float (*DevalModel) (const psVector * restrict, const psVector * restrict, int), // /<31 float (*DevalModel) (const psVector * restrict, const psVector * restrict, int), ///< 32 32 // Derivative 33 33 // of … … 38 38 // and 39 39 // params) 40 const psImage * restrict domain, // /< The domain values for the corresponding40 const psImage * restrict domain, ///< The domain values for the corresponding 41 41 // measurements 42 const psVector * restrict data, // /< Data to fit43 const psVector * restrict errors, // /< Errors in the data44 psVector * restrict initialGuess, // /< Initial guess45 const psVector * restrict paramMask, // /< 1 = fit for parameter, 0 = hold42 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 46 46 // parameter constant 47 47 float *chiSq); 48 48 49 49 /** Derive a polynomial fit by chi^2 minimisation (analytically) */ 50 psPolynomial1D *psVectorFitPolynomial1D(psPolynomial1D * myPoly, // /< Polynomial to fit51 const psVector * restrict x, // /< Ordinates (or NULL to just use50 psPolynomial1D *psVectorFitPolynomial1D(psPolynomial1D * myPoly, ///< Polynomial to fit 51 const psVector * restrict x, ///< Ordinates (or NULL to just use 52 52 // the indices) 53 const psVector * restrict y, // /< Coordinates54 const psVector * restrict yErr // /< Errors in coordinates, or NULL53 const psVector * restrict y, ///< Coordinates 54 const psVector * restrict yErr ///< Errors in coordinates, or NULL 55 55 ); 56 56 -
trunk/psLib/src/math/psPolynomial.h
r1407 r1426 13 13 * @author George Gusciora, MHPCC 14 14 * 15 * @version $Revision: 1.1 5$ $Name: not supported by cvs2svn $16 * @date $Date: 2004-08-0 7 00:06:06$15 * @version $Revision: 1.16 $ $Name: not supported by cvs2svn $ 16 * @date $Date: 2004-08-09 22:44:25 $ 17 17 * 18 18 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 34 34 evaluated Gaussian is: \f[ exp(-\frac{(x-mean)^2}{2\sigma^2}) \f] */ 35 35 36 float psGaussian(float x, // /< Value at which to evaluate37 float mean, // /< Mean for the Gaussian38 float stddev, // /< Standard deviation for the Gaussian39 bool normal // /< Indicates whether result should be normalized36 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 40 40 ); 41 41 42 42 /** Produce a vector of random numbers from a Gaussian distribution with 43 43 the specified mean and sigma */ 44 psVector *psGaussianDev(float mean, // /< The mean of the Gaussian45 float sigma, // /< The sigma of the Gaussian46 int Npts); // /< The size of the vector44 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 47 47 48 48 /** One-dimensional polynomial */ 49 49 typedef struct 50 50 { 51 int n; // /< Number of terms52 float *coeff; // /< Coefficients53 float *coeffErr; // /< Error in coefficients54 char *mask; // /< Coefficient mask51 int n; ///< Number of terms 52 float *coeff; ///< Coefficients 53 float *coeffErr; ///< Error in coefficients 54 char *mask; ///< Coefficient mask 55 55 } 56 56 psPolynomial1D; … … 60 60 { 61 61 int nX, 62 nY; // /< Number of terms in x and y63 float **coeff; // /< Coefficients64 float **coeffErr; // /< Error in coefficients65 char **mask; // /< Coefficients mask62 nY; ///< Number of terms in x and y 63 float **coeff; ///< Coefficients 64 float **coeffErr; ///< Error in coefficients 65 char **mask; ///< Coefficients mask 66 66 } 67 67 psPolynomial2D; … … 72 72 int nX, 73 73 nY, 74 nZ; // /< Number of terms in x, y and z75 float ***coeff; // /< Coefficients76 float ***coeffErr; // /< Error in coefficients77 char ***mask; // /< Coefficients mask74 nZ; ///< Number of terms in x, y and z 75 float ***coeff; ///< Coefficients 76 float ***coeffErr; ///< Error in coefficients 77 char ***mask; ///< Coefficients mask 78 78 } 79 79 psPolynomial3D; … … 85 85 nX, 86 86 nY, 87 nZ; // /< Number of terms in w, x, y and z88 float ****coeff; // /< Coefficients89 float ****coeffErr; // /< Error in coefficients90 char ****mask; // /< Coefficients mask87 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 91 91 } 92 92 psPolynomial4D; … … 95 95 96 96 /** Constructor */ 97 psPolynomial1D *psPolynomial1DAlloc(int n // /< Number of terms98 ); 99 100 /** Constructor */ 101 psPolynomial2D *psPolynomial2DAlloc(int nX, int nY // /< Number of terms in x and y102 ); 103 104 /** Constructor */ 105 psPolynomial3D *psPolynomial3DAlloc(int nX, int nY, int nZ // /< Number of terms in x, y and z106 ); 107 108 /** Constructor */ 109 psPolynomial4D *psPolynomial4DAlloc(int nW, int nX, int nY, int nZ // /< Number of terms in w, x, y and97 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 110 110 // z 111 111 ); 112 112 113 113 /** Evaluate 1D polynomial */ 114 float psPolynomial1DEval(float x, // /< Value at which to evaluate115 const psPolynomial1D * myPoly // /< Coefficients for the polynomial114 float psPolynomial1DEval(float x, ///< Value at which to evaluate 115 const psPolynomial1D * myPoly ///< Coefficients for the polynomial 116 116 ); 117 117 118 118 /** Evaluate 2D polynomial */ 119 float psPolynomial2DEval(float x, // /< Value x at which to evaluate120 float y, // /< Value y at which to evaluate121 const psPolynomial2D * myPoly // /< Coefficients for the polynomial119 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 122 122 ); 123 123 124 124 /** Evaluate 3D polynomial */ 125 float psPolynomial3DEval(float x, // /< Value x at which to evaluate126 float y, // /< Value y at which to evaluate127 float z, // /< Value z at which to evaluate128 const psPolynomial3D * myPoly // /< Coefficients for the polynomial125 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 129 129 ); 130 130 131 131 /** Evaluate 4D polynomial */ 132 float psPolynomial4DEval(float w, // /< Value w at which to evaluate133 float x, // /< Value x at which to evaluate134 float y, // /< Value y at which to evaluate135 float z, // /< Value z at which to evaluate136 const psPolynomial4D * myPoly // /< Coefficients for the polynomial132 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 137 137 ); 138 138 … … 144 144 typedef struct 145 145 { 146 int n; // /< Number of terms147 double *coeff; // /< Coefficients148 double *coeffErr; // /< Error in coefficients149 char *mask; // /< Coefficient mask146 int n; ///< Number of terms 147 double *coeff; ///< Coefficients 148 double *coeffErr; ///< Error in coefficients 149 char *mask; ///< Coefficient mask 150 150 } 151 151 psDPolynomial1D; … … 155 155 { 156 156 int nX, 157 nY; // /< Number of terms in x and y158 double **coeff; // /< Coefficients159 double **coeffErr; // /< Error in coefficients160 char **mask; // /< Coefficients mask157 nY; ///< Number of terms in x and y 158 double **coeff; ///< Coefficients 159 double **coeffErr; ///< Error in coefficients 160 char **mask; ///< Coefficients mask 161 161 } 162 162 psDPolynomial2D; … … 167 167 int nX, 168 168 nY, 169 nZ; // /< Number of terms in x, y and z170 double ***coeff; // /< Coefficients171 double ***coeffErr; // /< Error in coefficients172 char ***mask; // /< Coefficient mask169 nZ; ///< Number of terms in x, y and z 170 double ***coeff; ///< Coefficients 171 double ***coeffErr; ///< Error in coefficients 172 char ***mask; ///< Coefficient mask 173 173 } 174 174 psDPolynomial3D; … … 180 180 nX, 181 181 nY, 182 nZ; // /< Number of terms in w, x, y and z183 double ****coeff; // /< Coefficients184 double ****coeffErr; // /< Error in coefficients185 char ****mask; // /< Coefficients mask182 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 186 186 } 187 187 psDPolynomial4D; 188 188 189 189 /** Constructor */ 190 psDPolynomial1D *psDPolynomial1DAlloc(int n // /< Number of terms191 ); 192 193 /** Constructor */ 194 psDPolynomial2D *psDPolynomial2DAlloc(int nX, int nY // /< Number of terms in x and y195 ); 196 197 /** Constructor */ 198 psDPolynomial3D *psDPolynomial3DAlloc(int nX, int nY, int nZ // /< Number of terms in x, y and z199 ); 200 201 /** Constructor */ 202 psDPolynomial4D *psDPolynomial4DAlloc(int nW, int nX, int nY, int nZ // /< Number of terms in w, x, y and190 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 203 203 // z 204 204 ); 205 205 206 206 /** Evaluate 1D polynomial (double precision) */ 207 double psDPolynomial1DEval(double x, // /< Value at which to evaluate208 const psDPolynomial1D * myPoly // /< Coefficients for the polynomial207 double psDPolynomial1DEval(double x, ///< Value at which to evaluate 208 const psDPolynomial1D * myPoly ///< Coefficients for the polynomial 209 209 ); 210 210 211 211 /** Evaluate 2D polynomial (double precision) */ 212 double psDPolynomial2DEval(double x, // /< Value x at which to evaluate213 double y, // /< Value y at which to evaluate214 const psDPolynomial2D * myPoly // /< Coefficients for the polynomial212 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 215 215 ); 216 216 217 217 /** Evaluate 3D polynomial (double precision) */ 218 double psDPolynomial3DEval(double x, // /< Value x at which to evaluate219 double y, // /< Value y at which to evaluate220 double z, // /< Value z at which to evaluate221 const psDPolynomial3D * myPoly // /< Coefficients for the polynomial218 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 222 222 ); 223 223 224 224 /** Evaluate 4D polynomial (double precision) */ 225 double psDPolynomial4DEval(double w, // /< Value w at which to evaluate226 double x, // /< Value x at which to evaluate227 double y, // /< Value y at which to evaluate228 double z, // /< Value z at which to evaluate229 const psDPolynomial4D * myPoly // /< Coefficients for the polynomial225 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 230 230 ); 231 231 -
trunk/psLib/src/math/psSpline.h
r1407 r1426 13 13 * @author George Gusciora, MHPCC 14 14 * 15 * @version $Revision: 1.1 5$ $Name: not supported by cvs2svn $16 * @date $Date: 2004-08-0 7 00:06:06$15 * @version $Revision: 1.16 $ $Name: not supported by cvs2svn $ 16 * @date $Date: 2004-08-09 22:44:25 $ 17 17 * 18 18 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 34 34 evaluated Gaussian is: \f[ exp(-\frac{(x-mean)^2}{2\sigma^2}) \f] */ 35 35 36 float psGaussian(float x, // /< Value at which to evaluate37 float mean, // /< Mean for the Gaussian38 float stddev, // /< Standard deviation for the Gaussian39 bool normal // /< Indicates whether result should be normalized36 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 40 40 ); 41 41 42 42 /** Produce a vector of random numbers from a Gaussian distribution with 43 43 the specified mean and sigma */ 44 psVector *psGaussianDev(float mean, // /< The mean of the Gaussian45 float sigma, // /< The sigma of the Gaussian46 int Npts); // /< The size of the vector44 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 47 47 48 48 /** One-dimensional polynomial */ 49 49 typedef struct 50 50 { 51 int n; // /< Number of terms52 float *coeff; // /< Coefficients53 float *coeffErr; // /< Error in coefficients54 char *mask; // /< Coefficient mask51 int n; ///< Number of terms 52 float *coeff; ///< Coefficients 53 float *coeffErr; ///< Error in coefficients 54 char *mask; ///< Coefficient mask 55 55 } 56 56 psPolynomial1D; … … 60 60 { 61 61 int nX, 62 nY; // /< Number of terms in x and y63 float **coeff; // /< Coefficients64 float **coeffErr; // /< Error in coefficients65 char **mask; // /< Coefficients mask62 nY; ///< Number of terms in x and y 63 float **coeff; ///< Coefficients 64 float **coeffErr; ///< Error in coefficients 65 char **mask; ///< Coefficients mask 66 66 } 67 67 psPolynomial2D; … … 72 72 int nX, 73 73 nY, 74 nZ; // /< Number of terms in x, y and z75 float ***coeff; // /< Coefficients76 float ***coeffErr; // /< Error in coefficients77 char ***mask; // /< Coefficients mask74 nZ; ///< Number of terms in x, y and z 75 float ***coeff; ///< Coefficients 76 float ***coeffErr; ///< Error in coefficients 77 char ***mask; ///< Coefficients mask 78 78 } 79 79 psPolynomial3D; … … 85 85 nX, 86 86 nY, 87 nZ; // /< Number of terms in w, x, y and z88 float ****coeff; // /< Coefficients89 float ****coeffErr; // /< Error in coefficients90 char ****mask; // /< Coefficients mask87 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 91 91 } 92 92 psPolynomial4D; … … 95 95 96 96 /** Constructor */ 97 psPolynomial1D *psPolynomial1DAlloc(int n // /< Number of terms98 ); 99 100 /** Constructor */ 101 psPolynomial2D *psPolynomial2DAlloc(int nX, int nY // /< Number of terms in x and y102 ); 103 104 /** Constructor */ 105 psPolynomial3D *psPolynomial3DAlloc(int nX, int nY, int nZ // /< Number of terms in x, y and z106 ); 107 108 /** Constructor */ 109 psPolynomial4D *psPolynomial4DAlloc(int nW, int nX, int nY, int nZ // /< Number of terms in w, x, y and97 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 110 110 // z 111 111 ); 112 112 113 113 /** Evaluate 1D polynomial */ 114 float psPolynomial1DEval(float x, // /< Value at which to evaluate115 const psPolynomial1D * myPoly // /< Coefficients for the polynomial114 float psPolynomial1DEval(float x, ///< Value at which to evaluate 115 const psPolynomial1D * myPoly ///< Coefficients for the polynomial 116 116 ); 117 117 118 118 /** Evaluate 2D polynomial */ 119 float psPolynomial2DEval(float x, // /< Value x at which to evaluate120 float y, // /< Value y at which to evaluate121 const psPolynomial2D * myPoly // /< Coefficients for the polynomial119 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 122 122 ); 123 123 124 124 /** Evaluate 3D polynomial */ 125 float psPolynomial3DEval(float x, // /< Value x at which to evaluate126 float y, // /< Value y at which to evaluate127 float z, // /< Value z at which to evaluate128 const psPolynomial3D * myPoly // /< Coefficients for the polynomial125 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 129 129 ); 130 130 131 131 /** Evaluate 4D polynomial */ 132 float psPolynomial4DEval(float w, // /< Value w at which to evaluate133 float x, // /< Value x at which to evaluate134 float y, // /< Value y at which to evaluate135 float z, // /< Value z at which to evaluate136 const psPolynomial4D * myPoly // /< Coefficients for the polynomial132 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 137 137 ); 138 138 … … 144 144 typedef struct 145 145 { 146 int n; // /< Number of terms147 double *coeff; // /< Coefficients148 double *coeffErr; // /< Error in coefficients149 char *mask; // /< Coefficient mask146 int n; ///< Number of terms 147 double *coeff; ///< Coefficients 148 double *coeffErr; ///< Error in coefficients 149 char *mask; ///< Coefficient mask 150 150 } 151 151 psDPolynomial1D; … … 155 155 { 156 156 int nX, 157 nY; // /< Number of terms in x and y158 double **coeff; // /< Coefficients159 double **coeffErr; // /< Error in coefficients160 char **mask; // /< Coefficients mask157 nY; ///< Number of terms in x and y 158 double **coeff; ///< Coefficients 159 double **coeffErr; ///< Error in coefficients 160 char **mask; ///< Coefficients mask 161 161 } 162 162 psDPolynomial2D; … … 167 167 int nX, 168 168 nY, 169 nZ; // /< Number of terms in x, y and z170 double ***coeff; // /< Coefficients171 double ***coeffErr; // /< Error in coefficients172 char ***mask; // /< Coefficient mask169 nZ; ///< Number of terms in x, y and z 170 double ***coeff; ///< Coefficients 171 double ***coeffErr; ///< Error in coefficients 172 char ***mask; ///< Coefficient mask 173 173 } 174 174 psDPolynomial3D; … … 180 180 nX, 181 181 nY, 182 nZ; // /< Number of terms in w, x, y and z183 double ****coeff; // /< Coefficients184 double ****coeffErr; // /< Error in coefficients185 char ****mask; // /< Coefficients mask182 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 186 186 } 187 187 psDPolynomial4D; 188 188 189 189 /** Constructor */ 190 psDPolynomial1D *psDPolynomial1DAlloc(int n // /< Number of terms191 ); 192 193 /** Constructor */ 194 psDPolynomial2D *psDPolynomial2DAlloc(int nX, int nY // /< Number of terms in x and y195 ); 196 197 /** Constructor */ 198 psDPolynomial3D *psDPolynomial3DAlloc(int nX, int nY, int nZ // /< Number of terms in x, y and z199 ); 200 201 /** Constructor */ 202 psDPolynomial4D *psDPolynomial4DAlloc(int nW, int nX, int nY, int nZ // /< Number of terms in w, x, y and190 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 203 203 // z 204 204 ); 205 205 206 206 /** Evaluate 1D polynomial (double precision) */ 207 double psDPolynomial1DEval(double x, // /< Value at which to evaluate208 const psDPolynomial1D * myPoly // /< Coefficients for the polynomial207 double psDPolynomial1DEval(double x, ///< Value at which to evaluate 208 const psDPolynomial1D * myPoly ///< Coefficients for the polynomial 209 209 ); 210 210 211 211 /** Evaluate 2D polynomial (double precision) */ 212 double psDPolynomial2DEval(double x, // /< Value x at which to evaluate213 double y, // /< Value y at which to evaluate214 const psDPolynomial2D * myPoly // /< Coefficients for the polynomial212 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 215 215 ); 216 216 217 217 /** Evaluate 3D polynomial (double precision) */ 218 double psDPolynomial3DEval(double x, // /< Value x at which to evaluate219 double y, // /< Value y at which to evaluate220 double z, // /< Value z at which to evaluate221 const psDPolynomial3D * myPoly // /< Coefficients for the polynomial218 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 222 222 ); 223 223 224 224 /** Evaluate 4D polynomial (double precision) */ 225 double psDPolynomial4DEval(double w, // /< Value w at which to evaluate226 double x, // /< Value x at which to evaluate227 double y, // /< Value y at which to evaluate228 double z, // /< Value z at which to evaluate229 const psDPolynomial4D * myPoly // /< Coefficients for the polynomial225 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 230 230 ); 231 231 -
trunk/psLib/src/math/psStats.h
r1407 r1426 10 10 * @author George Gusciora, MHPCC 11 11 * 12 * @version $Revision: 1.2 1$ $Name: not supported by cvs2svn $13 * @date $Date: 2004-08-0 7 00:06:06$12 * @version $Revision: 1.22 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2004-08-09 22:44:25 $ 14 14 * 15 15 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 50 50 typedef struct 51 51 { 52 double sampleMean; // /< formal mean of sample53 double sampleMedian; // /< formal median of sample54 double sampleStdev; // /< standard deviation of sample55 double sampleUQ; // /< upper quartile of sample56 double sampleLQ; // /< lower quartile of sample57 double sampleLimit; // /<58 double robustMean; // /< robust mean of array59 double robustMedian; // /< robust median of array60 double robustMode; // /< Robust mode of array61 double robustStdev; // /< robust standard deviation of array62 double robustUQ; // /< robust upper quartile63 double robustLQ; // /< robust lower quartile52 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 64 64 double XXX; 65 double robustN50; // /<66 double robustNfit; // /<67 double clippedMean; // /< Nsigma clipped mean68 double clippedStdev; // /< standard deviation after clipping69 double clipSigma; // /< Nsigma used for clipping; user input70 int clipIter; // /< Number of clipping iterations; user input71 double min; // /< minimum data value in array72 double max; // /< maximum data value in array73 double binsize; // /<74 psStatsOptions options; // /< bitmask of calculated values65 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 75 75 } 76 76 psStats; 77 77 78 78 /** Do Statistics on an array. Returns a status value. \ingroup MathGroup */ 79 psStats *psVectorStats(psStats * stats, // /< stats structure defines stats to be calculated and how80 psVector * in, // /< Vector to be analysed: must be F3281 psVector * mask, // /< Ignore elements where (maskVector & maskVal) != 0: must be INT79 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 82 82 // or NULL 83 unsigned int maskVal // /< Only mask elements with one of these bits set in83 unsigned int maskVal ///< Only mask elements with one of these bits set in 84 84 // maskVector 85 85 ); 86 86 87 87 /** A constructor for the stats structure.*/ 88 psStats *psStatsAlloc(psStatsOptions options); // /< Statistics to measure88 psStats *psStatsAlloc(psStatsOptions options); ///< Statistics to measure 89 89 90 90 /****************************************************************************** … … 95 95 typedef struct 96 96 { 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 minimum100 int maxNum; // /< Number above the maximum101 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? 102 102 } 103 103 psHistogram; 104 104 105 105 /** Constructor \ingroup MathGroup */ 106 psHistogram *psHistogramAlloc(float lower, // /< Lower limit for the bins107 float upper, // /< Upper limit for the bins108 int n); // /< Number of bins106 psHistogram *psHistogramAlloc(float lower, ///< Lower limit for the bins 107 float upper, ///< Upper limit for the bins 108 int n); ///< Number of bins 109 109 110 110 /** Generic constructor \ingroup MathGroup */ 111 psHistogram *psHistogramAllocGeneric(const psVector * restrict bounds); // /< Bounds for the bins111 psHistogram *psHistogramAllocGeneric(const psVector * restrict bounds); ///< Bounds for the bins 112 112 113 113 /** Calculate a histogram \ingroup MathGroup **/ 114 psHistogram *psVectorHistogram(psHistogram * out, // /< Histogram data115 const psVector * restrict in, // /< Vector to analyse116 const psVector * restrict mask, // /< Mask dat for input vector117 unsigned int maskVal); // /< Mask value114 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 118 118 119 119 bool p_psGetStatValue(const psStats * stats, double *value); -
trunk/psLib/src/mathtypes/psImage.h
r1407 r1426 12 12 * @author Ross Harman, MHPCC 13 13 * 14 * @version $Revision: 1.2 8$ $Name: not supported by cvs2svn $15 * @date $Date: 2004-08-0 7 00:06:06$14 * @version $Revision: 1.29 $ $Name: not supported by cvs2svn $ 15 * @date $Date: 2004-08-09 22:44:25 $ 16 16 * 17 17 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii 18 18 */ 19 19 #ifndef PS_IMAGE_H 20 # define PS_IMAGE_H20 #define PS_IMAGE_H 21 21 22 # include <complex.h>22 #include <complex.h> 23 23 24 # include "psType.h"24 #include "psType.h" 25 25 26 26 /// @addtogroup Image 27 27 /// @{ 28 28 29 /** enumeration of options in interpolation 30 * 31 */ 29 32 typedef enum { 30 PS_INTERPOLATE_FLAT, 31 PS_INTERPOLATE_BILINEAR 33 PS_INTERPOLATE_FLAT, ///< 'flat' interpolation (nearest pixel) 34 PS_INTERPOLATE_BILINEAR ///< bi-linear interpolation 32 35 } psImageInterpolateMode; 33 36 … … 40 43 typedef struct psImage 41 44 { 42 const psType type; // /< Image data type and dimension.43 const unsigned int numCols; // /< Number of columns in image44 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. 47 50 48 51 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. 67 70 } 68 71 psImage; … … 82 85 * 83 86 */ 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.87 psImage *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. 87 90 ); 88 91 … … 92 95 * 93 96 */ 94 psImage *psImageRecycle(psImage * old, // /< the psImage to recycle by resizing image buffer95 unsigned int numCols, // /< the desired number of columns in image96 unsigned int numRows, // /< the desired number of rows in image97 const psElemType type // /< the desired datatype of the image97 psImage *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 98 101 ); 99 102 -
trunk/psLib/src/mathtypes/psScalar.h
r1407 r1426 11 11 * @author Ross Harman, MHPCC 12 12 * 13 * @version $Revision: 1. 4$ $Name: not supported by cvs2svn $14 * @date $Date: 2004-08-0 7 00:06:06$13 * @version $Revision: 1.5 $ $Name: not supported by cvs2svn $ 14 * @date $Date: 2004-08-09 22:44:25 $ 15 15 * 16 16 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 32 32 typedef struct 33 33 { 34 psType type; // /< Type of data.34 psType type; ///< Type of data. 35 35 36 36 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. 50 50 } 51 51 psScalar; … … 65 65 * 66 66 */ 67 psScalar *psScalarAlloc(psC64 value, // /< Data to be put into psScalar.68 psElemType dataType // /< Type of data to be held by psScalar.67 psScalar *psScalarAlloc(psC64 value, ///< Data to be put into psScalar. 68 psElemType dataType ///< Type of data to be held by psScalar. 69 69 ); 70 70 … … 76 76 * 77 77 */ 78 void psScalarFree(psScalar * restrict scalar // /< Scalar to free.78 void psScalarFree(psScalar * restrict scalar ///< Scalar to free. 79 79 ); 80 80 -
trunk/psLib/src/mathtypes/psVector.h
r1407 r1426 12 12 * @author Ross Harman, MHPCC 13 13 * 14 * @version $Revision: 1.1 6$ $Name: not supported by cvs2svn $15 * @date $Date: 2004-08-0 7 00:06:06$14 * @version $Revision: 1.17 $ $Name: not supported by cvs2svn $ 15 * @date $Date: 2004-08-09 22:44:25 $ 16 16 * 17 17 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 33 33 typedef struct 34 34 { 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. 38 38 39 39 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. 54 54 } 55 55 psVector; … … 68 68 * 69 69 */ 70 psVector *psVectorAlloc(unsigned int nalloc, // /< Total number of elements to make available.71 psElemType dataType // /< Type of data to be held by vector.70 psVector *psVectorAlloc(unsigned int nalloc, ///< Total number of elements to make available. 71 psElemType dataType ///< Type of data to be held by vector. 72 72 ); 73 73 … … 80 80 * 81 81 */ 82 psVector *psVectorRealloc(unsigned int nalloc, // /< Total number of elements to make available.83 psVector * restrict psVec // /< Vector to reallocate.82 psVector *psVectorRealloc(unsigned int nalloc, ///< Total number of elements to make available. 83 psVector * restrict psVec ///< Vector to reallocate. 84 84 ); 85 85 … … 93 93 */ 94 94 psVector *psVectorRecycle(psVector * restrict psVec, 95 // /< Vector to recycle. If NULL, a new vector is created. No effort taken to95 ///< Vector to recycle. If NULL, a new vector is created. No effort taken to 96 96 // preserve the values. 97 unsigned int nalloc, // /< Total number of elements to make available.98 psElemType type // /< the datatype of the returned vector97 unsigned int nalloc, ///< Total number of elements to make available. 98 psElemType type ///< the datatype of the returned vector 99 99 ); 100 100 … … 107 107 */ 108 108 109 psVector *psVectorSort(psVector * restrict outVector, // /< the output vector to recycle, or NULL if new109 psVector *psVectorSort(psVector * restrict outVector, ///< the output vector to recycle, or NULL if new 110 110 // vector desired. 111 const psVector * restrict inVector // /< the vector to sort.111 const psVector * restrict inVector ///< the vector to sort. 112 112 ); 113 113 -
trunk/psLib/src/sys/psAbort.h
r1407 r1426 12 12 * @author Eric Van Alst, MHPCC 13 13 * 14 * @version $Revision: 1. 5$ $Name: not supported by cvs2svn $15 * @date $Date: 2004-08-0 7 00:06:06$14 * @version $Revision: 1.6 $ $Name: not supported by cvs2svn $ 15 * @date $Date: 2004-08-09 22:44:25 $ 16 16 * 17 17 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 37 37 * 38 38 */ 39 void psAbort(const char *name, // /< Source of abort such as file or function detected40 const char *fmt, // /< A printf style formatting statement defining msg39 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 41 41 ... 42 42 ); -
trunk/psLib/src/sys/psError.h
r1407 r1426 13 13 * @author Eric Van Alst, MHPCC 14 14 * 15 * @version $Revision: 1. 5$ $Name: not supported by cvs2svn $16 * @date $Date: 2004-08-0 7 00:06:06$15 * @version $Revision: 1.6 $ $Name: not supported by cvs2svn $ 16 * @date $Date: 2004-08-09 22:44:25 $ 17 17 * 18 18 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 35 35 * 36 36 */ 37 void psError(const char *name, // /< Source of error such as file or function detected38 const char *fmt, // /< A printf style formatting statement defining msg37 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 39 39 ... 40 40 ); -
trunk/psLib/src/sys/psLogMsg.h
r1407 r1426 12 12 * @author George Gusciora, MHPCC 13 13 * 14 * @version $Revision: 1.1 3$ $Name: not supported by cvs2svn $15 * @date $Date: 2004-08-0 7 00:06:06$14 * @version $Revision: 1.14 $ $Name: not supported by cvs2svn $ 15 * @date $Date: 2004-08-09 22:44:25 $ 16 16 * 17 17 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 30 30 /// In future versions, this procedure will take a character string as an 31 31 /// argument which can specify more general log destinations. 32 int psLogSetDestination(const char *dest // /< Specifies where to send messages.32 int psLogSetDestination(const char *dest ///< Specifies where to send messages. 33 33 ); 34 34 … … 38 38 /// Ie. higher values set by this procedure will cause more log messages to 39 39 /// be displayed. 40 int psLogSetLevel(int level // /< Specifies the system log level40 int psLogSetLevel(int level ///< Specifies the system log level 41 41 ); 42 42 … … 46 46 /// Deleting a letter from the string will cause the associated information 47 47 /// to not be logged. 48 void psLogSetFormat(const char *fmt // /< Specifies the system log format48 void psLogSetFormat(const char *fmt ///< Specifies the system log format 49 49 ); 50 50 … … 53 53 /// specified by a prior call to psLogSetLevel(). The message is specified 54 54 /// with a printf-stype string an arguments. 55 void psLogMsg(const char *name, // /< name of the log source56 int myLevel, // /< severity level of this log message57 const char *fmt, ... // /< printf-style format command55 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 58 58 ); 59 59 60 60 /// This procedure is functionally equivalent to psLogMsg(), except that 61 61 /// it takes a va_list as the message parameter, not a printf-style string. 62 void psLogMsgV(const char *name, // /< name of the log source63 int myLevel, // /< severity level of this log message64 const char *fmt, // /< printf-style format command65 va_list ap // /< varargs argument list62 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 66 66 ); 67 67 -
trunk/psLib/src/sys/psMemory.h
r1407 r1426 15 15 * @ingroup MemoryManagement 16 16 * 17 * @version $Revision: 1.2 4$ $Name: not supported by cvs2svn $18 * @date $Date: 2004-08-0 7 00:06:06$17 * @version $Revision: 1.25 $ $Name: not supported by cvs2svn $ 18 * @date $Date: 2004-08-09 22:44:25 $ 19 19 * 20 20 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 63 63 typedef struct psMemBlock 64 64 { 65 const void *startblock; // /< initialised to p_psMEMMAGIC66 struct psMemBlock *previousBlock; // /< previous block in allocation list67 struct psMemBlock *nextBlock; // /< next block allocation list68 psFreeFcn freeFcn; // /< deallocator. If NULL, use generic deallocation.69 size_t userMemorySize; // /< the size of the user-portion of the memory block70 const psMemoryId id; // /< a unique ID for this allocation71 const char *file; // /< set from __FILE__ in e.g. p_psAlloc72 const int lineno; // /< set from __LINE__ in e.g. p_psAlloc73 pthread_mutex_t refCounterMutex; // /< mutex to ensure exclusive access to reference counter74 psReferenceCount refCounter; // /< how many times pointer is referenced75 const void *endblock; // /< initialised to p_psMEMMAGIC65 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 76 76 } 77 77 psMemBlock; … … 82 82 * @ingroup memCallback 83 83 */ 84 typedef psMemoryId(*psMemAllocateCallback) (const psMemBlock * ptr // /< the psMemBlock just allocated84 typedef psMemoryId(*psMemAllocateCallback) (const psMemBlock * ptr ///< the psMemBlock just allocated 85 85 ); 86 86 … … 90 90 * @ingroup memCallback 91 91 */ 92 typedef psMemoryId(*psMemFreeCallback) (const psMemBlock * ptr // /< the psMemBlock being freed92 typedef psMemoryId(*psMemFreeCallback) (const psMemBlock * ptr ///< the psMemBlock being freed 93 93 ); 94 94 … … 100 100 * @ingroup memCallback 101 101 */ 102 typedef void (*psMemProblemCallback) (const psMemBlock * ptr, // /< the pointer to the problematic memory102 typedef void (*psMemProblemCallback) (const psMemBlock * ptr, ///< the pointer to the problematic memory 103 103 // block. 104 const char *file, // /< the file in which the problem originated105 int lineno // /< the line number in which the problem originated104 const char *file, ///< the file in which the problem originated 105 int lineno ///< the line number in which the problem originated 106 106 ); 107 107 … … 123 123 */ 124 124 # ifdef DOXYGEN 125 void *psAlloc(size_t size // /< Size required125 void *psAlloc(size_t size ///< Size required 126 126 ); 127 127 # 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 131 132 ); 132 133 … … 144 145 */ 145 146 # ifdef DOXYGEN 146 void *psRealloc(void *ptr // /< Pointer to re-allocate147 size_t size, // /< Size required147 void *psRealloc(void *ptr ///< Pointer to re-allocate 148 size_t size, ///< Size required 148 149 ); 149 150 # 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 154 156 ); 155 157 … … 164 166 */ 165 167 # ifdef DOXYGEN 166 void psFree(void *ptr, // /< Pointer to free, if NULL, function returns immediately.168 void psFree(void *ptr, ///< Pointer to free, if NULL, function returns immediately. 167 169 ); 168 170 # 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 172 175 ); 173 176 … … 191 194 * @ingroup memTracing 192 195 */ 193 int psMemCheckLeaks(psMemoryId id0, // /< don't list blocks with id < id0194 psMemBlock *** arr, // /< pointer to array of pointers to leaked blocks, or NULL195 FILE * fd // /< print list of leaks to fd (or NULL)196 int 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) 196 199 ); 197 200 … … 201 204 * @ingroup memTracing 202 205 */ 203 int psMemCheckCorruption(bool abort_on_error // /< Abort on detecting corruption?206 int psMemCheckCorruption(bool abort_on_error ///< Abort on detecting corruption? 204 207 ); 205 208 … … 208 211 * @ingroup memRefCount 209 212 */ 210 psReferenceCount psMemGetRefCounter(void *vptr // /< Pointer to get refCounter for213 psReferenceCount psMemGetRefCounter(void *vptr ///< Pointer to get refCounter for 211 214 ); 212 215 … … 216 219 */ 217 220 # ifdef DOXYGEN 218 void *psMemIncrRefCounter(void *vptr // /< Pointer to increment refCounter, and return221 void *psMemIncrRefCounter(void *vptr ///< Pointer to increment refCounter, and return 219 222 ); 220 223 # 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 224 228 ); 225 229 … … 232 236 */ 233 237 # ifdef DOXYGEN 234 void *psMemDecrRefCounter(void *vptr // /< Pointer to decrement refCounter, and return238 void *psMemDecrRefCounter(void *vptr ///< Pointer to decrement refCounter, and return 235 239 ); 236 240 # 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 240 245 ); 241 246 … … 246 251 * @ingroup memCallback 247 252 */ 248 psMemProblemCallback psMemProblemCallbackSet(psMemProblemCallback func // /< Function to run253 psMemProblemCallback psMemProblemCallbackSet(psMemProblemCallback func ///< Function to run 249 254 ); 250 255 … … 253 258 * @ingroup memCallback 254 259 */ 255 psMemExhaustedCallback psMemExhaustedCallbackSet(psMemExhaustedCallback func // /< Function to run260 psMemExhaustedCallback psMemExhaustedCallbackSet(psMemExhaustedCallback func ///< Function to run 256 261 ); 257 262 … … 260 265 * @ingroup memCallback 261 266 */ 262 psMemAllocateCallback psMemAllocateCallbackSet(psMemAllocateCallback func // /< Function to run267 psMemAllocateCallback psMemAllocateCallbackSet(psMemAllocateCallback func ///< Function to run 263 268 ); 264 269 … … 267 272 * @ingroup memCallback 268 273 */ 269 psMemFreeCallback psMemFreeCallbackSet(psMemFreeCallback func // /< Function to run274 psMemFreeCallback psMemFreeCallbackSet(psMemFreeCallback func ///< Function to run 270 275 ); 271 276 … … 280 285 * @ingroup memCallback 281 286 */ 282 psMemoryId psMemAllocateCallbackSetID(psMemoryId id // /< ID to set287 psMemoryId psMemAllocateCallbackSetID(psMemoryId id ///< ID to set 283 288 ); 284 289 … … 287 292 * @ingroup memCallback 288 293 */ 289 psMemoryId psMemFreeCallbackSetID(psMemoryId id // /< ID to set294 psMemoryId psMemFreeCallbackSetID(psMemoryId id ///< ID to set 290 295 ); 291 296 -
trunk/psLib/src/sys/psTrace.h
r1407 r1426 10 10 * @author George Gusciora, MHPCC 11 11 * 12 * @version $Revision: 1.1 2$ $Name: not supported by cvs2svn $13 * @date $Date: 2004-08-0 7 00:06:06$12 * @version $Revision: 1.13 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2004-08-09 22:44:25 $ 14 14 * 15 15 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 59 59 # ifndef DOXYGEN 60 60 /// Send a trace message 61 void p_psTrace(const char *facil, // /< facilty of interest62 int myLevel, // /< desired trace level63 ...) // /< trace message arguments61 void p_psTrace(const char *facil, ///< facilty of interest 62 int myLevel, ///< desired trace level 63 ...) ///< trace message arguments 64 64 ; 65 65 # endif 66 66 67 67 /// Set trace level 68 int psTraceSetLevel(const char *facil, // /< facilty of interest69 int level) // /< desired trace level68 int psTraceSetLevel(const char *facil, ///< facilty of interest 69 int level) ///< desired trace level 70 70 ; 71 71 72 72 /// Get the trace level 73 int psTraceGetLevel(const char *facil) // /< facilty of interest73 int psTraceGetLevel(const char *facil) ///< facilty of interest 74 74 ; 75 75 -
trunk/psLib/src/sys/psType.h
r1407 r1426 11 11 * @author Ross Harman, MHPCC 12 12 * 13 * @version $Revision: 1.1 7$ $Name: not supported by cvs2svn $14 * @date $Date: 2004-08-0 7 00:06:06$13 * @version $Revision: 1.18 $ $Name: not supported by cvs2svn $ 14 * @date $Date: 2004-08-09 22:44:25 $ 15 15 * 16 16 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 40 40 */ 41 41 42 typedef uint8_t psU8; // /< 8-bit unsigned int43 typedef uint16_t psU16; // /< 16-bit unsigned int44 typedef uint32_t psU32; // /< 32-bit unsigned int45 typedef uint64_t psU64; // /< 64-bit unsigned int46 typedef int8_t psS8; // /< 8-bit signed int47 typedef int16_t psS16; // /< 16-bit signed int48 typedef int32_t psS32; // /< 32-bit signed int49 typedef int64_t psS64; // /< 64-bit signed int50 typedef float psF32; // /< 32-bit floating point51 typedef double psF64; // /< 64-bit floating point52 typedef complex float psC32; // /< complex with 32-bit floating point Real and Imagary numbers53 typedef complex double psC64; // /< complex with 64-bit floating point Real and Imagary numbers54 typedef void *psPTR; // /< void pointer42 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 55 55 56 56 typedef 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 floating57 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 68 68 // point. 69 PS_TYPE_C64 = 0x0810, // /< Complex numbers consisting of double-precision floating69 PS_TYPE_C64 = 0x0810, ///< Complex numbers consisting of double-precision floating 70 70 // 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. 72 72 } psElemType; 73 73 74 # define PS_TYPE_MASK PS_TYPE_U8 // /< the psElemType to use for mask image75 # define PS_TYPE_MASK_DATA U8 // /< the data member to use for mask image74 # 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 76 76 # define PS_TYPE_MASK_NAME "psU8" 77 typedef psU8 psMaskType; // /< the C datatype for a mask image77 typedef psU8 psMaskType; ///< the C datatype for a mask image 78 78 79 79 # define PS_MIN_S8 INT8_MIN … … 132 132 */ 133 133 typedef 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. 139 139 } psDimen; 140 140 … … 147 147 typedef struct 148 148 { 149 psElemType type; // /< Primitive type.150 psDimen dimen; // /< Dimensionality.149 psElemType type; ///< Primitive type. 150 psDimen dimen; ///< Dimensionality. 151 151 } 152 152 psType; -
trunk/psLib/src/sysUtils/psAbort.h
r1407 r1426 12 12 * @author Eric Van Alst, MHPCC 13 13 * 14 * @version $Revision: 1. 5$ $Name: not supported by cvs2svn $15 * @date $Date: 2004-08-0 7 00:06:06$14 * @version $Revision: 1.6 $ $Name: not supported by cvs2svn $ 15 * @date $Date: 2004-08-09 22:44:25 $ 16 16 * 17 17 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 37 37 * 38 38 */ 39 void psAbort(const char *name, // /< Source of abort such as file or function detected40 const char *fmt, // /< A printf style formatting statement defining msg39 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 41 41 ... 42 42 ); -
trunk/psLib/src/sysUtils/psError.h
r1407 r1426 13 13 * @author Eric Van Alst, MHPCC 14 14 * 15 * @version $Revision: 1. 5$ $Name: not supported by cvs2svn $16 * @date $Date: 2004-08-0 7 00:06:06$15 * @version $Revision: 1.6 $ $Name: not supported by cvs2svn $ 16 * @date $Date: 2004-08-09 22:44:25 $ 17 17 * 18 18 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 35 35 * 36 36 */ 37 void psError(const char *name, // /< Source of error such as file or function detected38 const char *fmt, // /< A printf style formatting statement defining msg37 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 39 39 ... 40 40 ); -
trunk/psLib/src/sysUtils/psLogMsg.h
r1407 r1426 12 12 * @author George Gusciora, MHPCC 13 13 * 14 * @version $Revision: 1.1 3$ $Name: not supported by cvs2svn $15 * @date $Date: 2004-08-0 7 00:06:06$14 * @version $Revision: 1.14 $ $Name: not supported by cvs2svn $ 15 * @date $Date: 2004-08-09 22:44:25 $ 16 16 * 17 17 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 30 30 /// In future versions, this procedure will take a character string as an 31 31 /// argument which can specify more general log destinations. 32 int psLogSetDestination(const char *dest // /< Specifies where to send messages.32 int psLogSetDestination(const char *dest ///< Specifies where to send messages. 33 33 ); 34 34 … … 38 38 /// Ie. higher values set by this procedure will cause more log messages to 39 39 /// be displayed. 40 int psLogSetLevel(int level // /< Specifies the system log level40 int psLogSetLevel(int level ///< Specifies the system log level 41 41 ); 42 42 … … 46 46 /// Deleting a letter from the string will cause the associated information 47 47 /// to not be logged. 48 void psLogSetFormat(const char *fmt // /< Specifies the system log format48 void psLogSetFormat(const char *fmt ///< Specifies the system log format 49 49 ); 50 50 … … 53 53 /// specified by a prior call to psLogSetLevel(). The message is specified 54 54 /// with a printf-stype string an arguments. 55 void psLogMsg(const char *name, // /< name of the log source56 int myLevel, // /< severity level of this log message57 const char *fmt, ... // /< printf-style format command55 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 58 58 ); 59 59 60 60 /// This procedure is functionally equivalent to psLogMsg(), except that 61 61 /// it takes a va_list as the message parameter, not a printf-style string. 62 void psLogMsgV(const char *name, // /< name of the log source63 int myLevel, // /< severity level of this log message64 const char *fmt, // /< printf-style format command65 va_list ap // /< varargs argument list62 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 66 66 ); 67 67 -
trunk/psLib/src/sysUtils/psMemory.h
r1407 r1426 15 15 * @ingroup MemoryManagement 16 16 * 17 * @version $Revision: 1.2 4$ $Name: not supported by cvs2svn $18 * @date $Date: 2004-08-0 7 00:06:06$17 * @version $Revision: 1.25 $ $Name: not supported by cvs2svn $ 18 * @date $Date: 2004-08-09 22:44:25 $ 19 19 * 20 20 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 63 63 typedef struct psMemBlock 64 64 { 65 const void *startblock; // /< initialised to p_psMEMMAGIC66 struct psMemBlock *previousBlock; // /< previous block in allocation list67 struct psMemBlock *nextBlock; // /< next block allocation list68 psFreeFcn freeFcn; // /< deallocator. If NULL, use generic deallocation.69 size_t userMemorySize; // /< the size of the user-portion of the memory block70 const psMemoryId id; // /< a unique ID for this allocation71 const char *file; // /< set from __FILE__ in e.g. p_psAlloc72 const int lineno; // /< set from __LINE__ in e.g. p_psAlloc73 pthread_mutex_t refCounterMutex; // /< mutex to ensure exclusive access to reference counter74 psReferenceCount refCounter; // /< how many times pointer is referenced75 const void *endblock; // /< initialised to p_psMEMMAGIC65 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 76 76 } 77 77 psMemBlock; … … 82 82 * @ingroup memCallback 83 83 */ 84 typedef psMemoryId(*psMemAllocateCallback) (const psMemBlock * ptr // /< the psMemBlock just allocated84 typedef psMemoryId(*psMemAllocateCallback) (const psMemBlock * ptr ///< the psMemBlock just allocated 85 85 ); 86 86 … … 90 90 * @ingroup memCallback 91 91 */ 92 typedef psMemoryId(*psMemFreeCallback) (const psMemBlock * ptr // /< the psMemBlock being freed92 typedef psMemoryId(*psMemFreeCallback) (const psMemBlock * ptr ///< the psMemBlock being freed 93 93 ); 94 94 … … 100 100 * @ingroup memCallback 101 101 */ 102 typedef void (*psMemProblemCallback) (const psMemBlock * ptr, // /< the pointer to the problematic memory102 typedef void (*psMemProblemCallback) (const psMemBlock * ptr, ///< the pointer to the problematic memory 103 103 // block. 104 const char *file, // /< the file in which the problem originated105 int lineno // /< the line number in which the problem originated104 const char *file, ///< the file in which the problem originated 105 int lineno ///< the line number in which the problem originated 106 106 ); 107 107 … … 123 123 */ 124 124 # ifdef DOXYGEN 125 void *psAlloc(size_t size // /< Size required125 void *psAlloc(size_t size ///< Size required 126 126 ); 127 127 # 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 131 132 ); 132 133 … … 144 145 */ 145 146 # ifdef DOXYGEN 146 void *psRealloc(void *ptr // /< Pointer to re-allocate147 size_t size, // /< Size required147 void *psRealloc(void *ptr ///< Pointer to re-allocate 148 size_t size, ///< Size required 148 149 ); 149 150 # 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 154 156 ); 155 157 … … 164 166 */ 165 167 # ifdef DOXYGEN 166 void psFree(void *ptr, // /< Pointer to free, if NULL, function returns immediately.168 void psFree(void *ptr, ///< Pointer to free, if NULL, function returns immediately. 167 169 ); 168 170 # 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 172 175 ); 173 176 … … 191 194 * @ingroup memTracing 192 195 */ 193 int psMemCheckLeaks(psMemoryId id0, // /< don't list blocks with id < id0194 psMemBlock *** arr, // /< pointer to array of pointers to leaked blocks, or NULL195 FILE * fd // /< print list of leaks to fd (or NULL)196 int 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) 196 199 ); 197 200 … … 201 204 * @ingroup memTracing 202 205 */ 203 int psMemCheckCorruption(bool abort_on_error // /< Abort on detecting corruption?206 int psMemCheckCorruption(bool abort_on_error ///< Abort on detecting corruption? 204 207 ); 205 208 … … 208 211 * @ingroup memRefCount 209 212 */ 210 psReferenceCount psMemGetRefCounter(void *vptr // /< Pointer to get refCounter for213 psReferenceCount psMemGetRefCounter(void *vptr ///< Pointer to get refCounter for 211 214 ); 212 215 … … 216 219 */ 217 220 # ifdef DOXYGEN 218 void *psMemIncrRefCounter(void *vptr // /< Pointer to increment refCounter, and return221 void *psMemIncrRefCounter(void *vptr ///< Pointer to increment refCounter, and return 219 222 ); 220 223 # 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 224 228 ); 225 229 … … 232 236 */ 233 237 # ifdef DOXYGEN 234 void *psMemDecrRefCounter(void *vptr // /< Pointer to decrement refCounter, and return238 void *psMemDecrRefCounter(void *vptr ///< Pointer to decrement refCounter, and return 235 239 ); 236 240 # 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 240 245 ); 241 246 … … 246 251 * @ingroup memCallback 247 252 */ 248 psMemProblemCallback psMemProblemCallbackSet(psMemProblemCallback func // /< Function to run253 psMemProblemCallback psMemProblemCallbackSet(psMemProblemCallback func ///< Function to run 249 254 ); 250 255 … … 253 258 * @ingroup memCallback 254 259 */ 255 psMemExhaustedCallback psMemExhaustedCallbackSet(psMemExhaustedCallback func // /< Function to run260 psMemExhaustedCallback psMemExhaustedCallbackSet(psMemExhaustedCallback func ///< Function to run 256 261 ); 257 262 … … 260 265 * @ingroup memCallback 261 266 */ 262 psMemAllocateCallback psMemAllocateCallbackSet(psMemAllocateCallback func // /< Function to run267 psMemAllocateCallback psMemAllocateCallbackSet(psMemAllocateCallback func ///< Function to run 263 268 ); 264 269 … … 267 272 * @ingroup memCallback 268 273 */ 269 psMemFreeCallback psMemFreeCallbackSet(psMemFreeCallback func // /< Function to run274 psMemFreeCallback psMemFreeCallbackSet(psMemFreeCallback func ///< Function to run 270 275 ); 271 276 … … 280 285 * @ingroup memCallback 281 286 */ 282 psMemoryId psMemAllocateCallbackSetID(psMemoryId id // /< ID to set287 psMemoryId psMemAllocateCallbackSetID(psMemoryId id ///< ID to set 283 288 ); 284 289 … … 287 292 * @ingroup memCallback 288 293 */ 289 psMemoryId psMemFreeCallbackSetID(psMemoryId id // /< ID to set294 psMemoryId psMemFreeCallbackSetID(psMemoryId id ///< ID to set 290 295 ); 291 296 -
trunk/psLib/src/sysUtils/psTrace.h
r1407 r1426 10 10 * @author George Gusciora, MHPCC 11 11 * 12 * @version $Revision: 1.1 2$ $Name: not supported by cvs2svn $13 * @date $Date: 2004-08-0 7 00:06:06$12 * @version $Revision: 1.13 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2004-08-09 22:44:25 $ 14 14 * 15 15 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 59 59 # ifndef DOXYGEN 60 60 /// Send a trace message 61 void p_psTrace(const char *facil, // /< facilty of interest62 int myLevel, // /< desired trace level63 ...) // /< trace message arguments61 void p_psTrace(const char *facil, ///< facilty of interest 62 int myLevel, ///< desired trace level 63 ...) ///< trace message arguments 64 64 ; 65 65 # endif 66 66 67 67 /// Set trace level 68 int psTraceSetLevel(const char *facil, // /< facilty of interest69 int level) // /< desired trace level68 int psTraceSetLevel(const char *facil, ///< facilty of interest 69 int level) ///< desired trace level 70 70 ; 71 71 72 72 /// Get the trace level 73 int psTraceGetLevel(const char *facil) // /< facilty of interest73 int psTraceGetLevel(const char *facil) ///< facilty of interest 74 74 ; 75 75 -
trunk/psLib/src/sysUtils/psType.h
r1407 r1426 11 11 * @author Ross Harman, MHPCC 12 12 * 13 * @version $Revision: 1.1 7$ $Name: not supported by cvs2svn $14 * @date $Date: 2004-08-0 7 00:06:06$13 * @version $Revision: 1.18 $ $Name: not supported by cvs2svn $ 14 * @date $Date: 2004-08-09 22:44:25 $ 15 15 * 16 16 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 40 40 */ 41 41 42 typedef uint8_t psU8; // /< 8-bit unsigned int43 typedef uint16_t psU16; // /< 16-bit unsigned int44 typedef uint32_t psU32; // /< 32-bit unsigned int45 typedef uint64_t psU64; // /< 64-bit unsigned int46 typedef int8_t psS8; // /< 8-bit signed int47 typedef int16_t psS16; // /< 16-bit signed int48 typedef int32_t psS32; // /< 32-bit signed int49 typedef int64_t psS64; // /< 64-bit signed int50 typedef float psF32; // /< 32-bit floating point51 typedef double psF64; // /< 64-bit floating point52 typedef complex float psC32; // /< complex with 32-bit floating point Real and Imagary numbers53 typedef complex double psC64; // /< complex with 64-bit floating point Real and Imagary numbers54 typedef void *psPTR; // /< void pointer42 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 55 55 56 56 typedef 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 floating57 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 68 68 // point. 69 PS_TYPE_C64 = 0x0810, // /< Complex numbers consisting of double-precision floating69 PS_TYPE_C64 = 0x0810, ///< Complex numbers consisting of double-precision floating 70 70 // 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. 72 72 } psElemType; 73 73 74 # define PS_TYPE_MASK PS_TYPE_U8 // /< the psElemType to use for mask image75 # define PS_TYPE_MASK_DATA U8 // /< the data member to use for mask image74 # 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 76 76 # define PS_TYPE_MASK_NAME "psU8" 77 typedef psU8 psMaskType; // /< the C datatype for a mask image77 typedef psU8 psMaskType; ///< the C datatype for a mask image 78 78 79 79 # define PS_MIN_S8 INT8_MIN … … 132 132 */ 133 133 typedef 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. 139 139 } psDimen; 140 140 … … 147 147 typedef struct 148 148 { 149 psElemType type; // /< Primitive type.150 psDimen dimen; // /< Dimensionality.149 psElemType type; ///< Primitive type. 150 psDimen dimen; ///< Dimensionality. 151 151 } 152 152 psType; -
trunk/psLib/src/types/psArray.h
r1407 r1426 12 12 * @author Ross Harman, MHPCC 13 13 * 14 * @version $Revision: 1.1 2$ $Name: not supported by cvs2svn $15 * @date $Date: 2004-08-0 7 00:06:06$14 * @version $Revision: 1.13 $ $Name: not supported by cvs2svn $ 15 * @date $Date: 2004-08-09 22:44:25 $ 16 16 * 17 17 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 34 34 typedef struct 35 35 { 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 elements36 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 39 39 } 40 40 psArray; … … 54 54 * 55 55 */ 56 psArray *psArrayAlloc(unsigned int nalloc // /< Total number of elements to make available.56 psArray *psArrayAlloc(unsigned int nalloc ///< Total number of elements to make available. 57 57 ); 58 58 … … 65 65 * 66 66 */ 67 psArray *psArrayRealloc(unsigned int nalloc, // /< Total number of elements to make available.68 psArray * restrict psArr // /< array to reallocate.67 psArray *psArrayRealloc(unsigned int nalloc, ///< Total number of elements to make available. 68 psArray * restrict psArr ///< array to reallocate. 69 69 ); 70 70 … … 76 76 * 77 77 */ 78 void psArrayElementFree(psArray * restrict psArr // /< Void pointer array to destroy.78 void psArrayElementFree(psArray * restrict psArr ///< Void pointer array to destroy. 79 79 ); 80 80 -
trunk/psLib/src/types/psHash.h
r1420 r1426 11 11 * @author George Gusciora, MHPCC 12 12 * 13 * @version $Revision: 1. 1$ $Name: not supported by cvs2svn $14 * @date $Date: 2004-08-09 2 0:29:43$13 * @version $Revision: 1.2 $ $Name: not supported by cvs2svn $ 14 * @date $Date: 2004-08-09 22:44:25 $ 15 15 * 16 16 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 29 29 typedef struct psHashBucket 30 30 { 31 char *key; // /< key for this item of data32 void *data; // /< the data itself33 struct psHashBucket *next; // /< list of other possible keys31 char *key; ///< key for this item of data 32 void *data; ///< the data itself 33 struct psHashBucket *next; ///< list of other possible keys 34 34 } 35 35 psHashBucket; … … 40 40 typedef struct psHash 41 41 { 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. 44 44 } 45 45 psHash; 46 46 47 47 /// Allocate hash buckets in table. 48 psHash *psHashAlloc(int nbucket // /< The number of buckets to allocate.48 psHash *psHashAlloc(int nbucket ///< The number of buckets to allocate. 49 49 ); 50 50 51 51 /// Insert entry into table. 52 bool psHashAdd(psHash * table, // /< table to insert in53 const char *key, // /< key to use54 void *data // /< data to insert52 bool psHashAdd(psHash * table, ///< table to insert in 53 const char *key, ///< key to use 54 void *data ///< data to insert 55 55 ); 56 56 57 57 /// Lookup key in table. 58 void *psHashLookup(psHash * table, // /< table to lookup key in59 const char *key // /< key to lookup58 void *psHashLookup(psHash * table, ///< table to lookup key in 59 const char *key ///< key to lookup 60 60 ); 61 61 62 62 /// Remove key from table. 63 bool psHashRemove(psHash * table, // /< table to lookup key in64 const char *key // /< key to lookup63 bool psHashRemove(psHash * table, ///< table to lookup key in 64 const char *key ///< key to lookup 65 65 ); 66 66 67 67 /// List all keys in table. 68 psList *psHashKeyList(psHash * table // /< table to list keys from.68 psList *psHashKeyList(psHash * table ///< table to list keys from. 69 69 ); 70 70 -
trunk/psLib/src/types/psList.h
r1407 r1426 10 10 * @ingroup LinkedList 11 11 * 12 * @version $Revision: 1.1 0$ $Name: not supported by cvs2svn $13 * @date $Date: 2004-08-0 7 00:06:06$12 * @version $Revision: 1.11 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2004-08-09 22:44:25 $ 14 14 * 15 15 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 33 33 */ 34 34 enum { 35 PS_LIST_HEAD = 0, // /< at head36 PS_LIST_TAIL = -1, // /< at tail37 PS_LIST_PREVIOUS = -2, // /< previous element38 PS_LIST_CURRENT = -3, // /< current element39 PS_LIST_NEXT = -4, // /< next element40 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) 41 41 }; 42 42 … … 44 44 typedef struct psListElem 45 45 { 46 struct psListElem *prev; // /< previous link in list47 struct psListElem *next; // /< next link in list48 void *data; // /< real data item46 struct psListElem *prev; ///< previous link in list 47 struct psListElem *next; ///< next link in list 48 void *data; ///< real data item 49 49 } 50 50 psListElem; … … 57 57 typedef struct 58 58 { 59 unsigned int size; // /< number of elements on list60 psListElem *head; // /< first element on list (may be NULL)61 psListElem *tail; // /< last element on list (may be NULL)62 psListElem *iter; // /< iteration cursor63 unsigned int iterIndex; // /< the numeric position of the iteration cursor in the list64 pthread_mutex_t lock; // /< mutex to lock a node during changes59 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 65 65 } 66 66 psList; … … 71 71 */ 72 72 psList *psListAlloc(void *data 73 // /< initial data item; may be NULL if no an empty psList is desired73 ///< initial data item; may be NULL if no an empty psList is desired 74 74 ) 75 75 ; … … 80 80 * NULL, the return value will also be NULL. 81 81 */ 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.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. 85 85 ); 86 86 … … 90 90 */ 91 91 bool psListRemove(psList * restrict list, 92 // /< list to remove element from92 ///< list to remove element from 93 93 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. 95 95 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. 97 97 ); 98 98 … … 104 104 * NULL is returned. 105 105 */ 106 void *psListGet(psList * restrict list, // /< list to retrieve element from107 int which // /< index number, or PS_LIST_NEXT, PS_LIST_PREV, PS_LIST_UNKNOWN106 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 108 108 ); 109 109 … … 112 112 * 113 113 */ 114 void psListSetIterator(psList * restrict list, // /< list to retrieve element from115 int where // /< index number, PS_LIST_HEAD, or PS_LIST_TAIL114 void psListSetIterator(psList * restrict list, ///< list to retrieve element from 115 int where ///< index number, PS_LIST_HEAD, or PS_LIST_TAIL 116 116 ); 117 117 … … 123 123 * parameter was NULL. 124 124 */ 125 void *psListGetNext(psList * restrict list // /< list to retrieve element from125 void *psListGetNext(psList * restrict list ///< list to retrieve element from 126 126 ); 127 127 … … 133 133 * iterator is not valid or list parameter was NULL. 134 134 */ 135 void *psListGetCurrent(psList * restrict list // /< list to retrieve element from135 void *psListGetCurrent(psList * restrict list ///< list to retrieve element from 136 136 ); 137 137 … … 143 143 * parameter was NULL. 144 144 */ 145 void *psListGetPrevious(psList * restrict list // /< list to retrieve element from145 void *psListGetPrevious(psList * restrict list ///< list to retrieve element from 146 146 ); 147 147 … … 151 151 * or NULL if the given dlist parameter is NULL. 152 152 */ 153 psArray *psListToArray(psList * dlist // /< List to convert153 psArray *psListToArray(psList * dlist ///< List to convert 154 154 ); 155 155 … … 159 159 * or NULL is the given arr parameter is NULL. 160 160 */ 161 psList *psArrayToList(psArray * arr // /< vector to convert161 psList *psArrayToList(psArray * arr ///< vector to convert 162 162 ); 163 163 -
trunk/psLib/src/types/psMetadata.h
r1407 r1426 11 11 * @author Ross Harman, MHPCC 12 12 * 13 * @version $Revision: 1.1 6$ $Name: not supported by cvs2svn $14 * @date $Date: 2004-08-0 7 00:06:06$13 * @version $Revision: 1.17 $ $Name: not supported by cvs2svn $ 14 * @date $Date: 2004-08-09 22:44:25 $ 15 15 * 16 16 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 34 34 */ 35 35 typedef enum { 36 PS_META_ITEM_SET = 0, // /< Null. Metadata is in psMetadataItem.items37 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. 48 48 } psMetadataType; 49 49 … … 55 55 typedef struct psMetadataItem 56 56 { 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. 60 60 union { 61 61 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. 69 69 } 70 70 psMetadataItem; … … 102 102 * @return psMetadataItem*: Pointer metadata item. 103 103 */ 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.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. 108 108 ); 109 109 … … 121 121 * @return psMetadataItem*: Pointer metadata item. 122 122 */ 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 item123 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 127 127 // data. 128 128 ); … … 134 134 * @return psMetadata*: Pointer metadata. 135 135 */ 136 psMetadata *psMetadataAlloc(void // /< Void.136 psMetadata *psMetadataAlloc(void ///< Void. 137 137 ); 138 138 … … 143 143 * @return bool: True for success, false for failure. 144 144 */ 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.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. 148 148 ); 149 149 … … 154 154 * @return bool: True for success, false for failure. 155 155 */ 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.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. 162 162 ); 163 163 … … 171 171 * @return bool: True for success, false for failure. 172 172 */ 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.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. 176 176 ); 177 177 … … 183 183 * @return psMetadataItem*: Pointer metadata item. 184 184 */ 185 psMetadataItem *psMetadataLookup(psMetadata * restrict md, // /< Metadata collection to insert metadat185 psMetadataItem *psMetadataLookup(psMetadata * restrict md, ///< Metadata collection to insert metadat 186 186 // item. 187 const char *restrict key // /< Name of metadata key.187 const char *restrict key ///< Name of metadata key. 188 188 ); 189 189 … … 194 194 * @return psMetadataItem*: Pointer metadata item. 195 195 */ 196 psMetadataItem *psMetadataGet(psMetadata * restrict md, // /< Metadata collection to insert metadat item.197 int where // /< Location to be retrieved.196 psMetadataItem *psMetadataGet(psMetadata * restrict md, ///< Metadata collection to insert metadat item. 197 int where ///< Location to be retrieved. 198 198 ); 199 199 … … 204 204 * @return void: void. 205 205 */ 206 bool psMetadataSetIterator(psMetadata * restrict md, // /< Metadata collection to iterate.207 int where // /< Location of iterator.206 bool psMetadataSetIterator(psMetadata * restrict md, ///< Metadata collection to iterate. 207 int where ///< Location of iterator. 208 208 ); 209 209 … … 214 214 * @return psMetadataItem*: Pointer metadata item. 215 215 */ 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.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. 219 219 ); 220 220 … … 225 225 * @return psMetadataItem*: Pointer metadata item. 226 226 */ 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.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. 230 230 ); 231 231 … … 240 240 * @return psMetadataItem*: Pointer metadata item. 241 241 */ 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.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. 245 245 ); 246 246 … … 252 252 * @return psMetadata*: Pointer metadata. 253 253 */ 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.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. 258 258 ); 259 259 … … 264 264 * @return psMetadata*: Pointer metadata. 265 265 */ 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.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. 270 270 ); 271 271
Note:
See TracChangeset
for help on using the changeset viewer.
