Changeset 153 for trunk/archive/pslib/include/psAstrom.h
- Timestamp:
- Mar 9, 2004, 12:28:16 PM (22 years ago)
- File:
-
- 1 edited
-
trunk/archive/pslib/include/psAstrom.h (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/archive/pslib/include/psAstrom.h
r149 r153 14 14 /***********************************************************************************************************/ 15 15 16 /* Astrometric coefficients */17 typedef struct { 18 int xyOrder; // Spatial (x,y) order of polynomial19 int colourOrder; // Order of polynomial in colour20 int magOrder; // Order of polynomial in magnitude21 int xyColourOrder; // Spatial (x,y) order of polynomial in colour times x and y22 int xyMagOrder; // Spatial (x,y) order of polynomial in magnitude times x and y23 enum psColourRef colourRef; // Colour reference24 psDoubleArray *restrict coeff; // Coefficients of astrometric solution25 psDoubleArray *restrict coeffErr; // Error in coefficients16 /** 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 26 26 } psAstromCoeffs; 27 27 28 /* Constructor */28 /** Constructor */ 29 29 psAstromCoeffs * 30 psAstromCoeffsNew(int xyOrder, // Spatial (x,y) order of polynomial31 int colourOrder, // Order of polynomial in colour32 int magOrder, // Order of polynomial in magnitude33 int xyColourOrder, // Spatial (x,y) order of polynomial in colour times x and y34 int xyMagOrder, // Spatial (x,y) order of polynomial in magnitude times x and y35 enum psColourRef colourRef // Colour reference36 ); 37 38 /* Destructor */39 void 40 psAstromCoeffsDel(psAstromCoeffs *restrict myAstromCoeffs // Object to destroy41 ); 42 43 /***********************************************************************************************************/ 44 45 /* Telescope pointing information for an exposure */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 */ 46 46 typedef struct { 47 47 // Telescope longitude, latitude and height are stored separately, since they don't change with pointing 48 double ra, dec; // Telescope boresight49 double ha; // Hour angle50 double zd; // Zenith distance51 double az; // Azimuth52 float rotAngle; // Rotator position angle53 float temp; // Temperature54 float pressure; // Pressure48 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 55 55 /* Derived quantities */ 56 float parallactic; // Parallactic angle57 float airmass; // Airmass, calculated from zenith distance56 float parallactic; //!< Parallactic angle 57 float airmass; //!< Airmass, calculated from zenith distance 58 58 } psTelPointing; 59 59 60 /* Constructor */60 /** Constructor */ 61 61 psTelPointing * 62 psTelPointingNew(double ra, double dec, // Telescope boresight63 double ha, // Hour angle64 double zd, // Zenith distance65 double az, // Azimuth66 float rotAngle, // Rotator position angle67 float temp, // Temperature68 float pressure // Pressure69 ); 70 71 /* Destructor */72 void 73 psTelPointingDel(psTelPointing *restrict myTelPointing // Object to destroy74 ); 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 the82 // (imaginary) pixel (0,0)83 float rotation; // Rotation of cell in its OTA. Specified from +x through +y84 int xSize, ySize; // Number of pixels in x and y85 float scale; // Relative pixel scales, if CCD pitch varies. Specify a positive86 // scale for a left-handed coordinate system, negative for right. If87 // NULL, then every chip has identical scale, and system is88 // left-handed.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. 89 89 } psCellDescription; 90 90 91 /* Constructor */91 /** Constructor */ 92 92 psCellDescription * 93 93 psCellDescriptionNew(void); 94 94 95 /* Destructor */96 void 97 psCellDescriptionDel(psCellDescription *restrict myCell // Cell description to destroy98 ); 99 100 /***********************************************************************************************************/ 101 102 /* Array of cell descriptions */95 /** Destructor */ 96 void 97 psCellDescriptionDel(psCellDescription *restrict myCell //!< Cell description to destroy 98 ); 99 100 /***********************************************************************************************************/ 101 102 /** Array of cell descriptions */ 103 103 PS_DECLARE_ARRAY_TYPE(psCellDescription); 104 104 PS_CREATE_ARRAY_TYPE(psCellDescription); … … 106 106 /***********************************************************************************************************/ 107 107 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 the111 // bottom left-hand corner.112 float rotation; // Rotation of OTA on the focal plane. Specified from +x through +y113 psCellDescriptionArray *restrict cells; // Cell descriptions114 psOTAAstrom *astrom; // OTA astrometry108 /** 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 115 115 } psOTADescription; 116 116 117 /* Constructor */117 /** Constructor */ 118 118 psOTADescription * 119 119 psOTADescriptionNew(void); 120 120 121 /* Destructor*/122 void 123 psOTADescriptionDel(psOTADescription *restrict myOTA // OTA description to destroy124 ); 125 126 /***********************************************************************************************************/ 127 128 /* Astrometric solution for an OTA */129 /* There are four coordinate frames that we need to worry about: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: 130 130 * 1. Chip frame: chip# plus x,y in pixels 131 131 * 2. Focal plane frame: X,Y in microns … … 144 144 typedef struct { 145 145 /* Focal plane to and from tangent plane */ 146 psAstromCoeffs *restrict tpToFP; // General astrometric solution for tangent plane to focal plane147 psAstromCoeffs *restrict fpToTP; // General astrometric solution for focal plane to tangent plane148 psMatrix *pattern; // Fixed pattern distortions for focal plane to tangent plane (simply149 // * -1 for the reverse); MAY NEED TO BE REVISED UPON IMPLEMENTATION146 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 150 150 /* 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") 153 153 /* Characterisation of the solution */ 154 float rmsX, rmsY; // Dispersion in astrometric solution155 float chi2; // chi^2 of astrometric solution154 float rmsX, rmsY; //!< Dispersion in astrometric solution 155 float chi2; //!< chi^2 of astrometric solution 156 156 } psOTAAstrom; 157 157 158 /* Constructor */158 /** Constructor */ 159 159 psAstrom * 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 destroy160 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 166 166 ); 167 167 … … 170 170 /* Calculating and applying astrometric solutions */ 171 171 172 /* Convert (RA,Dec) to (cell#,x,y) */172 /** Convert (RA,Dec) to (cell#,x,y) */ 173 173 psOTAPos * 174 psSkyToOTA(const psSkyPos *restrict position, // Position on the sky175 const psOTADescription *restrict ota // OTA details176 ); 177 178 /* Convert (cell#,x,y) to (RA,Dec) */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) */ 179 179 psSkyPos * 180 psOTAToSky(const psOTAPos *restrict position, // Position on the detector181 const psOTADescription *restrict ota // OTA details182 ); 183 184 /* Fit astrometric solution to list of (chip#,x,y) and (RA,Dec) */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) */ 185 185 int 186 psFitAstrom(psOTADescription *restrict ota, // psAstrom struct containing initial guess for coefficients187 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 angle190 // which may help set the astrometric solution186 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 191 191 ); 192 192 … … 195 195 /* Functions needed for astrometry, and will likely be useful elsewhere */ 196 196 197 /* Get the airmass for a given position and sidereal time */197 /** Get the airmass for a given position and sidereal time */ 198 198 float 199 psGetAirmass(const psSkyPos *restrict position, // Position on the sky200 float siderealTime // Sidereal time199 psGetAirmass(const psSkyPos *restrict position, //!< Position on the sky 200 float siderealTime //!< Sidereal time 201 201 ); 202 202 203 /* Get the parallactic angle for a given position and sidereal time */203 /** Get the parallactic angle for a given position and sidereal time */ 204 204 float 205 psGetParallactic(const psSkyPos *restrict position, // Position on the sky206 real siderealTime // Sidereal time205 psGetParallactic(const psSkyPos *restrict position, //!< Position on the sky 206 real siderealTime //!< Sidereal time 207 207 ); 208 208 209 /* Estimate atmospheric refraction, along the parallactic */209 /** Estimate atmospheric refraction, along the parallactic */ 210 210 float 211 psGetRefraction(float colour, // Colour of object212 enum psColourRef colourRef; // Colour reference213 psTelPointing telescope // Telescope pointing information, for airmass, temp and pressure211 psGetRefraction(float colour, //!< Colour of object 212 enum psColourRef colourRef; //!< Colour reference 213 psTelPointing telescope //!< Telescope pointing information, for airmass, temp and pressure 214 214 ); 215 215
Note:
See TracChangeset
for help on using the changeset viewer.
