ibl_alignment_gui.plugins.channel_prediction

Functions

compute_cosmos_predictions

Example prediction model that returns cosmos brain regions.

compute_cumulative_distribution

Example prediction model that plots cumulative prediction of brain regions.

compute_random_predictions

Example prediction model that uses the spikes data to assign random brain regions.

get_region_boundaries

Get the boundaries of brain regions along the histology track.

plot_original_regions

Plot the original histology regions on the reference histology plot.

plot_predicted_regions

Plot the model predictions on the reference histology plot.

setup

Set up the Channel Prediction plugin.

Classes

ChannelPrediction

Class to handle channel prediction plotting in the alignment GUI.

class ibl_alignment_gui.plugins.channel_prediction.ChannelPrediction(controller)[source]

Bases: object

Class to handle channel prediction plotting in the alignment GUI.

Parameters:

controller (AlignmentGUIController) – The main application controller.

plot_regions(_, model, func)[source]

Plot the brain regions based on the selected model.

Parameters:
  • model (str) – The name of the model to use for predictions.

  • func (Callable) – The function to compute the predictions.

Return type:

None

ibl_alignment_gui.plugins.channel_prediction.compute_cosmos_predictions(controller, items)[source]

Example prediction model that returns cosmos brain regions.

Returns:

A bunch containing the predicted brain regions.

Return type:

Bunch

ibl_alignment_gui.plugins.channel_prediction.compute_cumulative_distribution(controller, items)[source]

Example prediction model that plots cumulative prediction of brain regions.

Returns:

A bunch containing the predicted brain regions.

Return type:

Bunch

ibl_alignment_gui.plugins.channel_prediction.compute_random_predictions(controller, items)[source]

Example prediction model that uses the spikes data to assign random brain regions.

Returns:

A bunch containing the predicted brain regions.

Return type:

Bunch

ibl_alignment_gui.plugins.channel_prediction.get_region_boundaries(regions, depths)[source]

Get the boundaries of brain regions along the histology track.

Parameters:
  • regions (dict) – The brain regions along the histology track.

  • depths (ndarray) – The depths along the histology track.

Returns:

A bunch containing the region boundaries, labels, and colours.

Return type:

Bunch

ibl_alignment_gui.plugins.channel_prediction.plot_original_regions(_, items, **kwargs)[source]

Plot the original histology regions on the reference histology plot.

Return type:

None

ibl_alignment_gui.plugins.channel_prediction.plot_predicted_regions(controller, items, model, func, **kwargs)[source]

Plot the model predictions on the reference histology plot.

Parameters:
  • model (str) – The name of the model.

  • func (Callable) – The function to compute the predictions.

Return type:

None

ibl_alignment_gui.plugins.channel_prediction.setup(controller)[source]

Set up the Channel Prediction plugin.

Adds menu options to select different prediction models.

Parameters:

controller (AlignmentGUIController) – The main application controller.

Return type:

None