GUI¶
Graphic interface to launch analyses
Main Window¶
-
class
cicada.gui.cicada_main_window.
CicadaMainWindow
(config_handler)[source]¶ Main window of the GUI
-
add_group_data
(group_name)[source]¶ Add a group of saved sessions to the current list of session
Parameters: group_name (str) – Name of the group saved in YAML
Create group menu
Create sort menu
-
load_data_from_config
()[source]¶ Check if the last dir opened is saved in config and load it automatically
-
load_data_from_dir
(dir_name, method)[source]¶ Load data (currently only NWB) from selected directory
Parameters:
-
load_group
(group_name)[source]¶ Load a group of saved sessions, it will clear the current session list
Parameters: group_name (str) – Name of the group saved in YAML
-
on_group
(param, state)[source]¶ Give group list and parameters value to populate QListWidget
Parameters:
-
on_sort
(param, state)[source]¶ Give sorted list to populate QListWidget :param param: Parameter to sort by :type param: str :param state: State of the checkbox :type state: int
-
openWindow
()[source]¶ Open all widgets in a CentralWidget and call some menus that needed those widgets
Populate the menu to load groups
-
save_last_data_location
(dir_name)[source]¶ Keep path to last data directory selected in a YAML in config
Parameters: dir_name (str) – Path to data to be saved
-
Filter/group sessions¶
Display metadata¶
Analysises list¶
-
class
cicada.gui.cicada_analysis_tree_gui.
AnalysisTreeApp
(parent, config_handler, to_parameters_button=None)[source]¶ -
create_tree_model
()[source]¶ Create the tree model Returns: the tree model, an instance of QAnalysisTreeModel
-
doubleClickedItem
(idx)[source]¶ Method called when the user double click in the tree :param idx: Index of the branch clicked
Returns:
-
load_arguments_parameters_section
()[source]¶ Used to load the parameters section with widgets, based on the current selection in the tree. If the selection is not on any valid tree item, nothing will happen Returns: None
-
set_data
(data_to_analyse, data_format)[source]¶ Give to the tree the data that the analysis classes will be given to analyze. Allows the tree to inactivate the analyses for which the data don’t fulfill the requierements :param data_to_analyse: a list of data in a given format (could be nwb or other) :param data_format: format of the data, must be a string. So far only “nwb” is supported
Returns: None
-
-
class
cicada.gui.cicada_analysis_tree_gui.
QAnalysisTreeView
(tree_item, config_handler, parent=None)[source]¶
-
cicada.gui.cicada_analysis_tree_gui.
fill_tree_item_with_dict
(root_tree, instances_dict)[source]¶ Recursive function that fills the root_tree according to data in instances_dict. :param root_tree: instance of TreeItem :param instances_dict: Contains instance of cicada_analysis, in a hierarchy similar to the one we want the tree to be :return:
Overview of analysises¶
-
class
cicada.gui.cicada_analysis_overview.
AnalysisOverview
(config_handler, parent=None)[source]¶ Class containing the overview linked to an analysis
-
add_analysis_overview
(cicada_analysis, analysis_id, obj)[source]¶ Add widgets to track the corresponding analysis :param cicada_analysis: CicadaAnalysis instance :type cicada_analysis: CicadaAnalysis :param analysis_id: Randomly generated ID linked to the analysis :type analysis_id: str :param obj: The analysis window’s object itself :type obj: object
-
-
class
cicada.gui.cicada_analysis_overview.
AnalysisState
(analysis_id, cicada_analysis, parent=None, without_bringing_to_front=False)[source]¶ Class containing the name of the analysis and the subjects analysed
Analysis parameters¶
-
class
cicada.gui.cicada_analysis_parameters_gui.
AnalysisData
(cicada_analysis, arguments_section_widget, config_handler, parent=None)[source]¶
-
class
cicada.gui.cicada_analysis_parameters_gui.
AnalysisPackage
(cicada_analysis, analysis_name, name, main_window, config_handler, parent=None)[source]¶ Widget containing the whole analysis window
-
bring_to_front
(window_id, event)[source]¶ Bring corresponding window to the front (re-routed from the double click method)
Parameters: - window_id (QWidget) – Analysis Widget object
- event (QEvent) – Double click event
-
errOutputWritten
(text, path)[source]¶ Append std.err text to the QLabel and create an err file.
Parameters:
-
-
class
cicada.gui.cicada_analysis_parameters_gui.
AnalysisParametersApp
(thread_name, progress_bar, analysis_name, config_handler, parent=None)[source]¶ Class containing the parameters widgets
-
create_widgets
(cicada_analysis)[source]¶ Parameters: cicada_analysis (CicadaAnalysis) – Chosen analysis
-
load_arguments
()[source]¶ Will open a FileDialog to select a yaml file used to load arguments used for a previous analysis
-
run_analysis
()[source]¶ Check if the parameters are valid and then create a thread which will run the analysis
-
-
class
cicada.gui.cicada_analysis_parameters_gui.
CheckBoxWidget
(analysis_arg, parent=None)[source]¶ Used to set a boolean value
-
class
cicada.gui.cicada_analysis_parameters_gui.
ColorDialogWidget
(analysis_arg, show_alpha_channel, parent=None)[source]¶ Widget used to select a color
-
set_value
(value)[source]¶ Parameters: value – a list or tuple of 3 or 4 float between 0.0 to 1.0, RGB or RGBA values, the A representing the alpha Returns:
-
to_stretch
()[source]¶ Indicate if the widget should take all the space of a horizontal layout how might share the space with another widget Returns: Boolean
Returns:
-
-
class
cicada.gui.cicada_analysis_parameters_gui.
ComboBoxWidget
(analysis_arg, parent=None)[source]¶ -
add_multiple_combo_boxes
(session_id, choices_dict, legends, index)[source]¶ Allows to add multiple combo boxes, each changing the content of the next one for on given session_id :param session_id: :param choices_dict: each key represent a content to put in the list and the value could be either None, either :param another dict which keys will be the content of the next ComboBox etc… or instead of a dict as value it: :param could be a list that will define the content.: :param legends: :param index:
Returns:
-
-
class
cicada.gui.cicada_analysis_parameters_gui.
EmittingErrStream
(parent=None)[source]¶ Class managing the std.err redirection
-
class
cicada.gui.cicada_analysis_parameters_gui.
EmittingStream
(parent=None)[source]¶ Class managing the std.out redirection
-
class
cicada.gui.cicada_analysis_parameters_gui.
FileDialogWidget
(analysis_arg, directory_only, extensions=None, parent=None)[source]¶ Create a widget that will contain a button to open a FileDialog and a label to display the file or directory choosen A label will also explain what this parameter do
-
get_value
()[source]¶ Return the argument
Returns: Dictionary with the set value Return type: result_dict (dict)
-
-
class
cicada.gui.cicada_analysis_parameters_gui.
ListCheckboxWidget
(analysis_arg, choices_attr_name, parent=None)[source]¶ Allows multiple choices
-
class
cicada.gui.cicada_analysis_parameters_gui.
MyFileDialogQButton
(key_name, file_dialog, file_dialogs_dict, parent=None)[source]¶ Special button for opening file dialog
-
class
cicada.gui.cicada_analysis_parameters_gui.
MyQComboBox
[source]¶ Special instance of ComboBox allowing to handle change so that it is connected to other combo_boxes
-
class
cicada.gui.cicada_analysis_parameters_gui.
MyQFrame
(analysis_arg=None, parent=None, with_description=True)[source]¶
-
class
cicada.gui.cicada_analysis_parameters_gui.
ProgressBar
(remaining_time_label, parent=None)[source]¶ Class containing the progress bar of the current analysis
-
update_progress_bar
(time_elapsed, increment_value=0, new_set_value=0)[source]¶ Update the progress bar in the analysis widget and the corresponding remaining time :param time_elapsed: Time elepased since beginning of analysis, in seconds :type time_elapsed: float :param increment_value: Value that should be added to the current value of the progress bar :type increment_value: float :param new_set_value: Value that should be set as the current value of the progress bar :type new_set_value: float
Returns:
-
-
class
cicada.gui.cicada_analysis_parameters_gui.
RemainingTime
(parent=None)[source]¶ Class containing the remaining time of the analysis
-
static
correct_time_converter
(time_to_convert)[source]¶ Convert a float in a correct duration value :param time_to_convert: Float value representing seconds to be converted in a correct duration with MM.SS :type time_to_convert: float
Returns: String of the correct duration Return type: time_text (str)
-
update_remaining_time
(progress_value, time_elapsed, done=False)[source]¶ Update the remaining time :param progress_value: Current progress bar value :type progress_value: float :param time_elapsed: Time elepased since the beginning of the analysis (in sec) :type time_elapsed: float :param done: True if the analysis is done and false if still running :type done: bool
-
static
-
class
cicada.gui.cicada_analysis_parameters_gui.
SameFamilyWidgetsContainer
(widgets, parent=None)[source]¶ A QFrame used to group widgets that belongs to a same group. Just useful for visual purposes
-
class
cicada.gui.cicada_analysis_parameters_gui.
SliderWidget
(analysis_arg, parent=None)[source]¶ Used to set a numerical value
-
class
cicada.gui.cicada_analysis_parameters_gui.
Worker
(name, cicada_analysis, analysis_arguments_handler, parent)[source]¶ Thread to manage multiple analysises at the same time