Changeset 253
- Timestamp:
- Mar 17, 2004, 5:33:48 PM (22 years ago)
- Location:
- trunk/archive/pslib/include
- Files:
-
- 7 edited
-
psAstrom.h (modified) (8 diffs)
-
psImage.h (modified) (1 diff)
-
psLib.h (modified) (1 diff)
-
psMath.h (modified) (2 diffs)
-
psPhotom.h (modified) (2 diffs)
-
psPosition.h (modified) (4 diffs)
-
psSort.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/archive/pslib/include/psAstrom.h
r251 r253 7 7 */ 8 8 9 /* * Astrometric solution for an OTA.9 /* Astrometric transformations for a focal plane array. 10 10 * 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 pixels13 * 3. FPA frame:P,Q in microns11 * 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 14 14 * 4. Tangent plane: L,M in arcsec (TBR - angles or linear?) from the telescope boresight. 15 15 * 5. Sky frame: R,D in degrees (TBR - radians?) 16 16 * 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 optics20 * 4 <--> 5: fpa.SLpars : SLALib parameters generated based on the telescope, ra, dec, time, etc from exposure info17 * 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) 21 21 */ 22 22 … … 67 67 int nChips; ///< Number of Cells assigned 68 68 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 73 74 psExposure *exp; ///< information about this exposure 74 75 psMatrix *dx, *dy; //!< Focal Plane fixed pattern residual offsets … … 83 84 typedef struct { 84 85 int nCells; ///< Number of Cells assigned 85 psCell *cells;///< Cells in the Chip86 psMetaData *md; ///< Chip-level metadata 87 86 struct psCell *cells; ///< Cells in the Chip 87 88 psMetaDataSet *md; ///< Chip-level metadata 88 89 psCoordXform *chipToFPA; ///< Transformations from chip coordinates to FPA coordinates 89 90 psCoordXform *FPAtoChip; ///< Transformations from chip coordinates to FPA coordinates 90 91 91 psFPA *parentFPA;///< FPA which contains this chip92 struct psFPA *parentFPA; ///< FPA which contains this chip 92 93 } psChip; 93 94 … … 95 96 */ 96 97 typedef struct { 97 psObjectTable *objects; ///< objects derived from cell98 int nImage; ///< number of images in this cell realization 98 99 psImage *image; ///< imaging area of cell 100 psDlist *objects; ///< objects derived from cell 99 101 psImage *overscan; ///< bias region (subimage) of cell 100 psMetaData *md;///< Cell-level metadata102 psMetaDataSet *md; ///< Cell-level metadata 101 103 102 104 psCoordXform *cellToChip; ///< Transformations from cell coordinates to chip coordinates 103 105 psCoordXform *cellToFPA; ///< Transformations from cell coordinates to FPA coordinates 104 106 105 psChip *parentChip;///< chip which contains this cell107 struct psChip *parentChip; ///< chip which contains this cell 106 108 } psCell; 107 109 … … 112 114 /* Calculating and applying astrometric solutions */ 113 115 114 /** returns Cell in Chip which contains the given point */ 115 int 116 /** returns Chip in FPA which contains the given FPA coordinate */ 117 psChip * 118 psChipInFPA (psFPA *fpa, ///< FPA description 119 psCoord *coord ///< coordinate in FPA 120 ); 121 122 /** returns Cell in Chip which contains the given chip coordinate */ 123 psCell * 116 124 psCellInChip (psChip *chip, ///< chip description 117 psCoord s *coords ///< coordinate to find125 psCoord *coord ///< coordinate in chip 118 126 ); 119 127 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 */ 129 psCoord * 130 psCoordSkyToTP(psExposure *exp, //!< Exposure description 131 psCoord *coord //!< input Sky coordinate 132 ); 133 134 /** Convert tangent plane coords to focal plane coordinates */ 135 psCoord * 136 psCoordTPtoFPA(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 */ 141 psCoord * 142 psCoordFPAtoChip (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 */ 148 psCoord * 149 psCoordChiptoCell (psChip *chip, ///< Chip description 150 psCell *cell, ///< Cell of interest 151 psCoord *coord ///< input Chip coordinate 143 152 ); 144 153 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 */ 155 psCoord * 156 psCoordCelltoChip (psCell *cell, ///< Cell description 157 psCoord *coord ///< input Cell coordinate 150 158 ); 151 159 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 */ 161 psCoord * 162 psCoordChiptoFPA (psChip *chip, ///< Chip description 163 psCoord *coord ///< input Chip coordinate 164 ); 165 166 /** Convert focal plane coords to tangent plane coordinates */ 167 psCoord * 168 psCoordFPAToTP(psFPA *fpa, //!< FPA description 169 psCoord *coord //!< input FPA coordinate 170 ); 171 172 /** Convert tangent plane coords to (RA,Dec) */ 173 psCoord * 174 psCoordTPtoSky(psExposure *exp, //!< Exposure description 175 psCoord *coord //!< input TP coordinate 176 ); 175 177 176 178 /** Get the airmass for a given position and sidereal time */ 177 179 float 178 psGetAirmass(psCoord s *coords, //!< Position on the sky180 psGetAirmass(psCoord *coord, //!< Position on the sky 179 181 double siderealTime //!< Sidereal time 180 182 ); … … 182 184 /** Get the parallactic angle for a given position and sidereal time */ 183 185 float 184 psGetParallactic(psCoord s *coords, //!< Position on the sky186 psGetParallactic(psCoord *coord, //!< Position on the sky 185 187 double siderealTime //!< Sidereal time 186 188 ); … … 189 191 float 190 192 psGetRefraction(float colour, //!< Colour of object 191 psColourRef colourRef, //!< Colour reference 193 psPhotSystem colorPlus, // 194 psPhotSystem colorMinus, ///< Colour reference 192 195 psExposure *exp //!< Telescope pointing information, for airmass, temp and pressure 193 196 ); 194 195 /** Fit astrometric solution to list of (chip#,x,y) and (RA,Dec) */196 int197 psFitAstrom(psOTADescription *restrict ota, //!< Initial guess for coefficients198 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 angle201 //!< which may help set the astrometric solution202 );203 197 204 198 /*** Constructors / Destructors ******************************************************/ … … 223 217 psExposureFree(psExposure *restrict myExp //!< Object to destroy 224 218 ); 225 226 219 #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 16 16 int nx, ny; ///< size of image 17 17 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; 27 29 struct psImage *parent; ///< parent, if a subimage 28 30 struct psImage *children; ///< children of this region -
trunk/archive/pslib/include/psLib.h
r251 r253 39 39 # include <psPhotom.h> 40 40 # include <psAstrom.h> 41 # include <psObject.h> 41 /* # include <psObject.h> */ 42 42 43 43 # endif -
trunk/archive/pslib/include/psMath.h
r247 r253 15 15 double d; ///< double value entry 16 16 complex float c; ///< complex value entry 17 } 17 } val; 18 18 } p_psScalar; 19 19 … … 30 30 psUnaryOp (void *out, ///< destination (may be NULL) 31 31 void *in, ///< input 32 char *operator ,///< operator32 char *operator ///< operator 33 33 ); 34 34 35 35 /** create a psType-ed structure from a constant double value. */ 36 p_ps _Scalar *36 p_psScalar * 37 37 psScalar (double value); 38 38 39 39 /** create a psType-ed structure from a specified type */ 40 p_ps _Scalar *40 p_psScalar * 41 41 psScalarType (char *mode, ///< type description 42 42 ... ///< value (or values) of specified types -
trunk/archive/pslib/include/psPhotom.h
r252 r253 8 8 9 9 /** photometry system transformation types */ 10 enum {10 typedef enum { 11 11 PS_PHOT_SYS, 12 PS_PHOT_REF ,13 } psPhotTransformType 12 PS_PHOT_REF 13 } psPhotTransformType; 14 14 15 15 /** photometry system definition */ … … 27 27 psPhotSystem dst; 28 28 psPhotSystem colorPlus, colorMinus; ///< Colour reference 29 psPolynomial2D colorAirmasTerm;30 psPhotTran formType type;29 psPolynomial2D transform; 30 psPhotTransformType type; 31 31 } psPhotTransform; 32 32 -
trunk/archive/pslib/include/psPosition.h
r251 r253 7 7 */ 8 8 9 /*************************************************/ 9 /** A point in 2-D space, with errors. 10 */ 10 11 typedef struct { 11 12 union { 12 13 double x; //!< x position 13 14 double r; //!< x position 14 } 15 } x; 15 16 union { 16 17 double xErr; //!< Error in x position 17 18 double rErr; //!< Error in x position 18 } 19 } dx; 19 20 union { 20 21 double y; //!< y position 21 22 double d; //!< y position 22 } 23 } y; 23 24 union { 24 25 double yErr; //!< Error in y position 25 26 double dErr; //!< Error in y position 26 } 27 } dy; 27 28 } psCoord; 28 29 30 /** A polynomial transformation between coordinate frames. This may be a linear relationship, or may 31 * represent a higher-order transformation. 32 */ 33 typedef 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 */ 29 41 typedef struct { 30 42 psDPolynomial4D *x; 31 43 psDPolynomial4D *y; 32 44 } psDistortion; 33 34 typedef struct {35 psDPolynomial2D *x;36 psDPolynomial2D *y;37 } psCoordXform;38 45 39 46 psCoord *psCoordXformApply (psCoordXform *frame, psCoord *coords); … … 46 53 47 54 /** Get offset (RA,Dec) on the sky between two positions position1 and position2 may not be identical */ 48 psCoord s*49 psGetOffset(const psCoord s*restrict position1, //!< Position 150 const psCoord s*restrict position2, //!< Position 255 psCoord * 56 psGetOffset(const psCoord *restrict position1, //!< Position 1 57 const psCoord *restrict position2, //!< Position 2 51 58 char *system 52 59 ); 53 60 54 61 /** Apply an offset to a position */ 55 psCoord s*56 psApplyOffset(const psCoord s*restrict position, //!< Position57 const psCoord s*restrict offset, //!< Offset62 psCoord * 63 psApplyOffset(const psCoord *restrict position, //!< Position 64 const psCoord *restrict offset, //!< Offset 58 65 char *system 59 66 ); … … 64 71 65 72 /** Get Sun Position */ 66 psCoord s*73 psCoord * 67 74 psGetSunPos(float mjd //!< MJD to get position for 68 75 ); 69 76 70 77 /** Get Moon position */ 71 psCoord s*78 psCoord * 72 79 psGetMoonPos(float mjd, //!< MJD to get position for 73 80 double latitude, //!< Latitude for apparent position … … 81 88 82 89 /** Get Planet positions */ 83 psCoord s*90 psCoord * 84 91 psGetSolarSystemPos(char *solarSystemObject, //!< Named S.S. object 85 92 float mjd //!< MJD to get position for -
trunk/archive/pslib/include/psSort.h
r247 r253 15 15 /** Sort an array, along with some other stuff. Returns an index array */ 16 16 psIntArray * 17 psSortIndex(psIntArray *restrict out ;//!< Output index array (may be NULL)17 psSortIndex(psIntArray *restrict out, //!< Output index array (may be NULL) 18 18 const psFloatArray *restrict myArray //!< Array to sort 19 19 );
Note:
See TracChangeset
for help on using the changeset viewer.
