Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ def test_compare_input_argument_ranges_against_ibl(shanks, p, sigma_um, num_chan
rng = np.random.default_rng(seed=None)
x = rng.choice(shanks, num_channels)
for idx, __ in enumerate(recording._properties["contact_vector"]):
recording._properties["contact_vector"][idx][1] = x[idx]
recording._properties["contact_vector"][idx]["x"] = x[idx]

# generate random bad channel locations
bad_channel_indexes = rng.choice(num_channels, rng.integers(1, int(num_channels / 5)), replace=False)
Expand Down Expand Up @@ -171,8 +171,8 @@ def test_output_values():
] # all others equal distance away.
# Overwrite the probe information with the new locations
for idx, (x, y) in enumerate(zip(*new_probe_locs)):
recording._properties["contact_vector"][idx][1] = x
recording._properties["contact_vector"][idx][2] = y
recording._properties["contact_vector"][idx]["x"] = x
recording._properties["contact_vector"][idx]["y"] = y

# Run interpolation in SI and check the interpolated channel
# 0 is a linear combination of other channels
Expand All @@ -186,8 +186,8 @@ def test_output_values():
# Shift the last channel position so that it is 4 units, rather than 2
# away. Setting sigma_um = p = 1 allows easy calculation of the expected
# weights.
recording._properties["contact_vector"][-1][1] = 5
recording._properties["contact_vector"][-1][2] = 9
recording._properties["contact_vector"][-1]["x"] = 5
recording._properties["contact_vector"][-1]["y"] = 9
expected_weights = np.r_[np.tile(np.exp(-2), 3), np.exp(-4)]
expected_weights /= np.sum(expected_weights)

Expand Down
Loading