IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 9, 2004, 12:28:16 PM (22 years ago)
Author:
Paul Price
Message:

Doxygen-ated the source files.

File:
1 edited

Legend:

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

    r149 r153  
    1414/***********************************************************************************************************/
    1515
    16 /* Astrometric coefficients */
    17 typedef struct {
    18     int xyOrder;                        // Spatial (x,y) order of polynomial
    19     int colourOrder;                    // Order of polynomial in colour
    20     int magOrder;                       // Order of polynomial in magnitude
    21     int xyColourOrder;                  // Spatial (x,y) order of polynomial in colour times x and y
    22     int xyMagOrder;                     // Spatial (x,y) order of polynomial in magnitude times x and y
    23     enum psColourRef colourRef;         // Colour reference
    24     psDoubleArray *restrict coeff;      // Coefficients of astrometric solution
    25     psDoubleArray *restrict coeffErr;   // Error in coefficients
     16/** Astrometric coefficients */
     17typedef struct {
     18    int xyOrder;                        //!< Spatial (x,y) order of polynomial
     19    int colourOrder;                    //!< Order of polynomial in colour
     20    int magOrder;                       //!< Order of polynomial in magnitude
     21    int xyColourOrder;                  //!< Spatial (x,y) order of polynomial in colour times x and y
     22    int xyMagOrder;                     //!< Spatial (x,y) order of polynomial in magnitude times x and y
     23    enum psColourRef colourRef;         //!< Colour reference
     24    psDoubleArray *restrict coeff;      //!< Coefficients of astrometric solution
     25    psDoubleArray *restrict coeffErr;   //!< Error in coefficients
    2626} psAstromCoeffs;
    2727
    28 /* Constructor */
     28/** Constructor */
    2929psAstromCoeffs *
    30 psAstromCoeffsNew(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
    36     );
    37 
    38 /* Destructor */
    39 void
    40 psAstromCoeffsDel(psAstromCoeffs *restrict myAstromCoeffs // Object to destroy
    41     );
    42 
    43 /***********************************************************************************************************/
    44 
    45 /* Telescope pointing information for an exposure */
     30psAstromCoeffsNew(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
     36    );
     37
     38/** Destructor */
     39void
     40psAstromCoeffsDel(psAstromCoeffs *restrict myAstromCoeffs //!< Object to destroy
     41    );
     42
     43/***********************************************************************************************************/
     44
     45/** Telescope pointing information for an exposure */
    4646typedef struct {
    4747    // Telescope longitude, latitude and height are stored separately, since they don't change with pointing
    48     double ra, dec;                     // Telescope boresight
    49     double ha;                          // Hour angle
    50     double zd;                          // Zenith distance
    51     double az;                          // Azimuth
    52     float rotAngle;                     // Rotator position angle
    53     float temp;                         // Temperature
    54     float pressure;                     // Pressure
     48    double ra, dec;                     //!< Telescope boresight
     49    double ha;                          //!< Hour angle
     50    double zd;                          //!< Zenith distance
     51    double az;                          //!< Azimuth
     52    float rotAngle;                     //!< Rotator position angle
     53    float temp;                         //!< Temperature
     54    float pressure;                     //!< Pressure
    5555    /* Derived quantities */
    56     float parallactic;                  // Parallactic angle
    57     float airmass;                      // Airmass, calculated from zenith distance
     56    float parallactic;                  //!< Parallactic angle
     57    float airmass;                      //!< Airmass, calculated from zenith distance
    5858} psTelPointing;
    5959
    60 /* Constructor */
     60/** Constructor */
    6161psTelPointing *
    62 psTelPointingNew(double ra, double dec, // Telescope boresight
    63                  double ha,             // Hour angle
    64                  double zd,             // Zenith distance
    65                  double az,             // Azimuth
    66                  float rotAngle,        // Rotator position angle
    67                  float temp,            // Temperature
    68                  float pressure         // Pressure
    69     );
    70 
    71 /* Destructor */
    72 void
    73 psTelPointingDel(psTelPointing *restrict myTelPointing // Object to destroy
    74     );
    75 
    76 
    77 /***********************************************************************************************************/
    78 
    79 /* Cell details: specifies how the cell is mounted on its parent OTA  */
    80 typedef struct {
    81     psOTAPos position;                  // Position of cell in its OTA.  Specifies the position of the
    82                                         // (imaginary) pixel (0,0)
    83     float rotation;                     // Rotation of cell in its OTA.  Specified from +x through +y
    84     int xSize, ySize;                   // Number of pixels in x and y
    85     float scale;                        // Relative pixel scales, if CCD pitch varies. Specify a positive
    86                                         // scale for a left-handed coordinate system, negative for right. If
    87                                         // NULL, then every chip has identical scale, and system is
    88                                         // left-handed.
     62psTelPointingNew(double ra, double dec, //!< Telescope boresight
     63                 double ha,             //!< Hour angle
     64                 double zd,             //!< Zenith distance
     65                 double az,             //!< Azimuth
     66                 float rotAngle,        //!< Rotator position angle
     67                 float temp,            //!< Temperature
     68                 float pressure         //!< Pressure
     69    );
     70
     71/** Destructor */
     72void
     73psTelPointingDel(psTelPointing *restrict myTelPointing //!< Object to destroy
     74    );
     75
     76
     77/***********************************************************************************************************/
     78
     79/** Cell details: specifies how the cell is mounted on its parent OTA */
     80typedef struct {
     81    psOTAPos position;                  //!< Position of cell in its OTA.  Specifies the position of the
     82                                        //!< (imaginary) pixel (0,0)
     83    float rotation;                     //!< Rotation of cell in its OTA.  Specified from +x through +y
     84    int xSize, ySize;                   //!< Number of pixels in x and y
     85    float scale;                        //!< Relative pixel scales, if CCD pitch varies. Specify a positive
     86                                        //!< scale for a left-handed coordinate system, negative for right. If
     87                                        //!< NULL, then every chip has identical scale, and system is
     88                                        //!< left-handed.
    8989} psCellDescription;
    9090
    91 /* Constructor */
     91/** Constructor */
    9292psCellDescription *
    9393psCellDescriptionNew(void);
    9494
    95 /* Destructor */
    96 void
    97 psCellDescriptionDel(psCellDescription *restrict myCell // Cell description to destroy
    98     );
    99 
    100 /***********************************************************************************************************/
    101 
    102 /* Array of cell descriptions */
     95/** Destructor */
     96void
     97psCellDescriptionDel(psCellDescription *restrict myCell //!< Cell description to destroy
     98    );
     99
     100/***********************************************************************************************************/
     101
     102/** Array of cell descriptions */
    103103PS_DECLARE_ARRAY_TYPE(psCellDescription);
    104104PS_CREATE_ARRAY_TYPE(psCellDescription);
     
    106106/***********************************************************************************************************/
    107107
    108 /* OTA details: specifies how the OTA is mounted on the focal plane */
    109 typedef struct {
    110     psOTAPos position;                  // Position of OTA on the focal plane.  Specifies the position of the
    111                                         // bottom left-hand corner.
    112     float rotation;                     // Rotation of OTA on the focal plane.  Specified from +x through +y
    113     psCellDescriptionArray *restrict cells; // Cell descriptions
    114     psOTAAstrom *astrom;                // OTA astrometry
     108/** OTA details: specifies how the OTA is mounted on the focal plane */
     109typedef struct {
     110    psOTAPos position;                  //!< Position of OTA on the focal plane.  Specifies the position of the
     111                                        //!< bottom left-hand corner.
     112    float rotation;                     //!< Rotation of OTA on the focal plane.  Specified from +x through +y
     113    psCellDescriptionArray *restrict cells; //!< Cell descriptions
     114    psOTAAstrom *astrom;                //!< OTA astrometry
    115115} psOTADescription;
    116116
    117 /* Constructor */
     117/** Constructor */
    118118psOTADescription *
    119119psOTADescriptionNew(void);
    120120
    121 /* Destructor */
    122 void
    123 psOTADescriptionDel(psOTADescription *restrict myOTA // OTA description to destroy
    124     );
    125 
    126 /***********************************************************************************************************/
    127 
    128 /* Astrometric solution for an OTA */
    129 /* There are four coordinate frames that we need to worry about:
     121/** Destructor. */
     122void
     123psOTADescriptionDel(psOTADescription *restrict myOTA //!< OTA description to destroy
     124    );
     125
     126/***********************************************************************************************************/
     127
     128/** Astrometric solution for an OTA.
     129 * There are four coordinate frames that we need to worry about:
    130130 * 1. Chip frame: chip# plus x,y in pixels
    131131 * 2. Focal plane frame: X,Y in microns
     
    144144typedef struct {
    145145    /* Focal plane to and from tangent plane */
    146     psAstromCoeffs *restrict tpToFP;    // General astrometric solution for tangent plane to focal plane
    147     psAstromCoeffs *restrict fpToTP;    // General astrometric solution for focal plane to tangent plane
    148     psMatrix *pattern;                  // Fixed pattern distortions for focal plane to tangent plane (simply
    149                                         // * -1 for the reverse); MAY NEED TO BE REVISED UPON IMPLEMENTATION
     146    psAstromCoeffs *restrict tpToFP;    //!< General astrometric solution for tangent plane to focal plane
     147    psAstromCoeffs *restrict fpToTP;    //!< General astrometric solution for focal plane to tangent plane
     148    psMatrix *pattern;                  //!< Fixed pattern distortions for focal plane to tangent plane (simply
     149                                        //!< * -1 for the reverse); MAY NEED TO BE REVISED UPON IMPLEMENTATION
    150150    /* Tangent plane to and from the celestial sphere */
    151     psDoubleArray *restrict tp;         // Data needed to convert from the sky to the tangent plane and back;
    152                                         // produced by and used by SLALib (a.k.a. "Wallace's Grommit")
     151    psDoubleArray *restrict tp;         //!< Data needed to convert from the sky to the tangent plane and back;
     152                                        //!< produced by and used by SLALib (a.k.a. "Wallace's Grommit")
    153153    /* Characterisation of the solution */
    154     float rmsX, rmsY;                   // Dispersion in astrometric solution
    155     float chi2;                         // chi^2 of astrometric solution
     154    float rmsX, rmsY;                   //!< Dispersion in astrometric solution
     155    float chi2;                         //!< chi^2 of astrometric solution
    156156} psOTAAstrom;
    157157
    158 /* Constructor */
     158/** Constructor */
    159159psAstrom *
    160 psAstromNew(const psTelPointing *telescope      // Telescope pointing, used to initialise the tp data.
    161     );
    162 
    163 /* Destructor */
    164 void
    165 psAstromDel(psAstrom *restrict myAstrom // Object to destroy
     160psAstromNew(const psTelPointing *telescope //!< Telescope pointing, used to initialise the tp data.
     161    );
     162
     163/** Destructor */
     164void
     165psAstromDel(psAstrom *restrict myAstrom //!< Object to destroy
    166166    );
    167167
     
    170170/* Calculating and applying astrometric solutions */
    171171
    172 /* Convert (RA,Dec) to (cell#,x,y) */
     172/** Convert (RA,Dec) to (cell#,x,y) */
    173173psOTAPos *
    174 psSkyToOTA(const psSkyPos *restrict position, // Position on the sky
    175            const psOTADescription *restrict ota // OTA details
    176     );
    177 
    178 /* Convert (cell#,x,y) to (RA,Dec) */
     174psSkyToOTA(const psSkyPos *restrict position, //!< Position on the sky
     175           const psOTADescription *restrict ota //!< OTA details
     176    );
     177
     178/** Convert (cell#,x,y) to (RA,Dec) */
    179179psSkyPos *
    180 psOTAToSky(const psOTAPos *restrict position, // Position on the detector
    181            const psOTADescription *restrict ota // OTA details
    182     );
    183 
    184 /* Fit astrometric solution to list of (chip#,x,y) and (RA,Dec) */
     180psOTAToSky(const psOTAPos *restrict position, //!< Position on the detector
     181           const psOTADescription *restrict ota //!< OTA details
     182    );
     183
     184/** Fit astrometric solution to list of (chip#,x,y) and (RA,Dec) */
    185185int
    186 psFitAstrom(psOTADescription *restrict ota, // psAstrom struct containing initial guess for coefficients
    187             const psOTAPosArray *restrict detector, // Positions on OTA (chip#,x,y)
    188             const psSkyPosArray *restrict sky, // Positions on the sky (RA,Dec)
    189             const psTelPointing *telescope // Telescope pointing information, for airmass, parallactic angle
    190                                            // which may help set the astrometric solution
     186psFitAstrom(psOTADescription *restrict ota, //!< psAstrom struct containing initial guess for coefficients
     187            const psOTAPosArray *restrict detector, //!< Positions on OTA (chip#,x,y)
     188            const psSkyPosArray *restrict sky, //!< Positions on the sky (RA,Dec)
     189            const psTelPointing *telescope //!< Telescope pointing information, for airmass, parallactic angle
     190                                           //!< which may help set the astrometric solution
    191191            );
    192192
     
    195195/* Functions needed for astrometry, and will likely be useful elsewhere */
    196196
    197 /* Get the airmass for a given position and sidereal time */
     197/** Get the airmass for a given position and sidereal time */
    198198float
    199 psGetAirmass(const psSkyPos *restrict position, // Position on the sky
    200              float siderealTime // Sidereal time
     199psGetAirmass(const psSkyPos *restrict position, //!< Position on the sky
     200             float siderealTime //!< Sidereal time
    201201             );
    202202
    203 /* Get the parallactic angle for a given position and sidereal time */
     203/** Get the parallactic angle for a given position and sidereal time */
    204204float
    205 psGetParallactic(const psSkyPos *restrict position, // Position on the sky
    206                  real siderealTime      // Sidereal time
     205psGetParallactic(const psSkyPos *restrict position, //!< Position on the sky
     206                 real siderealTime      //!< Sidereal time
    207207                 );
    208208
    209 /* Estimate atmospheric refraction, along the parallactic */
     209/** Estimate atmospheric refraction, along the parallactic */
    210210float
    211 psGetRefraction(float colour,           // Colour of object
    212                 enum psColourRef colourRef; // Colour reference
    213                 psTelPointing telescope // Telescope pointing information, for airmass, temp and pressure
     211psGetRefraction(float colour,           //!< Colour of object
     212                enum psColourRef colourRef; //!< Colour reference
     213                psTelPointing telescope //!< Telescope pointing information, for airmass, temp and pressure
    214214    );
    215215
Note: See TracChangeset for help on using the changeset viewer.