-
Notifications
You must be signed in to change notification settings - Fork 9
Description
An idea to make the Observables call easier :
The main philosophy is to have very explicit Observables name, with a doctstring that explicits what this observable is used for.
But this can make very long class names to load (e.g. GalaxyCorrelationFunctionMultipoles and that's not the worst we have)
Each of those Observables contains a unique stat_name value that is a shortened name that corresponds to the compressed file loaded and is re-used within the class.
I propose we create class aliases that match (when possible) this stat_name value. In the case of GalaxyCorrelationFunctionMultipoles, we have stat_name='tpcf'. We can the define the following alias :
tpcf = GalaxyCorrelationFunctionMultipoles To make the namespace clearer, I'd recommend importing the aliases only in __init__.py, and the full classes names from the files themselves to prevent confusion ? 🤔
e.g.
from acm.observables.emc import tpcf # this is the alias of the GalaxyCorrelationFunctionMultipoles class
from acm.observables.emc.tpcf import GalaxyCorrelationFunctionMultipoles # This is the exact class name
from acm.observables.emc import GalaxyCorrelationFunctionMultipoles # This will crashNote
Ideally, we should prevent the files names and the aliases to have the same name to avoid confusion in the namespace 🤔 (e.g. acm.observables.tpcf should not include a tpcf alias - in this specific case we should change the name of the tpcf.py file to another name ?)