lab_driver.process_plots
#
Module Contents#
Functions#
Getting the color string |
|
Getting the marker for plotting |
|
Saving figure in given format Args: fig: Matplot which will be saved path: Path for saving the figure name: Name of the plot formats: List with data formats for saving the figures Returns: None |
|
Getting the scaling value and corresponding string notation for unit scaling in plots Args: data: Array or value for calculating the SI scaling value Returns: Tuple with [0] = scaling value and [1] = SI pre-unit |
|
Function for plotting the transfer function |
|
Function for plotting the metric, extracted from the transfer function |
API#
- lab_driver.process_plots.save_figure(fig, path: str, name: str, formats: list = ('pdf', 'svg')) None [source]#
Saving figure in given format Args: fig: Matplot which will be saved path: Path for saving the figure name: Name of the plot formats: List with data formats for saving the figures Returns: None
- lab_driver.process_plots.scale_auto_value(data: numpy.ndarray | float) [float, str] [source]#
Getting the scaling value and corresponding string notation for unit scaling in plots Args: data: Array or value for calculating the SI scaling value Returns: Tuple with [0] = scaling value and [1] = SI pre-unit
- lab_driver.process_plots.plot_transfer_function_norm(data: dict, path2save: str = '', xlabel: str = 'Stimulus Input', ylabel: str = 'Stimulus Output', title: str = 'Transfer Function', file_name: str = '') None [source]#
Function for plotting the transfer function
- Parameters:
data – Dictionary with extracted values from measurement data
path2save – Path for saving the figure
xlabel – Text Label for x-axis
ylabel – Text Label for y-axis
title – Text Label for title
file_name – File name of the saved figure
- Returns:
None
- lab_driver.process_plots.plot_transfer_function_metric(data: dict, func: object, path2save: str = '', xlabel: str = 'Stimulus Input', ylabel: str = 'Stimulus Output', title: str = 'Transfer Function', file_name: str = '') None [source]#
Function for plotting the metric, extracted from the transfer function
- Parameters:
data – Dictionary with pre-processed data from measurement with keys: [‘stim’, ‘ch
’: {‘mean’, ‘std’}} func – Function for calculating the metric
path2save – Path for saving the figure
xlabel – Text Label for x-axis
ylabel – Text Label for y-axis
title – Text Label for title
file_name – File name of the saved figure
- Returns:
None