IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 212


Ignore:
Timestamp:
Mar 10, 2004, 5:57:47 PM (22 years ago)
Author:
Paul Price
Message:

Changes following comments from the algorithms team.
Renamed psTelPointing to psExposure --- more meaningful name.
Floating point values associated with astrometric solutions are doubles now, to get maximum precision.
Added a bit mask for the astrometric coefficients.

File:
1 edited

Legend:

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

    r198 r212  
    2525    psDoubleArray *restrict coeff;      //!< Coefficients of astrometric solution
    2626    psDoubleArray *restrict coeffErr;   //!< Error in coefficients
     27    psBitMask *restrict coeffMask;      //!< Use this coefficient?
    2728} psAstromCoeffs;
    2829
     
    4445/***********************************************************************************************************/
    4546
    46 /** Telescope pointing information for an exposure */
     47/** Exposure information from the telescope */
    4748typedef struct {
    4849    // Telescope longitude, latitude and height are stored separately, since they don't change with pointing
     
    5152    double zd;                          //!< Zenith distance
    5253    double az;                          //!< Azimuth
     54    double lst;                         //!< Local Sidereal Time
     55    float mjd;                          //!< MJD of observation
    5356    float rotAngle;                     //!< Rotator position angle
    54     float temp;                         //!< Temperature
    55     float pressure;                     //!< Pressure
     57    float temp;                         //!< Air temperature, for estimating diffraction
     58    float pressure;                     //!< Air pressure, for calculating diffraction
     59    float humidity;                     //!< Relative humidity, for calculating diffraction
     60    float exptime;                      //!< Exposure time
    5661    /* Derived quantities */
     62    float posAngle;                     //!< Position angle
    5763    float parallactic;                  //!< Parallactic angle
    5864    float airmass;                      //!< Airmass, calculated from zenith distance
    59 } psTelPointing;
    60 
    61 /** Constructor */
    62 psTelPointing *
    63 psTelPointingAlloc(double ra, double dec,       //!< Telescope boresight
    64                  double ha,             //!< Hour angle
    65                  double zd,             //!< Zenith distance
    66                  double az,             //!< Azimuth
    67                  float rotAngle,        //!< Rotator position angle
    68                  float temp,            //!< Temperature
    69                  float pressure         //!< Pressure
    70     );
    71 
    72 /** Destructor */
    73 void
    74 psTelPointingFree(psTelPointing *restrict myTelPointing //!< Object to destroy
     65    float pf;                           //!< Parallactic factor
     66} psExposure;
     67
     68/** Constructor */
     69psExposure *
     70psExposureAlloc(double ra, double dec,  //!< Telescope boresight
     71                double ha,              //!< Hour angle
     72                double zd,              //!< Zenith distance
     73                double az,              //!< Azimuth
     74                double lst,             //!< Local Sidereal Time
     75                float mjd,              //!< MJD
     76                float rotAngle,         //!< Rotator position angle
     77                float temp,             //!< Temperature
     78                float pressure,         //!< Pressure
     79                float humidity,         //!< Relative humidity
     80                float exptime           //!< Exposure time
     81    );
     82
     83/** Destructor */
     84void
     85psExposureFree(psExposure *restrict myExp //!< Object to destroy
    7586    );
    7687
     
    8091/** Cell details: specifies how the cell is mounted on its parent OTA */
    8192typedef struct {
    82     psOTAPos position;                  //!< Position of cell in its OTA.  Specifies the position of the
     93    double x, y;                        //!< Position of cell in its OTA.  Specifies the position of the
    8394                                        //!< (imaginary) pixel (0,0)
    84     float rotation;                     //!< Rotation of cell in its OTA.  Specified from +x through +y
     95    double xErr, yErr;                  //!< Error in position of cell in the OTA.
     96    double rotation;                    //!< Rotation of cell in its OTA.  Specified from +x through +y
    8597    int xSize, ySize;                   //!< Number of pixels in x and y
    86     float scale;                        //!< Relative pixel scales, if CCD pitch varies. Specify a positive
    87                                         //!< scale for a left-handed coordinate system, negative for right. If
    88                                         //!< NULL, then every chip has identical scale, and system is
    89                                         //!< left-handed.
     98    double scale;                       //!< Relative pixel scales, if CCD pitch varies over the OTA. Specify
     99                                        //!< a positive scale for a left-handed coordinate system, negative
     100                                        //!< for right. If NULL, then every chip has identical scale, and
     101                                        //!< system is left-handed.
    90102} psCellDescription;
    91103
     
    102114
    103115/** Array of cell descriptions */
    104 PS_DECLARE_ARRAY_TYPE(psCellDescription);
    105 PS_CREATE_ARRAY_TYPE(psCellDescription);
     116typedef struct {
     117    enum psType type;                   //!< Type of data.  THIS STRUCT ELEMENT MUST BE FIRST IN THE STRUCT!
     118    int size;                           //!< Total number of elements available
     119    int n;                              //!< Number of elements in use
     120    double *arr;                        //!< The array data
     121} psCellDescriptionArray;
     122
     123/** Constructor */
     124psCellDescriptionArray *psCellDescriptionArrayAlloc(int s, //!< Total number of elements to make available
     125                                                    int n //!< Number of elements that will be used
     126                                                    );
     127/** Reallocator */
     128psCellDescriptionArray *psCellDescriptionArrayRealloc(psCellDescriptionArray *myArray, //!< Array to
     129                                                                                       //!< reallocate
     130                                                      int s //!< Total number of elements to make available
     131                                                      );
     132/** Destructor */
     133void psCellDescriptionArrayFree(psCellDescriptionArray *restrict myArray //!< Array to free
     134                                );
    106135
    107136/***********************************************************************************************************/
     
    109138/** OTA details: specifies how the OTA is mounted on the focal plane */
    110139typedef struct {
    111     psOTAPos position;                  //!< Position of OTA on the focal plane.  Specifies the position of the
    112                                         //!< bottom left-hand corner.
    113     float rotation;                     //!< Rotation of OTA on the focal plane.  Specified from +x through +y
     140    double x, y;                        //!< Position of OTA on the focal plane.  Specifies the position of
     141                                        //!< the bottom left-hand corner.
     142    double xErr, yErr;                  //!< Error in the position of the OTA.
     143    double rotation;                    //!< Rotation of OTA on the focal plane.  Specified from +x through +y
    114144    psCellDescriptionArray *restrict cells; //!< Cell descriptions
    115     struct psOTAAstrom *astrom;             //!< OTA astrometry
     145    psOTAAstrom *astrom;                //!< OTA astrometry
     146    psExposure *exp;                    //!< Exposure data
    116147} psOTADescription;
    117148
     
    159190/** Constructor */
    160191psOTAAstrom *
    161 psOTAAstromAlloc(const psTelPointing *telescope //!< Telescope pointing, used to initialise the tp data.
     192psOTAAstromAlloc(const psExposure *exp //!< Telescope pointing, used to initialise the tp data.
    162193    );
    163194
     
    188219            const psOTAPosArray *restrict detector, //!< Positions on OTA (chip#,x,y)
    189220            const psSkyPosArray *restrict sky, //!< Positions on the sky (RA,Dec)
    190             const psTelPointing *telescope //!< Telescope pointing information, for airmass, parallactic angle
    191                                            //!< which may help set the astrometric solution
     221            const psExposure *exp       //!< Telescope pointing information, for airmass, parallactic angle
     222                                        //!< which may help set the astrometric solution
    192223            );
    193224
     
    199230float
    200231psGetAirmass(const psSkyPos *restrict position, //!< Position on the sky
    201              float siderealTime //!< Sidereal time
     232             double siderealTime        //!< Sidereal time
    202233             );
    203234
     
    205236float
    206237psGetParallactic(const psSkyPos *restrict position, //!< Position on the sky
    207                  float siderealTime     //!< Sidereal time
     238                 double siderealTime    //!< Sidereal time
    208239                 );
    209240
     
    212243psGetRefraction(float colour,           //!< Colour of object
    213244                psColourRef colourRef,  //!< Colour reference
    214                 psTelPointing telescope //!< Telescope pointing information, for airmass, temp and pressure
     245                psExposure *exp         //!< Telescope pointing information, for airmass, temp and pressure
    215246    );
    216247
Note: See TracChangeset for help on using the changeset viewer.