Skip to content

Viewing statistics with a mask will show all the values if the mask removes all the windows. Resistics 0.0.6rc1 #5

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

Closed
nss350 opened this issue Jan 26, 2020 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@nss350
Copy link
Contributor

nss350 commented Jan 26, 2020

If my mask removes all the windows from a measurement, viewing the statistics for the measurement will show all the values rather than an empty plot.

@nss350 nss350 added the bug Something isn't working label Jan 26, 2020
@nss350 nss350 self-assigned this Jan 26, 2020
@nss350
Copy link
Contributor Author

nss350 commented Jan 26, 2020

This is caused by unexpected behaviour in numpy when indexing with an empty list. Thought it would return an empty array (no elements). However, if indexing occurs with an empty list, the returned numpy array contains all the elements.

@nss350 nss350 changed the title Viewing statistics with a mask will show all the values if the mask removes all the windows Viewing statistics with a mask will show all the values if the mask removes all the windows. Resistics 0.0.6.rc1 Jan 26, 2020
@nss350 nss350 changed the title Viewing statistics with a mask will show all the values if the mask removes all the windows. Resistics 0.0.6.rc1 Viewing statistics with a mask will show all the values if the mask removes all the windows. Resistics 0.0.6rc1 Jan 26, 2020
@nss350
Copy link
Contributor Author

nss350 commented Jan 26, 2020

Apologies, previous comment is all wrong. This is nothing to do with numpy. This is caused by poor coding and using bools and lists for checking without noting that checking the Truth of an empty list returns False.

@nss350
Copy link
Contributor Author

nss350 commented Mar 14, 2020

This should be fixed in commit 33cc327. However, more changes will be coming to statistics, masking and regression in the coming weeks after the release of 0.0.6

@nss350
Copy link
Contributor Author

nss350 commented Mar 15, 2020

This fix has been rolled into version 0.0.6 which was just released. Closing.

@nss350 nss350 closed this as completed Mar 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant