diff --git a/src/ctbin/ctbin.cpp b/src/ctbin/ctbin.cpp index 65d3274..66def29 100644 --- a/src/ctbin/ctbin.cpp +++ b/src/ctbin/ctbin.cpp @@ -503,7 +503,7 @@ void ctbin::bin_events(GCTAObservation* obs) // Open fits file to check which extension is given GFits file(m_ebinfile); - if (file.hashdu("EBOUNDS")) { + if (file.contains("EBOUNDS")) { // Close file and load ebounds file.close(); @@ -511,7 +511,7 @@ void ctbin::bin_events(GCTAObservation* obs) } // endif: EBOUNDS extension was given - else if (file.hashdu("ENERGYBINS")) { + else if (file.contains("ENERGYBINS")) { // Close file and load ebounds file.close(); diff --git a/src/ctlike/ctlike.cpp b/src/ctlike/ctlike.cpp index 9dbd6a6..5314df0 100644 --- a/src/ctlike/ctlike.cpp +++ b/src/ctlike/ctlike.cpp @@ -339,9 +339,9 @@ void ctlike::get_parameters(void) try { // Determine whether FITS file has EVENTS extension - GFits file(filename); - bool is_unbinned = file.hashdu("EVENTS"); - file.close(); + GFits fits(filename); + bool is_unbinned = fits.contains("EVENTS"); + fits.close(); // If FITS file has an events header then load as unbinned if (is_unbinned) { diff --git a/src/ctselect/ctselect.cpp b/src/ctselect/ctselect.cpp index 4247ae1..191cc9e 100644 --- a/src/ctselect/ctselect.cpp +++ b/src/ctselect/ctselect.cpp @@ -603,7 +603,7 @@ void ctselect::select_events(GCTAObservation* obs, const std::string& filename) } // Check if we have an EVENTS HDU - if (!file.hashdu("EVENTS")) { + if (!file.contains("EVENTS")) { std::string message = "No \"EVENTS\" extension found in FITS file "+ expression+"."; throw GException::app_error(G_SELECT_EVENTS, message); @@ -952,7 +952,7 @@ void ctselect::save_event_list(const GCTAObservation* obs, GFits infits(infile); GFits outfits(outfile); for (int extno = 1; extno < infits.size(); ++extno) { - GFitsHDU* hdu = infits.hdu(extno); + GFitsHDU* hdu = infits.at(extno); if (hdu->extname() != "EVENTS" && hdu->extname() != "GTI") { outfits.append(*hdu); }