INNER CODE UNIT · Python
plot_substrate
MathCancer/PhysiCell · beta/anim_substrate2D.py:108
def plot_substrate():
global current_idx, axes_max, cbar
xml_file = "output%08d.xml" % current_idx
tree = ET.parse(xml_file)
root = tree.getroot()
# print('time=' + root.find(".//current_time").text)
mins = float(root.find(".//current_time").text)
hrs = mins/60.
days = hrs/24.
title_str = '%d days, %d hrs, %d mins' % (int(days),(hrs%24), mins - (hrs*60))
print(title_str)
fname = "output%08d_microenvironment0.mat" % current_idx
output_dir_str = '.'
fullname = output_dir_str + "/" + fname
if not pathlib.Path(fullname).is_file():
print("file not found",fullname)