示例#1
0
xml_file = os.path.join('data', 'PhysiCell_settings.xml')
full_xml_filename = os.path.abspath(xml_file)

tree = ET.parse(
    full_xml_filename)  # this file cannot be overwritten; part of tool distro
xml_root = tree.getroot()

microenv_tab = MicroenvTab()
user_tab = UserTab()

if xml_root.find('.//cell_definitions'):
    cell_types_tab = CellTypesTab()

# svg = SVGTab()
sub = SubstrateTab()
animate_tab = AnimateTab()

nanoHUB_flag = False
if ('HOME' in os.environ.keys()):
    nanoHUB_flag = "home/nanohub" in os.environ['HOME']


# callback when user selects a cached run in the 'Load Config' dropdown widget.
# HOWEVER, beware if/when this is called after a sim finishes and the Load Config dropdown widget reverts to 'DEFAULT'.
# In that case, we don't want to recompute substrate.py self.numx, self.numy because we're still displaying plots from previous sim.
def read_config_cb(_b):
    # with debug_view:
    #     print("read_config_cb", read_config.value)

    sub.first_time = True
示例#2
0
# create the tabs, but don't display yet
about_tab = AboutTab()
config_tab = ConfigTab()

xml_file = os.path.join('data', 'PhysiCell_settings.xml')
full_xml_filename = os.path.abspath(xml_file)

tree = ET.parse(
    full_xml_filename)  # this file cannot be overwritten; part of tool distro
xml_root = tree.getroot()
microenv_tab = MicroenvTab()
user_tab = UserTab()
# svg = SVGTab()
sub = SubstrateTab()
animate_tab = AnimateTab()

nanoHUB_flag = False
if ('HOME' in os.environ.keys()):
    nanoHUB_flag = "home/nanohub" in os.environ['HOME']


# callback when user selects a cached run in the 'Load Config' dropdown widget.
# HOWEVER, beware if/when this is called after a sim finishes and the Load Config dropdown widget reverts to 'DEFAULT'.
# In that case, we don't want to recompute substrate.py self.numx, self.numy because we're still displaying plots from previous sim.
def read_config_cb(_b):
    # with debug_view:
    #     print("read_config_cb", read_config.value)

    sub.first_time = True