Skip to content

Add interpolation_kwargs to interpolate_templates#4665

Open
chrishalcrow wants to merge 2 commits into
SpikeInterface:mainfrom
chrishalcrow:add-interp-kwargs
Open

Add interpolation_kwargs to interpolate_templates#4665
chrishalcrow wants to merge 2 commits into
SpikeInterface:mainfrom
chrishalcrow:add-interp-kwargs

Conversation

@chrishalcrow

Copy link
Copy Markdown
Member

This allows the user to pass interpolate_templates to interpolate_templates.

@chrishalcrow chrishalcrow added generators Related to generator tools Edinburgh hackathon 2026 PRs from Edinburgh hackathon 2026 labels Jul 8, 2026
if interpolation_method == "thin_plate":

tps_interpolator = RBFInterpolator(source_locations, template, kernel="thin_plate_spline", neighbors=12)
if "neighbors" not in interpolation_kwargs:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a little wary of this. Why should we add in neighbors? If someone has poorly formed interpolation_kwargs shouldn't we let the function fail so the person can adjust themselves?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will run and give nonsense results for any probes with more than, say, 32 channels.
I don't think this is much different than setting default kwargs in other methods.

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

Labels

Edinburgh hackathon 2026 PRs from Edinburgh hackathon 2026 generators Related to generator tools

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants