IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 6, 2004, 2:06:06 PM (22 years ago)
Author:
desonia
Message:

another attempt to get astyle to get it right.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/astronomy/psAstrometry.h

    r1406 r1407  
     1
    12/** @file  psAstrometry.h
    23*
     
    89*  @author George Gusciora, MHPCC
    910*
    10 *  @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
    11 *  @date $Date: 2004-08-06 22:34:05 $
     11*  @version $Revision: 1.6 $ $Name: not supported by cvs2svn $
     12*  @date $Date: 2004-08-07 00:06:06 $
    1213*
    1314*  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
    1415*/
    1516
    16 # ifndef PS_ASTROMETRY_H
    17 # define PS_ASTROMETRY_H
    18 
    19 #include "psType.h"
    20 #include "psImage.h"
    21 #include "psArray.h"
    22 #include "psList.h"
    23 #include "psFunctions.h"
    24 #include "psMetadata.h"
    25 #include "psCoord.h"
    26 #include "psPhotometry.h"
     17#ifndef PS_ASTROMETRY_H
     18#    define PS_ASTROMETRY_H
     19
     20#    include "psType.h"
     21#    include "psImage.h"
     22#    include "psArray.h"
     23#    include "psList.h"
     24#    include "psFunctions.h"
     25#    include "psMetadata.h"
     26#    include "psCoord.h"
     27#    include "psPhotometry.h"
    2728
    2829struct psCell;
     
    4445typedef struct
    4546{
    46     const double latitude;             ///< geodetic latitude (radians)
    47     const double sinLat;               ///< sine of geodetic latitude
    48     const double cosLat;               ///< cosine of geodetic latitude
    49     const double abberationMag;        ///< magnitude of diurnal aberration vector
    50     const double height;               ///< height (HM)
    51     const double temperature;          ///< ambient temperature (TDK)
    52     const double pressure;             ///< pressure (PMB)
    53     const double humidity;             ///< relative humidity (RH)
    54     const double wavelength;           ///< wavelength (WL)
    55     const double lapseRate;            ///< lapse rate (TLR)
    56     const double refractA;             ///< refraction constant A (radians)
    57     const double refractB;             ///< refraction constant B (radians)
    58     const double longitudeOffset;      ///< longitude + ... (radians)
    59     const double siderealTime;         ///< local apparent sidereal time (radians)
     47    const double latitude;      // /< geodetic latitude (radians)
     48    const double sinLat;        // /< sine of geodetic latitude
     49    const double cosLat;        // /< cosine of geodetic latitude
     50    const double abberationMag; // /< magnitude of diurnal aberration vector
     51    const double height;        // /< height (HM)
     52    const double temperature;   // /< ambient temperature (TDK)
     53    const double pressure;      // /< pressure (PMB)
     54    const double humidity;      // /< relative humidity (RH)
     55    const double wavelength;    // /< wavelength (WL)
     56    const double lapseRate;     // /< lapse rate (TLR)
     57    const double refractA;      // /< refraction constant A (radians)
     58    const double refractB;      // /< refraction constant B (radians)
     59    const double longitudeOffset;       // /< longitude + ... (radians)
     60    const double siderealTime;  // /< local apparent sidereal time (radians)
    6061}
    6162psGrommit;
     
    7273typedef struct
    7374{
    74     int nX;                            ///< Number of elements in x direction
    75     int nY;                            ///< Number of elements in y direction
    76     double x0;                         ///< X Position of 0,0 corner on focal plane
    77     double y0;                         ///< Y Position of 0,0 corner on focal plane
    78     double xScale;                     ///< Scale of the grid in x direction
    79     double yScale;                     ///< Scale of the grid in x direction
    80     double **x;                        ///< The grid of offsets in x
    81     double **y;                        ///< The grid of offsets in y
     75    int nX;                     // /< Number of elements in x direction
     76    int nY;                     // /< Number of elements in y direction
     77    double x0;                  // /< X Position of 0,0 corner on focal plane
     78    double y0;                  // /< Y Position of 0,0 corner on focal plane
     79    double xScale;              // /< Scale of the grid in x direction
     80    double yScale;              // /< Scale of the grid in x direction
     81    double **x;                 // /< The grid of offsets in x
     82    double **y;                 // /< The grid of offsets in y
    8283}
    8384psFixedPattern;
     
    9495typedef struct
    9596{
    96     const unsigned int colBins;        ///< Amount of binning in x-dimension
    97     const unsigned int rowBins;        ///< Amount of binning in y-dimension
    98     const int col0;                    ///< Offset from the left of chip.
    99     const int row0;                    ///< Offset from the bottom of chip.
    100 
    101     psImage* image;                    ///< imaging area of Readout
    102     psList* objects;                   ///< objects derived from Readout
    103     psMetadata* metadata;              ///< readout-level metadata
     97    const unsigned int colBins; // /< Amount of binning in x-dimension
     98    const unsigned int rowBins; // /< Amount of binning in y-dimension
     99    const int col0;             // /< Offset from the left of chip.
     100    const int row0;             // /< Offset from the bottom of chip.
     101
     102    psImage *image;             // /< imaging area of Readout
     103    psList *objects;            // /< objects derived from Readout
     104    psMetadata *metadata;       // /< readout-level metadata
    104105}
    105106psReadout;
     
    116117typedef struct psCell
    117118{
    118     psArray* readouts;                 ///< readouts from the cell
    119     psMetadata* metadata;              ///< cell-level metadata
    120 
    121     psPlaneTransform* toChip;          ///< transformations from cell to chip coordinates
    122     psPlaneTransform* fromChip;        ///< transformations from chip to cell coordinates
    123     psPlaneTransform* toFPA;           ///< transformations from cell to FPA coordinates
    124     psPlaneTransform* toSky;           ///< transformations from cell to sky coordinates
    125 
    126     struct psChip* parent;             ///< chip in which contains this cell
     119    psArray *readouts;          // /< readouts from the cell
     120    psMetadata *metadata;       // /< cell-level metadata
     121
     122    psPlaneTransform *toChip;   // /< transformations from cell to chip coordinates
     123    psPlaneTransform *fromChip; // /< transformations from chip to cell coordinates
     124    psPlaneTransform *toFPA;    // /< transformations from cell to FPA coordinates
     125    psPlaneTransform *toSky;    // /< transformations from cell to sky coordinates
     126
     127    struct psChip *parent;      // /< chip in which contains this cell
    127128}
    128129psCell;
     
    138139typedef struct psChip
    139140{
    140     psArray* cells;                    ///< cells in the chip
    141     psMetadata* metadata;              ///< chip-level metadata
    142 
    143     psPlaneTransform* toFPA;           ///< transformation from chip to FPA coordinates
    144     psPlaneTransform* fromFPA;         ///< transformation from FPA to chip coordinates
    145 
    146     struct psFPA* parent;              ///< FPA which contains this chip
     141    psArray *cells;             // /< cells in the chip
     142    psMetadata *metadata;       // /< chip-level metadata
     143
     144    psPlaneTransform *toFPA;    // /< transformation from chip to FPA coordinates
     145    psPlaneTransform *fromFPA;  // /< transformation from FPA to chip coordinates
     146
     147    struct psFPA *parent;       // /< FPA which contains this chip
    147148}
    148149psChip;
     
    163164typedef struct psFPA
    164165{
    165     psArray* chips;                    ///< chips in the focal plane array
    166     psMetadata* metadata;              ///< focal-plane's metadata
    167 
    168     psPlaneDistort* fromTangentPlane;  ///< transformation from tangent plane to focal plane
    169     psPlaneDistort* toTangentPlane;    ///< transformation from focal plane to tangent plane
    170     psFixedPattern* pattern;           ///< fixed pattern residual offsets
    171 
    172     const struct psExposure* exposure; ///< information about this exposure
    173 
    174     psPhotSystem* colorPlus;           ///< Color reference
    175     psPhotSystem* colorMinus;          ///< Color reference
    176 
    177     float rmsX;                        ///< RMS for x transformation fits
    178     float rmsY;                        ///< RMS for y transformation fits
    179     float chi2;                        ///< chi^2 of astrometric solution
     166    psArray *chips;             // /< chips in the focal plane array
     167    psMetadata *metadata;       // /< focal-plane's metadata
     168
     169    psPlaneDistort *fromTangentPlane;   // /< transformation from tangent plane to focal plane
     170    psPlaneDistort *toTangentPlane;     // /< transformation from focal plane to tangent plane
     171    psFixedPattern *pattern;    // /< fixed pattern residual offsets
     172
     173    const struct psExposure *exposure;  // /< information about this exposure
     174
     175    psPhotSystem *colorPlus;    // /< Color reference
     176    psPhotSystem *colorMinus;   // /< Color reference
     177
     178    float rmsX;                 // /< RMS for x transformation fits
     179    float rmsY;                 // /< RMS for y transformation fits
     180    float chi2;                 // /< chi^2 of astrometric solution
    180181}
    181182psFPA;
     
    190191typedef struct psExposure
    191192{
    192     const double ra;                  ///< Telescope boresight, right ascention
    193     const double dec;                 ///< Telescope boresight, declination
    194     const double hourAngle;           ///< Hour angle
    195     const double zenith;              ///< Zenith distance
    196     const double azimuth;             ///< Azimuth
    197     const double localTime;           ///< Local Sidereal Time
    198     const float date;                 ///< Modified Jullian Date of observation
    199     const float rotAngle;             ///< Rotator position angle
    200     const float temperature;          ///< Air temperature, for estimating refraction
    201     const float pressure;             ///< Air pressure, for calculating refraction
    202     const float humidity;             ///< Relative humidity, for refraction
    203     const float exposureTime;         ///< Exposure time
     193    const double ra;            // /< Telescope boresight, right ascention
     194    const double dec;           // /< Telescope boresight, declination
     195    const double hourAngle;     // /< Hour angle
     196    const double zenith;        // /< Zenith distance
     197    const double azimuth;       // /< Azimuth
     198    const double localTime;     // /< Local Sidereal Time
     199    const float date;           // /< Modified Jullian Date of observation
     200    const float rotAngle;       // /< Rotator position angle
     201    const float temperature;    // /< Air temperature, for estimating refraction
     202    const float pressure;       // /< Air pressure, for calculating refraction
     203    const float humidity;       // /< Relative humidity, for refraction
     204    const float exposureTime;   // /< Exposure time
    204205
    205206    /* Derived quantities */
    206     const float positionAngle;        ///< Position angle
    207     const float parallacticAngle;     ///< Parallactic angle
    208     const float airmass;              ///< Airmass, calculated from zenith distance
    209     const float parallacticFactor;    ///< Parallactic factor
    210     const char *cameraName;           ///< name of camera which provided exposure
    211     const char *telescopeName;        ///< name of telescope which provided exposure
     207    const float positionAngle;  // /< Position angle
     208    const float parallacticAngle;       // /< Parallactic angle
     209    const float airmass;        // /< Airmass, calculated from zenith distance
     210    const float parallacticFactor;      // /< Parallactic factor
     211    const char *cameraName;     // /< name of camera which provided exposure
     212    const char *telescopeName;  // /< name of telescope which provided exposure
    212213}
    213214psExposure;
    214215
    215 psExposure* psExposureAlloc(
    216     double ra,                           ///< Telescope boresight, right ascention
    217     double dec,                          ///< Telescope boresight, declination
    218     double hourAngle,                    ///< Hour angle
    219     double zenith,                       ///< Zenith distance
    220     double azimuth,                      ///< Azimuth
    221     double localTime,                    ///< Local Sidereal Time
    222     float date,                          ///< MJD
    223     float rotAngle,                      ///< Rotator position angle
    224     float temperature,                   ///< Temperature
    225     float pressure,                      ///< Pressure
    226     float humidity,                      ///< Relative humidity
    227     float exposureTime                 ///< Exposure time
    228 );
     216psExposure *psExposureAlloc(double ra,  // /< Telescope boresight, right ascention
     217                            double dec, // /< Telescope boresight, declination
     218                            double hourAngle,   // /< Hour angle
     219                            double zenith,      // /< Zenith distance
     220                            double azimuth,     // /< Azimuth
     221                            double localTime,   // /< Local Sidereal Time
     222                            float date, // /< MJD
     223                            float rotAngle,     // /< Rotator position angle
     224                            float temperature,  // /< Temperature
     225                            float pressure,     // /< Pressure
     226                            float humidity,     // /< Relative humidity
     227                            float exposureTime  // /< Exposure time
     228                           );
    229229
    230230/** Allocates a Wallace's Grommit structure.
     
    235235 *  @return psGrommit*     New grommit structure.
    236236 */
    237 psGrommit* psGrommitAlloc(
    238     const psExposure* exp              ///< the cooresponding exposure structure.
    239 );
    240 
    241 psCell *psCellinFPA(
    242     psCell *out,
    243     const psPlane *coord,
    244     const psFPA *FPA
    245 );
    246 
    247 psChip *psChipinFPA(
    248     psChip *out,
    249     const psPlane *coord,
    250     const psFPA *FPA
    251 );
    252 
    253 psCell *psCellinChip(
    254     psCell *out,
    255     const psPlane *coord,
    256     const psChip *chip
    257 );
    258 
    259 psPlane *psCoordCelltoChip(
    260     psPlane *out,
    261     const psPlane *in,
    262     const psCell *cell
    263 );
    264 
    265 psPlane *psCoordChipToFPA(
    266     psPlane *out,
    267     const psPlane *in,
    268     const psChip *chip
    269 );
    270 
    271 psPlane *psCoordFPAtoTP(
    272     psPlane *out,
    273     const psPlane *in,
    274     const psFPA *fpa
    275 );
    276 
    277 psSphere *psCoordTPtoSky(
    278     psSphere *out,
    279     const psPlane *in,
    280     const psGrommit *grommit
    281 );
    282 
    283 psPlane *psCoordCellToFPA(
    284     psPlane *out,
    285     const psPlane *in,
    286     const psCell *cell
    287 );
    288 
    289 psSphere *psCoordCelltoSky(
    290     psSphere *out,
    291     const psPlane *in,
    292     const psCell *cell
    293 );
    294 
    295 psSphere *psCoordCelltoSkyQuick(
    296     psSphere *out,
    297     const psPlane *in,
    298     const psCell *cell
    299 );
    300 
    301 psPlane *psCoordSkytoTP(
    302     psPlane *out,
    303     const psSphere *in,
    304     const psGrommit *grommit
    305 );
    306 
    307 psPlane *psCoordTPtoFPA(
    308     psPlane *out,
    309     const psPlane *in,
    310     const psFPA *fpa
    311 );
    312 
    313 psPlane *psCoordFPAtoChip(
    314     psPlane *out,
    315     const psPlane *in,
    316     const psChip *chip
    317 );
    318 
    319 psPlane *psCoordChiptoCell(
    320     psPlane *out,
    321     const psPlane *in,
    322     const psCell *cell
    323 );
    324 
    325 psPlane *psCoordSkytoCell(
    326     psPlane *out,
    327     const psSphere *in,
    328     const psCell *cell
    329 );
    330 
    331 psPlane *psCoordSkytoCellQuick(
    332     psPlane *out,
    333     const psSphere *in,
    334     const psCell *cell
    335 );
     237psGrommit *psGrommitAlloc(const psExposure * exp        // /< the cooresponding exposure structure.
     238                         );
     239
     240psCell *psCellinFPA(psCell * out, const psPlane * coord, const psFPA * FPA);
     241
     242psChip *psChipinFPA(psChip * out, const psPlane * coord, const psFPA * FPA);
     243
     244psCell *psCellinChip(psCell * out, const psPlane * coord, const psChip * chip);
     245
     246psPlane *psCoordCelltoChip(psPlane * out, const psPlane * in, const psCell * cell);
     247
     248psPlane *psCoordChipToFPA(psPlane * out, const psPlane * in, const psChip * chip);
     249
     250psPlane *psCoordFPAtoTP(psPlane * out, const psPlane * in, const psFPA * fpa);
     251
     252psSphere *psCoordTPtoSky(psSphere * out, const psPlane * in, const psGrommit * grommit);
     253
     254psPlane *psCoordCellToFPA(psPlane * out, const psPlane * in, const psCell * cell);
     255
     256psSphere *psCoordCelltoSky(psSphere * out, const psPlane * in, const psCell * cell);
     257
     258psSphere *psCoordCelltoSkyQuick(psSphere * out, const psPlane * in, const psCell * cell);
     259
     260psPlane *psCoordSkytoTP(psPlane * out, const psSphere * in, const psGrommit * grommit);
     261
     262psPlane *psCoordTPtoFPA(psPlane * out, const psPlane * in, const psFPA * fpa);
     263
     264psPlane *psCoordFPAtoChip(psPlane * out, const psPlane * in, const psChip * chip);
     265
     266psPlane *psCoordChiptoCell(psPlane * out, const psPlane * in, const psCell * cell);
     267
     268psPlane *psCoordSkytoCell(psPlane * out, const psSphere * in, const psCell * cell);
     269
     270psPlane *psCoordSkytoCellQuick(psPlane * out, const psSphere * in, const psCell * cell);
    336271
    337272#endif
Note: See TracChangeset for help on using the changeset viewer.