-
Notifications
You must be signed in to change notification settings - Fork 159
Closed
Labels
braintvrelates to Insitute BrainTV programrelates to Insitute BrainTV programbugexternalIssues submitted from external usersIssues submitted from external usersneuropixels
Milestone
Description
Hi!
When running raster_plot (imported from allensdk.brain_observatory.ecephys.visualization) on a spike_times dataframe, the spike times from each unit is plotted twice (twice as many lines as it's supposed to).
This is because the function passed to pandas's aggregate (here, the call on the _VlPlotter object) is called on each column, thus once on the 'stimulus_presentation_id' and once on the 'time_since_stimulus_presentation_onset' column.
This can be fixed by passing only one column to the aggregate function, eg spike_times[['stimulus_presentation_id', 'unit_id']].groupby('unit_id').agg(plotter).
I'll follow up with a pull request in a moment!
Best
Daniel
Metadata
Metadata
Assignees
Labels
braintvrelates to Insitute BrainTV programrelates to Insitute BrainTV programbugexternalIssues submitted from external usersIssues submitted from external usersneuropixels