Closed HealthyPear closed 1 year ago
Sounds like a very good plan, I am only wondering about the gammapy
dependency.
For information, although that might be more useful for ctaplot
?, we have currently two pieces of code related to plotting IRFs:
Sounds like a very good plan, I am only wondering about the
gammapy
dependency.
Yes, this is more or less the same discussion as for ctapipe. Personally, I am not a fan of re-inventing the wheel and from one side I would prefer if pyirf performed its internal operations (core utilities - configuration - plotting) in a simple independent way from ctapipe and science tools... Though in the case of plotting the situation is probably more elastic, because
At the same time, I would like something simple and fast for benchmarking, testing or even for a pipeline user that maybe doesn't care to use a full science-tool just for producing 5 plots.
In this module, you might want to delegate as much plotting as you can to gammapy, just to minimize code. GammaPy already has some nice plots for things like IRFs.
Plot wishlist
General
Some diagnostic plotting code was present inside pyirf.cut_optimization.CutsDiagnostic
(e.g. commit 0bf3f40
)
Such plots are a single efficiency plot and one plot per energy bin like the following,
Just for reference, here is what Gernot's canvas look like:
sensitivity, sensitivity ratio, angular resolution, effective area, background rate, energy resolution
again, not sure if pyIRF shall do that, or if it shall be delegated to e.g. ctaplot, but it's a must have, and when we have it we can think about how to do better!
Do we still want to do this, given ctaplot exists and anyway other pipeline-related projects like magic-cta-pipe do the plotting themselves?
Right now, I would go for ctaplot and not add maintain plotting code here.
agreed
In fact this has already been implemented in the benchmarking suite.
After discussing with @vuillaut, this is a proposal for a simple plotting module (aka
pyirf.plot
orpyirf.vizualization
).Context:
This module would provide a simple and fast visualization suite to look into pyirf products (even in-between, for testing and benchmarking) without medium/high knowledge of any science tools.
There is some overlap between this and ctaplot. The latter could focus on sub-DL3 products, but it can still be useful to see e.g. the effective area before cut optimization (even though this can also be done by pyirf since it applies the cuts on DL2 data after reading it).
What we have:
pyirf.scripts.lst_performance
there are at least 1 function per IRF + a function to plot sensitivity using ctaplot API componentsOne notebook should be sufficient, each plot saved separately or together, with a set of metadata. Plotting could be done entirely by calling the specific gammapy API (a few methods).
What is missing: