Commit 4e0e3dfd15b8a11cf9d547094dfa36c5d45ebc33
1 parent
5a377f01
Rename GFitsHDU::size() to GFitsHDU::cards() (#1859)
The renaming clarifies the meaning of the method.
Showing
5 changed files
with
22 additions
and
17 deletions
ChangeLog
| ... | ... | @@ -3,21 +3,16 @@ |
| 3 | 3 | * Version 1.3.0 released |
| 4 | 4 | ========================= |
| 5 | 5 | |
| 6 | - Rename GFitsImage::size() to GFitsImage::npix() (#1858) | |
| 7 | - Remove GFitsTable::size() method (#1857) | |
| 8 | 6 | Add header card keyword map to GFitsHeader for fast access (#2120) |
| 9 | - Increase maximum CTA King PSF radius to 2 degrees (#2112) | |
| 10 | 7 | Correct set names of spatial GLON/GLAT model parameters (#2113) |
| 8 | + Increase maximum CTA King PSF radius to 2 degrees (#2112) | |
| 11 | 9 | Support "BKG" as name of CTA background template |
| 12 | 10 | Scale optimizer convergence criterion with step size (#2022) |
| 13 | 11 | Put response cube loading and saving in OpenMP critical zone (#2021) |
| 14 | 12 | Add GPhases class (#1996) |
| 15 | - Add support for Monte Carlo identifier metadata (#1483) | |
| 16 | - Add GEventList::has_mc_id() and GEventAtom::mc_id() methods (#1483) | |
| 17 | - Add GEventList::has_phase() and GEventList::has_detxy() methods (#1982) | |
| 13 | + Allow fitting of scale parameter in composite models (#1992) | |
| 18 | 14 | Add GEventList::append_column() method (#1991) |
| 19 | 15 | Add scalar addition and subtraction operators to matrix classes (#1990) |
| 20 | - Allow fitting of scale parameter in composite models (#1992) | |
| 21 | 16 | Add GCTAAeff::ebounds() method (#1989) |
| 22 | 17 | Add GEbounds::emin() and GEbounds::emax() setter methods (#1989) |
| 23 | 18 | Protect GEbounds::set_lin() and set_log() methods from invalid arguments (#1989) |
| ... | ... | @@ -26,22 +21,28 @@ |
| 26 | 21 | Added FITS image conversion operators (#1986) |
| 27 | 22 | If code originates from Git, always compile the Python bindings (#1985) |
| 28 | 23 | Raise exception instead of exiting with return code in Python tests (#1983) |
| 24 | + Add GEventList::has_phase() and GEventList::has_detxy() methods (#1982) | |
| 29 | 25 | Enhance precision of GCTAEdisp2D::compute_ebounds_src |
| 30 | 26 | Add conversion methods between GEbounds and GEnergies (#1977) |
| 27 | + Do no longer interpret a CTA calibration database as file path (#1969) | |
| 28 | + GWcs now supports CD keywords instead of CDELT (#1951) | |
| 31 | 29 | Add GModelSpectralSmoothBrokenPlaw class (#1948) |
| 32 | 30 | Implement lazy loading of energy dispersion in GCTAEdisp2D (#1940) |
| 33 | 31 | Add GCTARoi::contains method |
| 34 | - Do no longer interpret a CTA calibration database as file path (#1969) | |
| 35 | 32 | Add GCTAResponseIrf::rspname() method |
| 36 | - GWcs now supports CD keywords instead of CDELT (#1951) | |
| 37 | 33 | Correct GCTAPsf2D containment radius computation (#1876) |
| 38 | 34 | Add GFilename::type() method (#1863) |
| 35 | + Rename GFitsHDU::size() to GFitsHDU::cards() (#1859) | |
| 36 | + Rename GFitsImage::size() to GFitsImage::npix() (#1858) | |
| 37 | + Remove GFitsTable::size() method (#1857) | |
| 39 | 38 | Add GLS and SFL WCS projections (#1851) |
| 40 | 39 | Add GModelSpatialRadialProfile class (#1520) |
| 41 | 40 | Add GModelSpatialRadialProfileGauss class (#1520) |
| 42 | 41 | Add GModelSpatialRadialProfileDMBurkert class (#1520) |
| 43 | 42 | Add GModelSpatialRadialProfileDMEinasto class (#1520) |
| 44 | 43 | Add GModelSpatialRadialProfileDMZhao class (#1520) |
| 44 | + Add support for Monte Carlo identifier metadata (#1483) | |
| 45 | + Add GEventList::has_mc_id() and GEventAtom::mc_id() methods (#1483) | |
| 45 | 46 | GModelSpectralNodes throws exception for non-positive energy or intensity (#990) |
| 46 | 47 | |
| 47 | 48 | ... | ... |
NEWS
| ... | ... | @@ -69,6 +69,7 @@ The following methods have been removed: |
| 69 | 69 | |
| 70 | 70 | The following methods have been renamed: |
| 71 | 71 | - GFitsImage::size() => GFitsImage::npix() |
| 72 | +- GFitsHDU::size() => GFitsHDU::cards() | |
| 72 | 73 | |
| 73 | 74 | The arguments for the following methods have been changed: |
| 74 | 75 | - ... |
| ... | ... | @@ -120,6 +121,9 @@ method was ambiguous. It returned the number of table columns, but the |
| 120 | 121 | GFitsTable::ncols() does exactly the same thing, hence the method was |
| 121 | 122 | redundant (#1857). |
| 122 | 123 | |
| 124 | +The GFitsHDU::size() method has been renamed to GFitsHDU::cards() since the | |
| 125 | +meaning of the size() method was not clear (#1859). | |
| 126 | + | |
| 123 | 127 | |
| 124 | 128 | 7. Linear algebra module |
| 125 | 129 | ------------------------ | ... | ... |
include/GFitsHDU.hpp
| 1 | 1 | /*************************************************************************** |
| 2 | 2 | * GFitsHDU.hpp - Abstract FITS extension base class * |
| 3 | 3 | * ----------------------------------------------------------------------- * |
| 4 | - * copyright (C) 2008-2016 by Juergen Knoedlseder * | |
| 4 | + * copyright (C) 2008-2017 by Juergen Knoedlseder * | |
| 5 | 5 | * ----------------------------------------------------------------------- * |
| 6 | 6 | * * |
| 7 | 7 | * This program is free software: you can redistribute it and/or modify * |
| ... | ... | @@ -77,7 +77,7 @@ public: |
| 77 | 77 | virtual std::string print(const GChatter& chatter = NORMAL) const = 0; |
| 78 | 78 | |
| 79 | 79 | // Implemented methods |
| 80 | - int size(void) const; | |
| 80 | + int cards(void) const; | |
| 81 | 81 | const std::string& extname(void) const; |
| 82 | 82 | void extname(const std::string& extname); |
| 83 | 83 | const int& extno(void) const; |
| ... | ... | @@ -139,7 +139,7 @@ protected: |
| 139 | 139 | * Returns the number of cards in the header of the FITS extension. |
| 140 | 140 | ***************************************************************************/ |
| 141 | 141 | inline |
| 142 | -int GFitsHDU::size(void) const | |
| 142 | +int GFitsHDU::cards(void) const | |
| 143 | 143 | { |
| 144 | 144 | return (m_header.size()); |
| 145 | 145 | } | ... | ... |
pyext/GFitsHDU.i
| 1 | 1 | /*************************************************************************** |
| 2 | 2 | * GFitsHDU.i - FITS HDU handling class * |
| 3 | 3 | * ----------------------------------------------------------------------- * |
| 4 | - * copyright (C) 2008-2015 by Juergen Knoedlseder * | |
| 4 | + * copyright (C) 2008-2017 by Juergen Knoedlseder * | |
| 5 | 5 | * ----------------------------------------------------------------------- * |
| 6 | 6 | * * |
| 7 | 7 | * This program is free software: you can redistribute it and/or modify * |
| ... | ... | @@ -62,7 +62,7 @@ public: |
| 62 | 62 | virtual HDUType exttype(void) const = 0; |
| 63 | 63 | |
| 64 | 64 | // Implemented methods |
| 65 | - int size(void) const; | |
| 65 | + int cards(void) const; | |
| 66 | 66 | const std::string& extname(void) const; |
| 67 | 67 | void extname(const std::string& extname); |
| 68 | 68 | const int& extno(void) const; | ... | ... |
src/fits/GFitsImage.cpp
| 1 | 1 | /*************************************************************************** |
| 2 | 2 | * GFitsImage.cpp - Abstract FITS image base class * |
| 3 | 3 | * ----------------------------------------------------------------------- * |
| 4 | - * copyright (C) 2008-2016 by Juergen Knoedlseder * | |
| 4 | + * copyright (C) 2008-2017 by Juergen Knoedlseder * | |
| 5 | 5 | * ----------------------------------------------------------------------- * |
| 6 | 6 | * * |
| 7 | 7 | * This program is free software: you can redistribute it and/or modify * |
| ... | ... | @@ -385,7 +385,7 @@ void GFitsImage::nulval(const void* value) |
| 385 | 385 | /***********************************************************************//** |
| 386 | 386 | * @brief Print column information |
| 387 | 387 | * |
| 388 | - * @param[in] chatter Chattiness (defaults to NORMAL). | |
| 388 | + * @param[in] chatter Chattiness. | |
| 389 | 389 | * @return String containing column information. |
| 390 | 390 | * |
| 391 | 391 | * @todo Format and cfitsio information is mainly for debugging. This could |
| ... | ... | @@ -412,7 +412,7 @@ std::string GFitsImage::print(const GChatter& chatter) const |
| 412 | 412 | result.append("\n"+gammalib::parformat("Number of dimensions")); |
| 413 | 413 | result.append(gammalib::str(naxis())); |
| 414 | 414 | result.append("\n"+gammalib::parformat("Number of image pixels")); |
| 415 | - result.append(gammalib::str(size())); | |
| 415 | + result.append(gammalib::str(npix())); | |
| 416 | 416 | for (int i = 0; i < naxis(); ++i) { |
| 417 | 417 | result.append("\n"+gammalib::parformat("Number of bins in "+gammalib::str(i))); |
| 418 | 418 | result.append(gammalib::str(naxes(i))); | ... | ... |