IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 198


Ignore:
Timestamp:
Mar 9, 2004, 5:54:55 PM (22 years ago)
Author:
rhl
Message:

Misc changes to make code actually compile

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

Legend:

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

    r160 r198  
    1010/* Include colour definitions */
    1111#include "psColour.h"
     12#include "psMatrix.h"
    1213
    1314
     
    2122    int xyColourOrder;                  //!< Spatial (x,y) order of polynomial in colour times x and y
    2223    int xyMagOrder;                     //!< Spatial (x,y) order of polynomial in magnitude times x and y
    23     enum psColourRef colourRef;         //!< Colour reference
     24    psColourRef colourRef;              //!< Colour reference
    2425    psDoubleArray *restrict coeff;      //!< Coefficients of astrometric solution
    2526    psDoubleArray *restrict coeffErr;   //!< Error in coefficients
     
    2829/** Constructor */
    2930psAstromCoeffs *
    30 psAstromCoeffsAlloc(int xyOrder,                //!< Spatial (x,y) order of polynomial
    31                   int colourOrder,      //!< Order of polynomial in colour
    32                   int magOrder,         //!< Order of polynomial in magnitude
    33                   int xyColourOrder,    //!< Spatial (x,y) order of polynomial in colour times x and y
    34                   int xyMagOrder,       //!< Spatial (x,y) order of polynomial in magnitude times x and y
    35                   enum psColourRef colourRef //!< Colour reference
     31psAstromCoeffsAlloc(int xyOrder,        //!< Spatial (x,y) order of polynomial
     32                    int colourOrder,    //!< Order of polynomial in colour
     33                    int magOrder,       //!< Order of polynomial in magnitude
     34                    int xyColourOrder,  //!< Spatial (x,y) order of polynomial in colour times x and y
     35                    int xyMagOrder,     //!< Spatial (x,y) order of polynomial in magnitude times x and y
     36                    psColourRef colourRef //!< Colour reference
    3637    );
    3738
     
    112113    float rotation;                     //!< Rotation of OTA on the focal plane.  Specified from +x through +y
    113114    psCellDescriptionArray *restrict cells; //!< Cell descriptions
    114     psOTAAstrom *astrom;                //!< OTA astrometry
     115    struct psOTAAstrom *astrom;             //!< OTA astrometry
    115116} psOTADescription;
    116117
     
    157158
    158159/** Constructor */
    159 psAstrom *
    160 psAstromAlloc(const psTelPointing *telescope //!< Telescope pointing, used to initialise the tp data.
    161     );
    162 
    163 /** Destructor */
    164 void
    165 psAstromFree(psAstrom *restrict myAstrom        //!< Object to destroy
     160psOTAAstrom *
     161psOTAAstromAlloc(const psTelPointing *telescope //!< Telescope pointing, used to initialise the tp data.
     162    );
     163
     164/** Destructor */
     165void
     166psOTAAstromFree(psOTAAstrom *restrict myAstrom  //!< Object to destroy
    166167    );
    167168
     
    204205float
    205206psGetParallactic(const psSkyPos *restrict position, //!< Position on the sky
    206                  real siderealTime      //!< Sidereal time
     207                 float siderealTime     //!< Sidereal time
    207208                 );
    208209
     
    210211float
    211212psGetRefraction(float colour,           //!< Colour of object
    212                 enum psColourRef colourRef; //!< Colour reference
     213                psColourRef colourRef,  //!< Colour reference
    213214                psTelPointing telescope //!< Telescope pointing information, for airmass, temp and pressure
    214215    );
  • trunk/archive/pslib/include/psColour.h

    r153 r198  
    77 * 0.69 mag, y = 0.69 mag, w = 0.80 mag
    88 */
    9 enum {
     9typedef enum {
    1010    PS_COLOUR_NO_INFO,                  //!< No colour information
    1111    PS_COLOUR_G_MINUS_R,                //!< Reference is g-r = 0.5 mag
  • trunk/archive/pslib/include/psImages.h

    r189 r198  
    11# ifndef PS_IMAGES_H
    22# define PS_IMAGES_H
     3
     4#include "psStdArrays.h"
     5#include "psUtils.h"
     6#include "psObjects.h"
     7#include "psMetaData.h"
     8#include "psStats.h"
    39
    410/** General image manipulation functions.
     
    1521
    1622PS_DECLARE_ARRAY_TYPE(psFloatArray);    ///< Declare an array of real vectors (psFloatArrayArray).
    17 PS_CREATE_ARRAY_TYPE(psFloatArray);     ///< Create the data type (psFloatArrayArray).
    1823
    1924typedef unsigned char  psU8;            ///< BITPIX 8   (unsigned short)
     
    3439    psF32 **rows_f32;                   ///< pointers to psF32 data
    3540    psF64 **rows_f64;                   ///< pointers to psF64 data
    36     psImage *parent;                    ///< parent, if a subimage
    37     psImage *children;                  ///< children of this region
     41    struct psImage *parent;             ///< parent, if a subimage
     42    struct psImage *children;           ///< children of this region
    3843    int Nchildren;                      ///< number of subimages
    39     psDlist md;                         ///< metadata associated with image
    40     psObjectTable objtable;             ///< objects associated with image
     44    struct psMetaDataSet *md;           ///< metadata associated with image
     45    psObjectArray *objtable;            ///< objects associated with image
    4146} psImage;
    4247
     
    7580
    7681/*** various image pixel extractions ***/
     82
     83typedef enum { PS_STAT_MODE_MEDIAN } psStatMode;
     84
    7785/// Extract pixels from rectlinear region to a vector.
    7886psFloatArray *
     
    8290              int nx,                   ///< width of region in x
    8391              int ny,                   ///< width of region in y
    84               enum direction,           ///< direction of vector along slice
    85               enum statmode             ///< statistic applied to pixel group to find output value
     92              int direction,            ///< direction of vector along slice
     93              psStatMode statmode       ///< statistic applied to pixel group to find output value
    8694);
    8795
     
    94102            float ye,                   ///< ending y coord of cut
    95103            float dw,                   ///< width of cut
    96             enum statmode               ///< statistic applied to pixel group to find output value
    97 );
     104            psStatMode statmode         ///< statistic applied to pixel group to find output value
     105    );
    98106
    99107/// Extract radial annulii data to a vector.
     
    104112                  float radius,         ///< outer radius of annulii
    105113                  float dr,             ///< radial step size of annulii
    106                   enum statmode         ///< statistic applied to pixel group to find output value
    107 );
     114                  psStatMode statmode   ///< statistic applied to pixel group to find output value
     115    );
    108116
    109117/// Extract a 2-d contour from an image at the given threshold.
     
    114122);
    115123
    116 /// Extract a 2-d contour from an image at the given threshold.
    117 psSpanArray *
    118 psImageContour (psImage *input,         ///< create contour for this image
    119                 float threshold         ///<  image at this threshold
    120 );
    121 
    122124/*** various image geometry manipulation ***/
    123125/// Rebin image to new scale.
     
    125127psImageRebin (psImage *input,           ///< rebin this image
    126128              float scale,              ///< rebinning scale: doutput = scale*dinput
    127               enum statmode             ///< statistic used in performing interpolation / summing
     129              psStatMode statmode       ///< statistic used in performing interpolation / summing
    128130);
    129131
     
    155157/// How to represent the output values?
    156158void
    157 psImageGetStats (psImage *input, enum statmode);
     159psImageGetStats (psImage *input, psStatMode statmode);
    158160
    159161/// Construct a histogram from an image (or subimage).
    160162psHistogram *
    161 psImageHistogram (psHistogram        ///< input histogram description & target
    162                   psImage *input,       ///< determine histogram of this image
    163 );
     163psImageHistogram (psHistogram *hist,    ///< input histogram description & target
     164                  psImage *input        ///< determine histogram of this image
     165    );
    164166
    165167/// Fit a 2-D polynomial surface to an image.
    166168psFloatArrayArray *
    167169psImageFitPolynomial (psImage *input,   ///< image to fit
    168                       int xorder        ///< order of polynomial in x-dir
     170                      int xorder,       ///< order of polynomial in x-dir
    169171                      int yorder        ///< order of polynomial in y-dir
    170172);
     
    207209/// Write an image section to named file (which may exist).
    208210psImage *
    209 psImageFWriteSection (psImage *input,   ///< image to write out
    210                       int x,            ///< starting x coord of region           
    211                       int y,            ///< starting y coord of region           
    212                       int z,            ///< plane of interest                     
    213                       char *extname,    ///< MEF extension name                   
    214                       FILE *f           ///< file descriptor to write data to             
     211psImageFWriteSection(psImage *input,    ///< image to write out
     212                     int x,             ///< starting x coord of region           
     213                     int y,             ///< starting y coord of region           
     214                     int z,             ///< plane of interest                     
     215                     char *extname,     ///< MEF extension name                   
     216                     FILE *f            ///< file descriptor to write data to             
    215217);
    216218
    217219/// Read only header from image file.
    218 psMetadata *
    219 psImageReadHeader (psMetadata *output,  ///< read data to this structure
    220                    char *extname,       ///< MEF extension name ("PHU" for primary header)
    221                    char *filename       ///< file to read from
     220struct psMetadata *
     221psImageReadHeader(struct psMetadata *output,    ///< read data to this structure
     222                  char *extname,        ///< MEF extension name ("PHU" for primary header)
     223                  char *filename        ///< file to read from
    222224);
    223225
    224226/// Read only header from image file descriptor.
    225 psMetadata *
    226 psImageFReadHeader (psMetadata *output,         ///< read data to this structure
     227struct psMetadata *
     228psImageFReadHeader (struct psMetadata *output, ///< read data to this structure
    227229                   char *extname,       ///< MEF extension name ("PHU" for primary header)
    228230                   FILE *f              ///< file descriptor to read from
     
    233235psImage *
    234236psImageFFT (psImage *input,             ///< image to FFT
    235             enum direction              ///< FFT direction
     237            int direction               ///< FFT direction
    236238);
    237239
  • trunk/archive/pslib/include/psObjects.h

    r160 r198  
    1717#include "psImages.h"
    1818
    19 
    2019/***********************************************************************************************************/
    2120
     
    3130    float sky, skyErr;                  //!< Local sky level, and associated error
    3231    float colour, colourErr;            //!< Colour and associated error, if known
    33     enum psColourRef colourRef;         //!< Colour reference
     32    psColourRef colourRef;              //!< Colour reference
    3433    psBitMask *quality;                 //!< Bit mask for quality information
    3534} psObject;
     
    5352/** Associates objects on an image with the image */
    5453typedef struct {
    55     const psImage *image;               //!< Image that produced the objects, which has metadata we need
     54    const struct psImage *image;        //!< Image that produced the objects, which has metadata we need
    5655    psObjectArray *objects;             //!< The objects
    5756} psImageObjects;
     
    5958/** Constructor */
    6059psImageObjects *
    61 psImageObjectsAlloc(const psImage *image,       //!< Image that produced the objects, which has metadata we need
    62                   psObjectArray *objects //!< The objects
    63                   );
     60psImageObjectsAlloc(const struct psImage *image, //!< Image that produced the objects, with needed metadata
     61                    psObjectArray *objects //!< The objects
     62    );
    6463
    6564/** Destructor */
     
    7271/** Objects from a catalogue */
    7372typedef struct {
    74     enum psCatalogue catalogue;         //!< Source catalogue from which objects come
     73    psCatalogue catalogue;              //!< Source catalogue from which objects come
    7574    psObjectArray *object;              //!< The objects
    7675} psCatalogueObjects;
     
    7978psCatalogueObjects *
    8079psCatalogueObjectsAlloc(enum psCatalogue *catalogue, //!< Source catalogue
    81                       psObjectArray *objects //!< The objects
    82                       );
     80                        psObjectArray *objects //!< The objects
     81    );
    8382
    8483/** Destructor */
    8584void
    86 psCatalogueObjectsFree(psCatalogeObjects *restrict myCatalogueObjects //!< Object to destroy
     85psCatalogueObjectsFree(psCatalogueObjects *restrict myCatalogueObjects //!< Object to destroy
    8786                      );
    8887
     
    9190/** A "super" object --- an object with multiple detections in different images */
    9291typedef struct {
    93     const psImageArray *images;         //!< Images that provided the different measurements
     92    const struct  psImageArray *images; //!< Images that provided the different measurements
    9493    const psObjectArray *objects;       //!< Individual object measurements
    9594
     
    103102/** Constructor */
    104103psSuperObject *
    105 psSuperObjectAlloc(const psImageArray *images, //!< The images with the measurements
    106                  const psObjectArray *objects //!< Object measurements
    107                 );
     104psSuperObjectAlloc(const struct psImageArray *images, //!< The images with the measurements
     105                   const psObjectArray *objects //!< Object measurements
     106    );
    108107
    109108/** Destructor */
     
    167166                     float magLower,    //!< Lower bound for colour
    168167                     float magUpper,    //!< Upper bound for colour
    169                      enum psColourRef colourRef //!< Only select those with this colour reference
     168                     psColourRef colourRef //!< Only select those with this colour reference
    170169                     );
    171170
  • trunk/archive/pslib/include/psPosition.h

    r183 r198  
    44/* Include array declaration macros */
    55#include "psArray.h"
     6#include "psObjects.h"
    67
    78/***********************************************************************************************************/
     
    1617
    1718/** Planets */
    18 enum {
     19typedef enum {
    1920    PS_MERCURY = 1,
    2021    PS_VENUS = 2,
     
    2829
    2930/** Catalogues */
    30 enum {
     31typedef enum {
    3132    PS_PANSTARRS,                       //!< Pan-STARRS object catalogue
    3233    PS_USNO,                            //!< USNO-B1 catalogue
     
    148149/** Get Planet positions */
    149150psSkyPos *
    150 psGetPlanetPos(enum psPlanetNum myPlanetNum, //!< Number for planet
     151psGetPlanetPos(psPlanetNum myPlanetNum, //!< Number for planet
    151152               float mjd                //!< MJD to get position for
    152153               );
    153154
    154155/** Get star list from catalogue */
    155 psObjectArray *
     156struct psObjectArray *
    156157psReadStarCatalogue(double ra,          //!< RA of centre of search
    157158                    double dec,         //!< Declination of centre of search
    158159                    float radius,       //!< Radius of search for stars in catalogue
    159160                    float mjd,          //!< The epoch (in MJD) for which to get positions
    160                     enum psCatalogue myCatalogue //!< The catalogue to use
     161                    psCatalogue myCatalogue //!< The catalogue to use
    161162    );
    162163
     
    186187
    187188/***********************************************************************************************************/
     189#endif
  • trunk/archive/pslib/include/psStdArrays.h

    r153 r198  
    22#define PS_TYPES_H
    33
     4#include <complex.h>
    45#include "psArray.h"
    56
Note: See TracChangeset for help on using the changeset viewer.