Commit e3a47b690ac2983b00308dc8da853461a1e146b2
1 parent
f048480f
Rename CountsMap to CountsCube
Showing
6 changed files
with
19 additions
and
18 deletions
doc/source/user_manual/modules/cta.rst
| ... | ... | @@ -106,7 +106,7 @@ for an unbinned observation and: |
| 106 | 106 | .. code-block:: xml |
| 107 | 107 | |
| 108 | 108 | <observation name="..." id="..." instrument="..."> |
| 109 | - <parameter name="CountsMap" file="..."/> | |
| 109 | + <parameter name="CountsCube" file="..."/> | |
| 110 | 110 | <parameter name="EffectiveArea" file="..."/> |
| 111 | 111 | <parameter name="PointSpreadFunction" file="..."/> |
| 112 | 112 | <parameter name="EnergyDispersion" file="..."/> |
| ... | ... | @@ -118,7 +118,7 @@ specifies the filename for a specific file that is needed for the analysis. |
| 118 | 118 | The difference between an unbinned and a binned observation is that the |
| 119 | 119 | first uses an event list (requiring a parameter with name ``EventList``) |
| 120 | 120 | while the latter uses an event cube (requiring a parameter with name |
| 121 | -``CountsMap``). The ``EffectiveArea``, ``PointSpreadFunction`` and | |
| 121 | +``CountsCube``). The ``EffectiveArea``, ``PointSpreadFunction`` and | |
| 122 | 122 | ``EnergyDispersion`` parameters provide the filenames of the instrument |
| 123 | 123 | specific response function components for each observation |
| 124 | 124 | (see :ref:`sec_cta_response`). Note that for compatibility reasons, | ... | ... |
inst/cta/src/GCTAObservation.cpp
| 1 | 1 | /*************************************************************************** |
| 2 | 2 | * GCTAObservation.cpp - CTA Observation class * |
| 3 | 3 | * ----------------------------------------------------------------------- * |
| 4 | - * copyright (C) 2010-2014 by Juergen Knoedlseder * | |
| 4 | + * copyright (C) 2010-2015 by Juergen Knoedlseder * | |
| 5 | 5 | * ----------------------------------------------------------------------- * |
| 6 | 6 | * * |
| 7 | 7 | * This program is free software: you can redistribute it and/or modify * |
| ... | ... | @@ -634,7 +634,7 @@ GEbounds GCTAObservation::ebounds(void) const |
| 634 | 634 | * for an unbinned observation and |
| 635 | 635 | * |
| 636 | 636 | * <observation name="..." id="..." instrument="..."> |
| 637 | - * <parameter name="CountsMap" file="..."/> | |
| 637 | + * <parameter name="CountsCube" file="..."/> | |
| 638 | 638 | * ... |
| 639 | 639 | * </observation> |
| 640 | 640 | * |
| ... | ... | @@ -680,9 +680,9 @@ void GCTAObservation::read(const GXmlElement& xml) |
| 680 | 680 | // Get parameter element |
| 681 | 681 | const GXmlElement* par = xml.element("parameter", i); |
| 682 | 682 | |
| 683 | - // Handle EventList or CountsMap | |
| 683 | + // Handle EventList or CountsCube | |
| 684 | 684 | if ((par->attribute("name") == "EventList") || |
| 685 | - (par->attribute("name") == "CountsMap")) { | |
| 685 | + (par->attribute("name") == "CountsCube")) { | |
| 686 | 686 | |
| 687 | 687 | // Store event type |
| 688 | 688 | m_eventtype = par->attribute("name"); |
| ... | ... | @@ -728,7 +728,7 @@ void GCTAObservation::read(const GXmlElement& xml) |
| 728 | 728 | // Verify that all required parameters were found |
| 729 | 729 | if (npar[0] != 1) { |
| 730 | 730 | throw GException::xml_invalid_parnames(G_READ, xml, |
| 731 | - "Require \"EventList\" or \"CountsMap\" parameters."); | |
| 731 | + "Require \"EventList\" or \"CountsCube\" parameters."); | |
| 732 | 732 | } |
| 733 | 733 | |
| 734 | 734 | // Determine response type as function of the information that is |
| ... | ... | @@ -815,7 +815,7 @@ void GCTAObservation::read(const GXmlElement& xml) |
| 815 | 815 | * for an unbinned observation and |
| 816 | 816 | * |
| 817 | 817 | * <observation name="..." id="..." instrument="..."> |
| 818 | - * <parameter name="CountsMap" file="..."/> | |
| 818 | + * <parameter name="CountsCube" file="..."/> | |
| 819 | 819 | * ... |
| 820 | 820 | * </observation> |
| 821 | 821 | * |
| ... | ... | @@ -829,8 +829,9 @@ void GCTAObservation::read(const GXmlElement& xml) |
| 829 | 829 | void GCTAObservation::write(GXmlElement& xml) const |
| 830 | 830 | { |
| 831 | 831 | // Throw an exception if m_eventtype is neither "EventList" nor |
| 832 | - // "CountsMap" | |
| 833 | - if ((m_eventtype != "EventList") && (m_eventtype != "CountsMap")) { | |
| 832 | + // "CountsCube" | |
| 833 | + if ((m_eventtype != "EventList") && | |
| 834 | + (m_eventtype != "CountsCube")) { | |
| 834 | 835 | std::string msg; |
| 835 | 836 | if (m_eventtype.length() == 0) { |
| 836 | 837 | msg = "The observation does not contain any events, hence " |
| ... | ... | @@ -839,7 +840,7 @@ void GCTAObservation::write(GXmlElement& xml) const |
| 839 | 840 | else { |
| 840 | 841 | msg = "The observation contains an unknown event type \""+ |
| 841 | 842 | m_eventtype+"\". The event type needs to be either " |
| 842 | - "\"EventList\" or \"CountsMap\"."; | |
| 843 | + "\"EventList\" or \"CountsCube\"."; | |
| 843 | 844 | } |
| 844 | 845 | throw GException::invalid_value(G_WRITE, msg); |
| 845 | 846 | } |
| ... | ... | @@ -885,7 +886,7 @@ void GCTAObservation::write(GXmlElement& xml) const |
| 885 | 886 | // Verify that all required parameters are present |
| 886 | 887 | if (npar[0] != 1) { |
| 887 | 888 | throw GException::xml_invalid_parnames(G_WRITE, xml, |
| 888 | - "Require \"EventList\" or \"CountsMap\" parameters."); | |
| 889 | + "Require \"EventList\" or \"CountsCube\" parameters."); | |
| 889 | 890 | } |
| 890 | 891 | |
| 891 | 892 | // Write response information |
| ... | ... | @@ -1495,7 +1496,7 @@ void GCTAObservation::write_attributes(GFitsHDU& hdu) const |
| 1495 | 1496 | * set the event type to |
| 1496 | 1497 | * |
| 1497 | 1498 | * "EventList" if m_events is of type GCTAEventList |
| 1498 | - * "CountsMap" if m_events is of type GCTAEventCube | |
| 1499 | + * "CountsCube" if m_events is of type GCTAEventCube | |
| 1499 | 1500 | * "Events" if m_events is not NULL but neither GCTAEventList nor GCTAEventCube |
| 1500 | 1501 | * "" if m_events is NULL |
| 1501 | 1502 | * |
| ... | ... | @@ -1515,7 +1516,7 @@ void GCTAObservation::set_event_type(void) |
| 1515 | 1516 | else { |
| 1516 | 1517 | GCTAEventCube* cube = dynamic_cast<GCTAEventCube*>(m_events); |
| 1517 | 1518 | if (cube != NULL) { |
| 1518 | - m_eventtype = "CountsMap"; | |
| 1519 | + m_eventtype = "CountsCube"; | |
| 1519 | 1520 | } |
| 1520 | 1521 | |
| 1521 | 1522 | // Case C: we don't know what we have | ... | ... |
inst/cta/test/data/irf_1dc.xml
| 1 | 1 | <observation_list title="observation library"> |
| 2 | 2 | <observation name="Crab" id="000001" instrument="CTA"> |
| 3 | - <parameter name="CountsMap" file="$(PACKAGE_SOURCE)/inst/cta/test/data/crab_cntmap.fits"/> | |
| 3 | + <parameter name="CountsCube" file="$(PACKAGE_SOURCE)/inst/cta/test/data/crab_cntmap.fits"/> | |
| 4 | 4 | <parameter name="EffectiveArea" file="$(PACKAGE_SOURCE)/inst/cta/test/caldb/dc1/arf.fits"/> |
| 5 | 5 | <parameter name="PointSpreadFunction" file="$(PACKAGE_SOURCE)/inst/cta/test/caldb/dc1/psf.fits"/> |
| 6 | 6 | <parameter name="EnergyDispersion" file="$(PACKAGE_SOURCE)/inst/cta/test/caldb/dc1/rmf.fits"/> | ... | ... |
inst/cta/test/data/irf_binned.xml
| 1 | 1 | <observation_list title="observation library"> |
| 2 | 2 | <observation name="Crab" id="000001" instrument="CTA"> |
| 3 | - <parameter name="CountsMap" file="$(PACKAGE_SOURCE)/inst/cta/test/data/crab_cntmap.fits"/> | |
| 3 | + <parameter name="CountsCube" file="$(PACKAGE_SOURCE)/inst/cta/test/data/crab_cntmap.fits"/> | |
| 4 | 4 | <parameter name="EffectiveArea" file="$(PACKAGE_SOURCE)/inst/cta/caldb/data/cta/e/bcf/IFAE20120510_50h/irf_file.fits"/> |
| 5 | 5 | <parameter name="PointSpreadFunction" file="$(PACKAGE_SOURCE)/inst/cta/caldb/data/cta/e/bcf/IFAE20120510_50h/irf_file.fits"/> |
| 6 | 6 | <parameter name="EnergyDispersion" file="$(PACKAGE_SOURCE)/inst/cta/caldb/data/cta/e/bcf/IFAE20120510_50h/irf_file.fits"/> | ... | ... |
inst/cta/test/data/obs_binned.xml
| 1 | 1 | <observation_list title="observation library"> |
| 2 | 2 | <observation name="Crab" id="00001" instrument="CTA"> |
| 3 | - <parameter name="CountsMap" file="$(PACKAGE_SOURCE)/inst/cta/test/data/crab_cntmap.fits"/> | |
| 3 | + <parameter name="CountsCube" file="$(PACKAGE_SOURCE)/inst/cta/test/data/crab_cntmap.fits"/> | |
| 4 | 4 | </observation> |
| 5 | 5 | </observation_list> | ... | ... |
inst/cta/test/data/obs_cube.xml
| 1 | 1 | <observation_list title="observation library"> |
| 2 | 2 | <observation name="Crab" id="00001" instrument="CTA"> |
| 3 | - <parameter name="CountsMap" file="$(PACKAGE_SOURCE)/inst/cta/test/data/crab_cntmap.fits"/> | |
| 3 | + <parameter name="CountsCube" file="$(PACKAGE_SOURCE)/inst/cta/test/data/crab_cntmap.fits"/> | |
| 4 | 4 | <parameter name="ExposureCube" file="$(PACKAGE_SOURCE)/inst/cta/test/data/expcube.fits"/> |
| 5 | 5 | <parameter name="PsfCube" file="$(PACKAGE_SOURCE)/inst/cta/test/data/psfcube.fits"/> |
| 6 | 6 | </observation> | ... | ... |