beast
beast copied to clipboard
add kwargs to `tools/run/` functions
Every time we want to access a parameter in functions that are called by wrappers in tools/run/
, we have to add a new keyword. It might be simpler to add some kwargs for each function so that any keyword can be accessed at any time.
As an example (and what made me think of it), #605 adds a new parameter nfluxbins
to make_toothpick_noisemodel
in generic_noisemodel.py
. If create_obsmodel.py
were arranged something like this:
create_obsmodel(beast_settings_info, [other existing inputs], **toothpick_kwargs)
then I could easily access that particular parameter with
create_obsmodel(beast_settings_info, [other existing inputs], **{'nfluxbins':30})
and pass **toothpick_kwargs
to make_toothpick_noise_model
. At least I think that's how kwargs are supposed work...
Though since everything passes through parallel_wrapper
, this may be more complicated than I initially thought.