// ____ ______ __ // / __ \ / ____// / // / /_/ // / / / // / ____// /___ / /___ PixInsight Class Library // /_/ \____//_____/ PCL 2.4.23 // ---------------------------------------------------------------------------- // pcl/WCSKeywords.h - Released 2022-03-12T18:59:29Z // ---------------------------------------------------------------------------- // This file is part of the PixInsight Class Library (PCL). // PCL is a multiplatform C++ framework for development of PixInsight modules. // // Copyright (c) 2003-2022 Pleiades Astrophoto S.L. All Rights Reserved. // // Redistribution and use in both source and binary forms, with or without // modification, is permitted provided that the following conditions are met: // // 1. All redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // // 2. All redistributions in binary form must reproduce the above copyright // notice, this list of conditions and the following disclaimer in the // documentation and/or other materials provided with the distribution. // // 3. Neither the names "PixInsight" and "Pleiades Astrophoto", nor the names // of their contributors, may be used to endorse or promote products derived // from this software without specific prior written permission. For written // permission, please contact info@pixinsight.com. // // 4. All products derived from this software, in any form whatsoever, must // reproduce the following acknowledgment in the end-user documentation // and/or other materials provided with the product: // // "This product is based on software from the PixInsight project, developed // by Pleiades Astrophoto and its contributors (https://pixinsight.com/)." // // Alternatively, if that is where third-party acknowledgments normally // appear, this acknowledgment must be reproduced in the product itself. // // THIS SOFTWARE IS PROVIDED BY PLEIADES ASTROPHOTO AND ITS CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED // TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL PLEIADES ASTROPHOTO OR ITS // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, BUSINESS // INTERRUPTION; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; AND LOSS OF USE, // DATA OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. // ---------------------------------------------------------------------------- #ifndef __PCL_WCSKeywords_h #define __PCL_WCSKeywords_h /// \file pcl/WCSKeywords.h #include #include #include #include #include /* * Based on original work contributed by Andrés del Pozo. */ namespace pcl { // ---------------------------------------------------------------------------- class LinearTransformation; /*! * \class WCSKeywords * \brief A structure for management of WCS FITS header keywords and associated * image properties. * * \b References * * M. R. Calabretta, E. W. Greisen (2002) Representations of World * Coordinates in FITS, Astronomy & Astrophysics, 395, 1061-1075, * 1077-1122. * * \ingroup astrometry_support */ class PCL_CLASS WCSKeywords { public: Optional objctra; //!< Right ascension coordinate of the center of the image in degrees. Optional objctdec; //!< Declination coordinate of the center of the image in degrees. IsoString radesys; //!< Reference system of celestial coordinates. Optional equinox; //!< Equinox in years for the celestial coordinate system (not applicable if radesys = ICRS | GCRS). Optional dateobs; //!< Observation start time as a Julian date, UTC timescale. Optional dateend; //!< Observation end time as a Julian date, UTC timescale. Optional longobs; //!< Geodetic longitude of the observation location in degrees. Reckoned positive east of the reference meridian. Optional latobs; //!< Geodetic latitude of the observation location in degrees. Reckoned positive north of the equator. Optional altobs; //!< Geodetic height of the observation location in meters. Optional focallen; //!< Focal length in millimeters. Optional xpixsz; //!< Pixel size in micrometers. Optional crval1; //!< WCS coordinate at the reference pixel, X axis. Optional crval2; //!< WCS coordinate at the reference pixel, Y axis. Optional crpix1; //!< Image coordinate of the reference pixel on the X axis. Optional crpix2; //!< Image coordinate of the reference pixel on the Y axis. Optional cd1_1; //!< Rotation and scaling matrix: CDELT1 * cos(CROTA2) Optional cd1_2; //!< Rotation and scaling matrix: -CDELT2 * sin(CROTA2) Optional cd2_1; //!< Rotation and scaling matrix: CDELT1 * sin(CROTA2) Optional cd2_2; //!< Rotation and scaling matrix: CDELT2 * cos(CROTA2) Optional cdelt1; //!< Plate scale in degrees per pixel at the reference pixel, X axis. Optional cdelt2; //!< Plate scale in degrees per pixel at the reference pixel, Y axis. Optional crota1; //!< Rotation angle around the reference pixel in degrees. Same as CROTA2, unused. Optional crota2; //!< Rotation angle around the reference pixel in degrees. IsoString ctype1; //!< Coordinate type and projection, X axis. IsoString ctype2; //!< Coordinate type and projection, Y axis. Optional pv1_1; //!< Native longitude of the reference point in degrees. Optional pv1_2; //!< Native latitude of the reference point in degrees. Optional lonpole; //!< Native longitude of the pole of the coordinate system in degrees. Optional latpole; //!< Native latitude of the pole of the coordinate system in degrees. IsoString refSpline; //!< If nonempty, the astrometric solution uses thin plate splines instead of WCS polynomials. /*! * Default constructor. Constructs an uninitialized/undefined %WCSKeywords * object. */ WCSKeywords() = default; /*! * Copy constructor. */ WCSKeywords( const WCSKeywords& ) = default; /*! * Constructs a %WCSKeywords object by extracting data from the specified * arrays of image \a properties and %FITS \a keywords. * * Metadata items available as image properties take precedence over * equivalent %FITS keywords. */ WCSKeywords( const PropertyArray& properties, const FITSKeywordArray& keywords = FITSKeywordArray() ) { Read( properties, keywords ); } /*! * Extracts WCS metadata from the specified arrays of image \a properties * and %FITS \a keywords. * * If some metadata items are not included in the \a properties and * \a keywords arrays, the previously defined items, if any, will be * preserved. * * Metadata items available as image properties take precedence over * equivalent %FITS keywords. */ void Read( const PropertyArray& properties, const FITSKeywordArray& keywords = FITSKeywordArray() ); /*! * */ bool ExtractWorldTransformation( LinearTransformation& transIW, int imageHeight ); }; // ---------------------------------------------------------------------------- } // pcl #endif // __PCL_WCSKeywords_h // ---------------------------------------------------------------------------- // EOF pcl/WCSKeywords.h - Released 2022-03-12T18:59:29Z