-
Notifications
You must be signed in to change notification settings - Fork 63
Description
While working with HCIDataset.recenter, I was thinking about whether we are giving the user too many parameters at once.
HCIDataset.recenter aggregates the preproc/recentering.py::cube_recenter_* functions, and merges all keyword arguments from these functions into one single signature, which results in a large list. Which of these arguments are actually needed depend on the method parameter.
problem
So when a user wants to improve his recentering, he has to read through the docstrings to check which parameters belong to his method, and which parameters he has to ignore. This makes it difficult for the user to see what is available, as he is flooded with options.
proposition
We could make the actual recentering methods a "sub-method", so that the cube_recenter_* functions stay encapsulated, but are still accessible directly from an HCIDataset. Example:
ds = HCIDataset(...)
ds.recenter.radon(...)
# or
ds.recenter.satspots(...)This keeps the tab completion of HCIDataset. "clean", but helps the user with precise documentation for that specific method.