icecube / flarestack

Unbinned likelihood analysis code for astroparticle physics datasets
https://flarestack.readthedocs.io/en/latest/?badge=latest
MIT License
8 stars 7 forks source link

Implement dataset index #211

Closed mlincett closed 1 year ago

mlincett commented 1 year ago

This PR aims to fix #182 by implementing a dataset index.

It works exploiting mutual imports:

It works, but I acknowledge that the mutual import is quite inelegant and not very compliant with PEP8.

An alternative solution is to build the dataset index centrally in flarestack/data/__init__.py by adding each module by hand. All in all it does not really increase the maintenance efforts too much (just need to edit one more file when adding a new dataset).

Let me know if you have better ideas!

P.S.: we also fix a bug previously introduced by me in flarestack/data/icecube/ic_season.py