diff_classifier.heatmaps
¶
diff_classifier.heatmaps
¶
-
diff_classifier.heatmaps.
plot_heatmap
(prefix, feature='asymmetry1', vmin=0, vmax=1, resolution=512, rows=4, cols=4, upload=True, dpi=None, figsize=(12, 10), remote_folder='01_18_Experiment', bucket='ccurtis.data')[source]¶ Plot heatmap of trajectories in video with colors corresponding to features.
Parameters: - prefix: string
Prefix of file name to be plotted e.g. features_P1.csv prefix is P1.
- feature: string
Feature to be plotted. See features_analysis.py
- vmin: float64
Lower intensity bound for heatmap.
- vmax: float64
Upper intensity bound for heatmap.
- resolution: int
Resolution of base image. Only needed to calculate bounds of image.
- rows: int
Rows of base images used to build tiled image.
- cols: int
Columns of base images used to build tiled images.
- upload: boolean
True if you want to upload to s3.
- dpi: int
Desired dpi of output image.
- figsize: list
Desired dimensions of output image.
-
diff_classifier.heatmaps.
plot_histogram
(prefix, xlabel='Log Diffusion Coefficient Dist', ylabel='Trajectory Count', fps=100.02, umppx=0.16, frames=651, y_range=100, frame_interval=20, frame_range=100, analysis='log', theta='D', upload=True, remote_folder='01_18_Experiment', bucket='ccurtis.data')[source]¶ Plot heatmap of trajectories in video with colors corresponding to features.
Parameters: - prefix: string
Prefix of file name to be plotted e.g. features_P1.csv prefix is P1.
- xlabel: string
X axis label.
- ylabel: string
Y axis label.
- fps: float64
Frames per second of video.
- umppx: float64
Resolution of video in microns per pixel.
- frames: int
Number of frames in video.
- y_range: float64 or int
Desire y range of graph.
- frame_interval: int
Desired spacing between MSDs/Deffs to be plotted.
- analysis: string
Desired output format. If log, will plot log(MSDs/Deffs)
- theta: string
Desired output. D for diffusion coefficients. Anything else, MSDs.
- upload: boolean
True if you want to upload to s3.
-
diff_classifier.heatmaps.
plot_individual_msds
(prefix, x_range=100, y_range=20, umppx=0.16, fps=100.02, alpha=0.01, folder='.', upload=True, remote_folder='01_18_Experiment', bucket='ccurtis.data', figsize=(10, 10))[source]¶ Plot MSDs of trajectories and the geometric average.
Parameters: - prefix: string
Prefix of file name to be plotted e.g. features_P1.csv prefix is P1.
- x_range: float64 or int
Desire x range of graph.
- y_range: float64 or int
Desire y range of graph.
- fps: float64
Frames per second of video.
- umppx: float64
Resolution of video in microns per pixel.
- alpha: float64
Transparency factor. Between 0 and 1.
- upload: boolean
True if you want to upload to s3.
Returns: - geo_mean: numpy array
Geometric mean of trajectory MSDs at all time points.
- geo_SEM: numpy array
Geometric standard errot of trajectory MSDs at all time points.
-
diff_classifier.heatmaps.
plot_particles_in_frame
(prefix, x_range=600, y_range=2000, upload=True, remote_folder='01_18_Experiment', bucket='ccurtis.data')[source]¶ Plot number of particles per frame as a function of time.
Parameters: - prefix: string
Prefix of file name to be plotted e.g. features_P1.csv prefix is P1.
- x_range: float64 or int
Desire x range of graph.
- y_range: float64 or int
Desire y range of graph.
- upload: boolean
True if you want to upload to s3.
-
diff_classifier.heatmaps.
plot_scatterplot
(prefix, feature='asymmetry1', vmin=0, vmax=1, resolution=512, rows=4, cols=4, dotsize=10, figsize=(12, 10), upload=True, remote_folder='01_18_Experiment', bucket='ccurtis.data')[source]¶ Plot scatterplot of trajectories in video with colors corresponding to features.
Parameters: - prefix: string
Prefix of file name to be plotted e.g. features_P1.csv prefix is P1.
- feature: string
Feature to be plotted. See features_analysis.py
- vmin: float64
Lower intensity bound for heatmap.
- vmax: float64
Upper intensity bound for heatmap.
- resolution: int
Resolution of base image. Only needed to calculate bounds of image.
- rows: int
Rows of base images used to build tiled image.
- cols: int
Columns of base images used to build tiled images.
- upload: boolean
True if you want to upload to s3.
-
diff_classifier.heatmaps.
plot_trajectories
(prefix, resolution=512, rows=4, cols=4, upload=True, remote_folder='01_18_Experiment', bucket='ccurtis.data', figsize=(12, 12))[source]¶ Plot trajectories in video.
Parameters: - prefix: string
Prefix of file name to be plotted e.g. features_P1.csv prefix is P1.
- resolution: int
Resolution of base image. Only needed to calculate bounds of image.
- rows: int
Rows of base images used to build tiled image.
- cols: int
Columns of base images used to build tiled images.
- upload: boolean
True if you want to upload to s3.
-
diff_classifier.heatmaps.
voronoi_finite_polygons_2d
(vor, radius=None)[source]¶ Reconstruct infinite voronoi regions in a 2D diagram to finite regions.
Parameters: - vor : Voronoi
Input diagram
- radius : float, optional
Distance to ‘points at infinity’.
Returns: - regions : list of tuples
Indices of vertices in each revised Voronoi regions.
- vertices : list of tuples
Coordinates for revised Voronoi vertices. Same as coordinates of input vertices, with ‘points at infinity’ appended to the end.