Action #1307
Implement GCTAResponseCube::npred()
Status: | New | Start date: | 07/31/2014 | |
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assigned To: | Lu Chia-Chun | % Done: | 0% | |
Category: | - | |||
Target version: | - | |||
Duration: |
Description
In parellel to double GCTAResponseIrf::npred(const GPhoton& photon, const GObservation& obs) const
Recurrence
No recurrence.
History
#1 Updated by Knödlseder Jürgen over 10 years ago
- Description updated (diff)
The npred()
is a method specifically designed for unbinned analysis. Are you sure you want such a method for binned? What is your purpose?
#2 Updated by Lu Chia-Chun over 10 years ago
I want to calculate a spectrum. I try to use your analyses.py script to generate a spectrum but I got exception messages that this method is not implemented.
#3 Updated by Knödlseder Jürgen over 10 years ago
Ok, so what is needed to implement either the
virtual double GCTAResponseCube::npred(const GSource& source, const GObservation& obs) const;method or all four of the model specific methods
virtual double GCTAResponseCube::npred_ptsrc(const GSource& source, const GObservation& obs) const; virtual double GCTAResponseCube::npred_radial(const GSource& source, const GObservation& obs) const; virtual double GCTAResponseCube::npred_elliptical(const GSource& source, const GObservation& obs) const; virtual double GCTAResponseCube::npred_diffuse(const GSource& source, const GObservation& obs) const;
I guess it’s easier to implement
virtual double GCTAResponseCube::npred(const GSource& source, const GObservation& obs) const;where you would put a loop over the event cube and sum-up the values you get from
virtual double GCTAResponseCube::irf(const GEvent& event, const GSource& source, const GObservation& obs) const;multiplied by the event bin size.