I think I found a bug in the Simulator class that has eluded the test suite. It looks like calling the add method with a multiplicative effect and both ret_vis and add_vis set to True will result in the gain dictionary being returned, but the gains not actually being applied to the data. I think this can be fixed by inserting the following code block between lines 1082 and 1083 of the simulate.py module:
if add_vis:
self.data.data_array = data_copy
Additionally, the test_adding_vis_but_also_returning test should be updated to catch this. I think the best way to do this is to parametrize the test function, with one branch being an additive effect and the other being a multiplicative effect. I'll probably be the one to fix this, so I'll leave it to future-me to figure out the updated contents of the test.
I think I found a bug in the
Simulator
class that has eluded the test suite. It looks like calling theadd
method with a multiplicative effect and bothret_vis
andadd_vis
set toTrue
will result in the gain dictionary being returned, but the gains not actually being applied to the data. I think this can be fixed by inserting the following code block between lines 1082 and 1083 of thesimulate.py
module:Additionally, the
test_adding_vis_but_also_returning
test should be updated to catch this. I think the best way to do this is to parametrize the test function, with one branch being an additive effect and the other being a multiplicative effect. I'll probably be the one to fix this, so I'll leave it to future-me to figure out the updated contents of the test.