Skip to content

filter concentrations starting with "Lumped" #28

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,4 +77,4 @@ coming soon.

### Geometry import example

[![Open in Colab ](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/14L3WaV42PEu7NvAQdil7i8mEL4WTPF9h?usp=sharing)
[![Open in Colab ](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/14L3WaV42PEu7NvAQdil7i8mEL4WTPF9h?usp=sharing)
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "pyvcell"
version = "0.1.18"
version = "0.1.19"
description = "This is the python wrapper for vcell modeling and simulation"
authors = ["Jim Schaff <[email protected]>"]
repository = "https://github.com/virtualcell/pyvcell"
Expand Down
2 changes: 1 addition & 1 deletion pyvcell/sim_results/plotter.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def plot_concentrations(self) -> None:
ax.plot(t, self.concentrations.T)
ax.set(xlabel="time (s)", ylabel="concentration", title="Concentration over time")

y_labels = [c.label for c in self.channels if c.mean_values is not None]
y_labels = [c.label for c in self.channels if c.mean_values is not None and not c.label.startswith("Lumped")]
ax.legend(y_labels)
ax.grid()
return plt.show()
Expand Down
4 changes: 3 additions & 1 deletion pyvcell/sim_results/result.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,9 @@ def post_processing(self) -> PostProcessing:
@property
def concentrations(self) -> NDArray2D:
data: list[list[float]] = [
c.mean_values for c in self.channel_data if c.index > 0 and c.mean_values is not None
c.mean_values
for c in self.channel_data
if c.index > 0 and c.mean_values is not None and not c.label.startswith("Lumped")
]
return np.array(dtype=np.float64, object=data)

Expand Down
Loading