Skip to content

Argument spike_retriver_kwargs (sic) is not sent to the SpikeRetriever in ComputeSpikeLocations. #4320

@ecobost

Description

@ecobost

Smaller issue (typo): The argument in

should be spike_retriever_kwargs ("e" is missing).

Bigger issue: retriever_kwargs is not actually used during the initialization of the retriever (never was); the only kwarg used from it is peak_sign (to find the template extremum)

peak_sign = self.params["spike_retriver_kwargs"]["peak_sign"]
extremum_channels_indices = get_template_extremum_channel(
self.sorting_analyzer, peak_sign=peak_sign, outputs="index"
)
retriever = SpikeRetriever(
sorting,
recording,
channel_from_template=True,
extremum_channel_inds=extremum_channels_indices,
)

I'm happy to open a PR to fix it, just let me know whether:
a. You actually do wanna keep the retriever_kwargs and use it to init SpikeRetriever. I ask because ComputeSpikeAmplitudes receives only the peak_sign and calls SpikeRetriever with the default arguments so I wonder whether ComputeSpikeLocations should do the same

spike_retriever_node = SpikeRetriever(
sorting, recording, channel_from_template=True, extremum_channel_inds=extremum_channels_indices
)

or

b. You do wanna send the kwargs to SpikeRetriever() and are ok with renaming it to spike_retriever_kwargs (fixing the typo). Theoretically, it's a non-backwards-compatible change (people could be using the argument with the "retriver" name)

Metadata

Metadata

Assignees

No one assigned

    Labels

    postprocessingRelated to postprocessing module

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions