From e3a47b690ac2983b00308dc8da853461a1e146b2 Mon Sep 17 00:00:00 2001 From: Jürgen Knödlseder Date: Wed, 4 Feb 2015 21:55:35 +0100 Subject: [PATCH] Rename CountsMap to CountsCube --- doc/source/user_manual/modules/cta.rst | 4 ++-- inst/cta/src/GCTAObservation.cpp | 25 +++++++++++++------------ inst/cta/test/data/irf_1dc.xml | 2 +- inst/cta/test/data/irf_binned.xml | 2 +- inst/cta/test/data/obs_binned.xml | 2 +- inst/cta/test/data/obs_cube.xml | 2 +- 6 files changed, 19 insertions(+), 18 deletions(-) diff --git a/doc/source/user_manual/modules/cta.rst b/doc/source/user_manual/modules/cta.rst index 7528feb..b8b9149 100644 --- a/doc/source/user_manual/modules/cta.rst +++ b/doc/source/user_manual/modules/cta.rst @@ -106,7 +106,7 @@ for an unbinned observation and: .. code-block:: xml - + @@ -118,7 +118,7 @@ specifies the filename for a specific file that is needed for the analysis. The difference between an unbinned and a binned observation is that the first uses an event list (requiring a parameter with name ``EventList``) while the latter uses an event cube (requiring a parameter with name -``CountsMap``). The ``EffectiveArea``, ``PointSpreadFunction`` and +``CountsCube``). The ``EffectiveArea``, ``PointSpreadFunction`` and ``EnergyDispersion`` parameters provide the filenames of the instrument specific response function components for each observation (see :ref:`sec_cta_response`). Note that for compatibility reasons, diff --git a/inst/cta/src/GCTAObservation.cpp b/inst/cta/src/GCTAObservation.cpp index 20b0f5e..abb2781 100644 --- a/inst/cta/src/GCTAObservation.cpp +++ b/inst/cta/src/GCTAObservation.cpp @@ -1,7 +1,7 @@ /*************************************************************************** * GCTAObservation.cpp - CTA Observation class * * ----------------------------------------------------------------------- * - * copyright (C) 2010-2014 by Juergen Knoedlseder * + * copyright (C) 2010-2015 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -634,7 +634,7 @@ GEbounds GCTAObservation::ebounds(void) const * for an unbinned observation and * * - * + * * ... * * @@ -680,9 +680,9 @@ void GCTAObservation::read(const GXmlElement& xml) // Get parameter element const GXmlElement* par = xml.element("parameter", i); - // Handle EventList or CountsMap + // Handle EventList or CountsCube if ((par->attribute("name") == "EventList") || - (par->attribute("name") == "CountsMap")) { + (par->attribute("name") == "CountsCube")) { // Store event type m_eventtype = par->attribute("name"); @@ -728,7 +728,7 @@ void GCTAObservation::read(const GXmlElement& xml) // Verify that all required parameters were found if (npar[0] != 1) { throw GException::xml_invalid_parnames(G_READ, xml, - "Require \"EventList\" or \"CountsMap\" parameters."); + "Require \"EventList\" or \"CountsCube\" parameters."); } // Determine response type as function of the information that is @@ -815,7 +815,7 @@ void GCTAObservation::read(const GXmlElement& xml) * for an unbinned observation and * * - * + * * ... * * @@ -829,8 +829,9 @@ void GCTAObservation::read(const GXmlElement& xml) void GCTAObservation::write(GXmlElement& xml) const { // Throw an exception if m_eventtype is neither "EventList" nor - // "CountsMap" - if ((m_eventtype != "EventList") && (m_eventtype != "CountsMap")) { + // "CountsCube" + if ((m_eventtype != "EventList") && + (m_eventtype != "CountsCube")) { std::string msg; if (m_eventtype.length() == 0) { msg = "The observation does not contain any events, hence " @@ -839,7 +840,7 @@ void GCTAObservation::write(GXmlElement& xml) const else { msg = "The observation contains an unknown event type \""+ m_eventtype+"\". The event type needs to be either " - "\"EventList\" or \"CountsMap\"."; + "\"EventList\" or \"CountsCube\"."; } throw GException::invalid_value(G_WRITE, msg); } @@ -885,7 +886,7 @@ void GCTAObservation::write(GXmlElement& xml) const // Verify that all required parameters are present if (npar[0] != 1) { throw GException::xml_invalid_parnames(G_WRITE, xml, - "Require \"EventList\" or \"CountsMap\" parameters."); + "Require \"EventList\" or \"CountsCube\" parameters."); } // Write response information @@ -1495,7 +1496,7 @@ void GCTAObservation::write_attributes(GFitsHDU& hdu) const * set the event type to * * "EventList" if m_events is of type GCTAEventList - * "CountsMap" if m_events is of type GCTAEventCube + * "CountsCube" if m_events is of type GCTAEventCube * "Events" if m_events is not NULL but neither GCTAEventList nor GCTAEventCube * "" if m_events is NULL * @@ -1515,7 +1516,7 @@ void GCTAObservation::set_event_type(void) else { GCTAEventCube* cube = dynamic_cast(m_events); if (cube != NULL) { - m_eventtype = "CountsMap"; + m_eventtype = "CountsCube"; } // Case C: we don't know what we have diff --git a/inst/cta/test/data/irf_1dc.xml b/inst/cta/test/data/irf_1dc.xml index 07b2dcf..9aa4e0e 100644 --- a/inst/cta/test/data/irf_1dc.xml +++ b/inst/cta/test/data/irf_1dc.xml @@ -1,6 +1,6 @@ - + diff --git a/inst/cta/test/data/irf_binned.xml b/inst/cta/test/data/irf_binned.xml index a71f8ef..bd2a0be 100644 --- a/inst/cta/test/data/irf_binned.xml +++ b/inst/cta/test/data/irf_binned.xml @@ -1,6 +1,6 @@ - + diff --git a/inst/cta/test/data/obs_binned.xml b/inst/cta/test/data/obs_binned.xml index b2b46b9..eb78c51 100644 --- a/inst/cta/test/data/obs_binned.xml +++ b/inst/cta/test/data/obs_binned.xml @@ -1,5 +1,5 @@ - + diff --git a/inst/cta/test/data/obs_cube.xml b/inst/cta/test/data/obs_cube.xml index fafb1b0..61bb69d 100644 --- a/inst/cta/test/data/obs_cube.xml +++ b/inst/cta/test/data/obs_cube.xml @@ -1,6 +1,6 @@ - + -- libgit2 0.21.4