Closed rat-h closed 1 year ago
@rat-h indeed plot_templates
is not an argument of the function: https://spikeinterface.readthedocs.io/en/latest/api.html#spikeinterface.widgets.plot_unit_waveforms_density_map
Maybe you want to use sw.plot_unit_waveforms
instead?
See https://spikeinterface.readthedocs.io/en/latest/api.html#spikeinterface.widgets.plot_unit_waveforms
I marked by >
>>> from spikeinterface import widgets as spw
>>> help(spw.plot_unit_waveforms_density_map)
Help on function plot_unit_waveforms_density_map in module spikeinterface.widgets.base:
plot_unit_waveforms_density_map(waveform_extractor, channel_ids=None, unit_ids=None, sparsity=None, same_axis=False, use_max_channel=False, peak_sign='neg', unit_colors=None, backend=None, **backend_kwargs)
Plots unit waveforms using heat map density.
Parameters
----------
waveform_extractor: WaveformExtractor
channel_ids: list
The channel ids to display
unit_ids: list
List of unit ids.
> plot_templates: bool
If True, templates are plotted over the waveforms
sparsity : ChannelSparsity or None
Optional ChannelSparsity to apply.
If WaveformExtractor is already sparse, the argument is ignored
use_max_channel: bool default False
Use only the max channel
peak_sign: str "neg"
Used to detect max channel only when use_max_channel=True
unit_colors: None or dict
A dict key is unit_id and value is any color format handled by matplotlib.
If None, then the get_unit_colors() is internally used.
same_axis: bool
If True then all density are plot on the same axis and then channels is the union
all channel per units.
set_title: bool
Create a plot title with the unit number if True.
plot_channels: bool
Plot channel locations below traces, only used if channel_locs is True
backend: str
['matplotlib']
**backend_kwargs: kwargs
matplotlib:
* figure: Matplotlib figure. When None, it is created. Default None
* ax: Single matplotlib axis. When None, it is created. Default None
* axes: Multiple matplotlib axes. When None, they is created. Default None
* ncols: Number of columns to create in subplots. Default 5
* figsize: Size of matplotlib figure. Default None
* figtitle: The figure title. Default None
the same in the documentation you referred.
@alejoe91
It's in the doc-string, which might be contributing to the confusion. I can work on some doc updates for the widgets next unless you want to just fix that right away.
Oh sorry I didn't see it! Yes we should have a pass in the docstring and make sure they're up to date...
@alejoe91 or maybe you can make this argument work? :)
Honestly, I think that the plot_templates
was never implemented for this function, but it's there for a bad copy/paste :P
I'll assign this to @samuelgarcia, since he made the plot_unit_waveforms_density_map
in the first place. It's a good idea to have the possibility to add the template on top of the densities
Fixed by @zm711