IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 1479


Ignore:
Timestamp:
Aug 11, 2004, 12:01:35 PM (22 years ago)
Author:
desonia
Message:

doxygen comments added and function names made to comply with coding standards.

Location:
trunk/psLib/src/astronomy
Files:
2 edited

Legend:

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

    r1475 r1479  
    88*  @author George Gusciora, MHPCC
    99*
    10 *  @version $Revision: 1.9 $ $Name: not supported by cvs2svn $
    11 *  @date $Date: 2004-08-11 20:07:44 $
     10*  @version $Revision: 1.10 $ $Name: not supported by cvs2svn $
     11*  @date $Date: 2004-08-11 22:01:35 $
    1212*
    1313*  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    103103
    104104    // Determine which chip contains the fpaCoords.
    105     tmpChip = psChipinFPA(tmpChip, fpaCoord, FPA);
     105    tmpChip = psChipInFPA(tmpChip, fpaCoord, FPA);
    106106
    107107    // Convert to those chip coordinates.
    108     chipCoord = psCoordFPAtoChip(chipCoord, fpaCoord, tmpChip);
     108    chipCoord = psCoordFPAToChip(chipCoord, fpaCoord, tmpChip);
    109109
    110110    // Determine which cell contains those chip coordinates.
    111     outCell = psCellinChip(outCell, chipCoord, tmpChip);
     111    outCell = psCellInChip(outCell, chipCoord, tmpChip);
    112112
    113113    psFree(tmpChip);
     
    155155
    156156        chipCoord = psPlaneTransformApply(chipCoord, tmpChip->fromFPA, fpaCoord);
    157         tmpCell = psCellinChip(tmpCell, chipCoord, tmpChip);
     157        tmpCell = psCellInChip(tmpCell, chipCoord, tmpChip);
    158158        if (tmpCell != NULL) {
    159159            psFree(chipCoord);
  • trunk/psLib/src/astronomy/psAstrometry.h

    r1476 r1479  
    88*  @author George Gusciora, MHPCC
    99*
    10 *  @version $Revision: 1.12 $ $Name: not supported by cvs2svn $
    11 *  @date $Date: 2004-08-11 20:08:05 $
     10*  @version $Revision: 1.13 $ $Name: not supported by cvs2svn $
     11*  @date $Date: 2004-08-11 22:01:35 $
    1212*
    1313*  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    163163typedef struct psFPA
    164164{
    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
     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
    180180}
    181181psFPA;
     
    190190typedef struct psExposure
    191191{
    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
     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
    204204
    205205    /* 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
     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
    212212}
    213213psExposure;
    214214
    215 psExposure* psExposureAlloc(double ra,  ///< Telescope boresight, right ascention
    216                             double dec, ///< Telescope boresight, declination
    217                             double hourAngle,   ///< Hour angle
    218                             double zenith,      ///< Zenith distance
    219                             double azimuth,     ///< Azimuth
    220                             double localTime,   ///< Local Sidereal Time
    221                             float date, ///< MJD
    222                             float rotAngle,     ///< Rotator position angle
    223                             float temperature,  ///< Temperature
    224                             float pressure,     ///< Pressure
    225                             float humidity,     ///< Relative humidity
    226                             float exposureTime  ///< Exposure time
    227                            );
     215/** Allocator for psExposure
     216 *
     217 *  We need several quantities from the telescope in order to make a first
     218 *  guess at the astrometric solution. From these quantities, further
     219 *  quantities can be derived and stored for later use.
     220 *
     221 *  @return     psExposure*    new psExposure struct
     222 */
     223psExposure* psExposureAlloc(
     224    double ra,                         ///< Telescope boresight, right ascention
     225    double dec,                        ///< Telescope boresight, declination
     226    double hourAngle,                  ///< Hour angle
     227    double zenith,                     ///< Zenith distance
     228    double azimuth,                    ///< Azimuth
     229    double localTime,                  ///< Local Sidereal Time
     230    float date,                        ///< MJD
     231    float rotAngle,                    ///< Rotator position angle
     232    float temperature,                 ///< Temperature
     233    float pressure,                    ///< Pressure
     234    float humidity,                    ///< Relative humidity
     235    float exposureTime                 ///< Exposure time
     236);
    228237
    229238/** Allocates a Wallace's Grommit structure.
     
    234243 *  @return psGrommit* New grommit structure.
    235244 */
    236 psGrommit* psGrommitAlloc(const psExposure* exp        ///< the cooresponding exposure structure.
    237                          );
    238 
    239 /// XXX: This is defined as a private p_ps() type of function in the SDRS.
    240 /// I changed this to a public function.
    241 void psGrommitFree(psGrommit *grommit);
    242 
    243 psCell* psCellinFPA(psCell* out, const psPlane* coord, const psFPA* FPA);
    244 
    245 psChip* psChipinFPA(psChip* out, const psPlane* coord, const psFPA* FPA);
    246 
    247 psCell* psCellinChip(psCell* out, const psPlane* coord, const psChip* chip);
    248 
    249 psPlane* psCoordCelltoChip(psPlane* out, const psPlane* in, const psCell* cell);
    250 
    251 psPlane* psCoordChipToFPA(psPlane* out, const psPlane* in, const psChip* chip);
    252 
    253 psPlane* psCoordFPAtoTP(psPlane* out, const psPlane* in, const psFPA* fpa);
    254 
    255 psSphere* psCoordTPtoSky(psSphere* out, const psPlane* in, const psGrommit* grommit);
    256 
    257 psPlane* psCoordCellToFPA(psPlane* out, const psPlane* in, const psCell* cell);
    258 
    259 psSphere* psCoordCelltoSky(psSphere* out, const psPlane* in, const psCell* cell);
    260 
    261 psSphere* psCoordCelltoSkyQuick(psSphere* out, const psPlane* in, const psCell* cell);
    262 
    263 psPlane* psCoordSkytoTP(psPlane* out, const psSphere* in, const psGrommit* grommit);
    264 
    265 psPlane* psCoordTPtoFPA(psPlane* out, const psPlane* in, const psFPA* fpa);
    266 
    267 psPlane* psCoordFPAtoChip(psPlane* out, const psPlane* in, const psChip* chip);
    268 
    269 psPlane* psCoordChiptoCell(psPlane* out, const psPlane* in, const psCell* cell);
    270 
    271 psPlane* psCoordSkytoCell(psPlane* out, const psSphere* in, const psCell* cell);
    272 
    273 psPlane* psCoordSkytoCellQuick(psPlane* out, const psSphere* in, const psCell* cell);
     245psGrommit* psGrommitAlloc(
     246    const psExposure* exp              ///< the cooresponding exposure structure.
     247);
     248
     249/** Find cooresponding cell for given FPA coordinate
     250 *
     251 *  @return psCell*    the cell cooresponding to the coord in FPA
     252 */
     253psCell* psCellInFPA(
     254    psCell* out,                       ///< a cell struct to recycle. If NULL, a new struct is created
     255    const psPlane* coord,              ///< the coordinate in FPA plane
     256    const psFPA* FPA                   ///< the FPA to search for the cell
     257);
     258
     259/** Find cooresponding chip for given FPA coordinate
     260 *
     261 *  @return psChip*    the chip cooresponding to coord
     262 */
     263psChip* psChipInFPA(
     264    psChip* out,                       ///< a chip struct to recycle. If NULL, a new struct is created
     265    const psPlane* coord,              ///< the coordinate in FPA plane
     266    const psFPA* FPA                   ///< the FPA to search for the cell
     267);
     268
     269/** Find cooresponding cell for given Chip coordinate
     270 *
     271 *  @return psCell*    the cell cooresponding to coord
     272 */
     273psCell* psCellInChip(
     274    psCell* out,                       ///< a cell struct to recycle. If NULL, a new struct is created
     275    const psPlane* coord,              ///< the coordinate in Chip plane
     276    const psChip* chip                 ///< the chip to search for the cell
     277);
     278
     279/** Translate a cell coordinate into a chip coordinate
     280 *
     281 *  @return psPlane*    the resulting chip coordinate
     282 */
     283psPlane* psCoordCellToChip(
     284    psPlane* out,                      ///< a plane struct to recycle. If NULL, a new struct is created
     285    const psPlane* in,                 ///< the coordinate within Cell
     286    const psCell* cell                 ///< the Cell in interest
     287);
     288
     289/** Translate a chip coordinate into a FPA coordinate
     290 *
     291 *  @return psPlane*    the resulting FPA coordinate
     292 */
     293psPlane* psCoordChipToFPA(
     294    psPlane* out,                      ///< a plane struct to recycle. If NULL, a new struct is created
     295    const psPlane* in,                 ///< the coordinate within Chip
     296    const psChip* chip                 ///< the chip in interest
     297);
     298
     299/** Translate a FPA coordinate into a Tangent Plane coordinate
     300 *
     301 *  @return psPlane*    the resulting Tangent Plane coordinate
     302 */
     303psPlane* psCoordFPAToTP(
     304    psPlane* out,                      ///< a plane struct to recycle. If NULL, a new struct is created
     305    const psPlane* in,                 ///< the coordinate within FPA
     306    const psFPA* fpa                   ///< the FPA in interest
     307);
     308
     309/** Translate a Tangent Plane coordinate into a Sky coordinate
     310 *
     311 *  @return psSphere*    the resulting Sky coordinate
     312 */
     313psSphere* psCoordTPToSky(
     314    psSphere* out,                     ///< a sphere struct to recycle. If NULL, a new struct is created
     315    const psPlane* in,                 ///< the coordinate within Tangent Plane
     316    const psGrommit* grommit           ///< the grommit of the tangent plane
     317);
     318
     319/** Translate a cell coordinate into a FPA coordinate
     320 *
     321 *  @return psPlane*    the resulting FPA coordinate
     322 */
     323psPlane* psCoordCellToFPA(
     324    psPlane* out,                      ///< a plane struct to recycle. If NULL, a new struct is created
     325    const psPlane* in,                 ///< the coordinate within cell
     326    const psCell* cell                 ///< the cell in interest
     327);
     328
     329/** Translate a cell coordinate into a Sky coordinate
     330 *
     331 *  @return psSphere*    the resulting Sky coordinate
     332 */
     333psSphere* psCoordCellToSky(
     334    psSphere* out,                     ///< a sphere struct to recycle. If NULL, a new struct is created
     335    const psPlane* in,                 ///< the coordinate within cell
     336    const psCell* cell                 ///< the cell in interest
     337);
     338
     339/** Translate a cell coordinate into a Sky coordinate using a 'quick and
     340 *  dirty' method
     341 *
     342 *  @return psSphere*    the resulting Sky coordinate
     343 */
     344psSphere* psCoordCellToSkyQuick(
     345    psSphere* out,                     ///< a sphere struct to recycle. If NULL, a new struct is created
     346    const psPlane* in,                 ///< the coordinate within cell
     347    const psCell* cell                 ///< the cell in interest
     348);
     349
     350/** Translate a Sky coordinate into a Tangent Plane coordinate
     351 *
     352 *  @return psPlane*    the resulting Tangent Plane coordinate
     353 */
     354psPlane* psCoordSkyToTP(
     355    psPlane* out,                      ///< a plane struct to recycle. If NULL, a new struct is created
     356    const psSphere* in,                ///< the sky coordinate
     357    const psGrommit* grommit           ///< the grommit
     358);
     359
     360/** Translate a Tangent Plane coordinate into a FPA coordinate
     361 *
     362 *  @return psPlane*    the resulting FPA coordinate
     363 */
     364psPlane* psCoordTPToFPA(
     365    psPlane* out,                      ///< a plane struct to recycle. If NULL, a new struct is created
     366    const psPlane* in,                 ///< the coordinate within tangent plane
     367    const psFPA* fpa                   ///< the FPA of interest
     368);
     369
     370/** Translate a FPA coordinate into a chip coordinate
     371 *
     372 *  @return psPlane*    the resulting chip coordinate
     373 */
     374psPlane* psCoordFPAToChip(
     375    psPlane* out,                      ///< a plane struct to recycle. If NULL, a new struct is created
     376    const psPlane* in,                 ///< the FPA coordinate
     377    const psChip* chip                 ///< the chip of interest
     378);
     379
     380/** Translate a chip coordinate into a cell coordinate
     381 *
     382 *  @return psPlane*    the resulting cell coordinate
     383 */
     384psPlane* psCoordChipToCell(
     385    psPlane* out,                      ///< a plane struct to recycle. If NULL, a new struct is created
     386    const psPlane* in,                 ///< the Chip coordinate
     387    const psCell* cell                 ///< the cell of interest
     388);
     389
     390/** Translate a sky coordinate into a cell coordinate
     391 *
     392 *  @return psPlane*    the resulting cell coordinate
     393 */
     394psPlane* psCoordSkyToCell(
     395    psPlane* out,                      ///< a plane struct to recycle. If NULL, a new struct is created
     396    const psSphere* in,                ///< the Sky coordinate
     397    const psCell* cell                 ///< the cell of interest
     398);
     399
     400/** Translate a sky coordinate into a cell coordinate using a 'quick and
     401 *  dirty' method
     402 *
     403 *  @return psPlane*    the resulting cell coordinate
     404 */
     405psPlane* psCoordSkyToCellQuick(
     406    psPlane* out,                      ///< a plane struct to recycle. If NULL, a new struct is created
     407    const psSphere* in,                ///< the Sky coordinate
     408    const psCell* cell                 ///< the cell of interest
     409);
    274410
    275411#endif
Note: See TracChangeset for help on using the changeset viewer.