open-gamma-ray-astro / gamma-astro-data-formats

Data formats for gamma-ray astronomy
https://gamma-astro-data-formats.readthedocs.io
Creative Commons Attribution 4.0 International
29 stars 27 forks source link

Mark pixels in BKG_3D as "unconstrained" #135

Closed lmohrmann closed 4 years ago

lmohrmann commented 4 years ago

In 3D background models derived from data, there will always be spatial pixels where the available statistics prohibit a reasonable estimate of the background rate. I think there is currently no good way of marking such pixels. My suggestion would be to use NaN for such cases - this is more explicit than, e.g., using 0 or -1 or so, which can lead to problems in the evaluation of the model.

Tools will likely need to be modified to deal with NaN entries properly, but I think this could be done.

Opinions?

@cdeil @registerrier

lmohrmann commented 4 years ago

I've just opened a corresponding issue with Gammapy, see gammapy/gammapy#2432.

kosack commented 4 years ago

There is a requirement in CTA that we have error estimates on all IRF bins, so in the future that could help with this as well (obviously that will take some work to properly compute in a useful way). If that exists, you would just have very large (or inf) error bars on invalid points. For now, I agree using nan for "bad" bins is reasonable.

lmohrmann commented 4 years ago

Thanks for the feedback @kosack !

lmohrmann commented 4 years ago

Preference in gammapy/gammapy#2432 is to use 0 for marking invalid pixels, at least until we have a better solution for IRF quality in general. There is no need to update the format specs in this case, I would say. Closing.