Closed cosimoNigro closed 6 years ago
Short answer: I'm not sure if / what kind of code we should add.
gammapy.maps
).@cosimoNigro - What exactly would you propose to add? I.e. which functions / methods / classes? Are they separate from the existing spectral or other analysis code, or integrated somehow? Is the background estimate pixel-based or event-based?
Clearly we should provide something that makes it relatively straightforward to make this plot, it's commonly used, we have it in HESS as well.
But IMO we should avoid adding a lot of code for this, like we did with the ObservationStats
, ObservationSummary
, ObservationTableSummary
and the too many pixel-based *_profile
functions we have in gammapy.image
.
Maybe start with a Jupyter notebook in gammapy_extra/notebooks
showing an example how to compute the theta2 histograms (especially the background estimation) and how to make the plot, and then we discuss if / what parts to move into the Gammapy package?
Discussed with @cosimoNigro in the Gammapy call just now. Decided to close this feature request for now. We could still add something in the future, if someone is willing to send a pull request and it's not too much or to complex code. Plotting should always be separate from documentation.
@cosimoNigro - If you have working code for this, you could add add it as a docs example either in Gammapy, or link to it from Gammapy for now. That way, we show how to do it, but don't offer code / promise to maintain to users.
FYI
In case it helps, here's a notebook on how to do theta2 plots with ctapipe
Hi,
In MAGIC to have a quick look of the excesses in an observation and to assess their significance we use theta2 plots. These are basically histograms of the ON and OFF counts in theta2 (angular distance from the centre of the on/off regions) We count (integrate) the ON and OFF counts within a certain theta2 cut (i.e. the on region size) to get the excess and then compute their significance. I have to produce theta2 plots for a
MARS
/gammapy
comparison analysis I am doing, if you think they could be useful forgammapy
I am willing to add them togammapy
. For point like sources it is a straightforward way of estimating the significance without using a skymap, or it can also be the first step to see if a source has an extension. It can also reveal features in the background (like non-homogenities in the off regions).Let me know what do you think.
Thank you