Action #1249

Create GCTAExposure class

Added by Knödlseder Jürgen almost 10 years ago. Updated almost 10 years ago.

Status:ClosedStart date:07/08/2014
Priority:NormalDue date:
Assigned To:Lu Chia-Chun% Done:

100%

Category:-
Target version:3rd coding sprint
Duration:

Description

The GCTAExposure class should implement a CTA exposure cube, which is a 3D cube spanned by Right Ascension or Galactic longitude, Declination or Galactic latitude and log10 energy. The class may use the GSkymap class as storage container for the exposure cube information. The exposure cube values are effective area times lifetime, summed over a list of provided CTA observations. The typical interface should look like this:

    // Constructors and destructors
    GCTAExposure(void);
    GCTAExposure(const GCTAExposure& exposure);
    GCTAExposure(const GObservations& obs, const GSkymap& map);
    virtual ~GCTAExposure(void);

    // Operators
    GCTAExposure& operator=(const GCTAExposure& exposure);

    // Methods
    void          clear(void);
    GCTAExposure* clone(void) const;
    void          load(const std::string& filename);
    void          save(const std::string& filename);
    std::string   print(const GChatter& chatter = NORMAL) const;

protected:
    // Methods
    void init_members(void);
    void copy_members(const GCTAExposure& exposure);
    void free_members(void);

    // Data
    GSkymap m_cube; //!< Exposure cube


Recurrence

No recurrence.

History

#1 Updated by Knödlseder Jürgen almost 10 years ago

  • Assigned To set to Lu Chia-Chun
  • Target version set to 3rd coding sprint

#2 Updated by Lu Chia-Chun almost 10 years ago

  • Status changed from New to In Progress
  • % Done changed from 0 to 50

The GCTAExposure class has been created.

Todos:
Interpolation
communication with GCTAResponse

#3 Updated by Knödlseder Jürgen almost 10 years ago

  • % Done changed from 50 to 60

I merged the actual version of your GCTAExposure class into trunk after adapting the class interface and making the code compliant with the coding conventions. Exposure is now computed as effective area times livetime.

A set() method exists to set an exposure map from a single GCTAObservation, a fill() method exists to fill exposure from all CTA observations in an observation container. Writing and saving of the exposure cube works, reading and loading is not yet supported.

I also added unit tests to test_CTA.

Still to be done:
  • implement read() and load() methods
  • implement exposure cube access operator(s)

#4 Updated by Lu Chia-Chun almost 10 years ago

  • Status changed from In Progress to Pull request
  • % Done changed from 60 to 70

access operator and interpolation implemented.

To do:
read()
load()

#5 Updated by Knödlseder Jürgen almost 10 years ago

  • Status changed from Pull request to Resolved
  • % Done changed from 70 to 100

Added load() and read() access operators and merged into trunk.

#6 Updated by Knödlseder Jürgen almost 10 years ago

  • Status changed from Resolved to Closed
  • Remaining (hours) set to 0.0

Also available in: Atom PDF