IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 253


Ignore:
Timestamp:
Mar 17, 2004, 5:33:48 PM (22 years ago)
Author:
eugene
Message:

cleaned up structures to compile successfully

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

Legend:

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

    r251 r253  
    77 */
    88
    9 /** Astrometric solution for an OTA.
     9/* Astrometric transformations for a focal plane array.
    1010 * There are five coordinate frames that we need to worry about:
    11  * 1. Cell frame:    x,y in pixels (raw coordinates; lower-left pixel center is 0.5,0.5 TBR)
    12  * 2. Chip frame:    X,Y in pixels
    13  * 3. FPA frame:     P,Q in microns
     11 * 1. Cell:          x,y in pixels (raw coordinates; lower-left pixel center is 0.5,0.5 TBR)
     12 * 2. Chip:          X,Y in pixels
     13 * 3. FPA:           P,Q in microns
    1414 * 4. Tangent plane: L,M in arcsec (TBR - angles or linear?) from the telescope boresight.
    1515 * 5. Sky frame:     R,D in degrees (TBR - radians?)
    1616 *
    17  * 1 <--> 2: cell.coords : a 2-D linear transformation : rotation, scaling, offset, (skew)
    18  * 2 <--> 3: chip.coords : a 2-D cubic (max) transform : specifies how the chips are mounted on the focal plane.
    19  * 3 <--> 4: fpa.distort : a 2-D quartic (?) transform : specifies the distortions in the optics
    20  * 4 <--> 5: fpa.SLpars  : SLALib parameters generated based on the telescope, ra, dec, time, etc from exposure info
     17 * 1 <--> 2: 2 2-D polynomials: (X,Y) = f(x,y)
     18 * 2 <--> 3: 2 2-D polynomials: (P.Q) = f(X,Y)
     19 * 3 <--> 4: 2 4-D polynomials: (L,M) = f(P,Q,m,c) (m & c are magnitude and color of object)
     20 * 4 <--> 5: SLALib transformation using exposure parameters (psExposure or psGrommit)
    2121 */
    2222
     
    6767    int nChips;                         ///< Number of Cells assigned
    6868    int nAlloc;                         ///< Number of Cells available
    69     psChip *chips;                      ///< Chips in the Focal Plane Array
    70     psMetaData *md;                     ///< FPA-level metadata
    71     psDistort *TPtoFP;                  ///< Transformation term from
    72     psDistort *FPtoTP;                  ///< Transformation term from
     69    struct psChip *chips;               ///< Chips in the Focal Plane Array
     70
     71    psMetaDataSet *md;                  ///< FPA-level metadata
     72    psDistortion *TPtoFP;               ///< Transformation term from
     73    psDistortion *FPtoTP;               ///< Transformation term from
    7374    psExposure *exp;                    ///< information about this exposure
    7475    psMatrix *dx, *dy;                  //!< Focal Plane fixed pattern residual offsets
     
    8384typedef struct {
    8485    int nCells;                         ///< Number of Cells assigned
    85     psCell *cells;                      ///< Cells in the Chip
    86     psMetaData *md;                     ///< Chip-level metadata
    87 
     86    struct psCell *cells;               ///< Cells in the Chip
     87
     88    psMetaDataSet *md;                  ///< Chip-level metadata
    8889    psCoordXform *chipToFPA;            ///< Transformations from chip coordinates to FPA coordinates
    8990    psCoordXform *FPAtoChip;            ///< Transformations from chip coordinates to FPA coordinates
    9091
    91     psFPA *parentFPA;                   ///< FPA which contains this chip
     92    struct psFPA *parentFPA;            ///< FPA which contains this chip
    9293} psChip;
    9394
     
    9596 */
    9697typedef struct {
    97     psObjectTable *objects;             ///< objects derived from cell
     98    int nImage;                         ///< number of images in this cell realization
    9899    psImage *image;                     ///< imaging area of cell
     100    psDlist *objects;                   ///< objects derived from cell
    99101    psImage *overscan;                  ///< bias region (subimage) of cell
    100     psMetaData *md;                     ///< Cell-level metadata
     102    psMetaDataSet *md;                  ///< Cell-level metadata
    101103
    102104    psCoordXform *cellToChip;           ///< Transformations from cell coordinates to chip coordinates
    103105    psCoordXform *cellToFPA;            ///< Transformations from cell coordinates to FPA coordinates
    104106
    105     psChip  *parentChip;                ///< chip which contains this cell
     107    struct psChip  *parentChip;         ///< chip which contains this cell
    106108} psCell;
    107109
     
    112114/* Calculating and applying astrometric solutions */
    113115
    114 /** returns Cell in Chip which contains the given point */
    115 int
     116/** returns Chip in FPA which contains the given FPA coordinate */
     117psChip *
     118psChipInFPA (psFPA *fpa,                ///< FPA description
     119             psCoord *coord             ///< coordinate in FPA
     120             );
     121
     122/** returns Cell in Chip which contains the given chip coordinate */
     123psCell *
    116124psCellInChip (psChip *chip,             ///< chip description
    117               psCoords *coords          ///< coordinate to find
     125              psCoord *coord            ///< coordinate in chip
    118126              );
    119127
    120 /** returns the Cell coords for the specified Cell corresponding to the given Chip coords */
    121 psCoords
    122 psChipCoordsOnCell (psCell *cell,       ///< source cell for coordinate
    123                     psCoords *coords    ///< coordinate of interest
    124                     );
    125 
    126 /** returns the Cell coords for the specified Cell corresponding to the given Chip coords */
    127 psCoords
    128 psCellCoordsInChip (psChip *chip,       ///<
    129                     int cell,           ///<
    130                     psCoords *coords    ///<
    131                     );
    132 
    133 /** returns Chip in FPA which contains the given point */
    134 int
    135 psChipInFPA (psFPA *fpa,                ///<
    136              psCoords *coords           ///<
    137              );
    138 
    139 /** returns the Chip coords for the specified Chip corresponding to the given FPA coords */
    140 psCoords
    141 psFPACoordsOnChip (psChip *chip,        ///<
    142                    psCoords *coords     ///<
     128/** Convert (RA,Dec) to tangent plane coords */
     129psCoord *
     130psCoordSkyToTP(psExposure *exp,         //!< Exposure description
     131               psCoord *coord           //!< input Sky coordinate
     132               );
     133
     134/** Convert tangent plane coords to focal plane coordinates */
     135psCoord *
     136psCoordTPtoFPA(psFPA *fpa,              //!< FPA description
     137               psCoord *coord           //!< input TP coordinate
     138               );
     139
     140/** converts the specified FPA coord to the coord on the given Chip */
     141psCoord *
     142psCoordFPAtoChip (psFPA *fpa,           ///< FPA description
     143                  psChip *chip,         ///< Chip of interest
     144                  psCoord *coord        ///< input FPA coordinate
     145                  );
     146
     147/** converts the specified Chip coord to the coord on the given Cell */
     148psCoord *
     149psCoordChiptoCell (psChip *chip,        ///< Chip description
     150                   psCell *cell,        ///< Cell of interest
     151                   psCoord *coord       ///< input Chip coordinate
    143152                   );
    144153
    145 /** returns the Chip coords for the specified Chip corresponding to the given FPA coords */
    146 psCoords
    147 psChipCoordsInFPA (psFPA *fpa,          ///<
    148                    int chip,            ///<
    149                    psCoords *coords     ///<
     154/** converts the specified Cell coord to the coord on the parent Chip */
     155psCoord *
     156psCoordCelltoChip (psCell *cell,        ///< Cell description
     157                   psCoord *coord       ///< input Cell coordinate
    150158                   );
    151159
    152 /** Convert (RA,Dec) to (cell#,x,y) */
    153 psCoords *
    154 psSkyToFPA(psFPA *fpa,                  //!< OTA details
    155            psCoords *coords             //!< Position on the sky
    156            );
    157 
    158 /** Convert (cell#,x,y) to (RA,Dec) */
    159 psCoords *
    160 psFPAToSky(psFPA *fpa,                  //!< OTA details
    161            psCoords *coords             //!< Position on the sky
    162            );
    163 
    164 /** Convert (RA,Dec) to (cell#,x,y) */
    165 psCoords *
    166 psSkyToTP(psExposure *exp,              //!< OTA details
    167           psCoords *coords              //!< Position on the sky
    168           );
    169 
    170 /** Convert (RA,Dec) to (cell#,x,y) */
    171 psCoords *
    172 psTPtoSky(psExposure *exp,              //!< OTA details
    173           psCoords *coords              //!< Position on the sky
    174           );
     160/** converts the specified Chip coord to the coord on the parent FPA */
     161psCoord *
     162psCoordChiptoFPA (psChip *chip,         ///< Chip description
     163                  psCoord *coord        ///< input Chip coordinate
     164                  );
     165
     166/** Convert focal plane coords to tangent plane coordinates */
     167psCoord *
     168psCoordFPAToTP(psFPA *fpa,                      //!< FPA description
     169               psCoord *coord           //!< input FPA coordinate
     170               );
     171
     172/** Convert tangent plane coords to (RA,Dec) */
     173psCoord *
     174psCoordTPtoSky(psExposure *exp,         //!< Exposure description
     175               psCoord *coord           //!< input TP coordinate
     176               );
    175177
    176178/** Get the airmass for a given position and sidereal time */
    177179float
    178 psGetAirmass(psCoords *coords,          //!< Position on the sky
     180psGetAirmass(psCoord *coord,            //!< Position on the sky
    179181             double siderealTime        //!< Sidereal time
    180182             );
     
    182184/** Get the parallactic angle for a given position and sidereal time */
    183185float
    184 psGetParallactic(psCoords *coords,      //!< Position on the sky
     186psGetParallactic(psCoord *coord,        //!< Position on the sky
    185187                 double siderealTime    //!< Sidereal time
    186188                 );
     
    189191float
    190192psGetRefraction(float colour,           //!< Colour of object
    191                 psColourRef colourRef,  //!< Colour reference
     193                psPhotSystem colorPlus, //
     194                psPhotSystem colorMinus, ///< Colour reference
    192195                psExposure *exp         //!< Telescope pointing information, for airmass, temp and pressure
    193196                );
    194 
    195 /** Fit astrometric solution to list of (chip#,x,y) and (RA,Dec) */
    196 int
    197 psFitAstrom(psOTADescription *restrict ota, //!< Initial guess for coefficients
    198             const psOTAPosArray *restrict detector, //!< Positions on OTA (chip#,x,y)
    199             const psSkyPosArray *restrict sky, //!< Positions on the sky (RA,Dec)
    200             const psExposure *exp       //!< Telescope pointing information, for airmass, parallactic angle
    201                                         //!< which may help set the astrometric solution
    202             );
    203197
    204198/*** Constructors / Destructors ******************************************************/
     
    223217psExposureFree(psExposure *restrict myExp //!< Object to destroy
    224218               );
    225 
    226219#endif
     220
     221/*
     222   example images:
     223
     224   GPC:          1 Chip per file, 1 Cell per extension
     225   Megacam:      1 FPA per file, 1 Chip per extension, 2 Cell per extension (DSEC)
     226   CFH12K (MEF): 1 FPA per file, 1 Chip per extension, 1 Cell per extension
     227   CFHT-IR:      1 FPA per file, 1 Chip per extension, 4 Cell per extension (NAXIS = 3)
     228   WIRCAM:       1 FPA per file, 1 Chip per extension, 1 Cell per extension (?)
     229   
     230
     231*/
  • trunk/archive/pslib/include/psImage.h

    r251 r253  
    1616    int nx, ny;                         ///< size of image
    1717    int x0, y0;                         ///< data region relative to parent
    18     psF32 **rows;                       ///< == rows_f32
    19     psS8  **rows_s8;                    ///< pointers to psS8 data
    20     psS16 **rows_s16;                   ///< pointers to psS16 data
    21     psS32 **rows_s32;                   ///< pointers to psS32 data
    22     psU8  **rows_u8;                    ///< pointers to psU8 data
    23     psU16 **rows_u16;                   ///< pointers to psU16 data
    24     psU32 **rows_u32;                   ///< pointers to psU32 data
    25     psF32 **rows_f32;                   ///< pointers to psF32 data
    26     psF64 **rows_f64;                   ///< pointers to psF64 data
     18    union {
     19        psF32 **rows;                   ///< == rows_f32
     20        psS8  **rows_s8;                        ///< pointers to psS8 data
     21        psS16 **rows_s16;                       ///< pointers to psS16 data
     22        psS32 **rows_s32;                       ///< pointers to psS32 data
     23        psU8  **rows_u8;                        ///< pointers to psU8 data
     24        psU16 **rows_u16;                       ///< pointers to psU16 data
     25        psU32 **rows_u32;                       ///< pointers to psU32 data
     26        psF32 **rows_f32;                       ///< pointers to psF32 data
     27        psF64 **rows_f64;                       ///< pointers to psF64 data
     28    } rows;
    2729    struct psImage *parent;             ///< parent, if a subimage
    2830    struct psImage *children;           ///< children of this region
  • trunk/archive/pslib/include/psLib.h

    r251 r253  
    3939# include <psPhotom.h>
    4040# include <psAstrom.h>
    41 # include <psObject.h>
     41/* # include <psObject.h> */
    4242
    4343# endif
  • trunk/archive/pslib/include/psMath.h

    r247 r253  
    1515        double d;                       ///< double value entry
    1616        complex float c;                ///< complex value entry
    17     }
     17    } val;
    1818} p_psScalar;
    1919
     
    3030psUnaryOp (void *out,                   ///< destination (may be NULL)
    3131           void *in,                    ///< input
    32            char *operator,              ///< operator
     32           char *operator               ///< operator
    3333);
    3434
    3535/** create a psType-ed structure from a constant double value. */
    36 p_ps_Scalar *
     36p_psScalar *
    3737psScalar (double value);
    3838
    3939/** create a psType-ed structure from a specified type  */
    40 p_ps_Scalar *
     40p_psScalar *
    4141psScalarType (char *mode,               ///< type description
    4242              ...                       ///< value (or values) of specified types
  • trunk/archive/pslib/include/psPhotom.h

    r252 r253  
    88
    99/** photometry system transformation types */
    10 enum {
     10typedef enum {
    1111    PS_PHOT_SYS,
    12     PS_PHOT_REF,
    13 } psPhotTransformType
     12    PS_PHOT_REF
     13} psPhotTransformType;
    1414
    1515/** photometry system definition */
     
    2727    psPhotSystem dst;
    2828    psPhotSystem colorPlus, colorMinus; ///< Colour reference
    29     psPolynomial2D colorAirmasTerm;
    30     psPhotTranformType type;
     29    psPolynomial2D transform;
     30    psPhotTransformType type;
    3131} psPhotTransform;
    3232
  • trunk/archive/pslib/include/psPosition.h

    r251 r253  
    77 */
    88
    9 /*************************************************/
     9/** A point in 2-D space, with errors.
     10 */
    1011typedef struct {
    1112    union {
    1213        double x;                               //!< x position
    1314        double r;                               //!< x position
    14     }
     15    } x;
    1516    union {
    1617        double xErr;                            //!< Error in x position
    1718        double rErr;                            //!< Error in x position
    18     }
     19    } dx;
    1920    union {
    2021        double y;                               //!< y position
    2122        double d;                               //!< y position
    22     }
     23    } y;
    2324    union {
    2425        double yErr;                            //!< Error in y position
    2526        double dErr;                            //!< Error in y position
    26     }
     27    } dy;
    2728} psCoord;
    2829
     30/** A polynomial transformation between coordinate frames.  This may be a linear relationship, or may
     31 * represent a higher-order transformation.
     32 */
     33typedef struct {
     34    psDPolynomial2D *x;
     35    psDPolynomial2D *y;
     36} psCoordXform;
     37
     38/** The optical distortion terms.  The lowest two terms are the x and y axis of the target system.  The higher
     39 * two terms represent magnitude and color terms.
     40 */
    2941typedef struct {
    3042    psDPolynomial4D *x;
    3143    psDPolynomial4D *y;
    3244} psDistortion;
    33 
    34 typedef struct {
    35     psDPolynomial2D *x;
    36     psDPolynomial2D *y;
    37 } psCoordXform;
    3845
    3946psCoord *psCoordXformApply (psCoordXform *frame, psCoord *coords);
     
    4653
    4754/** Get offset (RA,Dec) on the sky between two positions position1 and position2 may not be identical */
    48 psCoords *
    49 psGetOffset(const psCoords *restrict position1, //!< Position 1
    50             const psCoords *restrict position2, //!< Position 2
     55psCoord *
     56psGetOffset(const psCoord *restrict position1, //!< Position 1
     57            const psCoord *restrict position2, //!< Position 2
    5158            char *system
    5259            );
    5360
    5461/** Apply an offset to a position */
    55 psCoords *
    56 psApplyOffset(const psCoords *restrict position, //!< Position
    57               const psCoords *restrict offset, //!< Offset
     62psCoord *
     63psApplyOffset(const psCoord *restrict position, //!< Position
     64              const psCoord *restrict offset, //!< Offset
    5865              char *system
    5966    );
     
    6471
    6572/** Get Sun Position */
    66 psCoords *
     73psCoord *
    6774psGetSunPos(float mjd                   //!< MJD to get position for
    6875            );
    6976
    7077/** Get Moon position */
    71 psCoords *
     78psCoord *
    7279psGetMoonPos(float mjd,                 //!< MJD to get position for
    7380             double latitude,           //!< Latitude for apparent position
     
    8188
    8289/** Get Planet positions */
    83 psCoords *
     90psCoord *
    8491psGetSolarSystemPos(char *solarSystemObject, //!< Named S.S. object
    8592                    float mjd           //!< MJD to get position for
  • trunk/archive/pslib/include/psSort.h

    r247 r253  
    1515/** Sort an array, along with some other stuff.  Returns an index array */
    1616psIntArray *
    17 psSortIndex(psIntArray *restrict out;   //!< Output index array (may be NULL)
     17psSortIndex(psIntArray *restrict out,   //!< Output index array (may be NULL)
    1818            const psFloatArray *restrict myArray //!< Array to sort
    1919    );
Note: See TracChangeset for help on using the changeset viewer.