Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in Simulator #199

Open
r-pascua opened this issue Jan 12, 2022 · 0 comments
Open

Bug in Simulator #199

r-pascua opened this issue Jan 12, 2022 · 0 comments

Comments

@r-pascua
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant