-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from elmbeech/master
bugfix pyMCDS_timeseries.py and bugfix and extend test_single.py and test_timeseries.py
- Loading branch information
Showing
3 changed files
with
33 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,23 @@ | ||
# load library | ||
from pyMCDS import pyMCDS | ||
|
||
# load physicell data | ||
mcds1 = pyMCDS('output00000001.xml', 'timeseries_set') | ||
mcds2 = pyMCDS('output00000008.xml', 'timeseries_set') | ||
|
||
# commands to extract basic information | ||
print(mcds1.get_time()) | ||
print(mcds2.get_menv_species_list()) | ||
print(mcds2.get_concentrations('quorum')) | ||
print(mcds1.get_cell_variables()) | ||
print(mcds1.get_substrate_names()) | ||
|
||
# commnds to extract pandas compatible output | ||
print(mcds1.get_cell_df()) | ||
print(mcds1.get_cell_df_at(x=39, y=83, z=0)) | ||
|
||
# commands to extract mesh related output | ||
print(mcds1.get_mesh_spacing()) | ||
print(mcds1.get_mesh()) | ||
print(mcds1.get_2D_mesh()) | ||
print(mcds1.get_linear_voxels()) | ||
print(mcds1.get_containing_voxel_ijk(x=0,y=0,z=0)) | ||
print(mcds1.get_concentrations('quorum')) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,19 @@ | ||
from pyMCDS import * | ||
from pyMCDS_timeseries import * | ||
# load library | ||
from pyMCDS_timeseries import pyMCDS_timeseries | ||
|
||
# load physicell timeseries data | ||
mcds = pyMCDS_timeseries('timeseries_set') | ||
|
||
chem_list = mcds.timeseries[0].get_menv_species_list() | ||
# command to extract basic timeseries information | ||
mcds.get_times() | ||
|
||
# howto extract data form a single timepoint | ||
# check out test_single.py for more details | ||
mcd1 = mcds.timeseries[0] | ||
print(mcd1.get_time()) | ||
print(mcds.timeseries[0].get_time()) | ||
|
||
# plotting commands | ||
chem_list = mcds.timeseries[0].get_substrate_names() | ||
mcds.plot_menv_total(chem_list) | ||
mcds.plot_cell_type_counts() | ||
mcds.plot_cell_type_counts() |