ibl_alignment_gui.app.app_view
Classes
The main GUI window for the alignment application. |
- class ibl_alignment_gui.app.app_view.AlignmentGUIView(offline=False, config=False)[source]
Bases:
QMainWindowThe main GUI window for the alignment application.
- Parameters:
offline (bool) – Whether to run in offline mode (local files) or online mode (ONE/Alyx)
config (bool) – Whether multiple configs are to be used
- activate_selection_button()[source]
Change the stylesheet of the data button to show it is activated.
- Return type:
None
- add_point(point)[source]
Remove a point to the fit plot.
- Parameters:
point (pg.PlotDataItem) – A point to remove to the fit plot
- Return type:
None
- add_points_to_display(points)[source]
Add a list of points to the fit plot.
- Parameters:
points (list[pg.PlotDataItem]) – A list of points to add to the fit plot
- Return type:
None
See
MenuWidget.populate_non_exclusive_tab()for details.- Return type:
None
- clear_selection_dropdown(name)[source]
Clear values from a list or a set of lists.
- Parameters:
name (str or list) – The name of the dropdown or dropdowns to clear
- Return type:
None
- clear_tabs()[source]
Clear the shank and slice tab widgets of all their contents.
- Return type:
None
- connect_button(name, callback)[source]
Connect a button to a callback.
- Parameters:
name (str) – The name of the button
callback (Callable) – The callback function to connect to
- Return type:
None
- connect_lin_fit(callback)[source]
Connect the linear fit checkbox to a callback.
- Parameters:
callback (Callable) – The callback function to connect to
- Return type:
None
- connect_selection_button(name, callback)[source]
Connect the data button to a callback.
- Parameters:
name (str) – The name of the button
callback (Callable) – The callback function to connect to
- Return type:
None
- connect_selection_dropdown(name, callback)[source]
Connect a dropdown to a callback.
- Parameters:
name (str) – The name of the dropdown
callback (Callable) – The callback function to connect to
- Return type:
None
- connect_tabs(name, callback, layout_callback=None)[source]
Connect the tab change signal to a callback.
- Parameters:
name (str) – The name of the tab widget
callback (Callable) – The tab change callback to connect to
layout_callback (Callable, optional) – The layout chance callback to connect to
- Return type:
None
- deactivate_selection_button()[source]
Change the stylesheet of the data button to show it is deactivated.
- Return type:
None
- get_selected_path()[source]
Get the user selected path and set the text line edit to show the selected folder path.
- Returns:
selected_path – The user selected path that contains data to load
- Return type:
Path
- init_tabs(shank_items, selected_config, default_config, non_default_config, feature_view=False)[source]
Initialize the shank and slice tab widgets with the given shank items.
- Parameters:
shank_items (dict | Bunch) – A dictionary of ShankController instances for each shank
selected_config (
str) – The configuration to display. Can be ‘default’, ‘non-default’ or ‘both’default_config (
str) – The default configuration.non_default_config (
str) – The non-default configuration.feature_view (bool) – Whether to display the ephys plot as a feature view or not.
- Returns:
A list of the shank panels created
- Return type:
list[QtWidgets.QWidget]
- init_view()[source]
Initialize the main view by setting the central widget and the splitter sizes.
- Return type:
None
- property is_grid: bool
Check if the shank tab view is in grid layout.
- Returns:
True if the shank tab view is in grid layout, False if in tab layout
- Return type:
bool
See
MenuWidget.populate_exclusive_tab()for details.- Return type:
str|None
- populate_selection_dropdown(name, values)[source]
Populate a dropdown with values.
- Parameters:
name (str) – The name of the dropdown to populate
values (list or dict or np.ndarray) – The values to add to the list
- Return type:
None
- remove_point(point)[source]
Add a point to the fit plot.
- Parameters:
point (pg.PlotDataItem) – A point to add to the fit plot
- Return type:
None
- remove_points_from_display(points)[source]
Remove a list of points to the fit plot.
- Parameters:
points (list[pg.PlotDataItem]) – A list of points to remove to the fit plot
- Return type:
None
- reset_view()[source]
Reset the main view by clearing the fit plot and all the tab widgets.
- Return type:
None
- set_labels(current_idx, total_idx)[source]
Set the strings to indicate the number of fits applied by the user.
- Parameters:
current_idx (int) – The current index of the fit in the alignment buffer
total_idx (int) – The total number of fits stores in the alignment buffer
- Return type:
None
- set_lut(images, cbar)[source]
Add the LUT item if not already added and set the LUT for the given images and colorbar.
- Parameters:
images (list) – A list of pyqtgraph ImageItem instances to be linked to the LUT.
cbar (ColorBar) – A ColorBar object
- Return type:
None
- set_selected_path(selected_path)[source]
Set the text line edit to show the selected folder path.
- Parameters:
selected_path (Path or str) – The user selected path that contains data to load
- Return type:
None
- set_selection_dropdown(name, idx)[source]
Set the dropdown to a given index.
- Parameters:
name (str) – The name of the dropdown
idx (
int) – The index to set
- Return type:
None
- set_shank_tab(idx)[source]
Set the tab of the shank tabs to the given index.
- Parameters:
idx (
int) – The index to set the tab to- Return type:
None
- set_slice_tab(idx)[source]
Set the tab of the slice tabs to the given index.
- Parameters:
idx (
int) – The index to set the tab to
- set_tabs(idx)[source]
Set the index of the selected tab in the shank and slice tab views.
- Parameters:
idx (
int) – The index to set the tabs to- Return type:
None
Toggle through the options in an action group stored in the menubar.
- Parameters:
tab (str) – The name of the tab
direction (int) – The direction to toggle in the action group (1 for next, -1 for previous)
- Return type:
None
- toggle_tabs(idx)[source]
Toggle the shank and slice tabs between grid and tab view.
After toggling ensure the correct index is selected.
- Parameters:
idx (int) – The index of the selected panel
- Return type:
None
Trigger the selection of an action in an action group stored in the menubar.
- Parameters:
tab (str) – The name of the tab
option (str) – The name of the option in the tab to trigger
- Return type:
None