Commit 2a1986901b24886939eef19247100c83d41ae30b

Authored by Jürgen Knödlseder
1 parent a96dc02e

GSkyProjection::coordsys() method now returns CEL instead of EQU (#1829)

ChangeLog
... ... @@ -32,6 +32,7 @@
32 32 Add GSkyDir::moon() method (#1855)
33 33 Add GSkyDir::sun(), GSkyDir::precess() and GTime::julian_epoch() methods
34 34 (#1854)
  35 + GSkyProjection::coordsys() method now returns CEL instead of EQU (#1829)
35 36 Remove GModelSpatialDiffuseCube::maps() and
36 37 GModelSpatialDiffuseCube::pixels() methods (#1761)
37 38 Implement INTEGRAL/SPI instrument interface (#733, #734, #735, #736,
... ...
... ... @@ -226,6 +226,8 @@ the Sun for a given date and a specific epoch. To support the method, a
226 226 GSkyDir::precess() method was added that allows precessing a sky direction to
227 227 a specific epoch (#1854).
228 228  
  229 +The GSkyProjection::coordsys() method now returns CEL instead of EQU (#1829).
  230 +
229 231  
230 232 13. Support module
231 233 ------------------
... ...
doc/source/admin/release_history/1.7.rst
... ... @@ -96,5 +96,7 @@ Clean up
96 96 Rename ``GModelSpatialDiffuseMap::set_mc_cone()`` to ``GModelSpatialDiffuseMap::mc_cone()`` and add ``mc_cone()``getter methods.
97 97 * [`2893 <https://cta-redmine.irap.omp.eu/issues/2893>`_] -
98 98 Remove ``GCTAResponseCache::ndirs()``, ``GCTAResponseCache::nerecos()`` and ``GCTAResponseCache::netrues()`` methods.
  99 +* [`1829 <https://cta-redmine.irap.omp.eu/issues/1829>`_] -
  100 + ``GSkyProjection::coordsys()`` method now returns ``CEL`` instead of ``EQU``.
99 101 * [`1761 <https://cta-redmine.irap.omp.eu/issues/1761>`_] -
100 102 Remove ``GModelSpatialDiffuseCube::maps()`` and ``GModelSpatialDiffuseCube::pixels()`` methods.
... ...
include/GHealpix.hpp
1 1 /***************************************************************************
2 2 * GHealpix.hpp - Healpix projection class *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2010-2015 by Juergen Knoedlseder *
  4 + * copyright (C) 2010-2020 by Juergen Knoedlseder *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -51,7 +51,7 @@ public:
51 51 GHealpix(void);
52 52 GHealpix(const int& nside,
53 53 const std::string& ordering = "NESTED",
54   - const std::string& coordsys = "EQU");
  54 + const std::string& coordsys = "CEL");
55 55 explicit GHealpix(const GFitsHDU& hdu);
56 56 GHealpix(const GHealpix& wcs);
57 57 virtual ~GHealpix(void);
... ...
include/GSkyProjection.hpp
1 1 /***************************************************************************
2 2 * GSkyProjection.hpp - Abstract sky projection base class *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2010-2014 by Juergen Knoedlseder *
  4 + * copyright (C) 2010-2020 by Juergen Knoedlseder *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -85,7 +85,7 @@ protected:
85 85 virtual bool compare(const GSkyProjection& proj) const = 0;
86 86  
87 87 // Protected members
88   - int m_coordsys; //!< 0=EQU, 1=GAL
  88 + int m_coordsys; //!< 0=CEL, 1=GAL
89 89 };
90 90  
91 91 #endif /* GSKYPROJECTION_HPP */
... ...
src/sky/GException_sky.cpp
1 1 /***************************************************************************
2 2 * GException_sky.cpp - sky exception handlers *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2010-2015 by Jurgen Knodlseder *
  4 + * copyright (C) 2010-2020 by Jurgen Knodlseder *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -187,7 +187,7 @@ GException::wcs_bad_coords::wcs_bad_coords(std::string origin,
187 187 // Set origin and message
188 188 m_origin = origin;
189 189 m_message = "Invalid WCS coordinate system ("+coordsys+"). "
190   - "Should be one of EQU/CEL/GAL/ECL/HEL/SGL.";
  190 + "Should be one of CEL/GAL/ECL/HEL/SGL.";
191 191  
192 192 // Return
193 193 return;
... ...
src/sky/GHealpix.cpp
1 1 /***************************************************************************
2 2 * GHealpix.cpp - Healpix projection class *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2010-2015 by Juergen Knoedlseder *
  4 + * copyright (C) 2010-2020 by Juergen Knoedlseder *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -114,7 +114,7 @@ GHealpix::GHealpix(void) : GSkyProjection()
114 114 *
115 115 * @param[in] nside Number of sides.
116 116 * @param[in] order Pixel ordering ('RING' or 'NESTED').
117   - * @param[in] coords Coordinate system ('EQU' or 'GAL').
  117 + * @param[in] coords Coordinate system ('CEL' or 'GAL').
118 118 *
119 119 * @exception GException::wcs_hpx_bad_nside
120 120 * Invalid nside parameter.
... ... @@ -370,7 +370,7 @@ void GHealpix::write(GFitsHDU&amp; hdu) const
370 370 hdu.card("ORDERING", ordering(),
371 371 "Pixel ordering scheme, either RING or NESTED");
372 372 hdu.card("COORDSYS", coordsys(),
373   - "Coordinate system, either EQU or GAL");
  373 + "Coordinate system, either CEL or GAL");
374 374  
375 375 // Return
376 376 return;
... ...
src/sky/GSkyProjection.cpp
1 1 /***************************************************************************
2 2 * GSkyProjection.cpp - Abstract sky projection base class *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2010-2012 by Juergen Knoedlseder *
  4 + * copyright (C) 2010-2020 by Juergen Knoedlseder *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -141,7 +141,7 @@ GSkyProjection&amp; GSkyProjection::operator= (const GSkyProjection&amp; proj)
141 141 * @return Coordinate system string.
142 142 *
143 143 * Returns one of
144   - * 'EQU' (equatorial),
  144 + * 'CEL' (celestial),
145 145 * 'GAL' (galactic),
146 146 ***************************************************************************/
147 147 std::string GSkyProjection::coordsys(void) const
... ... @@ -150,7 +150,7 @@ std::string GSkyProjection::coordsys(void) const
150 150 std::string s_coordsys;
151 151 switch (m_coordsys) {
152 152 case 0:
153   - s_coordsys = "EQU";
  153 + s_coordsys = "CEL";
154 154 break;
155 155 case 1:
156 156 s_coordsys = "GAL";
... ... @@ -211,7 +211,7 @@ void GSkyProjection::coordsys(const std::string&amp; coordsys)
211 211 void GSkyProjection::init_members(void)
212 212 {
213 213 // Initialise members
214   - m_coordsys = 0; // 0 means EQU
  214 + m_coordsys = 0; // 0 means CEL
215 215  
216 216 // Return
217 217 return;
... ...
src/sky/GWcs.cpp
1 1 /***************************************************************************
2 2 * GWcs.cpp - Abstract world coordinate system base class *
3 3 * ----------------------------------------------------------------------- *
4   - * copyright (C) 2011-2019 by Juergen Knoedlseder *
  4 + * copyright (C) 2011-2020 by Juergen Knoedlseder *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7 7 * This program is free software: you can redistribute it and/or modify *
... ... @@ -245,12 +245,12 @@ void GWcs::read(const GFitsHDU&amp; hdu)
245 245 if (xcoord == "RA--" && ycoord == "DEC-") {
246 246 m_lng = 0;
247 247 m_lat = 1;
248   - coords = "EQU";
  248 + coords = "CEL";
249 249 }
250 250 else if (xcoord == "DEC-" && ycoord == "RA--") {
251 251 m_lng = 1;
252 252 m_lat = 0;
253   - coords = "EQU";
  253 + coords = "CEL";
254 254 }
255 255 else if (xcoord == "GLON" && ycoord == "GLAT") {
256 256 m_lng = 0;
... ...
test/test_GSky.cpp
... ... @@ -733,26 +733,12 @@ void TestGSky::test_GSkyMap_healpix_construct(void)
733 733 test_value(map1.ny(), 0, "Check for no Y-direction map pixels");
734 734 test_value(map1.nmaps(), 1, "Check for one sky map");
735 735 //
736   - GSkyMap map2("CEL", 1, "RING", 2);
  736 + GSkyMap map2("CEL", 1, "NESTED", 2);
737 737 test_assert(!map2.is_empty(), "Check for non-empty sky map");
738 738 test_value(map2.npix(), 12, "Check for 12 sky map pixels");
739 739 test_value(map2.nx(), 0, "Check for no X-direction map pixels");
740 740 test_value(map2.ny(), 0, "Check for no Y-direction map pixels");
741 741 test_value(map2.nmaps(), 2, "Check for one sky map");
742   - //
743   - GSkyMap map3("EQU", 1, "RING", 1);
744   - test_assert(!map3.is_empty(), "Check for non-empty sky map");
745   - test_value(map3.npix(), 12, "Check for 12 sky map pixels");
746   - test_value(map3.nx(), 0, "Check for no X-direction map pixels");
747   - test_value(map3.ny(), 0, "Check for no Y-direction map pixels");
748   - test_value(map3.nmaps(), 1, "Check for one sky map");
749   - //
750   - GSkyMap map4("EQU", 1, "NESTED", 2);
751   - test_assert(!map4.is_empty(), "Check for non-empty sky map");
752   - test_value(map4.npix(), 12, "Check for 12 sky map pixels");
753   - test_value(map4.nx(), 0, "Check for no X-direction map pixels");
754   - test_value(map4.ny(), 0, "Check for no Y-direction map pixels");
755   - test_value(map4.nmaps(), 2, "Check for one sky map");
756 742  
757 743 // Test Healpix copy constructor
758 744 GSkyMap ring1cpy = ring1;
... ...