ibllib.plots.figures
Module that produces figures, usually for the extraction pipeline
Functions
Creates DLC QC plot. |
|
Function to remove outline of empty axis |
|
Function to normalise size of all axis labels |
Classes
Plots AP RMS plots |
|
Plots raw electrophysiology AP band task = BadChannelsAp(pid, one=one=one) |
|
Behavioural plots. |
|
Plots coronal and sagittal slice showing electrode locations. |
|
Plots LFP spectrum and LFP RMS plots |
|
Plots raw electrophysiology AP band |
- set_axis_label_size(ax, labels=14, ticklabels=12, title=14, cmap=False)[source]
Function to normalise size of all axis labels
- Parameters:
ax
labels
ticklabels
title
cmap
- Returns:
- class BehaviourPlots(eid, session_path=None, one=None, **kwargs)[source]
Bases:
ReportSnapshot
Behavioural plots.
- property signature
dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object’s
(key, value) pairs
- dict(iterable) -> new dictionary initialized as if via:
d = {} for k, v in iterable:
d[k] = v
- dict(**kwargs) -> new dictionary initialized with the name=value pairs
in the keyword argument list. For example: dict(one=1, two=2)
- class HistologySlices(pid, session_path=None, one=None, brain_regions=None, brain_atlas=None, **kwargs)[source]
Bases:
ReportSnapshotProbe
Plots coronal and sagittal slice showing electrode locations.
- class LfpPlots(pid, session_path=None, one=None, brain_regions=None, brain_atlas=None, **kwargs)[source]
Bases:
ReportSnapshotProbe
Plots LFP spectrum and LFP RMS plots
- class ApPlots(pid, session_path=None, one=None, brain_regions=None, brain_atlas=None, **kwargs)[source]
Bases:
ReportSnapshotProbe
Plots AP RMS plots
- class SpikeSorting(pid, session_path=None, one=None, brain_regions=None, brain_atlas=None, **kwargs)[source]
Bases:
ReportSnapshotProbe
Plots raw electrophysiology AP band
- Parameters:
session_path – session path
probe_id – str, UUID of the probe insertion for which to create the plot
**kwargs –
keyword arguments passed to tasks.Task
- class BadChannelsAp(pid, session_path=None, one=None, brain_regions=None, brain_atlas=None, **kwargs)[source]
Bases:
ReportSnapshotProbe
Plots raw electrophysiology AP band task = BadChannelsAp(pid, one=one=one)
- Parameters:
session_path – session path
probe_id – str, UUID of the probe insertion for which to create the plot
**kwargs –
keyword arguments passed to tasks.Task
- ephys_bad_channels(raw, fs, channel_labels, channel_features, h=None, channels=None, title='ephys_bad_channels', save_dir=None, destripe=False, eqcs=None, br=None, pid_info=None, plot_backend='matplotlib')[source]
- raw_destripe(raw, fs, t0, i_plt, n_plt, fig=None, axs=None, savedir=None, detect_badch=True, SAMPLE_SKIP=200, DISPLAY_TIME=0.05, N_CHAN=384, MIN_X=-0.00011, MAX_X=0.00011)[source]
- Parameters:
raw – raw ephys data, Ns x Nc, x-axis: time (s), y-axis: channel
fs – sampling freq (Hz) of the raw ephys data
t0 – time (s) of ephys sample beginning from session start
i_plt – increment of plot to display image one (start from 0, has to be < n_plt)
n_plt – total number of subplot on figure
fig – figure handle
axs – axis handle
savedir – filename, including directory, to save figure to
detect_badch – boolean, to detect or not bad channels
SAMPLE_SKIP – number of samples to skip at origin of ephsy sample for display
DISPLAY_TIME – time (s) to display
N_CHAN – number of expected channels on the probe
MIN_X – max voltage for color range
MAX_X – min voltage for color range
- Returns:
fig, axs
- dlc_qc_plot(session_path, one=None, device_collection='raw_video_data', cameras=('left', 'right', 'body'), trials_collection='alf')[source]
Creates DLC QC plot. Data is searched first locally, then on Alyx. Panels that lack required data are skipped.
- Required data to create all panels
‘raw_video_data/_iblrig_bodyCamera.raw.mp4’, ‘raw_video_data/_iblrig_leftCamera.raw.mp4’, ‘raw_video_data/_iblrig_rightCamera.raw.mp4’, ‘alf/_ibl_bodyCamera.dlc.pqt’, ‘alf/_ibl_leftCamera.dlc.pqt’, ‘alf/_ibl_rightCamera.dlc.pqt’, ‘alf/_ibl_bodyCamera.times.npy’, ‘alf/_ibl_leftCamera.times.npy’, ‘alf/_ibl_rightCamera.times.npy’, ‘alf/_ibl_leftCamera.features.pqt’, ‘alf/_ibl_rightCamera.features.pqt’, ‘alf/rightROIMotionEnergy.position.npy’, ‘alf/leftROIMotionEnergy.position.npy’, ‘alf/bodyROIMotionEnergy.position.npy’, ‘alf/_ibl_trials.choice.npy’, ‘alf/_ibl_trials.feedbackType.npy’, ‘alf/_ibl_trials.feedback_times.npy’, ‘alf/_ibl_trials.stimOn_times.npy’, ‘alf/_ibl_wheel.position.npy’, ‘alf/_ibl_wheel.timestamps.npy’, ‘alf/licks.times.npy’,
- Params session_path:
Path to session data on disk
- Params one:
ONE instance, if None is given, default ONE is instantiated
- Returns:
Matplotlib figure