chime-experiment / ch_util

CHIME utilities
https://chime-experiment.github.io/ch_util
MIT License
2 stars 3 forks source link

fix(hfbcat): Re-initialise class variables #86

Closed ketiltrout closed 4 weeks ago

ketiltrout commented 1 month ago

Because it subclasses from FluxCatalog, HFBCatalog by default will inherit the class variables from FluxCatalog, but that's where FluxCatalog stores the catalogs it loads at import time. (Which seems like a weird, and un-Pythonic, effect of importing a module.)

The side effect is that all the FluxCatalog catalogs end up in the HFBCatalog as well, which I suspect is not intended. So here's a fix to re-initialise these class variables to nothing, so that the FluxCatalog catalogs don't pollute the HFBCatalog.

Now, only the catalogue(s) loaded explicitly into HFBCatalog will exist in it.

ketiltrout commented 1 month ago

Yes, I've asked on #hyper_fine_beam_analysis for a review.