-
Notifications
You must be signed in to change notification settings - Fork 1
Description
Trying to implement a basic "Multiply" module, which raises some questions. As I remember it, modules have access to the IoSources, and are provided with keys to the DataBundle on which to operate on. It also gets a reference to the BaseData class to operate on.
What is supplied to calling_arguments?
Given the above, for the multiplication, additional information is needed. In the end, I would need a second BaseData object that is the multiplier "m" (with signal, uncertainties, units, scalar, scalar_uncertainty, etc.), but I am not sure we would be passing this on to the module directly.
Alternatively, I would need to construct this BaseData multiplier object "m" from IoSources references. That would mean the "Multiply" module needs a lot of optional references, or (and this is my preference), a dictionary that is enough for a BaseData constructor, i.e.:
multiplier_constructor_keys = {
"signal": "some_source::path/to/signal",
"uncertainties": {'propagate_to_all': "some_source::path/to/uncertainties"},
"units": "some_source::path/to/data@unit_attribute", # or perhaps supplied directly as "m" for data sources without attributes
"scalar": 1.0,
"scalar_uncertainty_key": "some_source::path/to/scalar_uncertainty",
}It would be good to get some input before I'll put more effort into its implementation, many thanks in advance!