IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 1511


Ignore:
Timestamp:
Aug 11, 2004, 6:16:38 PM (22 years ago)
Author:
Paul Price
Message:

Defined psObservatory, and added constructors for the image structures.

File:
1 edited

Legend:

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

    r753 r1511  
    2020 * 4 <--> 5: SLALib transformation using exposure parameters (psExposure or psGrommit)
    2121 */
     22
     23/** Observatory data */
     24typedef struct {
     25    const char *name;                   ///< Name of observatory
     26    const double latitude;              ///< Latitude of observatory, east positive
     27    const double longitude;             ///< Longitude of observatory
     28    const double height;                ///< Height of observatory
     29    const double tlr;                   ///< Tropospheric Lapse Rate
     30} psObservatory;
     31
     32psObservatory *
     33psObservatoryAlloc(const char *name,    ///< Name of observatory
     34                   double latitude,     ///< Latitude of observatory, east positive
     35                   double longitude,    ///< Longitude of observatory
     36                   double height,       ///< Height of observatory
     37                   double tlr           ///< Tropospheric Lapse Rate
     38                   );
    2239
    2340/** Information needed (by SLALIB) to convert Apparent to Observed Position */
     
    3754} psGrommit;
    3855
     56/** Constructor */
     57psGrommit *
     58psGrommitAlloc(double latitude,         ///< geodetic latitude (radians)
     59               double sinLat, double cosLat, ///< sine and cosine of geodetic latitude
     60               double abberationMag,    ///< magnitude of diurnal aberration vector
     61               double height,           ///< height (HM)
     62               double temperature,      ///< ambient temperature (TDK)
     63               double pressure,         ///< pressure (PMB)
     64               double humidity,         ///< relative humidity (RH)
     65               double wavelength,       ///< wavelength (WL)
     66               double lapseRate,        ///< lapse rate (TLR)
     67               double refractA, double refractB, ///< refraction constants A and B (radians)
     68               double longitudeOffset,  ///< longitude + eqn of equinoxes + ``sidereal UT'' (radians)
     69               double siderealTime      ///< local apparent sidereal time (radians)
     70    );
     71
    3972/** Exposure information from the telescope */
    4073typedef struct {
    41     // Telescope longitude, latitude and height are stored separately, since they don't change with pointing
    4274    const double ra, dec;               ///< Telescope boresight
    4375    const double ha;                    ///< Hour angle
     
    4577    const double az;                    ///< Azimuth
    4678    const double lst;                   ///< Local Sidereal Time
    47     const float mjd;                    ///< MJD of observation
     79    const psTime *time;                 ///< Time of observation
    4880    const float rotAngle;               ///< Rotator position angle
    4981    const float temp;                   ///< Air temperature, for estimating refraction
     
    5183    const float humidity;               ///< Relative humidity, for calculating refraction
    5284    const float exptime;                ///< Exposure time
     85    const float wavelength;             ///< Wavelength of observation
     86    const psObservatory *observatory;   ///< Observatory data: longitude, latitude, height etc.
    5387    /* Derived quantities */
    5488    const float posAngle;               ///< Position angle
     
    6094} psExposure;
    6195
     96/** Constructor */
     97psExposure *
     98psExposureAlloc(double ra, double dec,  ///< Telescope boresight
     99                double ha,              ///< Hour angle
     100                double zd,              ///< Zenith distance
     101                double az,              ///< Azimuth
     102                double lst,             ///< Local Sidereal Time
     103                const psTime *time,     ///< Time of observation
     104                float rotAngle,         ///< Rotator position angle
     105                float temp,             ///< Temperature
     106                float pressure,         ///< Pressure
     107                float humidity,         ///< Relative humidity
     108                float exptime,          ///< Exposure time
     109                float wavelength,       ///< Wavelength of observation
     110                const psObservatory *observatory ///< Observatory data
     111                );
    62112
    63113/** The fixed pattern residual offsets.  These are specified via a coarse grid of x and y offsets. */
     
    69119} psFixedPattern;
    70120
     121/** Constructor */
     122psFixedPattern *
     123psFixedPatternAlloc(double x0, double y0, ///< Position of the lower-left corner of the grid on the focal plane
     124                    double xScale, double yScale, ///< Scale of the grid
     125                    const psImage *x,   ///< Grid of offsets in x
     126                    const psImage *y    ///< Grid of offsets in y
     127                    );
     128
    71129
    72130/** a Focal plane array: a collection of chips.  Not all chips in a camera need to be listed in an instance of
     
    83141    psFixedPattern *pattern;            ///< Fixed pattern residual offsets
    84142    const psExposure *exp;              ///< information about this exposure
     143    const psGrommit *grommit;           ///< Information for conversion from TP to Sky.
    85144    psPhotSystem colorPlus, colorMinus; ///< Colour reference
    86145    float rmsX, rmsY;                   ///< Dispersion in astrometric solution
     
    88147} psFPA;
    89148
     149/** Constructor: makes an empty FPA */
     150psFPA *
     151psFPAAlloc(int nAlloc,                  ///< Number of Cells to allocate
     152           const psExposure *exp        ///< information about this exposure
     153           );
     154
     155
    90156/** a Chip: a collection of cells.  Not all valid cells in a chip need to be listed in an
    91157 *  instance of psChip.
     
    101167    struct psFPA *parentFPA;            ///< FPA which contains this chip
    102168} psChip;
     169
     170/** Constructor */
     171psChip *
     172psChipAlloc(int nCells,                 ///< Number of Cells assigned
     173            psFPA *parentFPA            ///< FPA which contains this chip
     174            );
     175
    103176
    104177/** a Cell: a collection of readouts.
     
    109182    struct psReadout *readouts;         ///< Readouts from the cell
    110183    psMetadata *md;                     ///< Cell-level metadata
    111 
    112184    psPlaneTransform *cellToChip;       ///< Transformations from cell coordinates to chip coordinates
    113185    psPlaneTransform *cellToFPA;        ///< Transformations from cell coordinates to FPA coordinates
    114186    psPlaneTransform *cellToSky;        ///< Quick and Dirty transformations from cell coordinates to sky
    115 
    116187    struct psChip  *parentChip;         ///< chip which contains this cell
    117188} psCell;
     189
     190/** Constructor */
     191psCell *
     192psCellAlloc(int nReadouts,              ///< number of readouts in this cell
     193            struct psChip *parentChip   ///< chip which contains this cell
     194            );
     195
    118196
    119197/** a Readout: a collection of pixels */
     
    127205   
    128206
     207/** Constructor */
     208psReadout *
     209psReadoutAlloc(int x0, int y0,          ///< Offset from the lower-left corner of the physical device
     210               const psImage *image     ///< imaging area of cell
     211               );
     212
     213
    129214/** Functions **************************************************************/
    130215/** \addtogroup AstroGroup Astronomy-Specific Utilities
     
    280365/*** Constructors / Destructors ******************************************************/
    281366
    282 /** Constructor */
    283 psExposure *
    284 psExposureAlloc(double ra, double dec,  ///< Telescope boresight
    285                 double ha,              ///< Hour angle
    286                 double zd,              ///< Zenith distance
    287                 double az,              ///< Azimuth
    288                 double lst,             ///< Local Sidereal Time
    289                 float mjd,              ///< MJD
    290                 float rotAngle,         ///< Rotator position angle
    291                 float temp,             ///< Temperature
    292                 float pressure,         ///< Pressure
    293                 float humidity,         ///< Relative humidity
    294                 float exptime)          ///< Exposure time
    295 ;
    296367
    297368/** Destructor */
Note: See TracChangeset for help on using the changeset viewer.