Skip to content

Commit

Permalink
refactor(plots): rename vector field uncertainty plot function
Browse files Browse the repository at this point in the history
Signed-off-by: Cameron Smith <cameron.ray.smith@gmail.com>
  • Loading branch information
cameronraysmith committed Aug 24, 2024
1 parent ee3ae34 commit 8fc0d94
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
14 changes: 8 additions & 6 deletions src/pyrovelocity/plots/_lineage_fate_correlation.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,15 @@

from pyrovelocity.io.compressedpickle import CompressedPickle
from pyrovelocity.logging import configure_logging
from pyrovelocity.plots import (
from pyrovelocity.plots._time import plot_posterior_time
from pyrovelocity.plots._trajectory import (
align_trajectory_diff,
get_clone_trajectory,
)
from pyrovelocity.plots._uncertainty import (
get_posterior_sample_angle_uncertainty,
plot_posterior_time,
plot_vector_field_uncertain,
)
from pyrovelocity.plots._vector_fields import plot_vector_field_uncertainty

__all__ = ["plot_lineage_fate_correlation"]

Expand Down Expand Up @@ -132,7 +134,7 @@ def plot_lineage_fate_correlation(
cell_time_cov = cell_time_std / cell_time_mean
print(cell_time_cov)

plot_vector_field_uncertain(
plot_vector_field_uncertainty(
adata_pyrovelocity,
embed_mean,
cell_time_cov,
Expand All @@ -159,7 +161,7 @@ def plot_lineage_fate_correlation(
cell_magnitudes_cov = cell_magnitudes_std / cell_magnitudes_mean
print(cell_magnitudes_cov)

plot_vector_field_uncertain(
plot_vector_field_uncertainty(
adata_pyrovelocity,
embed_mean,
cell_magnitudes_cov,
Expand All @@ -185,7 +187,7 @@ def plot_lineage_fate_correlation(
pca_angles_std = get_posterior_sample_angle_uncertainty(pca_cell_angles)
print(pca_angles_std)

plot_vector_field_uncertain(
plot_vector_field_uncertainty(
adata_pyrovelocity,
embed_mean,
pca_angles_std,
Expand Down
11 changes: 5 additions & 6 deletions src/pyrovelocity/plots/_vector_fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,12 @@
get_posterior_sample_angle_uncertainty,
)


logger = configure_logging(__name__)


__all__ = [
"plot_vector_field_summary",
"plot_vector_field_uncertain",
"plot_vector_field_uncertainty",
"plot_mean_vector_field",
"plot_arrow_examples",
]
Expand Down Expand Up @@ -131,7 +130,7 @@ def plot_vector_field_summary(
cell_time_std = posterior_time.std(0).flatten()
cell_time_cov = cell_time_std / cell_time_mean

plot_vector_field_uncertain(
plot_vector_field_uncertainty(
adata,
embed_mean,
cell_time_std,
Expand All @@ -153,7 +152,7 @@ def plot_vector_field_summary(
cell_magnitudes_mean = cell_magnitudes.mean(axis=-2)
cell_magnitudes_std = cell_magnitudes.std(axis=-2)
cell_magnitudes_cov = cell_magnitudes_std / cell_magnitudes_mean
plot_vector_field_uncertain(
plot_vector_field_uncertainty(
adata,
embed_mean,
cell_magnitudes_cov,
Expand All @@ -172,7 +171,7 @@ def plot_vector_field_summary(
cmax=None,
)

plot_vector_field_uncertain(
plot_vector_field_uncertainty(
adata,
embed_mean,
pca_angles_std,
Expand Down Expand Up @@ -202,7 +201,7 @@ def plot_vector_field_summary(
return fig


def plot_vector_field_uncertain(
def plot_vector_field_uncertainty(
adata,
embed_mean,
embeds_radian_or_magnitude,
Expand Down

0 comments on commit 8fc0d94

Please sign in to comment.