sarcgraph.sg_tools.SarcGraphTools.Visualization

class SarcGraphTools.Visualization(sg_tools)[source]

Provides tools to visualize the results of post-processing analysis on detected sarcomeres.

Methods

F()

Plot recovered deformation gradient.

F_eigenval_animation([no_anim])

Visualize the eigenvalues of F over all frames

J()

Plot recovered deformation jacobian.

OOP()

Plot recovered Orientational Order Parameter.

contraction()

Visualize all detected sarcomeres in every frame according to normalized fraction length and save as a gif file.

dendrogram([dist_func])

Cluster timeseries and plot a dendrogram that shows clusters.

normalized_sarcs_length()

Plot normalized length of all detected sarcomeres vs frame number.

spatial_graph()

Visualizes the spatial graph

timeseries_params()

Visualize time series parameters.

tracked_vs_untracked(file_path[, ...])

Visualize metrics to compare the effect of tracking sarcomeres in a video vs only detecting sarcomeres in each frame without tracking

zdiscs_and_sarcs([frame_num])

Visualize and save the plot of segmented zdiscs and detected sarcomeres in the chosen frame

zdiscs_and_sarcs(frame_num=0)[source]

Visualize and save the plot of segmented zdiscs and detected sarcomeres in the chosen frame

Parameters:

frame_num (int, by default 0) –

contraction()[source]

Visualize all detected sarcomeres in every frame according to normalized fraction length and save as a gif file.

normalized_sarcs_length()[source]

Plot normalized length of all detected sarcomeres vs frame number.

OOP()[source]

Plot recovered Orientational Order Parameter.

F()[source]

Plot recovered deformation gradient.

J()[source]

Plot recovered deformation jacobian.

F_eigenval_animation(no_anim=False)[source]

Visualize the eigenvalues of F over all frames

timeseries_params()[source]

Visualize time series parameters.

dendrogram(dist_func='dtw')[source]

Cluster timeseries and plot a dendrogram that shows clusters.

Parameters:

dist_func (str, optional, by default "dtw") – Choose between “euclidean” or “dtw”

spatial_graph()[source]

Visualizes the spatial graph

tracked_vs_untracked(file_path, start_frame=0, stop_frame=inf)[source]

Visualize metrics to compare the effect of tracking sarcomeres in a video vs only detecting sarcomeres in each frame without tracking

Parameters:
  • file_path (str) – address to the original video file

  • start_frame (int, optional, by default 0) –

  • stop_frame (int, optional, by default np.inf) –