magland / sortingview

Web app for viewing results of ephys spike sorting
Apache License 2.0
24 stars 8 forks source link

Simpler raster view #223

Open khl02007 opened 1 year ago

khl02007 commented 1 year ago

@magland

Currently I add a raster view like this:

plot_items = []
for unit_id, spike_times in good_units.items():
    if len(spike_times) > 0:
        plot_items.append(
            vv.RasterPlotItem(
                unit_id=f'{unit_id}',
                spike_times_sec=spike_times.astype(np.float32)
            )
        )
view_raster_plot = vv.RasterPlot(
    start_time_sec=time[0],
    end_time_sec=time[-1],
    plots=plot_items
)

This results in an interactive view where if you hover over the raster with your mouse, it highlights a row (unit). It is also linked to a units table. I don't really need this feature and would rather have the raster view be static so that it updates quickly as I scroll through the data. Is that kind of simpler rasterview already available?