denspp.offline.pipeline.pipeline_cmds#

Module Contents#

Classes#

PipelineLibrary

Class for searching all Pipeline Processors in repository to get an overview

DataloaderLibrary

Class for searching all Pipeline Processors in repository to get an overview

PipelineCMD

Class for handling the pipeline processing

ThreadProcessor

SettingsThread

Class for handling the processor Attribute: use_multithreading: Boolean for enabling multithreading on data processing pipeline num_max_workers: Integer with total number of workers used in multithreading do_block_plots: Boolean for generating and blocking plots

ProcessingData

Data#

API#

class denspp.offline.pipeline.pipeline_cmds.PipelineLibrary[source]#

Class for searching all Pipeline Processors in repository to get an overview

get_registry(package: str = 'src_pipe') denspp.offline.dnn.model_library.ModuleRegistryManager[source]#
class denspp.offline.pipeline.pipeline_cmds.DataloaderLibrary[source]#

Class for searching all Pipeline Processors in repository to get an overview

get_registry(package: str = 'src_pipe') denspp.offline.dnn.model_library.ModuleRegistryManager[source]#
class denspp.offline.pipeline.pipeline_cmds.PipelineCMD[source]#

Class for handling the pipeline processing

path2save: str = <Multiline-String>#
get_pipeline_name() str[source]#

Getting the name of the pipeline

generate_run_folder(path2runs: str, addon: str) None[source]#

Generating the default folder for saving figures and data

Parameters:
  • path2runs – Main folder in which the figures and data is stored

  • addon – Name of new folder for saving results

Returns:

None

apply_mapping(data: numpy.ndarray, electrode_id: list, mapping: numpy.ndarray) numpy.ndarray[source]#

Transforming the input data to 2D array using electrode mapping configuration

Parameters:
  • data – Input data with shape (num_channels, num_samples)

  • electrode_id – List with name/numbers of electrodes used on data

  • mapping – Numpy array with electrode ID localisation

Returns:

Numpy array with transformed data to 2D

deploy_mapping(data: numpy.ndarray, electrode_id: list, mapping: numpy.ndarray) numpy.ndarray[source]#

Transforming the 2D data to normal electrode orientation using electrode mapping configuration

Parameters:
  • data – Input data with shape (num_rows, num_cols, num_samples)

  • electrode_id – List with name/numbers of electrodes used on data

  • mapping – Numpy array with electrode ID localisation

Returns:

Numpy array with original data format

save_results(name: str, data: dict) None[source]#

Saving the data with a dictionary

Parameters:
  • name – File name for saving results

  • data – Dictionary with data content

Returns:

None

class denspp.offline.pipeline.pipeline_cmds.ThreadProcessor(rawdata: numpy.ndarray, fs_ana: float, pipeline)[source]#

Bases: threading.Thread

output_save: dict#

None

run() None[source]#

Do data processing

class denspp.offline.pipeline.pipeline_cmds.SettingsThread[source]#

Class for handling the processor Attribute: use_multithreading: Boolean for enabling multithreading on data processing pipeline num_max_workers: Integer with total number of workers used in multithreading do_block_plots: Boolean for generating and blocking plots

use_multithreading: bool#

None

num_max_workers: int#

None

do_block_plots: bool#

None

denspp.offline.pipeline.pipeline_cmds.RecommendedSettingsThread#

‘SettingsThread(…)’

class denspp.offline.pipeline.pipeline_cmds.ProcessingData(pipeline, settings: denspp.offline.pipeline.pipeline_cmds.SettingsThread, data_in: numpy.ndarray, channel_id: numpy.ndarray, fs: float)[source]#

Initialization

Thread processor for analyzing data Args: pipeline: Used pipeline for signal processing settings: Settings for handling the threads data_in: Numpy array of input data for signal processing channel_id: Corresponding ID of used electrode / channel fs: Sampling rate of data Returns: None

do_save_results() None[source]#

Saving results in desired numpy format

do_plot_results() None[source]#

Plotting the results of all signal processors

do_processing() None[source]#

Performing the data processing