Closed mabitbol closed 5 years ago
Yes, this is something we should decide about asap in order to freeze the high level API.
The easiest option I see is to force all the parameters of the __call__
methods to be keyword arguments and change the default value at construction time, whenever we want to fix any of them. The mechanism would be similar to functools.partial
(or we could use directly that library)
Pros: easy to implement, transparent, foolproof (I think, despite my explanation might be unclear) Cons: Everything is a keyword argument, which means extra typing for the users
Other ideas?
With #20 you can now print the objects to get an insight on it, including defaults parameters. About setting parameters, you can access the defaults with the Model.defaults
attribute, change them and set the with Model.set_defaults
. Defaults can be also set at construction time.
I'm wondering if we can add support to the cross spectrum class that will allow us to see and access the SED and power spectrum parameters easily, like how it is done in FGBuster.