IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 344


Ignore:
Timestamp:
Mar 31, 2004, 5:01:04 PM (22 years ago)
Author:
Paul Price
Message:

Standardised on /< as Doxygen comment for variable.

Location:
trunk/archive/pslib/include
Files:
19 edited

Legend:

Unmodified
Added
Removed
  • trunk/archive/pslib/include/psAstrom.h

    r343 r344  
    4040typedef struct {
    4141    // Telescope longitude, latitude and height are stored separately, since they don't change with pointing
    42     double ra, dec;                     //!< Telescope boresight
    43     double ha;                          //!< Hour angle
    44     double zd;                          //!< Zenith distance
    45     double az;                          //!< Azimuth
    46     double lst;                         //!< Local Sidereal Time
    47     float mjd;                          //!< MJD of observation
    48     float rotAngle;                     //!< Rotator position angle
    49     float temp;                         //!< Air temperature, for estimating refraction
    50     float pressure;                     //!< Air pressure, for calculating refraction
    51     float humidity;                     //!< Relative humidity, for calculating refraction
    52     float exptime;                      //!< Exposure time
     42    double ra, dec;                     ///< Telescope boresight
     43    double ha;                          ///< Hour angle
     44    double zd;                          ///< Zenith distance
     45    double az;                          ///< Azimuth
     46    double lst;                         ///< Local Sidereal Time
     47    float mjd;                          ///< MJD of observation
     48    float rotAngle;                     ///< Rotator position angle
     49    float temp;                         ///< Air temperature, for estimating refraction
     50    float pressure;                     ///< Air pressure, for calculating refraction
     51    float humidity;                     ///< Relative humidity, for calculating refraction
     52    float exptime;                      ///< Exposure time
    5353    /* Derived quantities */
    54     float posAngle;                     //!< Position angle
    55     float parallactic;                  //!< Parallactic angle
    56     float airmass;                      //!< Airmass, calculated from zenith distance
    57     float pf;                           //!< Parallactic factor
     54    float posAngle;                     ///< Position angle
     55    float parallactic;                  ///< Parallactic angle
     56    float airmass;                      ///< Airmass, calculated from zenith distance
     57    float pf;                           ///< Parallactic factor
    5858    char *cameraName;                   ///< name of camera which provided exposure
    5959    char *telescopeName;                ///< name of telescope which provided exposure
    60     psGrommit *grommit;                 //!< Data needed to convert from the sky to the tangent plane
     60    psGrommit *grommit;                 ///< Data needed to convert from the sky to the tangent plane
    6161} psExposure;
    6262
     
    6464/** The fixed pattern residual offsets.  These are specified via a coarse grid of x and y offsets. */
    6565typedef struct {
    66     int nX, nY;                         //!< Number of elements in x and y
    67     double x0, y0;                      //!< Position of the lower-left corner of the grid on the focal plane
    68     double xScale, yScale;              //!< Scale of the grid
    69     double **x, **y;                    //!< The grid of offsets in x and y
     66    int nX, nY;                         ///< Number of elements in x and y
     67    double x0, y0;                      ///< Position of the lower-left corner of the grid on the focal plane
     68    double xScale, yScale;              ///< Scale of the grid
     69    double **x, **y;                    ///< The grid of offsets in x and y
    7070} psFixedPattern;
    7171
     
    8282    psDistortion *TPtoFP;               ///< Transformation term from
    8383    psDistortion *FPtoTP;               ///< Transformation term from
    84     psFixedPattern *pattern;            //!< Fixed pattern residual offsets
     84    psFixedPattern *pattern;            ///< Fixed pattern residual offsets
    8585    psExposure *exp;                    ///< information about this exposure
    8686    psPhotSystem colorPlus, colorMinus; ///< Colour reference
    87     float rmsX, rmsY;                   //!< Dispersion in astrometric solution
    88     float chi2;                         //!< chi^2 of astrometric solution
     87    float rmsX, rmsY;                   ///< Dispersion in astrometric solution
     88    float chi2;                         ///< chi^2 of astrometric solution
    8989} psFPA;
    9090
     
    9898    psMetaDataSet *md;                  ///< Chip-level metadata
    9999    psCoordXform *chipToFPA;            ///< Transformations from chip coordinates to FPA coordinates
    100     psCoordXform *FPAtoChip;            //!< Transformations from FPA coordinates to chip
     100    psCoordXform *FPAtoChip;            ///< Transformations from FPA coordinates to chip
    101101
    102102    struct psFPA *parentFPA;            ///< FPA which contains this chip
     
    108108    int nReadouts;                      ///< number of readouts in this cell realization; each may have its
    109109                                        ///< own image, objects and overscan.
    110     psReadout *readouts;                //!< Readouts from the cell
     110    psReadout *readouts;                ///< Readouts from the cell
    111111    psMetaDataSet *md;                  ///< Cell-level metadata
    112112
     
    120120/** a Readout: a collection of pixels */
    121121typedef struct {
    122     const int x0, y0;                   //!< Offset from the lower-left corner
    123     const int nx, ny;                   //!< Image binning
     122    const int x0, y0;                   ///< Offset from the lower-left corner
     123    const int nx, ny;                   ///< Image binning
    124124    psImage *image;                     ///< imaging area of cell
    125125    psDlist *objects;                   ///< objects derived from cell
    126126    psImage *overscan;                  ///< bias region (subimage) of cell
    127     psMetaDataSet *md;                  //!< Readout-level metadata
     127    psMetaDataSet *md;                  ///< Readout-level metadata
    128128} psReadout;
    129129   
     
    138138/** returns Chip in FPA which contains the given FPA coordinate */
    139139psChip *
    140 psChipInFPA (psChip *out,               //!< Chip to return, or NULL
     140psChipInFPA (psChip *out,               ///< Chip to return, or NULL
    141141             const psFPA *fpa,          ///< FPA description
    142142             const psCoord *coord       ///< coordinate in FPA
     
    145145/** returns Cell in Chip which contains the given chip coordinate */
    146146psCell *
    147 psCellInChip(psCell *out,               //!< Cell to return, or NULL
     147psCellInChip(psCell *out,               ///< Cell to return, or NULL
    148148             const psChip *chip,        ///< chip description
    149149             const psCoord *coord       ///< coordinate in chip
     
    152152/** Return the cell in FPA which contains the given FPA coordinates */
    153153psCell *
    154 psCellInFPA(psCell *out,                //!< Cell to return, or NULL
    155             const psFPA *fpa,           //!< FPA description
    156             const psCoord *coord        //!< Coordinate in FPA
     154psCellInFPA(psCell *out,                ///< Cell to return, or NULL
     155            const psFPA *fpa,           ///< FPA description
     156            const psCoord *coord        ///< Coordinate in FPA
    157157            );
    158158
     
    160160/** Convert (RA,Dec) to cell and cell coordinates */
    161161psCoord *
    162 psCoordSkyToCell(psCoord *out,          //!< Coordinates to return, or NULL
    163                  psCell *cell,          //!< Cell to return
    164                  const psFPA *fpa       //!< FPA description
     162psCoordSkyToCell(psCoord *out,          ///< Coordinates to return, or NULL
     163                 psCell *cell,          ///< Cell to return
     164                 const psFPA *fpa       ///< FPA description
    165165                 );
    166166
    167167/** Convert cell and cell coordinate to (RA,Dec) */
    168168psCoord *
    169 psCoordCellToSky(psCoord *out,          //!< Coordinates to return, or NULL
    170                  const psCell *cell,    //!< Cell to get coordinates for
    171                  const psCoord *coord   //!< cell coordinates to transform
     169psCoordCellToSky(psCoord *out,          ///< Coordinates to return, or NULL
     170                 const psCell *cell,    ///< Cell to get coordinates for
     171                 const psCoord *coord   ///< cell coordinates to transform
    172172                 );
    173173
    174174/** Quick and dirty cell to (RA,Dec) --- employs cellToSky transformation */
    175175psCoord *
    176 psCoordCellToSkyQuick(psCoord *out,     //!< Coordinates to return, or NULL
    177                       const psCell *cell, //!< Cell description
    178                       const psCoord *coord //!< cell coordinates to transform
     176psCoordCellToSkyQuick(psCoord *out,     ///< Coordinates to return, or NULL
     177                      const psCell *cell, ///< Cell description
     178                      const psCoord *coord ///< cell coordinates to transform
    179179                      );
    180180
    181181/** Convert (RA,Dec) to tangent plane coords */
    182182psCoord *
    183 psCoordSkyToTP(psCoord *out,            //!< Coordinates to return, or NULL
    184                const psExposure *exp,   //!< Exposure description
    185                const psCoord *coord     //!< input Sky coordinate
     183psCoordSkyToTP(psCoord *out,            ///< Coordinates to return, or NULL
     184               const psExposure *exp,   ///< Exposure description
     185               const psCoord *coord     ///< input Sky coordinate
    186186               );
    187187
    188188/** Convert tangent plane coords to focal plane coordinates */
    189189psCoord *
    190 psCoordTPtoFPA(psCoord *out,            //!< Coordinates to return, or NULL
    191                const psFPA *fpa,        //!< FPA description
    192                const psCoord *coord     //!< input TP coordinate
     190psCoordTPtoFPA(psCoord *out,            ///< Coordinates to return, or NULL
     191               const psFPA *fpa,        ///< FPA description
     192               const psCoord *coord     ///< input TP coordinate
    193193               );
    194194
    195195/** converts the specified FPA coord to the coord on the given Chip */
    196196psCoord *
    197 psCoordFPAtoChip (psCoord *out,         //!< Coordinates to return, or NULL
     197psCoordFPAtoChip (psCoord *out,         ///< Coordinates to return, or NULL
    198198                  const psChip *chip,   ///< Chip of interest
    199199                  const psCoord *coord  ///< input FPA coordinate
     
    202202/** converts the specified Chip coord to the coord on the given Cell */
    203203psCoord *
    204 psCoordChiptoCell (psCoord *out,        //!< Coordinates to return, or NULL
     204psCoordChiptoCell (psCoord *out,        ///< Coordinates to return, or NULL
    205205                   const psCell *cell,  ///< Cell of interest
    206206                   const psCoord *coord ///< input Chip coordinate
     
    209209/** converts the specified Cell coord to the coord on the parent Chip */
    210210psCoord *
    211 psCoordCelltoChip (psCoord *out,        //!< Coordinates to return, or NULL
     211psCoordCelltoChip (psCoord *out,        ///< Coordinates to return, or NULL
    212212                   const psCell *cell,  ///< Cell description
    213213                   const psCoord *coord ///< input Cell coordinate
     
    216216/** converts the specified Chip coord to the coord on the parent FPA */
    217217psCoord *
    218 psCoordChiptoFPA (psCoord *out,         //!< Coordinates to return, or NULL
     218psCoordChiptoFPA (psCoord *out,         ///< Coordinates to return, or NULL
    219219                  const psChip *chip,   ///< Chip description
    220220                  const psCoord *coord  ///< input Chip coordinate
     
    223223/** Convert focal plane coords to tangent plane coordinates */
    224224psCoord *
    225 psCoordFPAToTP(psCoord *out,            //!< Coordinates to return, or NULL
    226                const psFPA *fpa,        //!< FPA description
    227                const psCoord *coord     //!< input FPA coordinate
     225psCoordFPAToTP(psCoord *out,            ///< Coordinates to return, or NULL
     226               const psFPA *fpa,        ///< FPA description
     227               const psCoord *coord     ///< input FPA coordinate
    228228               );
    229229
    230230/** Convert tangent plane coords to (RA,Dec) */
    231231psCoord *
    232 psCoordTPtoSky(psCoord *out,            //!< Coordinates to return, or NULL
    233                const psExposure *exp,   //!< Exposure description
    234                const psCoord *coord     //!< input TP coordinate
     232psCoordTPtoSky(psCoord *out,            ///< Coordinates to return, or NULL
     233               const psExposure *exp,   ///< Exposure description
     234               const psCoord *coord     ///< input TP coordinate
    235235               );
    236236
    237237/** Convert Cell coords to FPA coordinates */
    238238psCoord *
    239 psCoordCellToFPA(psCoord *out,          //!< Coordinates to return, or NULL
    240                  const psCell *cell,    //!< Cell description
    241                  const psCoord *coord   //!< Input cell coordinates
     239psCoordCellToFPA(psCoord *out,          ///< Coordinates to return, or NULL
     240                 const psCell *cell,    ///< Cell description
     241                 const psCoord *coord   ///< Input cell coordinates
    242242                 );
    243243
    244244/** Get the airmass for a given position and sidereal time */
    245245float
    246 psGetAirmass(const psCoord *coord,      //!< Position on the sky
    247              double siderealTime,       //!< Sidereal time
    248              float height               //!< Height above sea level
     246psGetAirmass(const psCoord *coord,      ///< Position on the sky
     247             double siderealTime,       ///< Sidereal time
     248             float height               ///< Height above sea level
    249249             );
    250250
    251251/** Get the parallactic angle for a given position and sidereal time */
    252252float
    253 psGetParallactic(const psCoord *coord,  //!< Position on the sky
    254                  double siderealTime    //!< Sidereal time
     253psGetParallactic(const psCoord *coord,  ///< Position on the sky
     254                 double siderealTime    ///< Sidereal time
    255255                 );
    256256
    257257/** Estimate atmospheric refraction, along the parallactic */
    258258float
    259 psGetRefraction(float colour,           //!< Colour of object
     259psGetRefraction(float colour,           ///< Colour of object
    260260                psPhotSystem colorPlus, ///< Colour reference
    261261                psPhotSystem colorMinus, ///< Colour reference
    262                 const psExposure *exp   //!< Telescope pointing information, for airmass, temp and pressure
     262                const psExposure *exp   ///< Telescope pointing information, for airmass, temp and pressure
    263263                );
    264264
    265265/** Calculate the parallax factor */
    266266psCoord *
    267 psGetParallaxFactor(const psExposure *exp //!< Exposure details
     267psGetParallaxFactor(const psExposure *exp ///< Exposure details
    268268    );
    269269
     
    272272/** Constructor */
    273273psExposure *
    274 psExposureAlloc(double ra, double dec,  //!< Telescope boresight
    275                 double ha,              //!< Hour angle
    276                 double zd,              //!< Zenith distance
    277                 double az,              //!< Azimuth
    278                 double lst,             //!< Local Sidereal Time
    279                 float mjd,              //!< MJD
    280                 float rotAngle,         //!< Rotator position angle
    281                 float temp,             //!< Temperature
    282                 float pressure,         //!< Pressure
    283                 float humidity,         //!< Relative humidity
    284                 float exptime           //!< Exposure time
     274psExposureAlloc(double ra, double dec,  ///< Telescope boresight
     275                double ha,              ///< Hour angle
     276                double zd,              ///< Zenith distance
     277                double az,              ///< Azimuth
     278                double lst,             ///< Local Sidereal Time
     279                float mjd,              ///< MJD
     280                float rotAngle,         ///< Rotator position angle
     281                float temp,             ///< Temperature
     282                float pressure,         ///< Pressure
     283                float humidity,         ///< Relative humidity
     284                float exptime           ///< Exposure time
    285285                );
    286286
    287287/** Destructor */
    288288void
    289 psExposureFree(psExposure *restrict myExp //!< Object to destroy
     289psExposureFree(psExposure *restrict myExp ///< Object to destroy
    290290               );
    291291/* \} */ // End of AstroGroup Functions
  • trunk/archive/pslib/include/psBitMask.h

    r257 r344  
    99/** A bitmask of arbitrary length. */
    1010typedef struct {
    11     int n;                              //!< Number of chars that form the mask
    12     char *bits;                         //!< The bits
     11    int n;                              ///< Number of chars that form the mask
     12    char *bits;                         ///< The bits
    1313} psBitMask;
    1414
     
    1919
    2020/** Constructor */
    21 psBitMask *psBitMaskAlloc(int n         //!< Number of bits required
     21psBitMask *psBitMaskAlloc(int n         ///< Number of bits required
    2222    );
    2323
    2424/** Destructor */
    25 void psBitMaskFree(psBitMask *restrict myMask //!< Bit mask to destroy
     25void psBitMaskFree(psBitMask *restrict myMask ///< Bit mask to destroy
    2626    );
    2727
     
    3030/** Set a bit mask */
    3131psBitMask *
    32 psBitMaskSet(psBitMask *outMask,        //!< Output bit mask or NULL
    33              const psBitMask *myMask,   //!< Input bit mask
    34              int bit                    //!< Bit to set
     32psBitMaskSet(psBitMask *outMask,        ///< Output bit mask or NULL
     33             const psBitMask *myMask,   ///< Input bit mask
     34             int bit                    ///< Bit to set
    3535    );
    3636
    3737/** Check a bit mask.  Returns true or false */
    3838int
    39 psBitMaskTest(const psBitMask *checkMask, //!< Bit mask to check
    40               int bit                   //!< Bit to check
     39psBitMaskTest(const psBitMask *checkMask, ///< Bit mask to check
     40              int bit                   ///< Bit to check
    4141    );
    4242
    4343/** apply the given operator to two bit masks */
    4444psBitMask *
    45 psBitMaskOp(psBitMask *outMask,         //!< Output bit mask or NULL
    46             const psBitMask *restrict inMask1, //!< Input bit mask 1
    47             char *operator,             //!< bit mask operator (AND, OR, XOR)
    48             const psBitMask *restrict inMask2 //!< Input bit mask 2
     45psBitMaskOp(psBitMask *outMask,         ///< Output bit mask or NULL
     46            const psBitMask *restrict inMask1, ///< Input bit mask 1
     47            char *operator,             ///< bit mask operator (AND, OR, XOR)
     48            const psBitMask *restrict inMask2 ///< Input bit mask 2
    4949    );
    5050
  • trunk/archive/pslib/include/psDateTime.h

    r257 r344  
    2121/** Get current sidereal time at longitude \ingroup AstroGroup */
    2222double
    23 psGetSidereal(float mjd,                //!< MJD
    24               float longitude)          //!< Longitude
     23psGetSidereal(float mjd,                ///< MJD
     24              float longitude)          ///< Longitude
    2525;
    2626
     
    2828/** Convert psTime to ISOTime (Human-readable date/time string YYYY/MM/DD,HH:MM:SS.SSS) */
    2929char *
    30 psTimeToISOTime (psTime time)           //!< Input psTime time
     30psTimeToISOTime (psTime time)           ///< Input psTime time
    3131;
    3232
    3333/** Convert psTime to UTC */
    3434double
    35 psTimeToUTC (psTime time)               //!< Input psTime time
     35psTimeToUTC (psTime time)               ///< Input psTime time
    3636;
    3737
    3838/** Convert psTime to MJD */
    3939double
    40 psTimeToMJD (psTime time)               //!< Input psTime time
     40psTimeToMJD (psTime time)               ///< Input psTime time
    4141;
    4242
    4343/** Convert psTime to JD */
    4444double
    45 psTimeToJD (psTime time)                        //!< Input psTime time
     45psTimeToJD (psTime time)                        ///< Input psTime time
    4646;
    4747
    4848/** Convert psTime to timeval (struct timeval) */
    4949struct timeval *
    50 psTimeToTimeval (psTime time)           //!< Input psTime time
     50psTimeToTimeval (psTime time)           ///< Input psTime time
    5151;
    5252
    5353/** Convert psTime to broken-down time (struct tm) */
    5454struct tm *
    55 psTimeToTm (psTime time)                        //!< Input psTime time
     55psTimeToTm (psTime time)                        ///< Input psTime time
    5656;
    5757
     
    5959/** Convert ISOTime (Human-readable date/time string YYYY/MM/DD,HH:MM:SS.SSS) to psTime \ingroup AstroGroup */
    6060psTime *
    61 psISOTimeToTime (char *input)           //!< Input ISOTime time
     61psISOTimeToTime (char *input)           ///< Input ISOTime time
    6262;
    6363
    6464/** Convert UTC to psTime */
    6565psTime *
    66 psUTCToTime (double input)              //!< Input UTC time
     66psUTCToTime (double input)              ///< Input UTC time
    6767;
    6868
    6969/** Convert MJD to psTime */
    7070psTime *
    71 psMJDToTime (double input)              //!< Input MJD time
     71psMJDToTime (double input)              ///< Input MJD time
    7272;
    7373
    7474/** Convert JD to psTime */
    7575psTime *
    76 psJDToTime (double input)               //!< Input JD time
     76psJDToTime (double input)               ///< Input JD time
    7777;
    7878
    7979/** Convert timeval to psTime (struct timeval) */
    8080psTime *
    81 psTimevalToTime (struct timeval *input) //!< Input timeval time
     81psTimevalToTime (struct timeval *input) ///< Input timeval time
    8282;
    8383
    8484/** Convert broken-to psTime down time (struct tm) */
    8585psTime *
    86 psTMtoTime (struct tm *input)           //!< Input tm time
     86psTMtoTime (struct tm *input)           ///< Input tm time
    8787;
    8888
  • trunk/archive/pslib/include/psDlist.h

    r291 r344  
    99/** Doubly-linked list element */
    1010typedef struct psDlistElem {
    11    struct psDlistElem *prev;            //!< previous link in list
    12    struct psDlistElem *next;            //!< next link in list
    13    void *data;                          //!< real data item
     11   struct psDlistElem *prev;            ///< previous link in list
     12   struct psDlistElem *next;            ///< next link in list
     13   void *data;                          ///< real data item
    1414} psDlistElem;
    1515
    1616/** Doubly-linked list */
    1717typedef struct {
    18    int n;                               //!< number of elements on list
    19    psDlistElem *head;                   //!< first element on list (may be NULL)
    20    psDlistElem *tail;                   //!< last element on list (may be NULL)
    21    psDlistElem *iter;                   //!< iteration cursor
     18   int n;                               ///< number of elements on list
     19   psDlistElem *head;                   ///< first element on list (may be NULL)
     20   psDlistElem *tail;                   ///< last element on list (may be NULL)
     21   psDlistElem *iter;                   ///< iteration cursor
    2222} psDlist;
    2323
    2424/** Special values of index into list */
    2525enum {
    26    PS_DLIST_HEAD = 0,                   //!< at head
    27    PS_DLIST_TAIL = -1,                  //!< at tail
    28    PS_DLIST_UNKNOWN = -2,               //!< unknown position
    29    PS_DLIST_PREV = -3,                  //!< previous element
    30    PS_DLIST_NEXT = -4                   //!< next element
     26   PS_DLIST_HEAD = 0,                   ///< at head
     27   PS_DLIST_TAIL = -1,                  ///< at tail
     28   PS_DLIST_UNKNOWN = -2,               ///< unknown position
     29   PS_DLIST_PREV = -3,                  ///< previous element
     30   PS_DLIST_NEXT = -4                   ///< next element
    3131};
    3232
     
    3737
    3838/** Constructor */
    39 psDlist *psDlistAlloc(void *data        //!< initial data item; may be NULL
     39psDlist *psDlistAlloc(void *data        ///< initial data item; may be NULL
    4040                      );
    4141
    4242/** Destructor */
    43 void psDlistFree(psDlist *list,         //!< list to destroy
    44                 void (*elemFree)(void *) //!< destructor for data on list
     43void psDlistFree(psDlist *list,         ///< list to destroy
     44                void (*elemFree)(void *) ///< destructor for data on list
    4545                 );
    4646
     
    4848
    4949/** Add to list */
    50 psDlist *psDlistAdd(psDlist *list,      //!< list to add to (may be NULL)
    51                     void *data,         //!< data item to add
    52                     int where           //!< index, PS_DLIST_HEAD, or PS_DLIST_TAIL
     50psDlist *psDlistAdd(psDlist *list,      ///< list to add to (may be NULL)
     51                    void *data,         ///< data item to add
     52                    int where           ///< index, PS_DLIST_HEAD, or PS_DLIST_TAIL
    5353                    );
    5454
    5555/** Append to a list */
    56 psDlist *psDlistAppend(psDlist *list,   //!< list to append to (may be NULL)
    57                        void *data       //!< data item to add
     56psDlist *psDlistAppend(psDlist *list,   ///< list to append to (may be NULL)
     57                       void *data       ///< data item to add
    5858                       );
    5959
    6060/** Remove from a list */
    61 void *psDlistRemove(psDlist *list,      //!< list to remove element from
    62                     void *data,         //!< data item to remove
    63                     int which           //!< index of item, or PS_DLIST_UNKNOWN, or PS_DLIST_NEXT, or
    64                                         //!< PS_DLIST_PREV
     61void *psDlistRemove(psDlist *list,      ///< list to remove element from
     62                    void *data,         ///< data item to remove
     63                    int which           ///< index of item, or PS_DLIST_UNKNOWN, or PS_DLIST_NEXT, or
     64                                        ///< PS_DLIST_PREV
    6565                    );
    6666/** Retrieve from a list */
    67 void *psDlistGet(const psDlist *list,   //!< list to retrieve element from
    68                  int which              //!< index of item, or PS_DLIST_NEXT, or PS_DLIST_PREV
     67void *psDlistGet(const psDlist *list,   ///< list to retrieve element from
     68                 int which              ///< index of item, or PS_DLIST_NEXT, or PS_DLIST_PREV
    6969                 );
    7070
     
    7272
    7373/** Set the iterator */
    74 void psDlistSetIterator(psDlist *list,  //!< list to retrieve element from
    75                         int where,      //!< index, PS_DLIST_HEAD, or PS_DLIST_TAIL
    76                         int which       //!< index of item, or PS_DLIST_UNKNOWN, or PS_DLIST_NEXT, or
    77                                         //!< PS_DLIST_PREV
     74void psDlistSetIterator(psDlist *list,  ///< list to retrieve element from
     75                        int where,      ///< index, PS_DLIST_HEAD, or PS_DLIST_TAIL
     76                        int which       ///< index of item, or PS_DLIST_UNKNOWN, or PS_DLIST_NEXT, or
     77                                        ///< PS_DLIST_PREV
    7878                        );
    7979
    8080/** Get next element */
    81 void *psDlistGetNext(psDlist *list,     //!< list to retrieve element from
    82                      int which          //!< index of item, or PS_DLIST_UNKNOWN, or PS_DLIST_NEXT, or
    83                                         //!< PS_DLIST_PREV
     81void *psDlistGetNext(psDlist *list,     ///< list to retrieve element from
     82                     int which          ///< index of item, or PS_DLIST_UNKNOWN, or PS_DLIST_NEXT, or
     83                                        ///< PS_DLIST_PREV
    8484                     );
    8585
    8686/** Get previous element */
    87 void *psDlistGetPrev(psDlist *list,     //!< list to retrieve element from
    88                      int which          //!< index of item, or PS_DLIST_UNKNOWN, or PS_DLIST_NEXT, or
    89                                         //!< PS_DLIST_PREV
     87void *psDlistGetPrev(psDlist *list,     ///< list to retrieve element from
     88                     int which          ///< index of item, or PS_DLIST_UNKNOWN, or PS_DLIST_NEXT, or
     89                                        ///< PS_DLIST_PREV
    9090                     );
    9191
    9292/** Convert doubly-linked list to an array */
    93 psVoidPtrArray *psDlistToArray(psDlist *dlist //!< List to convert
     93psVoidPtrArray *psDlistToArray(psDlist *dlist ///< List to convert
    9494                               );
    9595
    9696/** Convert array to a doubly-linked list */
    97 psDlist *psArrayToDlist(psVoidPtrArray *arr //!< Array to convert
     97psDlist *psArrayToDlist(psVoidPtrArray *arr ///< Array to convert
    9898                        );
    9999
  • trunk/archive/pslib/include/psFFT.h

    r317 r344  
    1616/** Details on FFT implementation (private).  Example shown is for FFTW */
    1717typedef struct {
    18     fftw_plan plan;                     //!< FFTW plan on how to do the FFT
    19     char *filename;                     //!< File name for FFTW plan
     18    fftw_plan plan;                     ///< FFTW plan on how to do the FFT
     19    char *filename;                     ///< File name for FFTW plan
    2020} p_psFFTDetails;
    2121
    2222/** Fast Fourier Transform */
    2323typedef struct {
    24     p_psFFTDetails *details;            //!< Details on FFT implementation (private)
    25     int nx, ny;                         //!< Size in x and y
    26     float *real;                        //!< Data in real space: a 2D array using the [nx*y + x] stuff
    27     void *fourier;                      //!< Data in fourier space; implementation dependent
     24    p_psFFTDetails *details;            ///< Details on FFT implementation (private)
     25    int nx, ny;                         ///< Size in x and y
     26    float *real;                        ///< Data in real space: a 2D array using the [nx*y + x] stuff
     27    void *fourier;                      ///< Data in fourier space; implementation dependent
    2828} psFFT;
    2929
    3030/** Constructor */
    3131psFFT *
    32 psFFTAlloc(psImage *image               //!< Image to transform
     32psFFTAlloc(psImage *image               ///< Image to transform
    3333           );
    3434
    3535/** Constructor for 1D case */
    3636psFFT *
    37 psFFTAlloc1D(const psFloatArray *arr    //!< Array to transform
     37psFFTAlloc1D(const psFloatArray *arr    ///< Array to transform
    3838             );
    3939
    4040/** Destructor. Returns the data in the real space as an image. */
    4141psImage *
    42 psFFTFree(psImage *out,                 //!< Image to write the data to, or NULL
    43           psFFT *restrict fft           //!< FFT to destroy
     42psFFTFree(psImage *out,                 ///< Image to write the data to, or NULL
     43          psFFT *restrict fft           ///< FFT to destroy
    4444          );
    4545
    4646/** Forward FFT: from real to fourier space */
    4747psFFT *
    48 psFFTForward(psFFT *fft                 //!< FFT to apply (input and output)
     48psFFTForward(psFFT *fft                 ///< FFT to apply (input and output)
    4949             );
    5050
    5151/** Reverse FFT: from fourier to real space */
    5252psFFT *
    53 psFFTReverse(psFFT *fft                 //!< FFT to apply (input and output)
     53psFFTReverse(psFFT *fft                 ///< FFT to apply (input and output)
    5454             );
    5555
    5656/** Apply filter function in fourier space */
    5757psFFT *
    58 psFFTFilter(psFFT *fft,                 //!< FFT to use (input and output)
    59             float (*filterFunc)(int kx, int ky) //!< External filter function
     58psFFTFilter(psFFT *fft,                 ///< FFT to use (input and output)
     59            float (*filterFunc)(int kx, int ky) ///< External filter function
    6060            );
    6161
    6262/** Apply complex filter function */
    6363psFFT *
    64 psFFTFilterComplex(psFFT *fft,          //!< FFT to use (input and output)
    65                    float (*realFilterFunc)(int kx, int ky), //!< External filter function, real part
    66                    float (*imagFilterFunc)(int kx, int ky) //!< External filter function, imaginary part
     64psFFTFilterComplex(psFFT *fft,          ///< FFT to use (input and output)
     65                   float (*realFilterFunc)(int kx, int ky), ///< External filter function, real part
     66                   float (*imagFilterFunc)(int kx, int ky) ///< External filter function, imaginary part
    6767                   );
    6868
     
    7171 */
    7272psFFT *
    73 psFFTCrossCorrelate(psFFT *out          //!< Output FFT (or NULL)
    74                     const psFFT *fft1, const psFFT *fft2 //!< FFTs to use in cross-correlation
     73psFFTCrossCorrelate(psFFT *out          ///< Output FFT (or NULL)
     74                    const psFFT *fft1, const psFFT *fft2 ///< FFTs to use in cross-correlation
    7575                    );
    7676
    7777/** Calculate FFT of the convolution.  Straight multiplication of the FFTs */
    7878psFFT *
    79 psFFTConvolve(psFFT *out,               //!< Output FFT (or NULL)
    80               const psFFT *fft1, const psFFT *fft2 //!< FFTs to multiply
     79psFFTConvolve(psFFT *out,               ///< Output FFT (or NULL)
     80              const psFFT *fft1, const psFFT *fft2 ///< FFTs to multiply
    8181              );
    8282
    8383/** Calculate power spectrum */
    8484psFloatArray *
    85 psFFTPowerSpec(psFFT *fft               //!< FFT to use (input and output)
     85psFFTPowerSpec(psFFT *fft               ///< FFT to use (input and output)
    8686               );
    8787
    8888/* Convert the real data in the FFT struct to an image again */
    8989psImage *
    90 psFFTGetImage(psImage *out,             //!< Image to write to (or NULL)
    91               const psFFT *fft          //!< FFT to get image from
     90psFFTGetImage(psImage *out,             ///< Image to write to (or NULL)
     91              const psFFT *fft          ///< FFT to get image from
    9292              );
    9393
    9494/** Convert the Fourier transform data in the FFT struct to an image of complex numbers */
    9595psImage *
    96 psFFTGetFT(psImage *out,                //!< Image to write to (or NULL)
    97            const psFFT *fft             //!< FFT to get Fourier transform from
     96psFFTGetFT(psImage *out,                ///< Image to write to (or NULL)
     97           const psFFT *fft             ///< FFT to get Fourier transform from
    9898           );
    9999
  • trunk/archive/pslib/include/psFunctions.h

    r298 r344  
    1010    is not a Gaussian deviate.  The evaluated Gaussian is: \f[ exp(-\frac{(x-mean)^2}{2\sigma^2}) \f] */
    1111float
    12 psGaussian(float x,                     //!< Value at which to evaluate
    13            float mean,                  //!< Mean for the Gaussian
    14            float stddev                 //!< Standard deviation for the Gaussian
     12psGaussian(float x,                     ///< Value at which to evaluate
     13           float mean,                  ///< Mean for the Gaussian
     14           float stddev                 ///< Standard deviation for the Gaussian
    1515           );
    1616
     
    1919/** One-dimensional polynomial */
    2020typedef struct {
    21     int n;                              //!< Number of terms
    22     float *restrict coeff;              //!< Coefficients
    23     float *restrict coeffErr;           //!< Error in coefficients
    24     char *restrict mask;                //!< Coefficient mask
     21    int n;                              ///< Number of terms
     22    float *restrict coeff;              ///< Coefficients
     23    float *restrict coeffErr;           ///< Error in coefficients
     24    char *restrict mask;                ///< Coefficient mask
    2525} psPolynomial1D;
    2626
    2727/** Two-dimensional polynomial */
    2828typedef struct {
    29     int nX, nY;                         //!< Number of terms in x and y
    30     float *restrict *restrict coeff;    //!< Coefficients
    31     float *restrict *restrict coeffErr; //!< Error in coefficients
    32     char *restrict *restrict mask;      //!< Coefficients mask
     29    int nX, nY;                         ///< Number of terms in x and y
     30    float *restrict *restrict coeff;    ///< Coefficients
     31    float *restrict *restrict coeffErr; ///< Error in coefficients
     32    char *restrict *restrict mask;      ///< Coefficients mask
    3333} psPolynomial2D;
    3434
    3535/** Three-dimensional polynomial */
    3636typedef struct {
    37     int nX, nY, nZ;                     //!< Number of terms in x, y and z
    38     float *restrict *restrict *restrict coeff; //!< Coefficients
    39     float *restrict *restrict *restrict coeffErr; //!< Error in coefficients
    40     char *restrict *restrict *restrict mask; //!< Coefficients mask
     37    int nX, nY, nZ;                     ///< Number of terms in x, y and z
     38    float *restrict *restrict *restrict coeff; ///< Coefficients
     39    float *restrict *restrict *restrict coeffErr; ///< Error in coefficients
     40    char *restrict *restrict *restrict mask; ///< Coefficients mask
    4141} psPolynomial3D;
    4242
    4343/** Four-dimensional polynomial */
    4444typedef struct {
    45     int nW, nX, nY, nZ;                 //!< Number of terms in w, x, y and z
    46     float *restrict *restrict *restrict *restrict coeff; //!< Coefficients
    47     float *restrict *restrict *restrict *restrict coeffErr; //!< Error in coefficients
    48     char *restrict *restrict *restrict *restrict mask; //!< Coefficients mask
     45    int nW, nX, nY, nZ;                 ///< Number of terms in w, x, y and z
     46    float *restrict *restrict *restrict *restrict coeff; ///< Coefficients
     47    float *restrict *restrict *restrict *restrict coeffErr; ///< Error in coefficients
     48    char *restrict *restrict *restrict *restrict mask; ///< Coefficients mask
    4949} psPolynomial4D;
    5050
     
    5656
    5757/** Constructor */
    58 psPolynomial1D *psPolynomial1DAlloc(int n //!< Number of terms
    59                                     );
    60 /** Constructor */
    61 psPolynomial2D *psPolynomial2DAlloc(int nX, int nY //!< Number of terms in x and y
    62                                     );
    63 /** Constructor */
    64 psPolynomial3D *psPolynomial3DAlloc(int nX, int nY, int nZ //!< Number of terms in x, y and z
    65                                     );
    66 /** Constructor */
    67 psPolynomial4D *psPolynomial4DAlloc(int nW, int nX, int nY, int nZ //!< Number of terms in w, x, y and z
    68                                     );
    69 
    70 /** Destructor */
    71 void psPolynomial1DFree(psPolynomial1D *restrict myPoly //!< Polynomial to destroy
     58psPolynomial1D *psPolynomial1DAlloc(int n ///< Number of terms
     59                                    );
     60/** Constructor */
     61psPolynomial2D *psPolynomial2DAlloc(int nX, int nY ///< Number of terms in x and y
     62                                    );
     63/** Constructor */
     64psPolynomial3D *psPolynomial3DAlloc(int nX, int nY, int nZ ///< Number of terms in x, y and z
     65                                    );
     66/** Constructor */
     67psPolynomial4D *psPolynomial4DAlloc(int nW, int nX, int nY, int nZ ///< Number of terms in w, x, y and z
     68                                    );
     69
     70/** Destructor */
     71void psPolynomial1DFree(psPolynomial1D *restrict myPoly ///< Polynomial to destroy
    7272    );
    7373     
    7474/** Destructor */
    75 void psPolynomial2DFree(psPolynomial2D *restrict myPoly //!< Polynomial to destroy
    76     );
    77 /** Destructor */
    78 void psPolynomial3DFree(psPolynomial3D *restrict myPoly //!< Polynomial to destroy
    79     );
    80 /** Destructor */
    81 void psPolynomial4DFree(psPolynomial4D *restrict myPoly //!< Polynomial to destroy
     75void psPolynomial2DFree(psPolynomial2D *restrict myPoly ///< Polynomial to destroy
     76    );
     77/** Destructor */
     78void psPolynomial3DFree(psPolynomial3D *restrict myPoly ///< Polynomial to destroy
     79    );
     80/** Destructor */
     81void psPolynomial4DFree(psPolynomial4D *restrict myPoly ///< Polynomial to destroy
    8282    );
    8383
    8484/** Evaluate 1D polynomial */
    8585float
    86 psEvalPolynomial1D(float x,             //!< Value at which to evaluate
    87                    const psPolynomial1D *restrict myPoly //!< Coefficients for the polynomial
     86psEvalPolynomial1D(float x,             ///< Value at which to evaluate
     87                   const psPolynomial1D *restrict myPoly ///< Coefficients for the polynomial
    8888                   );
    8989
    9090/** Evaluate 2D polynomial */
    9191float
    92 psEvalPolynomial2D(float x,             //!< Value x at which to evaluate
    93                    float y,             //!< Value y at which to evaluate
    94                    const psPolynomial2D *restrict myPoly //!< Coefficients for the polynomial
     92psEvalPolynomial2D(float x,             ///< Value x at which to evaluate
     93                   float y,             ///< Value y at which to evaluate
     94                   const psPolynomial2D *restrict myPoly ///< Coefficients for the polynomial
    9595                   );
    9696
    9797/** Evaluate 3D polynomial */
    9898float
    99 psEvalPolynomial3D(float x,             //!< Value x at which to evaluate
    100                    float y,             //!< Value y at which to evaluate
    101                    float z,             //!< Value z at which to evaluate
    102                    const psPolynomial3D *restrict myPoly //!< Coefficients for the polynomial
     99psEvalPolynomial3D(float x,             ///< Value x at which to evaluate
     100                   float y,             ///< Value y at which to evaluate
     101                   float z,             ///< Value z at which to evaluate
     102                   const psPolynomial3D *restrict myPoly ///< Coefficients for the polynomial
    103103                   );
    104104
    105105/** Evaluate 4D polynomial */
    106106float
    107 psEvalPolynomial4D(float w,             //!< Value w at which to evaluate
    108                    float x,             //!< Value x at which to evaluate
    109                    float y,             //!< Value y at which to evaluate
    110                    float z,             //!< Value z at which to evaluate
    111                    const psPolynomial4D *restrict myPoly //!< Coefficients for the polynomial
     107psEvalPolynomial4D(float w,             ///< Value w at which to evaluate
     108                   float x,             ///< Value x at which to evaluate
     109                   float y,             ///< Value y at which to evaluate
     110                   float z,             ///< Value z at which to evaluate
     111                   const psPolynomial4D *restrict myPoly ///< Coefficients for the polynomial
    112112                   );
    113113
     
    120120/** Double-precision one-dimensional polynomial */
    121121typedef struct {
    122     int n;                              //!< Number of terms
    123     double *restrict coeff;             //!< Coefficients
    124     double *restrict coeffErr;          //!< Error in coefficients
    125     char *restrict mask;                //!< Coefficient mask
     122    int n;                              ///< Number of terms
     123    double *restrict coeff;             ///< Coefficients
     124    double *restrict coeffErr;          ///< Error in coefficients
     125    char *restrict mask;                ///< Coefficient mask
    126126} psDPolynomial1D;
    127127
    128128/** Double-precision two-dimensional polynomial */
    129129typedef struct {
    130     int nX, nY;                         //!< Number of terms in x and y
    131     double *restrict *restrict coeff;   //!< Coefficients
    132     double *restrict *restrict coeffErr; //!< Error in coefficients
    133     char *restrict *restrict mask;      //!< Coefficients mask
     130    int nX, nY;                         ///< Number of terms in x and y
     131    double *restrict *restrict coeff;   ///< Coefficients
     132    double *restrict *restrict coeffErr; ///< Error in coefficients
     133    char *restrict *restrict mask;      ///< Coefficients mask
    134134} psDPolynomial2D;
    135135
    136136/** Double-precision three-dimensional polynomial */
    137137typedef struct {
    138     int nX, nY, nZ;                     //!< Number of terms in x, y and z
    139     double *restrict *restrict *restrict coeff; //!< Coefficients
    140     double *restrict *restrict *restrict coeffErr; //!< Error in coefficients
    141     char *restrict *restrict *restrict mask; //!< Coefficient mask
     138    int nX, nY, nZ;                     ///< Number of terms in x, y and z
     139    double *restrict *restrict *restrict coeff; ///< Coefficients
     140    double *restrict *restrict *restrict coeffErr; ///< Error in coefficients
     141    char *restrict *restrict *restrict mask; ///< Coefficient mask
    142142} psDPolynomial3D;
    143143
    144144/** Double-precision four-dimensional polynomial */
    145145typedef struct {
    146     int nW, nX, nY, nZ;                 //!< Number of terms in w, x, y and z
    147     double *restrict *restrict *restrict *restrict coeff; //!< Coefficients
    148     double *restrict *restrict *restrict *restrict coeffErr; //!< Error in coefficients
    149     char *restrict *restrict *restrict *restrict mask; //!< Coefficients mask
     146    int nW, nX, nY, nZ;                 ///< Number of terms in w, x, y and z
     147    double *restrict *restrict *restrict *restrict coeff; ///< Coefficients
     148    double *restrict *restrict *restrict *restrict coeffErr; ///< Error in coefficients
     149    char *restrict *restrict *restrict *restrict mask; ///< Coefficients mask
    150150} psDPolynomial4D;
    151151
     
    156156
    157157/** Constructor */
    158 psDPolynomial1D *psDPolynomial1DAlloc(int n //!< Number of terms
    159     );
    160 /** Constructor */
    161 psDPolynomial2D *psDPolynomial2DAlloc(int nX, int nY //!< Number of terms in x and y
    162     );
    163 /** Constructor */
    164 psDPolynomial3D *psDPolynomial3DAlloc(int nX, int nY, int nZ //!< Number of terms in x, y and z
    165     );
    166 /** Constructor */
    167 psDPolynomial4D *psDPolynomial4DAlloc(int nW, int nX, int nY, int nZ //!< Number of terms in w, x, y and z
    168     );
    169 
    170 
    171 /** Destructor */
    172 void psDPolynomial1DFree(psDPolynomial1D *restrict myPoly //!< Polynomial to destroy
    173     );
    174 /** Destructor */
    175 void psDPolynomial2DFree(psDPolynomial2D *restrict myPoly //!< Polynomial to destroy
    176     );
    177 /** Destructor */
    178 void psDPolynomial3DFree(psDPolynomial3D *restrict myPoly //!< Polynomial to destroy
    179     );
    180 /** Destructor */
    181 void psDPolynomial4DFree(psDPolynomial4D *restrict myPoly //!< Polynomial to destroy
     158psDPolynomial1D *psDPolynomial1DAlloc(int n ///< Number of terms
     159    );
     160/** Constructor */
     161psDPolynomial2D *psDPolynomial2DAlloc(int nX, int nY ///< Number of terms in x and y
     162    );
     163/** Constructor */
     164psDPolynomial3D *psDPolynomial3DAlloc(int nX, int nY, int nZ ///< Number of terms in x, y and z
     165    );
     166/** Constructor */
     167psDPolynomial4D *psDPolynomial4DAlloc(int nW, int nX, int nY, int nZ ///< Number of terms in w, x, y and z
     168    );
     169
     170
     171/** Destructor */
     172void psDPolynomial1DFree(psDPolynomial1D *restrict myPoly ///< Polynomial to destroy
     173    );
     174/** Destructor */
     175void psDPolynomial2DFree(psDPolynomial2D *restrict myPoly ///< Polynomial to destroy
     176    );
     177/** Destructor */
     178void psDPolynomial3DFree(psDPolynomial3D *restrict myPoly ///< Polynomial to destroy
     179    );
     180/** Destructor */
     181void psDPolynomial4DFree(psDPolynomial4D *restrict myPoly ///< Polynomial to destroy
    182182    );
    183183
     
    185185/** Evaluate 1D polynomial (double precision) */
    186186double
    187 psEvalDPolynomial1D(double x,           //!< Value at which to evaluate
    188                     const psDPolynomial1D *restrict myPoly //!< Coefficients for the polynomial
     187psEvalDPolynomial1D(double x,           ///< Value at which to evaluate
     188                    const psDPolynomial1D *restrict myPoly ///< Coefficients for the polynomial
    189189                    );
    190190
    191191/** Evaluate 2D polynomial (double precision) */
    192192double
    193 psEvalDPolynomial2D(double x,           //!< Value x at which to evaluate
    194                     double y,           //!< Value y at which to evaluate
    195                     const psDPolynomial2D *restrict myPoly //!< Coefficients for the polynomial
     193psEvalDPolynomial2D(double x,           ///< Value x at which to evaluate
     194                    double y,           ///< Value y at which to evaluate
     195                    const psDPolynomial2D *restrict myPoly ///< Coefficients for the polynomial
    196196                    );
    197197
    198198/** Evaluate 3D polynomial (double precision) */
    199199double
    200 psEvalDPolynomial3D(double x,           //!< Value x at which to evaluate
    201                     double y,           //!< Value y at which to evaluate
    202                     double z,           //!< Value z at which to evaluate
    203                     const psDPolynomial3D *restrict myPoly //!< Coefficients for the polynomial
     200psEvalDPolynomial3D(double x,           ///< Value x at which to evaluate
     201                    double y,           ///< Value y at which to evaluate
     202                    double z,           ///< Value z at which to evaluate
     203                    const psDPolynomial3D *restrict myPoly ///< Coefficients for the polynomial
    204204                    );
    205205
    206206/** Evaluate 4D polynomial (double precision) */
    207207double
    208 psEvalDPolynomial4D(double w,           //!< Value w at which to evaluate
    209                     double x,           //!< Value x at which to evaluate
    210                     double y,           //!< Value y at which to evaluate
    211                     double z,           //!< Value z at which to evaluate
    212                     const psDPolynomial4D *restrict myPoly //!< Coefficients for the polynomial
     208psEvalDPolynomial4D(double w,           ///< Value w at which to evaluate
     209                    double x,           ///< Value x at which to evaluate
     210                    double y,           ///< Value y at which to evaluate
     211                    double z,           ///< Value z at which to evaluate
     212                    const psDPolynomial4D *restrict myPoly ///< Coefficients for the polynomial
    213213                    );
    214214
  • trunk/archive/pslib/include/psImage.h

    r292 r344  
    2222        psF32 **rows_f32;               ///< pointers to psF32 data
    2323        psF64 **rows_f64;               ///< pointers to psF64 data
    24         psComplex **rows_complex;       //!< pointers to psComplex data
     24        psComplex **rows_complex;       ///< pointers to psComplex data
    2525    } rows;
    2626    psImage *parent;                    ///< parent, if a subimage
     
    4545/// Create a subimage of the specified area.
    4646psImage *
    47 psImageSubset(psImage *out,             //!< Subimage to return, or NULL
     47psImageSubset(psImage *out,             ///< Subimage to return, or NULL
    4848              const psImage *image,     ///< parent image
    4949              int nx,                   ///< subimage width (<= image.nx - x0) 
     
    6060/** Destroy the pixels of the specified image */
    6161psImage *
    62 psImageFreePixels(psImage *restrict image //!< Image whose pixels are to be freed
     62psImageFreePixels(psImage *restrict image ///< Image whose pixels are to be freed
    6363    );
    6464
     
    7878/// Extract pixels from rectlinear region to a vector.
    7979psFloatArray *
    80 psImageSlice(psFloatArray *out,         //!< Vector to output, or NULL
     80psImageSlice(psFloatArray *out,         ///< Vector to output, or NULL
    8181             const psImage *input,      ///< extract slice from this image
    8282             int x,                     ///< starting x coord of region to slice
     
    9090/// Extract pixels along a line to a vector.
    9191psFloatArray *
    92 psImageCut(psFloatArray *out,           //!< Vector to output, or NULL
     92psImageCut(psFloatArray *out,           ///< Vector to output, or NULL
    9393           const psImage *input,        ///< extract cut from this image
    9494           float xs,                    ///< starting x coord of cut
     
    102102/// Extract radial annulii data to a vector.
    103103psFloatArray *
    104 psImageRadialCut(psFloatArray *out,     //!< Vector to output, or NULL
     104psImageRadialCut(psFloatArray *out,     ///< Vector to output, or NULL
    105105                 const psImage *input,  ///< extract profile from this image
    106106                 float x,               ///< center x coord of annulii
     
    115115/// Extract a 2-d contour from an image at the given threshold.
    116116psFloatArray *
    117 psImageContour(psFloatArray *out,       //!< Vector to output, or NULL
     117psImageContour(psFloatArray *out,       ///< Vector to output, or NULL
    118118               const psImage *input,    ///< create contour for this image
    119119               float threshold, ///< contour image at this threshold
     
    125125/// Rebin image to new scale.
    126126psImage *
    127 psImageRebin(psImage *out,              //!< Image to output, or NULL
     127psImageRebin(psImage *out,              ///< Image to output, or NULL
    128128             const psImage *input,      ///< rebin this image
    129129             float scale,               ///< rebinning scale: doutput = scale*dinput
     
    133133/// Rotate image by given angle.
    134134psImage *
    135 psImageRotate(psImage *out,             //!< Image to output, or NULL
     135psImageRotate(psImage *out,             ///< Image to output, or NULL
    136136              const psImage *input,     ///< rotate this image
    137137              float angle               ///< rotate by this amount anti-clockwise (degrees)
     
    141141/// Drop edge pixels, and set newly exposed pixels to 'exposed'.
    142142psImage *
    143 psImageShift(psImage *out,              //!< Image to output, or NULL
     143psImageShift(psImage *out,              ///< Image to output, or NULL
    144144             const psImage *input,      ///< shift this image
    145145             float dx,                  ///< shift by this amount in x
     
    151151/// Edge pixels wrap to the other side (no values are lost).
    152152psImage *
    153 psImageRoll(psImage *out,               //!< Image to output, or NULL
     153psImageRoll(psImage *out,               ///< Image to output, or NULL
    154154            const psImage *input,       ///< roll this image
    155155            int dx,                     ///< roll this amount in x
     
    249249/// Perform an FFT on the image.  The output image type is psComplex.
    250250psImage *
    251 psImageFFT(psImage *output,             //!< Output image
     251psImageFFT(psImage *output,             ///< Output image
    252252           const psImage *input,        ///< image to FFT
    253253           int direction                ///< FFT direction
  • trunk/archive/pslib/include/psLogMsg.h

    r325 r344  
    3131/* \} */ // End of SystemGroup Functions
    3232
    33 enum { PS_LOG_ABORT = 0, PS_LOG_ERROR, PS_LOG_WARN, PS_LOG_INFO }; //!< Status codes for log messages
     33enum { PS_LOG_ABORT = 0, PS_LOG_ERROR, PS_LOG_WARN, PS_LOG_INFO }; ///< Status codes for log messages
    3434
    35 enum { PS_LOG_NONE, PS_LOG_TO_STDERR, PS_LOG_TO_STDOUT }; //!< Destinations for log messages
     35enum { PS_LOG_NONE, PS_LOG_TO_STDERR, PS_LOG_TO_STDOUT }; ///< Destinations for log messages
    3636
    3737#endif
  • trunk/archive/pslib/include/psMatrix.h

    r340 r344  
    1717/** Invert matrix.  Not using restrict, to allow inversion to be done in-place */
    1818psImage *
    19 psMatrixInvert(psImage *out,            //!< Matrix to return, or NULL
    20                const psImage *myMatrix, //!< Matrix to be inverted
    21                float *restrict determinant //!< Determinant to return, or NULL
     19psMatrixInvert(psImage *out,            ///< Matrix to return, or NULL
     20               const psImage *myMatrix, ///< Matrix to be inverted
     21               float *restrict determinant ///< Determinant to return, or NULL
    2222    );
    2323
    2424/** Matrix determinant */
    2525float
    26 psMatrixDeterminant(const psImage *restrict myMatrix //!< Matrix to get determinant for
     26psMatrixDeterminant(const psImage *restrict myMatrix ///< Matrix to get determinant for
    2727                    );
    2828
    2929/** Matrix operation: addition, subtraction, multiplication */
    3030psImage *
    31 psMatrixOp(psImage *out,                //!< Matrix to return, or NULL
    32            const psImage *matrix1,      //!< Matrix 1
    33            const psImage *matrix2       //!< Matrix 2
     31psMatrixOp(psImage *out,                ///< Matrix to return, or NULL
     32           const psImage *matrix1,      ///< Matrix 1
     33           const psImage *matrix2       ///< Matrix 2
    3434    );
    3535
    3636/** Transpose Matrix */
    3737psImage *
    38 psMatrixTranspose(psImage *out,         //!< Matrix to return, or NULL
    39                   const psImage *myMatrix //!< Matrix to transpose
     38psMatrixTranspose(psImage *out,         ///< Matrix to return, or NULL
     39                  const psImage *myMatrix ///< Matrix to transpose
    4040                  );
    4141
     
    4646/** Convert matrix to vector.  Intended for a 1-d matrix. */
    4747psVector *
    48 psMatrixToVector(psVector *out,         //!< Vector to return, or NULL
    49                  psImage *myMatrix      //!< Matrix to convert
     48psMatrixToVector(psVector *out,         ///< Vector to return, or NULL
     49                 psImage *myMatrix      ///< Matrix to convert
    5050    );
    5151
    5252/** Convert vector to matrix. */
    5353psImage *
    54 psVectorToMatrix(psImage *out,          //!< Matrix to return, or NULL
    55                  psVector *myVector     //!< Vector to convert
     54psVectorToMatrix(psImage *out,          ///< Matrix to return, or NULL
     55                 psVector *myVector     ///< Vector to convert
    5656    );
    5757
  • trunk/archive/pslib/include/psMemory.h

    r326 r344  
    1616 */
    1717typedef struct {
    18     const void *magic0;                 //!< initialised to p_psMEMMAGIC
    19     const unsigned long id;             //!< a unique ID for this allocation
    20     const char *file;                   //!< set from __FILE__ in e.g. p_psAlloc
    21     const int lineno;                   //!< set from __LINE__ in e.g. p_psAlloc
    22     int refCounter;                     //!< how many times pointer is referenced
    23     const void *magic;                  //!< initialised to p_psMEMMAGIC
     18    const void *magic0;                 ///< initialised to p_psMEMMAGIC
     19    const unsigned long id;             ///< a unique ID for this allocation
     20    const char *file;                   ///< set from __FILE__ in e.g. p_psAlloc
     21    const int lineno;                   ///< set from __LINE__ in e.g. p_psAlloc
     22    int refCounter;                     ///< how many times pointer is referenced
     23    const void *magic;                  ///< initialised to p_psMEMMAGIC
    2424} psMemBlock;
    2525
     
    3939
    4040/// Memory allocation. Underlying private function called by macro psAlloc.
    41 void *p_psAlloc(size_t size,            //!< Size required
    42                 const char *file,       //!< File of call
    43                 int lineno              //!< Line number of call
     41void *p_psAlloc(size_t size,            ///< Size required
     42                const char *file,       ///< File of call
     43                int lineno              ///< Line number of call
    4444                );
    4545
    4646/// Memory re-allocation.  Underlying private function called by macro psRealloc.
    47 void *p_psRealloc(void *ptr,            //!< Pointer to re-allocate
    48                   size_t size,          //!< Size required
    49                   const char *file,     //!< File of call
    50                   int lineno            //!< Line number of call
     47void *p_psRealloc(void *ptr,            ///< Pointer to re-allocate
     48                  size_t size,          ///< Size required
     49                  const char *file,     ///< File of call
     50                  int lineno            ///< Line number of call
    5151                  );
    5252
    5353/// Free memory.  Underlying private function called by macro psFree.
    54 void p_psFree(void *ptr,                //!< Pointer to free
    55               const char *file,         //!< File of call
    56               int lineno                //!< Line number of call
     54void p_psFree(void *ptr,                ///< Pointer to free
     55              const char *file,         ///< File of call
     56              int lineno                ///< Line number of call
    5757              );
    5858
    5959/// Check for memory leaks
    60 int psMemCheckLeaks(int id0,            //!< don't list blocks with id < id0
    61                     psMemBlock ***arr,  //!< pointer to array of pointers to leaked blocks, or NULL
    62                     FILE *fd            //!< print list of leaks to fd (or NULL)
     60int psMemCheckLeaks(int id0,            ///< don't list blocks with id < id0
     61                    psMemBlock ***arr,  ///< pointer to array of pointers to leaked blocks, or NULL
     62                    FILE *fd            ///< print list of leaks to fd (or NULL)
    6363                    );
    6464
    6565/// Check for memory corruption
    66 int psMemCheckCorruption(int abort_on_error //!< Abort on detecting corruption?
     66int psMemCheckCorruption(int abort_on_error ///< Abort on detecting corruption?
    6767                         );
    6868
    6969/// Return reference counter
    70 int psMemGetRefCounter(void *vptr       //!< Pointer to get refCounter for
     70int psMemGetRefCounter(void *vptr       ///< Pointer to get refCounter for
    7171                       );
    7272
    7373/// Increment reference counter and return the pointer
    74 void *psMemIncrRefCounter(void *vptr    //!< Pointer to increment refCounter, and return
     74void *psMemIncrRefCounter(void *vptr    ///< Pointer to increment refCounter, and return
    7575                          );
    7676
    7777/// Decrement reference counter and return the pointer
    78 void *psMemDecrRefCounter(void *vptr    //!< Pointer to decrement refCounter, and return
     78void *psMemDecrRefCounter(void *vptr    ///< Pointer to decrement refCounter, and return
    7979                          );
    8080
    8181/// Set callback for problems
    82 psMemProblemCallback psMemProblemSetCB(psMemProblemCallback func //!< Function to run
     82psMemProblemCallback psMemProblemSetCB(psMemProblemCallback func ///< Function to run
    8383                                       );
    8484
    8585/// Set callback for out-of-memory
    86 psMemExhaustedCallback psMemExhaustedSetCB(psMemExhaustedCallback func //!< Function to run
     86psMemExhaustedCallback psMemExhaustedSetCB(psMemExhaustedCallback func ///< Function to run
    8787                                           );
    8888
    8989/// Set call back for when a particular memory block is allocated
    90 psMemCallback psMemAllocateSetCB(psMemCallback func //!< Function to run
     90psMemCallback psMemAllocateSetCB(psMemCallback func ///< Function to run
    9191                                 );
    9292
     
    9999
    100100/// set p_psMemAllocateID to id
    101 long psMemSetAllocateID(long id         //!< ID to set
     101long psMemSetAllocateID(long id         ///< ID to set
    102102                        );
    103103
    104104/// set p_psMemFreeID to id
    105 long psMemSetFreeID(long id             //!< ID to set
     105long psMemSetFreeID(long id             ///< ID to set
    106106                    );
    107107
  • trunk/archive/pslib/include/psMetaData.h

    r294 r344  
    88
    99/** Possible types of metadata. */
    10 typedef enum {                          //!< type of val is:
    11     PS_META_ITEM_SET = 0,               //!< NULL; metadata is in psMetaDataType.items
    12     PS_META_FLOAT,                      //!< float (.f)
    13     PS_META_INT,                        //!< int (.i)
    14     PS_META_STR,                        //!< string (.v)
    15     PS_META_IMG,                        //!< image (.v)
    16     PS_META_JPEG,                       //!< JPEG (.v)
    17     PS_META_PNG,                        //!< PNG (.v)
    18     PS_META_ASTROM,                     //!< astrometric coefficients (.v)
    19     PS_META_UNKNOWN,                    //!< other (.v)
    20     PS_META_NTYPE                       //!< Number of types; must be last
     10typedef enum {                          ///< type of val is:
     11    PS_META_ITEM_SET = 0,               ///< NULL; metadata is in psMetaDataType.items
     12    PS_META_FLOAT,                      ///< float (.f)
     13    PS_META_INT,                        ///< int (.i)
     14    PS_META_STR,                        ///< string (.v)
     15    PS_META_IMG,                        ///< image (.v)
     16    PS_META_JPEG,                       ///< JPEG (.v)
     17    PS_META_PNG,                        ///< PNG (.v)
     18    PS_META_ASTROM,                     ///< astrometric coefficients (.v)
     19    PS_META_UNKNOWN,                    ///< other (.v)
     20    PS_META_NTYPE                       ///< Number of types; must be last
    2121} psMetaDataType;
    2222
    2323/** Metadata flags (not exclusive with psMetaDataType). */
    2424typedef enum {
    25     PS_META_TYPE_MASK =     0xffff,     //!< the type enum must fit in this mask
    26     PS_META_UNIQUE =       0x10000,     //!< the name must be unique (default)
    27     PS_META_NON_UNIQUE =   0x20000,     //!< the name may be repeated, and should be disambiguated for us
     25    PS_META_TYPE_MASK =     0xffff,     ///< the type enum must fit in this mask
     26    PS_META_UNIQUE =       0x10000,     ///< the name must be unique (default)
     27    PS_META_NON_UNIQUE =   0x20000,     ///< the name may be repeated, and should be disambiguated for us
    2828} psMetaDataFlags;
    2929
    3030/** A struct to define a single item of metadata */
    3131typedef struct {
    32     const int id;                       //!< unique ID for this item
    33     char *restrict name;                //!< Name of item
    34     psMetaDataType type;                //!< type of this item
    35     psMetaDataFlags flags;              //!< flags associated with this item
     32    const int id;                       ///< unique ID for this item
     33    char *restrict name;                ///< Name of item
     34    psMetaDataType type;                ///< type of this item
     35    psMetaDataFlags flags;              ///< flags associated with this item
    3636    const union {
    37         float f;                        //!< floating value
    38         int i;                          //!< integer value
    39         void *v;                        //!< other type
    40     } val;                              //!< value of metadata
    41     char *comment;                      //!< optional comment ("", not NULL)
    42     psDlist *restrict items;            //!< list of psMetaDataItems with the same name
     37        float f;                        ///< floating value
     38        int i;                          ///< integer value
     39        void *v;                        ///< other type
     40    } val;                              ///< value of metadata
     41    char *comment;                      ///< optional comment ("", not NULL)
     42    psDlist *restrict items;            ///< list of psMetaDataItems with the same name
    4343} psMetaDataItem;
    4444
    4545/** A set of metadata */
    4646typedef struct {
    47     psDlist *restrict list;             //!< list of psMetaDataItem
    48     psHash *restrict table;             //!< hash table of the same metadata
     47    psDlist *restrict list;             ///< list of psMetaDataItem
     48    psHash *restrict table;             ///< hash table of the same metadata
    4949} psMetaDataSet;
    5050
     
    5555
    5656/** Constructor */
    57 psMetaDataItem *psMetaDataItemAlloc(int typeFlags, //!< type of this piece of metadata + flags
    58                                     const void *val, //!< value of new item N.b. a pointer even if the item
    59                                                      //!< is of type e.g. int
    60                                     const char *comment, //!< comment associated with item
    61                                     const char *name, //!< name of new item of metadata (may be in sprintf
    62                                                       //!< format)
    63                                     ... //!< possible arguments for name format
     57psMetaDataItem *psMetaDataItemAlloc(int typeFlags, ///< type of this piece of metadata + flags
     58                                    const void *val, ///< value of new item N.b. a pointer even if the item
     59                                                     ///< is of type e.g. int
     60                                    const char *comment, ///< comment associated with item
     61                                    const char *name, ///< name of new item of metadata (may be in sprintf
     62                                                      ///< format)
     63                                    ... ///< possible arguments for name format
    6464    );
    6565
    6666/** Destructor */
    67 void psMetaDataItemFree(psMetaDataItem *ms //!< piece of metadata to destroy
     67void psMetaDataItemFree(psMetaDataItem *ms ///< piece of metadata to destroy
    6868    );
    6969/** Constructor */
    70 psMetaDataSet *psMetaDataSetAlloc(void);   //!< make a new set of metadata
     70psMetaDataSet *psMetaDataSetAlloc(void);   ///< make a new set of metadata
    7171
    7272/** Destructor */
    73 void psMetaDataSetFree(psMetaDataSet *ms //!< destroy a set of metadata
     73void psMetaDataSetFree(psMetaDataSet *ms ///< destroy a set of metadata
    7474    );
    7575
     
    7777
    7878/// Add entry to the end of the metadata set
    79 psMetaDataItem *psMetaDataAppend(psMetaDataSet *restrict ms, //!< Metadata set to add to
    80                                  psMetaDataItem *restrict item //!< Metatdata to add
     79psMetaDataItem *psMetaDataAppend(psMetaDataSet *restrict ms, ///< Metadata set to add to
     80                                 psMetaDataItem *restrict item ///< Metatdata to add
    8181    );
    8282
    8383/// delete entry from the metadata set
    84 psMetaDataItem *psMetaDataRemove(psMetaDataSet *restrict ms, //!< Metadata set to delete from
    85                                  const char *restrict key //!< Key to delete
     84psMetaDataItem *psMetaDataRemove(psMetaDataSet *restrict ms, ///< Metadata set to delete from
     85                                 const char *restrict key ///< Key to delete
    8686    );
    8787
    8888/// reset the iterator to the start of the list
    89 void psMetaDataSetIterator(psMetaDataSet *ms //!< Metadata set to set iterator for
     89void psMetaDataSetIterator(psMetaDataSet *ms ///< Metadata set to set iterator for
    9090    );
    9191
    9292/// get the next entry in the sequence
    93 psMetaDataItem *psMetaDataGetNext(psMetaDataSet *restrict ms, //!< Metadata set to get from
    94                                   const char *restrict match //!< Match this
     93psMetaDataItem *psMetaDataGetNext(psMetaDataSet *restrict ms, ///< Metadata set to get from
     94                                  const char *restrict match ///< Match this
    9595    );
    9696
    9797/// find the metadata with the specified key
    98 psMetaDataItem *psMetaDataLookup(const psMetaDataSet *restrict ms, //!< Metadata set to look up
    99                                  const char *restrict key //!< Key to find
     98psMetaDataItem *psMetaDataLookup(const psMetaDataSet *restrict ms, ///< Metadata set to look up
     99                                 const char *restrict key ///< Key to find
    100100    );
    101101
    102102/// print metadata item to the specified stream
    103 void psMetaDataItemPrint(FILE *fd,              //!< file descriptor to write to
    104                          const psMetaDataItem *restrict ms, //!< item of metadata to print
    105                          const char *prefix        //!< print this at the beginning of each line
     103void psMetaDataItemPrint(FILE *fd,              ///< file descriptor to write to
     104                         const psMetaDataItem *restrict ms, ///< item of metadata to print
     105                         const char *prefix        ///< print this at the beginning of each line
    106106    );
    107107/* \} */ // End of AstroGroup Functions
  • trunk/archive/pslib/include/psMinimize.h

    r336 r344  
    1414/** Minimize a particular non-linear function */
    1515psFloatArray *
    16 psMinimize(float (*myFunction)(const psFloatArray *restrict),   //!< Function to minimize
    17            psFloatArray *restrict initialGuess //!< Initial guess
     16psMinimize(float (*myFunction)(const psFloatArray *restrict),   ///< Function to minimize
     17           psFloatArray *restrict initialGuess ///< Initial guess
    1818           );
    1919
     
    2222psFloatArray *
    2323psMinimizeChi2(float (*evalModel)(const psFloatArray *restrict,
    24                                   const psFloatArray *restrict), //!< Model to fit; (domain and params)
    25                const psFloatArray *restrict domain, //!< The domain values for the corresponding measurements
    26                const psFloatArray *restrict data, //!< Data to fit
    27                const psFloatArray *restrict errors, //!< Errors in the data
    28                psFloatArray *restrict initialGuess, //!< Initial guess
    29                const psIntArray *restrict guessMask //!< 1 = fit for parameter, 0 = hold parameter constant
     24                                  const psFloatArray *restrict), ///< Model to fit; (domain and params)
     25               const psFloatArray *restrict domain, ///< The domain values for the corresponding measurements
     26               const psFloatArray *restrict data, ///< Data to fit
     27               const psFloatArray *restrict errors, ///< Errors in the data
     28               psFloatArray *restrict initialGuess, ///< Initial guess
     29               const psIntArray *restrict guessMask ///< 1 = fit for parameter, 0 = hold parameter constant
    3030    );
    3131
    3232/** Derive a polynomial fit by chi^2 minimisation --- can be done analytically */
    3333psPolynomial1D *
    34 psGetArrayPolynomial(psPolynomial1D myPoly, //!< Polynomial to fit
    35                      const psFloatArray *restrict x, //!< Ordinates (or NULL to just use the indices)
    36                      const psFloatArray *restrict y, //!< Coordinates
    37                      const psFloatArray *restrict yErr //!< Errors in coordinates, or NULL
     34psGetArrayPolynomial(psPolynomial1D myPoly, ///< Polynomial to fit
     35                     const psFloatArray *restrict x, ///< Ordinates (or NULL to just use the indices)
     36                     const psFloatArray *restrict y, ///< Coordinates
     37                     const psFloatArray *restrict yErr ///< Errors in coordinates, or NULL
    3838    );
    3939
  • trunk/archive/pslib/include/psMisc.h

    r327 r344  
    2424/// Allocates nChar and returns a copy of the string or segment
    2525char *psStringNCopy(const char *str,    ///< string to copy
    26                     int nChar           //!< Number of characters (including \0 )
     26                    int nChar           ///< Number of characters (including \0 )
    2727    );
    2828
  • trunk/archive/pslib/include/psObject.h

    r251 r344  
    1111/** Object definition, to handle both objects we detect, and catalogues */
    1212typedef struct {
    13     psCoord *cell;                      //!< Centre position on Cell, with associated error
    14     psCoord *sky;                       //!< Position on the sky, with associated error
    15     float mag, magErr;                  //!< Magnitude and associated error
    16     float isoMag, isoMagErr;            //!< Isophotal magnitude and associated error
    17     float fwhm, fwhmErr;                //!< FWHM and associated error
    18     float ellipA, ellipB;               //!< Elliptical semi-major (A) and semi-minor (B) axes
    19     float ellipAngle;                   //!< Ellipse position angle
    20     float sky, skyErr;                  //!< Local sky level, and associated error
    21     float colour, colourErr;            //!< Colour and associated error, if known
    22     psPhotSysrem colorPlus, colorMinus; //!< Colour reference
    23     psBitMask *quality;                 //!< Bit mask for quality information
     13    psCoord *cell;                      ///< Centre position on Cell, with associated error
     14    psCoord *sky;                       ///< Position on the sky, with associated error
     15    float mag, magErr;                  ///< Magnitude and associated error
     16    float isoMag, isoMagErr;            ///< Isophotal magnitude and associated error
     17    float fwhm, fwhmErr;                ///< FWHM and associated error
     18    float ellipA, ellipB;               ///< Elliptical semi-major (A) and semi-minor (B) axes
     19    float ellipAngle;                   ///< Ellipse position angle
     20    float sky, skyErr;                  ///< Local sky level, and associated error
     21    float colour, colourErr;            ///< Colour and associated error, if known
     22    psPhotSysrem colorPlus, colorMinus; ///< Colour reference
     23    psBitMask *quality;                 ///< Bit mask for quality information
    2424    psCell *parentCell;                 ///< Cell this measurement came from
    2525} psObject;
     
    3737/** An assembly of objects */
    3838typedef struct {
    39     psType type;                        //!< Type of data.  THIS STRUCT ELEMENT MUST BE FIRST IN THE STRUCT!
    40     int size;                           //!< Total number of elements available
    41     int n;                              //!< Number of elements in use
    42     psObject *arr;                      //!< The array data
     39    psType type;                        ///< Type of data.  THIS STRUCT ELEMENT MUST BE FIRST IN THE STRUCT!
     40    int size;                           ///< Total number of elements available
     41    int n;                              ///< Number of elements in use
     42    psObject *arr;                      ///< The array data
    4343} psObjectArray;
    4444
    4545/** Constructor */
    46 psObjectArray *psObjectArrayAlloc(int s, //!< Total number of elements to make available
    47                                   int n //!< Number of elements that will be used
     46psObjectArray *psObjectArrayAlloc(int s, ///< Total number of elements to make available
     47                                  int n ///< Number of elements that will be used
    4848    );
    4949/** Reallocator */
    50 psObjectArray *psObjectArrayRealloc(psObjectArray *myArray, //!< Array to reallocate
    51                                     int s //!< Total number of elements to make available
     50psObjectArray *psObjectArrayRealloc(psObjectArray *myArray, ///< Array to reallocate
     51                                    int s ///< Total number of elements to make available
    5252    );
    5353/** Destructor */
    54 void psObjectArrayFree(psObjectArray *restrict myArray //!< Array to free
     54void psObjectArrayFree(psObjectArray *restrict myArray ///< Array to free
    5555    );
    5656
     
    5959/** Associates objects on an image with the image */
    6060typedef struct {
    61     const struct psImage *image;        //!< Image that produced the objects, which has metadata we need
    62     psObjectArray *objects;             //!< The objects
     61    const struct psImage *image;        ///< Image that produced the objects, which has metadata we need
     62    psObjectArray *objects;             ///< The objects
    6363} psImageObjects;
    6464
    6565/** Constructor */
    6666psImageObjects *
    67 psImageObjectsAlloc(const struct psImage *image, //!< Image that produced the objects, with needed metadata
    68                     psObjectArray *objects //!< The objects
     67psImageObjectsAlloc(const struct psImage *image, ///< Image that produced the objects, with needed metadata
     68                    psObjectArray *objects ///< The objects
    6969    );
    7070
    7171/** Destructor */
    7272void
    73 psImageObjectsFree(psImageObjects *restrict myImageObjects //!< Object to destroy
     73psImageObjectsFree(psImageObjects *restrict myImageObjects ///< Object to destroy
    7474                  );
    7575
     
    7878/** Objects from a catalogue */
    7979typedef struct {
    80     psCatalogue catalogue;              //!< Source catalogue from which objects come
    81     psObjectArray *object;              //!< The objects
     80    psCatalogue catalogue;              ///< Source catalogue from which objects come
     81    psObjectArray *object;              ///< The objects
    8282} psCatalogueObjects;
    8383
    8484/** Constructor */
    8585psCatalogueObjects *
    86 psCatalogueObjectsAlloc(enum psCatalogue *catalogue, //!< Source catalogue
    87                         psObjectArray *objects //!< The objects
     86psCatalogueObjectsAlloc(enum psCatalogue *catalogue, ///< Source catalogue
     87                        psObjectArray *objects ///< The objects
    8888    );
    8989
    9090/** Destructor */
    9191void
    92 psCatalogueObjectsFree(psCatalogueObjects *restrict myCatalogueObjects //!< Object to destroy
     92psCatalogueObjectsFree(psCatalogueObjects *restrict myCatalogueObjects ///< Object to destroy
    9393                      );
    9494
     
    9797/** A "super" object --- an object with multiple detections in different images */
    9898typedef struct {
    99     const struct  psImageArray *images; //!< Images that provided the different measurements
    100     const psObjectArray *objects;       //!< Individual object measurements
     99    const struct  psImageArray *images; ///< Images that provided the different measurements
     100    const psObjectArray *objects;       ///< Individual object measurements
    101101
    102102    /* Derived quantities */
    103     psSkyPos *meanSkyPos;               //!< Mean position on the sky
    104     double pmRA, pmDec;                 //!< Proper motion in RA and Dec
    105     double pmRAErr, pmDecErr;           //!< Errors in proper motion
    106     float posChi2;                      //!< chi^2 for position
     103    psSkyPos *meanSkyPos;               ///< Mean position on the sky
     104    double pmRA, pmDec;                 ///< Proper motion in RA and Dec
     105    double pmRAErr, pmDecErr;           ///< Errors in proper motion
     106    float posChi2;                      ///< chi^2 for position
    107107} psSuperObject;
    108108
    109109/** Constructor */
    110110psSuperObject *
    111 psSuperObjectAlloc(const struct psImageArray *images, //!< The images with the measurements
    112                    const psObjectArray *objects //!< Object measurements
     111psSuperObjectAlloc(const struct psImageArray *images, ///< The images with the measurements
     112                   const psObjectArray *objects ///< Object measurements
    113113    );
    114114
    115115/** Destructor */
    116116void
    117 psSuperObjectFree(psSuperObject *restrict mySuperObject //!< Object to destroy
     117psSuperObjectFree(psSuperObject *restrict mySuperObject ///< Object to destroy
    118118                 );
    119119
     
    129129 */
    130130psIntArray *
    131 psCorrelateObjects(const psObjectArray *restrict myObjects1, //!< First bunch of objects
    132                    const psObjectArray *restrict myObjects2, //!< Second bunch of objects
    133                    const psOTADescription *myOTA1, //!< OTA description for first bunch of objects, or NULL for
    134                                                    //!< sky
    135                    const psOTADescription *myOTA2 //!< OTA description for second bunch of objects, or NULL for
    136                                                   //!< sky
     131psCorrelateObjects(const psObjectArray *restrict myObjects1, ///< First bunch of objects
     132                   const psObjectArray *restrict myObjects2, ///< Second bunch of objects
     133                   const psOTADescription *myOTA1, ///< OTA description for first bunch of objects, or NULL for
     134                                                   ///< sky
     135                   const psOTADescription *myOTA2 ///< OTA description for second bunch of objects, or NULL for
     136                                                  ///< sky
    137137                   );
    138138
     
    142142 */
    143143int
    144 psGetCorrelatedMatches(const psIntArray matches, //!< Index array specifying matches */
    145                        const psObjectArray *restrict myObjects1, //!< First bunch of objects
    146                        const psObjectArray *restrict myObjects2, //!< Second bunch of objects
    147                        psObjectArray *matched1, //!< Matched objects in first bunch
    148                        psObjectArray *matched2 //!< Matched objects in second bunch
     144psGetCorrelatedMatches(const psIntArray matches, ///< Index array specifying matches */
     145                       const psObjectArray *restrict myObjects1, ///< First bunch of objects
     146                       const psObjectArray *restrict myObjects2, ///< Second bunch of objects
     147                       psObjectArray *matched1, ///< Matched objects in first bunch
     148                       psObjectArray *matched2 ///< Matched objects in second bunch
    149149                       );
    150150
     
    155155/** Get objects within a particular magnitude range */
    156156psObjectArray *
    157 psSelectObjectMag(psObjectArray *restrict myArray, //!< Bunch of objects to select from
    158                   float magLower,       //!< Lower bound for magnitude
    159                   float magUpper        //!< Upper bound for magnitude
     157psSelectObjectMag(psObjectArray *restrict myArray, ///< Bunch of objects to select from
     158                  float magLower,       ///< Lower bound for magnitude
     159                  float magUpper        ///< Upper bound for magnitude
    160160                  );
    161161
    162162/** Get objects within a radius on the sky */
    163163psObjectArray *
    164 psSelectObjectSkyDist(psObjectArray *restrict myArray, //!< Bunch of objects to select from
    165                       psSkyPos *skyPos, //!< Position on the sky
    166                       float radius,     //!< Radius of search
    167                       int circleOrSquare //!< Circle = 1, Square = 2
     164psSelectObjectSkyDist(psObjectArray *restrict myArray, ///< Bunch of objects to select from
     165                      psSkyPos *skyPos, ///< Position on the sky
     166                      float radius,     ///< Radius of search
     167                      int circleOrSquare ///< Circle = 1, Square = 2
    168168                      );
    169169
    170170/** Get objects within a particular colour range */
    171171psObjectArray *
    172 psSelectObjectColour(psObjectArray *restrict myArray, //!< Bunch of objects to select from
    173                      float magLower,    //!< Lower bound for colour
    174                      float magUpper,    //!< Upper bound for colour
    175                      psColourRef colourRef //!< Only select those with this colour reference
     172psSelectObjectColour(psObjectArray *restrict myArray, ///< Bunch of objects to select from
     173                     float magLower,    ///< Lower bound for colour
     174                     float magUpper,    ///< Upper bound for colour
     175                     psColourRef colourRef ///< Only select those with this colour reference
    176176                     );
    177177
  • trunk/archive/pslib/include/psPhotom.h

    r283 r344  
    1515/** photometry system definition */
    1616typedef struct {
    17     int ID;                             //!< ID number for this photometric system
    18     char *name;                         //!< Name of photometric system
    19     char *camera;                       //!< Camera for photometric system
    20     char *filter;                       //!< Filter used for photometric system
    21     char *detector;                     //!< Detector used for photometric system
     17    int ID;                             ///< ID number for this photometric system
     18    char *name;                         ///< Name of photometric system
     19    char *camera;                       ///< Camera for photometric system
     20    char *filter;                       ///< Filter used for photometric system
     21    char *detector;                     ///< Detector used for photometric system
    2222} psPhotSystem;
    2323
    2424/** photometry transformations */
    2525typedef struct {
    26     psPhotSystem src;                   //!< Source photometric system
    27     psPhotSystem dst;                   //!< Destination photometric system
     26    psPhotSystem src;                   ///< Source photometric system
     27    psPhotSystem dst;                   ///< Destination photometric system
    2828    psPhotSystem pP, pM;                ///< Primary colour reference
    2929    psPhotSystem sP, sM;                ///< Secondary colour reference
    3030    float pA, sA;                       ///< Colour offset for primary and secondary references
    31     psPolynomial3D transform;           //!< Transformation from source to destination
     31    psPolynomial3D transform;           ///< Transformation from source to destination
    3232} psPhotTransform;
    3333
  • trunk/archive/pslib/include/psPosition.h

    r295 r344  
    1313typedef union {
    1414    struct {
    15         double x;                       //!< x position
    16         double y;                       //!< y position
    17         double xErr;                    //!< Error in x position
    18         double yErr;                    //!< Error in y position
     15        double x;                       ///< x position
     16        double y;                       ///< y position
     17        double xErr;                    ///< Error in x position
     18        double yErr;                    ///< Error in y position
    1919    } xy;
    2020    struct {
    21         double r;                       //!< RA
    22         double d;                       //!< Dec
    23         double rErr;                    //!< Error in RA
    24         double dErr;                    //!< Error in Dec
     21        double r;                       ///< RA
     22        double d;                       ///< Dec
     23        double rErr;                    ///< Error in RA
     24        double dErr;                    ///< Error in Dec
    2525    } rd;
    2626} psCoord;
     
    4848
    4949/** apply the coordinate transformation to the given coordinate */
    50 psCoord *psCoordXformApply (psCoord *out, //!< Output coordinates, or NULL
     50psCoord *psCoordXformApply (psCoord *out, ///< Output coordinates, or NULL
    5151                            const psCoordXform *frame, ///< coordinate transformation
    5252                            const psCoord *coords ///< input coordiate
     
    5454
    5555/** apply the optical distortion to the given coordinate, magnitude, color */
    56 psCoord *psDistortionApply (psCoord *out, //!< Output coordinates, or NULL
     56psCoord *psDistortionApply (psCoord *out, ///< Output coordinates, or NULL
    5757                            const psdistortion *pattern, ///< optical distortion pattern
    5858                            const psCoord *coords, ///< input coordinate
     
    6363/** Get offset (RA,Dec) on the sky between two positions position1 and position2 may not be identical */
    6464psCoord *
    65 psGetOffset(const psCoord *restrict position1, //!< Position 1
    66             const psCoord *restrict position2, //!< Position 2
    67             const char *type            //!< Type of offset: Linear, Spherical/Arcsec, Spherical/Degreees etc
     65psGetOffset(const psCoord *restrict position1, ///< Position 1
     66            const psCoord *restrict position2, ///< Position 2
     67            const char *type            ///< Type of offset: Linear, Spherical/Arcsec, Spherical/Degreees etc
    6868    );
    6969
    7070/** Apply an offset to a position */
    7171psCoord *
    72 psApplyOffset(const psCoord *restrict position, //!< Position
    73               const psCoord *restrict offset, //!< Offset
    74               const char *type          //!< Type of offset: Linear, Spherical/Arcsec, Spherical/Degreees etc
     72psApplyOffset(const psCoord *restrict position, ///< Position
     73              const psCoord *restrict offset, ///< Offset
     74              const char *type          ///< Type of offset: Linear, Spherical/Arcsec, Spherical/Degreees etc
    7575    );
    7676
     
    7979/** Get Sun Position */
    8080psCoord *
    81 psGetSunPos(float mjd                   //!< MJD to get position for
     81psGetSunPos(float mjd                   ///< MJD to get position for
    8282    );
    8383
    8484/** Get Moon position */
    8585psCoord *
    86 psGetMoonPos(float mjd,                 //!< MJD to get position for
    87              double latitude,           //!< Latitude for apparent position
    88              double longitude           //!< Longitude for apparent position
     86psGetMoonPos(float mjd,                 ///< MJD to get position for
     87             double latitude,           ///< Latitude for apparent position
     88             double longitude           ///< Longitude for apparent position
    8989    );
    9090
    9191/** Get Moon phase */
    9292float
    93 psGetMoonPhase(float mjd                //!< MJD to get phase for
     93psGetMoonPhase(float mjd                ///< MJD to get phase for
    9494    );
    9595
    9696/** Get Planet positions */
    9797psCoord *
    98 psGetSolarSystemPos(const char *solarSystemObject, //!< Named S.S. object
    99                     float mjd           //!< MJD to get position for
     98psGetSolarSystemPos(const char *solarSystemObject, ///< Named S.S. object
     99                    float mjd           ///< MJD to get position for
    100100    );
    101101
     
    106106/** Convert ICRS to Ecliptic */
    107107psCoord *
    108 psCoordinatesItoE(const psCoord *restrict coordinates //!< ICRS coordinates to convert
     108psCoordinatesItoE(const psCoord *restrict coordinates ///< ICRS coordinates to convert
    109109    );
    110110
    111111/** Convert Ecliptic to ICRS */
    112112psCoord *
    113 psCoordinatesEtoI(const psCoord *restrict coordinates //!< Ecliptic coordinates to convert
     113psCoordinatesEtoI(const psCoord *restrict coordinates ///< Ecliptic coordinates to convert
    114114    );
    115115
    116116/** Convert ICRS to Galactic */
    117117psCoord *
    118 psCoordinatesItoG(const psCoord *restrict coordinates //!< ICRS coordinates to convert
     118psCoordinatesItoG(const psCoord *restrict coordinates ///< ICRS coordinates to convert
    119119    );
    120120
    121121/** Convert Galactic to ICRS */
    122122psCoord *
    123 psCoordinatesGtoI(const psCoord *restrict coordinates //!< Galactic coordinates to convert
     123psCoordinatesGtoI(const psCoord *restrict coordinates ///< Galactic coordinates to convert
    124124    );
    125125
  • trunk/archive/pslib/include/psSort.h

    r257 r344  
    1414/** Sort an array. Inputs not restrict-ed to allow sort in place */
    1515psFloatArray *
    16 psSort(psFloatArray *out,               //!< Sorted array to return. May be NULL
    17        const psFloatArray *myArray      //!< Array to sort
     16psSort(psFloatArray *out,               ///< Sorted array to return. May be NULL
     17       const psFloatArray *myArray      ///< Array to sort
    1818    );
    1919
    2020/** Sort an array, along with some other stuff.  Returns an index array */
    2121psIntArray *
    22 psSortIndex(psIntArray *restrict out,   //!< Output index array (may be NULL)
    23             const psFloatArray *restrict myArray //!< Array to sort
     22psSortIndex(psIntArray *restrict out,   ///< Output index array (may be NULL)
     23            const psFloatArray *restrict myArray ///< Array to sort
    2424    );
    2525
  • trunk/archive/pslib/include/psStats.h

    r257 r344  
    3939/** generic statistics structure */
    4040typedef struct {
    41     double sampleMean;                  //<! formal mean of sample
    42     double sampleMedian;                //<! formal median of sample
    43     double sampleMode;                  //!< Formal mode of sample
    44     double sampleStdev;                 //<! standard deviation of sample
    45     double sampleUQ;                    //<! upper quartile of sample
    46     double sampleLQ;                    //<! lower quartile of sample
    47     double robustMean;                  //<! robust mean of array
    48     double robustMeanError;             //<! error on robust mean
    49     int    robustMeanNvalues;           //<! number of measurements used for robust mean
    50     double robustMedian;                //<! robust median of array
    51     double robustMedianError;           //<! error on robust median
    52     int    robustMedianNvalues;         //<! number of measurements used for robust median
    53     double robustMode;                  //!< Robust mode of array
    54     double robustModeErr;               //!< Error in robust mode
    55     int    robustModeNvalues;           //!< Number of measurements used for robust mode
    56     double robustStdev;                 //<! robust standard deviation of array
    57     double robustUQ;                    //<! robust upper quartile
    58     double robustLQ;                    //<! robust lower quartile
    59     double clippedMean;                 //<! Nsigma clipped mean
    60     double clippedMeanError;            //<! error on clipped mean
    61     int    clippedMeanNvalues;          //<! number of data points used for clipped mean
    62     double clippedStdev;                //!< standard deviation after clipping
    63     double clipSigma;                   //<! Nsigma used for clipping; user input
    64     int    clipIter;                    //!< Number of clipping iterations; user input
    65     double min;                         //<! minimum data value in array
    66     double max;                         //<! maximum data value in array
    67     int    nValues;                     //<! number of data values in array
    68     psStatsOptions options;             //<! bitmask of calculated values
     41    double sampleMean;                  ///< formal mean of sample
     42    double sampleMedian;                ///< formal median of sample
     43    double sampleMode;                  ///< Formal mode of sample
     44    double sampleStdev;                 ///< standard deviation of sample
     45    double sampleUQ;                    ///< upper quartile of sample
     46    double sampleLQ;                    ///< lower quartile of sample
     47    double robustMean;                  ///< robust mean of array
     48    double robustMeanError;             ///< error on robust mean
     49    int    robustMeanNvalues;           ///< number of measurements used for robust mean
     50    double robustMedian;                ///< robust median of array
     51    double robustMedianError;           ///< error on robust median
     52    int    robustMedianNvalues;         ///< number of measurements used for robust median
     53    double robustMode;                  ///< Robust mode of array
     54    double robustModeErr;               ///< Error in robust mode
     55    int    robustModeNvalues;           ///< Number of measurements used for robust mode
     56    double robustStdev;                 ///< robust standard deviation of array
     57    double robustUQ;                    ///< robust upper quartile
     58    double robustLQ;                    ///< robust lower quartile
     59    double clippedMean;                 ///< Nsigma clipped mean
     60    double clippedMeanError;            ///< error on clipped mean
     61    int    clippedMeanNvalues;          ///< number of data points used for clipped mean
     62    double clippedStdev;                ///< standard deviation after clipping
     63    double clipSigma;                   ///< Nsigma used for clipping; user input
     64    int    clipIter;                    ///< Number of clipping iterations; user input
     65    double min;                         ///< minimum data value in array
     66    double max;                         ///< maximum data value in array
     67    int    nValues;                     ///< number of data values in array
     68    psStatsOptions options;             ///< bitmask of calculated values
    6969} psStats;
    7070
     
    7272/** Do Statistics on an array.  Returns a status value. \ingroup MathGroup */
    7373psStats *
    74 psArrayStats(const psFloatArray *restrict myArray, //!< Array to be analysed
    75              const psIntArray *restrict maskArray, //!< Ignore elements where (maskArray & maskVal) != 0
    76                                                    //!< May be NULL
    77              unsigned int maskVal,      //!< Only mask elements with one of these bits set in maskArray
    78              psStats *stats             //!< stats structure defines stats to be calculated and how
     74psArrayStats(const psFloatArray *restrict myArray, ///< Array to be analysed
     75             const psIntArray *restrict maskArray, ///< Ignore elements where (maskArray & maskVal) != 0
     76                                                   ///< May be NULL
     77             unsigned int maskVal,      ///< Only mask elements with one of these bits set in maskArray
     78             psStats *stats             ///< stats structure defines stats to be calculated and how
    7979    );
    8080
     
    8383/** Histograms  */
    8484typedef struct {
    85     const psFloatArray *restrict lower; //!< Lower bounds for the bins
    86     const psFloatArray *restrict upper; //!< Upper bounds for the bins
    87     psIntArray *nums;                   //!< Number in each of the bins
    88     const float minVal, maxVal;         //!< Minimum and maximum values
    89     int minNum, maxNum;                 //!< Number below the minimum and above the maximum
     85    const psFloatArray *restrict lower; ///< Lower bounds for the bins
     86    const psFloatArray *restrict upper; ///< Upper bounds for the bins
     87    psIntArray *nums;                   ///< Number in each of the bins
     88    const float minVal, maxVal;         ///< Minimum and maximum values
     89    int minNum, maxNum;                 ///< Number below the minimum and above the maximum
    9090} psHistogram;
    9191
    9292/** Constructor \ingroup MathGroup */
    9393psHistogram *
    94 psHistogramAlloc(float lower,           //!< Lower limit for the bins
    95                  float upper,           //!< Upper limit for the bins
    96                  float size             //!< Size of the bins
     94psHistogramAlloc(float lower,           ///< Lower limit for the bins
     95                 float upper,           ///< Upper limit for the bins
     96                 float size             ///< Size of the bins
    9797    );
    9898
    9999/** Generic constructor \ingroup MathGroup */
    100100psHistogram *
    101 psHistogramAllocGeneric(const psFloatArray *restrict lower, //!< Lower bounds for the bins
    102                         const psFloatArray *restrict upper, //!< Upper bounds for the bins
    103                         float minVal,   //!< Minimum value
    104                         float maxVal    //!< Maximum value
     101psHistogramAllocGeneric(const psFloatArray *restrict lower, ///< Lower bounds for the bins
     102                        const psFloatArray *restrict upper, ///< Upper bounds for the bins
     103                        float minVal,   ///< Minimum value
     104                        float maxVal    ///< Maximum value
    105105    );
    106106
    107107/** Destructor \ingroup MathGroup **/
    108108void
    109 psHistogramFree(psHistogram *restrict myHist //!< Histogram to destroy
     109psHistogramFree(psHistogram *restrict myHist ///< Histogram to destroy
    110110    );
    111111
     
    113113/** Calculate a histogram \ingroup MathGroup **/
    114114psHistogram *
    115 psGetArrayHistogram(psHistogram *restrict myHist, //!< Histogram data
    116                     const psFloatArray *restrict myArray //!< Array to analyse
     115psGetArrayHistogram(psHistogram *restrict myHist, ///< Histogram data
     116                    const psFloatArray *restrict myArray ///< Array to analyse
    117117    );
    118118
  • trunk/archive/pslib/include/psStdArrays.h

    r339 r344  
    100100
    101101/** Transpose a vector.  Changes the type to a PS_DIMEN_TRANSV */
    102 psVector *psVectorTranspose(psVector *out, //!< Output vector, or NULL
    103                             psVector *myVector //!< Vector to be transposed
     102psVector *psVectorTranspose(psVector *out, ///< Output vector, or NULL
     103                            psVector *myVector ///< Vector to be transposed
    104104    );
    105105
     
    200200 */
    201201typedef struct {
    202     int n;                              //!< Number of elements in use
    203     int size;                           //!< Number of total elements
    204     void **arr;                         //!< The elements
     202    int n;                              ///< Number of elements in use
     203    int size;                           ///< Number of total elements
     204    void **arr;                         ///< The elements
    205205} psVoidPtrArray;
    206206
    207207/** Constructor \ingroup DataGroup */
    208 psVoidPtrArray *psVoidPtrArrayAlloc(int n, //!< Number of elements to use
    209                                     int s //!< Total number of elements
     208psVoidPtrArray *psVoidPtrArrayAlloc(int n, ///< Number of elements to use
     209                                    int s ///< Total number of elements
    210210                                    );
    211211/** Reallocate \ingroup DataGroup */
    212 psVoidPtrArray *psVoidPtrArrayRealloc(psVoidPtrArray *arr, //!< Array to reallocate
    213                                       int n //!< Number of elements
     212psVoidPtrArray *psVoidPtrArrayRealloc(psVoidPtrArray *arr, ///< Array to reallocate
     213                                      int n ///< Number of elements
    214214                                      );
    215215/** Destructor \ingroup DataGroup */
    216 void psVoidPtrArrayFree(psVoidPtrArray *arr, //!< array to destroy
    217                         void (*elemFree)(void *) //!< destructor for array data
     216void psVoidPtrArrayFree(psVoidPtrArray *arr, ///< array to destroy
     217                        void (*elemFree)(void *) ///< destructor for array data
    218218                        );
    219219
Note: See TracChangeset for help on using the changeset viewer.