Skip to content

Testing separate_fields_by_distance is not actually testing anything #6

@dragly

Description

@dragly

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()

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions