4.1.1.2.1.1. lib.plotting.artefacts#

Module that provides plotting, pre-layouted figures and import/export of artefacts.

4.1.1.2.1.1.1. Module Contents#

4.1.1.2.1.1.1.1. Classes#

Artefacts

Class to deal with artefacts and save measurements in order to re-evaluate the data later or load an old experiment if needed. Saves parameters, measurement record (results) as json-files and plots as figures in various formats.

Figures

Class that provides some routines to create figures.

CPSegmentation_Figures

Class to generate diagnostic figures for the classical changepoint segmentation

Residual_Figures

Figures to visualize residuals of fit. Until now only wrt to full model (harmonic)

Minflux_Figures

Meta_Analysis_Figures

Figures for meta analysis on all analyzed data, e.g. statistics over batches etc.

Filter_Figures

Figures related to the filtering procedure

NALM_Figures

Class that contains the figures for the NALM analysis

Trace_Figures

Figures for visualization of traces.

4.1.1.2.1.1.1.2. Data#

4.1.1.2.1.1.1.3. API#

lib.plotting.artefacts.script_name = 'basename(...)'#
class lib.plotting.artefacts.Artefacts#

Class to deal with artefacts and save measurements in order to re-evaluate the data later or load an old experiment if needed. Saves parameters, measurement record (results) as json-files and plots as figures in various formats.

Initialization

add_figures(figures, prefixes)#

Add figures one by one to list of figures with prefixes and close them.

save_figures(meta={}, out_dir=None)#

Save all present figures and empty list.

append(obj)#

Method to merge to objects via merging their attributes. attributes have to be lists! :param obj1: first object :param obj2: second object to be appended :return: pass

class lib.plotting.artefacts.Figures#

Class that provides some routines to create figures.

Initialization

save_fig(fig, short_title_str, meta={}, out_path=None, make_pdf=False)#

Method to time-stamp, name and save plots. :param fig: figure object to be saved. :param short_title_str: string used to create label. :param meta: optional dictionary of meta-data :param out_path: string, full path to output destination, without file extension.

_get_std_layout_single(suptitle)#
class lib.plotting.artefacts.CPSegmentation_Figures#

Bases: lib.plotting.artefacts.Figures

Class to generate diagnostic figures for the classical changepoint segmentation

Initialization

fig_diagnostics(segmented_df, filtered_df)#
class lib.plotting.artefacts.Residual_Figures#

Bases: lib.plotting.artefacts.Figures

Figures to visualize residuals of fit. Until now only wrt to full model (harmonic)

Initialization

fig_check_residuals(data_arrays, fit_arrays, res_arrays)#

Create a figure for the residuals. :param max_lines: number of lines to be plotted in each axis.

class lib.plotting.artefacts.Minflux_Figures#

Bases: lib.plotting.artefacts.Figures

fig_visibility(df)#

Method to visualize the analysis of a dataset in terms of kappa related to quality of minimum.

fig_count_histogram(df)#

Method to visualize the analysis of a dataset in terms of kappa related to quality of minimum.

fig_distance_histogram(df)#

Method to visualize the analysis of a dataset in terms of kappa related to quality of minimum.

fig_distance_precision(df)#

Method to visualize the precision of distance estimates.

fig_COM_movement(df)#
fig_tracking(df)#
fig_distance_wrt_time(df)#
fig_pos_brightness(df)#
class lib.plotting.artefacts.Meta_Analysis_Figures#

Bases: lib.plotting.artefacts.Figures

Figures for meta analysis on all analyzed data, e.g. statistics over batches etc.

Initialization

fig_correlations(df)#

Method to plot correlations between several methods.

If no method is provided (default), only method intern correlations are sought for, i.e. between different measured quantities.

fig_correlation_matrix(df, key)#
fig_individual_batch_histograms(df)#

Create a figure for each analyzed batch with distance histogram, scattered points etc. returns a list of figures, one for each analyzed batch.

fig_power_balance(df)#

Method to visualize the analysis of a dataset in terms of kappa related to quality of minimum.

fig_estimated_distances(df)#

Method to visualize the analysis of a dataset in terms of estimated distances vs ground truth.

class lib.plotting.artefacts.Filter_Figures#

Bases: lib.plotting.artefacts.Figures

Figures related to the filtering procedure

Initialization

fig_filter_statistics(reasons)#
class lib.plotting.artefacts.NALM_Figures#

Bases: lib.plotting.artefacts.Figures

Class that contains the figures for the NALM analysis

Initialization

fig_NALM_analysis(result_dict, imarray)#
class lib.plotting.artefacts.Trace_Figures#

Bases: lib.plotting.artefacts.Figures

Figures for visualization of traces.

Initialization

fig_segmented_trace(line_avgs, seg_idcs)#

Display line average and detected bleaching steps

fig_raw_trace(imarray, x_imarray, y_imarray)#

Pcolormesh plot of raw trace , combined and in each axis

plot_segmented_trace(fig, ax, line_avgs, seg_idcs)#
plot_imarray(fig, ax, imarray)#