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

Testing separate_fields_by_distance is not actually testing anything #6

Open
dragly opened this issue Mar 26, 2019 · 1 comment
Open
Assignees

Comments

@dragly
Copy link
Member

dragly commented Mar 26, 2019

The following lines compares pos_true to pos_true, which will always be true. It should test against peaks, but changing pos_true to peaks fails the test currently, so there is something else that needs to be done:

peaks, radius = separate_fields_from_distance(rate_map)
bump_centers = np.array([xbins[peaks[:,0]], ybins[peaks[:,1]]])
# The position of a 2D bin is defined to be its center
for p in pos_true:
assert np.isclose(p, pos_true).prod(axis=1).any()

@lepmik
Copy link
Member

lepmik commented Mar 26, 2019

good catch!! should be peaks, probably just some shape difference in ordering of the peaks or similar. I'll fix soon

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

No branches or pull requests

2 participants