Contents¶
Dependencies¶
PyCICADA has the following minimum requirements, which must be installed before you can get started using PyNWB.
- Python 3.6, or 3.7
- pip
PyCICADA has been tested on Ubuntu 18.04.1 LTS, Windows 10 and macOS Mojave, using Python 3.6 & 3.7
Installation¶
Install release from PyPI¶
The Python Package Index (PyPI) is a repository of software for the Python programming language.
To install or update PyCICADA distribution from PyPI simply run:
$ pip install -U pycicada
This will automatically install the following required dependencies:
- h5py
- numpy
- sortedcontainers
- shapely
- qtpy
- Pillow
- PyYAML
- scanimage-tiff-reader
- pyabf
- hdf5storage
- pathlib
- scipy
- matplotlib
- PyQt5
Introduction¶
CICADA stands for Calcium Imaging Complete Automated Data Analysis.
It’s a Python pipeline aimed for analyzing calcium imaging data.
Motivation¶
We notice a lack of toolboxes or analysis pipelines for calcium imaging data, using open source language. Our motivation was to build an easy-to-use pipeline, which doesn’t need programming skills. In that purpose, we offer a Graphical User Interface as well as a command line usage.
In order to tackle the broadness of scientists’ needs, we built the pipeline to be easily extendable with a plugin-like interface, for data format and analyses.
Supported data format¶
The default data format chosen was Neurodata Without Borders: Neurophysiology (NWB:N). that is a data standard for neurophysiology, providing neuroscientists with a common standard to share, archive, use, and build analysis tools for neurophysiology data. NWB:N is designed to store a variety of neurophysiology data, including data from intracellular and extracellular electrophysiology experiments, data from optical physiology experiments, and tracking and stimulus data.
We provide some tools to convert their data into NWB, with a plugin-like interface. (Curently in Preprocessing)
Functionalities¶
- We offer a Graphical User Interface (GUI) as well as a command line usage.
- We have already implemented or aim to implement various kind of analyses such cell assemblies detection, network analyses, display functions (rasters, cells map) etc…
- The GUI offers specifics functionalities: - Subjects and recorded sessions can be filtered or grouped in order to easily select the data to be analysed, and saved for future use. - Subjects and and recorded sessions’ informations can be displayed and modified depending on the data format. - Analyses are grouped by family. Each analysis provide a way to check the data see if they are compatible. - Analyses arguments can be saved in a yaml file allowing to easily load them later. - A multi-thread implementation allows multiple analysis at the same time. - A progression bar allows to follow the analysis current status.
Software architecture¶
Analysis¶
Each analysis is represented by a class that inherits CicadaAnalysis (in the module cicada.analysis).
Each CicadaAnalysis instance instanciate an ArgumentAnalysisHandler that communicates with the GUI and handle the arguments that will be passed to the analysis.
Each CicadaAnalaysis instance allows to check the compatibility of the data to analyze though the method check_data()
.
The method run_analysis()
will be called to start the analysis.
The abstract class CicadaAnalysisFormatWrapper allows,through inheritance, to write a wrapper for a given data format, such as nwb. It allows to get the content from specific data format, and adding a new format consists in creating a new instance of CicadaAnalysisFormatWrapper, without any change in the CicadaAnalysis instances.
Graphical User Interface¶
The GUI uses Qt through QtPy which wrapps PyQt5 and PySide.
The GUI is composed of 3 main modules.
- A list that displays the loaded recorded sessions to analyse (SessionsWidget).
- A tree that displays the available analyses, updated depending on the data to analyse. (AnalysisTreeApp)
- A pop-up panel that allows to set arguments for the given analysis and to follow the status of the analysis. (AnalysisParametersApp). A corresponding overwiew of the opened panels is available on the main window (AnalysisOverview)
How to use¶
To be added
Pre-processing¶
Convert CI data to NWB file format
Data to NWB¶
-
cicada.preprocessing.cicada_data_to_nwb.
convert_data_to_nwb
(data_to_convert_dir, default_convert_to_nwb_yml_file, nwb_files_dir)[source]¶ Convert all default_config_data_for_conversion located in dir_path and put it in NWB format then create the file. Use the yaml file contains in dir_path to convert the default_config_data_for_conversion. A yaml file with in its name session_data and one with subject_data must be in directory. Otherwise nothing will happend. A yaml file with abf in its name will need to be present to convert the abf default_config_data_for_conversion.
Parameters:
-
cicada.preprocessing.cicada_data_to_nwb.
create_convert_class
(class_name, config_dict, converter_dict, nwb_file, yaml_path, files, dir_path)[source]¶ Parameters: - class_name –
- config_dict –
- converter_dict –
- nwb_file –
- yaml_path –
- files –
- dir_path –
Returns:
-
cicada.preprocessing.cicada_data_to_nwb.
create_nwb_file
(subject_data_yaml_file, session_data_yaml_file)[source]¶ Create an NWB file object using all metadata containing in YAML file
Parameters:
-
cicada.preprocessing.cicada_data_to_nwb.
filter_list_according_to_keywords
(list_to_filter, keywords, keywords_to_exclude)[source]¶ Conditional loop to remove all files or directories not containing the keywords # or containing excluded keywords. Inplace list modification
Parameters: - Exemples:
>>> print(filter_list_of_files(["file1.py", "file2.c", "file2.h"],"2","h")) ["file2.c"]
-
cicada.preprocessing.cicada_data_to_nwb.
filter_list_of_files
(dir_path, files, extensions, directory=None)[source]¶ Take a list of file names and either no extensions (empty list or None) and remove the directory that starts by “.” or a list of extension and remove the files that are not with this extension. It returns a new list
Parameters: - Exemples:
>>> print(filter_list_of_files(["file1.py", "file2.c", "file3.h"],"py")) ["file1.py"]
Run preprocessing¶
NWB file class¶
Suite 2P ROIs¶
2D series¶
-
class
cicada.preprocessing.convert_processed_2d_series_to_nwb.
ConvertProcessed2dSeriesToNWB
(nwb_file)[source]¶ Class to convert 2D series to NWB
-
convert
(**kwargs)[source]¶ Convert the data and add to the nwb_file
Parameters: **kwargs – arbitrary arguments
-
Calcium imaging movie¶
ABF¶
-
class
cicada.preprocessing.convert_abf_to_nwb.
ConvertAbfToNWB
(nwb_file)[source]¶ Class to convert ABF data to NWB
-
convert
(**kwargs)[source]¶ The goal of this function is to extract from an Axon Binary Format (ABF) file its content and make it accessible through the NWB file. The content can be: LFP signal, piezzo signal, speed of the animal on the treadmill. All, None or a few of these informations could be available. One information always present is the timestamps, at the abf sampling_rate, of the frames acquired by the microscope to create the calcium imaging movie. Such movie could be the concatenation of a few movies, such is the case if the movie need to be saved every x frames for memory issue for ex. If the movie is the concatenation of many, then there is an option to choose to extract the information as if 2 frames concatenate are contiguous in times (such as then LFP signal or piezzo would be match movie), or to add interval_times indicating at which time the recording is on pause and at which time it’s starting again. The time interval containing this information is named “ci_recording_on_pause” and you can get it doing: if ‘ci_recording_on_pause’ in nwb_file.intervals: pause_intervals = nwb_file.intervals[‘ci_recording_on_pause’]
Parameters: - **kwargs (dict) – kwargs is a dictionary, potentials keys and values types are:
- abf_yaml_file_name – mandatory parameter. The value is a string representing the path
- file_name of the yaml file associated to this abf file. In the abf (and) –
- frames_channel – mandatory parameter. The value is an int representing the channel
- the abf in which is the frames timestamps data. (of) –
- abf_file_name – mandatory parameter. The value is a string representing the path
- file_name of the abf file. (and) –
-
detect_run_periods
(run_data, min_speed)[source]¶ Using the data from the abf regarding the speed of the animal on the treadmill, return the speed in cm/s at each timestamps as well as period when the animal is moving (using min_speed threshold)
Parameters: Returns: List of movements periods speed_during_movement_periods (list) : List of subject speed during movements speed_by_time (list) : List of subject speed by time
Return type: mvt_periods (list)
-
determine_ci_frames_indices
()[source]¶ Using the frames data channel, estimate the timestamps of each frame of the calcium imaging movie. If there are breaks between each recording (the movie being a concatenation of different movies), then there is an option to either skip those non registered frames that will be skept in all other data (lfp, piezzo, …) or to determine how many frames to add in the movie and where so it matches the other data recording in the abf file
-
Utils¶
-
class
cicada.preprocessing.utils.
ComparableItem
(value)[source]¶ Make it possible to sort a list of items of different types, such as int and string
-
cicada.preprocessing.utils.
class_name_to_file_name
(class_name)[source]¶ Transform the string representing a class_name, by removing the upper case letters, and inserting before them an underscore if 2 upper case letters don’t follow. Underscore are also inserted before numbers ex: ConvertAbfToNWB -> convert_abf_to_nwb :param class_name: string :return:
-
cicada.preprocessing.utils.
flatten
(list)[source]¶ Flatten a nested list no matter the nesting level
Parameters: list (list) – List to flatten Returns: List without nest Examples
>>> flatten([1,2,[[3,4],5],[7]]) [1,2,3,4,5,7]
-
cicada.preprocessing.utils.
get_continous_time_periods
(binary_array)[source]¶ take a binary array and return a list of tuples representing the first and last position(included) of continuous positive period :param binary_array: :return:
-
cicada.preprocessing.utils.
load_tiff_movie_in_memory
(tif_movie_file_name, frames_to_add=None)[source]¶ Load tiff movie from filename using Scan Image Tiff
Parameters: tif_movie_file_name (str) – Absolute path to tiff movie Returns: Tiff movie as 3D-array Return type: tiff_movie (array)
-
cicada.preprocessing.utils.
load_tiff_movie_in_memory_using_pil
(tif_movie_file_name, frames_to_add=None)[source]¶ Load tiff movie from filename using PIL library
Parameters: - tif_movie_file_name (str) – Absolute path to tiff movie
- frames_to_add – dict with key an int representing the frame index after which add frames. the value is the number of frames to add (integer)
Returns: Tiff movie as 3D-array
Return type: tiff_movie (array)
-
cicada.preprocessing.utils.
merging_time_periods
(time_periods, min_time_between_periods)[source]¶ Take a list of pair of values representing intervals (periods) and a merging thresholdd represented by min_time_between_periods. If the time between 2 periods are under this threshold, then we merge those periods. It returns a new list of periods. :param time_periods: list of list of 2 integers or floats. The second value represent the end of the period, the value being included in the period. :param min_time_between_periods: a float or integer value :return: a list of pair of list.
-
cicada.preprocessing.utils.
sort_by_param
(nwb_path_list, param_list)[source]¶ Sort NWB files depending on a list of parameters
Parameters: Returns: List of NWB files sorted
Return type: nwb_sorted_list (list)
-
cicada.preprocessing.utils.
update_frames_to_add
(frames_to_add, nwb_file, ci_sampling_rate)[source]¶ Update frames_to_add (dict), based on pause_intervals and ci_frames_time_series :param frames_to_add: dict, with key an int representing the frame index after which add frames. :param the value is the number of frames to add: :type the value is the number of frames to add: integer :param nwb_file: nwb file, will get nwb_file.intervals[‘ci_recording_on_pause’] and :param nwb_file.get_acquisition: :type nwb_file.get_acquisition: “ci_frames”
Returns:
Appendix¶

