Change request #1846
Use ctobservation base class for all tools that hold an observation container
Status: | Closed | Start date: | 08/22/2016 | |
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assigned To: | Mayer Michael | % Done: | 100% | |
Category: | - | |||
Target version: | 1.2.0 | |||
Duration: |
Recurrence
No recurrence.
History
#1 Updated by Mayer Michael over 8 years ago
Is there in fact a ctool
that doesn’t hold an observation container? If there is none, we might even think about moving the ctobservation
functionality up to the ctool
base class. But maybe we will have ctools
without observation container in the future?
There are some cscripts
that don’t work with observation containers though. Do we expose the ctobservation
base class to Python?
#2 Updated by Knödlseder Jürgen over 8 years ago
Yes, there is: ctmapcube
.
#3 Updated by Mayer Michael over 8 years ago
Yes, there is: ctmapcube.
Ok, so we don’t move the functionality upwards
I wanted to start making the changes and stumbled upon the ctools for stacked responses. I think ctexpcube
, ctpsfcube
and ctedispcube
should inherit from ctobservation
and return the original observation container in the obs()
-function. I am still not sure how to handle ctbkgcube
since it changes the model container of the observation. I think it should return also the original observation (including original model) instead of the unbinned observation container with a model for stacked analysis right?
#4 Updated by Mayer Michael over 8 years ago
- Status changed from New to Pull request
- Assigned To set to Mayer Michael
- % Done changed from 0 to 100
I have modified the code such that all ctools that hold an observation container are now inheriting from ctobservation
base class.
For ctobssim
, I hope my changes didnt break anything: before we had a protected member mutable GObservation&
. Now since we inherit from ctobservation
, this member is not mutable
anymore (since we use the one from the base class). All unit tests run smoothly though, so I believe it is ok like that?
Changes are on branch 1846-use-ctobservation-base-class.
#5 Updated by Knödlseder Jürgen about 8 years ago
- Status changed from Pull request to Closed
Merged into devel
.