ibl_alignment_gui.handlers.shank_handler

Classes

ShankHandler

Model for handling data on a shank of a probe for a given recording configuration.

class ibl_alignment_gui.handlers.shank_handler.ShankHandler(loaders, shank_idx)[source]

Bases: object

Model for handling data on a shank of a probe for a given recording configuration.

Parameters:
  • loaders (Bunch) – A Bunch object containing all the relevant loaders and uploaders to read and write data.

  • shank_idx (int) – The index of the shank in the probe

property chn_max: float

Return the maximum y channel value for the currently active shank.

Returns:

The maximum channel value

Return type:

float

property chn_min: float

Return the minimum y channel value for the currently active shank.

Returns:

The minimum channel value, or 0 if the minimum is positive.

Return type:

float

property feature: ndarray

See AlignmentHandler.feature() for details.

feature2track_lin(depths, feature, track)[source]

Estimate values of depth according to linear fit between feature and track reference lines.

Parameters:
  • depths (np.ndarray) – The depths to estimate the new depths for

  • feature (np.ndarray) – The feature line positions

  • track (np.ndarray) – The track line positions

Returns:

The new estimated depths

Return type:

np.ndarray

property feature_plots: Bunch[str, Bunch]

Access the feature plots from the current shank’s plot loader.

Returns:

A bunch of available feature plots.

Return type:

Bunch

property feature_prev: ndarray

Return the previous feature from the alignment loader for the currently active shank.

Returns:

Previous feature array.

Return type:

np.ndarray

filter_units(filter_type)[source]

Filter the spikesorting data by selected unit type and recompute plot data.

Parameters:

filter_type (str) – The type of unit to filter by

Return type:

None

get_scaled_histology()[source]

See AlignmentHandler.get_scaled_histology() for details.

Return type:

None

property image_plots: Bunch[str, ImageData]

Access the image plots for the currently active shank.

Returns:

A bunch of available slice plots.

Return type:

Bunch

property line_plots: Bunch[str, LineData]

Access the slice plots for the currently active shank.

Returns:

A bunch of available slice plots.

Return type:

Bunch

load_data()[source]

Load the geometry, ephys and alignment data.

Return type:

None

load_plots()[source]

Load all the plot data for the current shank.

offset_hist_data(*args)[source]

See AlignmentHandler.offset_hist_data() for details.

Return type:

None

property probe_plots: Bunch[str, ProbeData]

Access the probe plots for the currently active shank.

Returns:

A bunch of available probe plots.

Return type:

Bunch

reset_features_and_tracks()[source]

See AlignmentHandler.reset_features_and_tracks() for details.

Return type:

None

reset_levels()[source]

Reset the levels for all image, scatter, line and probe plots.

Return type:

None

scale_hist_data(*args, **kwargs)[source]

See AlignmentHandler.scale_hist_data() for details.

Return type:

None

property scatter_plots: Bunch[str, ScatterData]

Access the scatter plots for the currently active shank.

Returns:

A bunch of available slice plots.

Return type:

Bunch

set_init_alignment()[source]

Set the initial alignment based on previous features and tracks.

Return type:

None

property slice_plots: Bunch[str, Bunch]

Access the slice plots from the current shank’s plot loader.

Returns:

A bunch of available slice plots.

Return type:

Bunch

property track: ndarray

See AlignmentHandler.track() for details.

property track_lines: list[ndarray]

See AlignmentHandler.track_lines() for details.

upload_data()[source]

Upload the data, save the channels and the alignments.

Return type:

str

property xyz_channels: ndarray

See AlignmentHandler.xyz_channels() for details.

property xyz_clusters: ndarray

Return the xyz cluster locations estimated using the fit from the track and feature lines.

The values in the current index in the circular buffer for the currently active shank are used.

Returns:

xyz positions of clusters in 3D space

Return type:

np.ndarray

property xyz_track: ndarray

See AlignmentHandler.xyz_track() for details.

property y_max: float

Return the maximum y channel value.

Returns:

The maximum channel value

Return type:

float

property y_min: float

Return the minimum y channel value.

Returns:

The minimum channel value

Return type:

float