Analysis¶
Analysises
Main analysis class¶
-
class
cicada.analysis.cicada_analysis.
CicadaAnalysis
(name, short_description, family_id=None, long_description=None, data_to_analyse=None, data_format=None, config_handler=None, gui=True)[source]¶ An abstract class that should be inherit in order to create a specific analyse
-
add_argument_for_gui
(with_incremental_order=True, **kwargs)[source]¶ Parameters: - **kwargs –
- with_incremental_order – boolean, if True means the order of the argument will be the same as when added
Returns:
-
add_ci_movie_arg_for_gui
(long_description=None)[source]¶ Will add an argument for gui, named ci_movie that will list all calcium imaging available for each session Returns:
-
add_segmentation_arg_for_gui
()[source]¶ Will add an argument for gui, named segmentation that will list all segmentations available for each session Returns:
-
check_data
()[source]¶ Check the data given one initiating the class and return True if the data given allows the analysis implemented, False otherwise. :return: a boolean
-
create_results_directory
(dir_path)[source]¶ Will create a directory in dir_path with the name of analysis and time at which the directory is created so it can be unique. The attribute _results_path will be updated with the path of this new directory :param dir_path: path of the dir in which create the results dir
Returns: this new directory
-
get_results_path
()[source]¶ Return the path when the results from the analysis will be saved or None if it doesn’t exist yet Returns:
-
set_arguments_for_gui
()[source]¶ Need to be implemented in order to be used through the graphical interface. super().set_arguments_for_gui() should be call first to instantiate an AnalysisArgumentsHandler and create the attribution for results_path :return: None
-
set_data
(data_to_analyse, data_format='nwb')[source]¶ A list of :param data_to_analyse: list of data_structure :param data_format: indicate the type of data structure. for NWB, NIX
-
update_original_data
()[source]¶ To be called if the data to analyse should be updated after the analysis has been run. :return: boolean: return True if the data has been modified
-
Argument handler¶
-
class
cicada.analysis.cicada_analysis_arguments_handler.
AnalysisArgumentsHandler
(cicada_analysis)[source]¶ Handle the AnalysisArgument instances for a given CicadaAnalysis instance. Allows to create the widgets and get the values to pass to run_analysis() of the CicadaAnalysis instance.
-
check_arguments_validity
()[source]¶ Check if all mandatory arguments have been filled Returns: True if we can run the analysis
-
get_gui_widgets
(group_by_family=False)[source]¶ Get the list of widgets necessary to fill the arguments for the cicada analysis associated :param group_by_family: if True, group the widgets in one widget to be grouped together if they belong to the same :param family. AnalysisArgument will have an attribute named family_widget whose value is a string.:
Returns:
-
load_analysis_argument_from_yaml_file
(file_name)[source]¶ Set the analysis argument value based on the value in the yaml file. The :param file_name:
Returns:
-
save_analysis_arguments_to_yaml_file
(path_dir, yaml_file_name)[source]¶ Save the arguments value to a yaml file. The first key will represent the argument name then the value will be a dict with the argument details such as the type etc… :param path_dir: directory in which save the yaml file :param yaml_file_name: yaml file name, with the extension or without (will be added in that case)
Returns:
-
Format wrapper¶
-
class
cicada.analysis.cicada_analysis_format_wrapper.
CicadaAnalysisFormatWrapper
(data_ref, data_format, load_data=True)[source]¶ An abstract class that should be inherit in order to create a specific format wrapper
-
age
¶ Age of the subject :return: None if age unknown
-
contains_ci_movie
(consider_only_2_photons)[source]¶ Indicate if the data object contains at least one calcium imaging movie :param consider_only_2_photons: boolean, it True means we consider only 2 photons calcium imaging movies, :param if other exists but not 2 photons, then False will be return:
Returns: True if it’s the case, False otherwise
-
genotype
¶ Genotype of the subject :return: None if age unknown
-
get_ci_movies
(only_2_photons)[source]¶ Return a dict with as key a string identifying the movie, and as value a dict of CI movies a string as file_name if external, or a 3d array :param only_2_photons: return only the 2 photon movies
Returns:
-
get_identifier
(session_data)[source]¶ Get the identifier of one of the data to analyse :param session_data: Data we want to know the identifier
Returns: A hashable object identfying the data
-
get_intervals_names
()[source]¶ Return a list representing the intervals contains in this data Returns:
-
get_pixel_mask
(segmentation_info)[source]¶ Return pixel_mask which is a list of list of pair of integers representing the pixels coordinate (x, y) for each cell. the list length is the same as the number of cells. :param segmentation_info: object (could be list, dict etc…) given information about how to reach the pixel_mask :param data:
Returns:
-
get_roi_response_series
()[source]¶ Returns: a list or dict of objects representing all roi response series (rrs) names rrs could represents raw traces, or binary raster, and its link to a given segmentation. The results returned should allow to identify the segmentation associated. Object could be strings, or a list of strings, that identify a rrs and give information how to get there.
-
get_segmentations
()[source]¶ Returns: a list or dict of objects representing all segmentation names up the segmentation planes (like in nwb) Object could be strings, or a list of strings, that identify a segmentation and give information how to get there.
-
identifier
¶ Identifier of the session :return:
-
sex
¶ Sex (gender) of the subject :return: None if sex unknown
-
species
¶ Species of the subject :return: None if age unknown
-
subject_id
¶ Id of the subject :return: None if age unknown
-
weight
¶ Id of the subject :return: None if age unknown
-
NWB wrapper¶
-
class
cicada.analysis.cicada_analysis_nwb_wrapper.
CicadaAnalysisNwbWrapper
(data_ref, load_data=True)[source]¶ Allows to communicate with the nwb format
-
age
¶ Age of the subject :return: None if age unknown
-
contains_ci_movie
(consider_only_2_photons)[source]¶ Indicate if the data object contains at least one calcium imaging movie represented by an instance of pynwb.image.ImageSeries :param consider_only_2_photons: boolean, it True means we consider only 2 photons calcium imaging movies, :param if other exists but not 2 photons, then False will be return:
Returns: True if it’s the case, False otherwise
-
genotype
¶ Genotype of the subject :return: None if age unknown
-
get_ci_movies
(only_2_photons)[source]¶ Return a dict with as key a string identifying the movie, and as value a dict of CI movies a string as file_name if external, or a 3d array :param only_2_photons: return only the 2 photon movies
Returns:
-
get_identifier
(session_data)[source]¶ Get the identifier of one of the data to analyse :param session_data: Data we want to know the identifier
Returns: A hashable object identfying the data
-
get_intervals_names
()[source]¶ Return a list representing the intervals contains in this data Returns:
-
get_pixel_mask
(segmentation_info)[source]¶ Return pixel_mask which is a list of list of pair of integers representing the pixels coordinate (x, y) for each cell. the list length is the same as the number of cells. :param segmentation_info: a list of 3 elements: first one being the name of the module, then the name :param of image_segmentation and then the name of the segmentation plane.:
Returns:
-
get_roi_response_series
()[source]¶ Returns: a list or dict of objects representing all roi response series (rrs) names rrs could represents raw traces, or binary raster, and its link to a given segmentation. The results returned should allow to identify the segmentation associated. Object could be strings, or a list of strings, that identify a rrs and give information how to get there.
-
get_segmentations
()[source]¶ Returns: a dict that for each step till plane_segmentation represents the different option. First dict will have as keys the name of the modules, then for each modules the value will be a new dict with keys the ImageSegmentation names and then the value will be a list representing the segmentation plane
-
identifier
¶ Identifier of the session :return:
-
sex
¶ Sex (gender) of the subject :return: None if sex unknown
-
species
¶ Species of the subject :return: None if age unknown
-
subject_id
¶ Id of the subject :return: None if subject_id unknown
-
weight
¶ Id of the subject :return: None if weight unknown
-
Cells count¶
Connectivity graph¶
Frames count¶
Hubs analysis¶
PSTH analysis¶
Annexe¶

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