Action #3912

Add event selection capabilities to likelihood computation

Added by Knödlseder Jürgen almost 3 years ago. Updated over 2 years ago.

Status:ClosedStart date:11/28/2021
Priority:NormalDue date:
Assigned To:Knödlseder Jürgen% Done:

100%

Category:-
Target version:2.0.0
Duration:

Description

Add comdataselect script that allows removal of Phibar layers from the DRIs.


Recurrence

No recurrence.

History

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

Instead of implementing such a script a virtual method

GObservation::use_event_for_likelihood(const int& index) const
should be added that always returns true. This method should be called in the event loops of GObservation::likelihood_poisson_unbinned, GObservation::likelihood_poisson_binned and GObservation::likelihood_gaussian_binned.

Now an instrument specific implementation of GObservation can reimplement the method, allowing to select the events or bins that should be used for likelihood computation. This allows for example to implement for COMPTEL a Phibar selection.

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

  • Project changed from ctools to GammaLib
  • Subject changed from Add comdataselect script to Add event selection capabilities to likelihood computation
  • Target version changed from 2.0.0 to 2.0.0

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

  • Status changed from New to In Progress
  • Assigned To set to Knödlseder Jürgen
  • % Done changed from 0 to 10

Add

virtual bool   use_event_for_likelihood(const int& index) const
and used method in likelihood computation.

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

  • % Done changed from 10 to 50

I added an equivalent method for GCOMObservation, which now has two more members

    int                    m_phi_first;  //!< First Phibar layer to use for likelihood
    int                    m_phi_last;   //!< Last Phibar layer to use for likelihood
and methods
    const int&       phi_first(void) const;
    const int&       phi_last(void) const;
    void             phi_first(const int& phi_first);
    void             phi_last(const int& phi_last);
to get and set the values for the members. These members specify the first and the last Phibar layer that should be used for likelihood fitting.

I also added parameters phi_first and phi_last to comlixfit and some code that sets the members for all COMPTEL observations.

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

  • % Done changed from 50 to 90

I added phi_first and phi_last parameters to comlixfit and comlixmap so that Phibar layer selection is possible in these two scripts.

#6 Updated by Knödlseder Jürgen over 2 years ago

  • Status changed from In Progress to Closed
  • % Done changed from 90 to 100

Also available in: Atom PDF