Commit b77a0fd91f5d7f6cc770d2242ceece130aa8aac1

Authored by knodlseder
1 parent 95ea49dc

replace FITS table column() method by access operator[]

src/obs/GEbounds.cpp
... ... @@ -361,8 +361,8 @@ void GEbounds::read(GFitsTable* hdu)
361 361  
362 362 // Copy information
363 363 for (int i = 0; i < m_num; ++i) {
364   - m_min[i].keV(hdu->column("E_MIN")->real(i));
365   - m_max[i].keV(hdu->column("E_MAX")->real(i));
  364 + m_min[i].keV((*hdu)["E_MIN"].real(i));
  365 + m_max[i].keV((*hdu)["E_MAX"].real(i));
366 366 }
367 367  
368 368 } // endif: there were channels to read
... ...
src/obs/GGti.cpp
... ... @@ -4,10 +4,18 @@
4 4 * copyright (C) 2008-2011 by Jurgen Knodlseder *
5 5 * ----------------------------------------------------------------------- *
6 6 * *
7   - * This program is free software; you can redistribute it and/or modify *
8   - * it under the terms of the GNU General Public License as published by *
9   - * the Free Software Foundation; either version 2 of the License, or *
10   - * (at your option) any later version. *
  7 + * This program is free software: you can redistribute it and/or modify *
  8 + * it under the terms of the GNU General Public License as published by *
  9 + * the Free Software Foundation, either version 3 of the License, or *
  10 + * (at your option) any later version. *
  11 + * *
  12 + * This program is distributed in the hope that it will be useful, *
  13 + * but WITHOUT ANY WARRANTY; without even the implied warranty of *
  14 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
  15 + * GNU General Public License for more details. *
  16 + * *
  17 + * You should have received a copy of the GNU General Public License *
  18 + * along with this program. If not, see <http://www.gnu.org/licenses/>. *
11 19 * *
12 20 ***************************************************************************/
13 21 /**
... ... @@ -324,8 +332,8 @@ void GGti::read(GFitsTable* hdu)
324 332 m_start = new GTime[m_num];
325 333 m_stop = new GTime[m_num];
326 334 for (int i = 0; i < m_num; ++i) {
327   - m_start[i].met(hdu->column("START")->real(i));
328   - m_stop[i].met(hdu->column("STOP")->real(i));
  335 + m_start[i].met((*hdu)["START"].real(i));
  336 + m_stop[i].met((*hdu)["STOP"].real(i));
329 337 }
330 338  
331 339 // Set attributes
... ...
src/sky/GSkymap.cpp
... ... @@ -1121,7 +1121,7 @@ void GSkymap::read_healpix(const GFitsTable* hdu)
1121 1121 // all columns. Only count columns that can fully hold the map.
1122 1122 m_num_maps = 0;
1123 1123 for (int icol = 0; icol < ncols; ++icol) {
1124   - GFitsTableCol* col = ((GFitsTable*)hdu)->column(icol);
  1124 + const GFitsTableCol* col = &(*hdu)[icol];
1125 1125 if (col->number() % nentry == 0)
1126 1126 m_num_maps += col->number() / nentry;
1127 1127 }
... ... @@ -1139,7 +1139,7 @@ void GSkymap::read_healpix(const GFitsTable* hdu)
1139 1139 for (int icol = 0; icol < ncols; ++icol) {
1140 1140  
1141 1141 // Get next column
1142   - GFitsTableCol* col = ((GFitsTable*)hdu)->column(icol);
  1142 + const GFitsTableCol* col = &(*hdu)[icol];
1143 1143  
1144 1144 // Only consider columns that can fully hold maps
1145 1145 if (col->number() % nentry == 0) {
... ...