Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/development' into physipkpd-tab
Browse files Browse the repository at this point in the history
  • Loading branch information
drbergman committed Jan 4, 2024
2 parents 092a305 + ccc3c21 commit 0239574
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
11 changes: 7 additions & 4 deletions bin/vis_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ def __init__(self, studio_flag, rules_flag, nanohub_flag, config_tab, microenv_t
self.discrete_cell_scalars = ['cell_type', 'cycle_model', 'current_phase','is_motile','current_death_model','dead']

self.circle_radius = 100 # will be set in run_tab.py using the .xml
self.mech_voxel_size = 30
self.mech_voxel_size = 30 # TODO? modify based on voxel size?

self.nanohub_flag = nanohub_flag
self.config_tab = config_tab
Expand Down Expand Up @@ -1714,17 +1714,20 @@ def update_output_dir(self, dir_path):


def reset_domain_box(self):
print("\n------ vis_base: reset_domain_box()")
# print("\n------ vis_base: reset_domain_box()")
self.lut_discrete = None

self.xmin = float(self.config_tab.xmin.text())
self.xmax = float(self.config_tab.xmax.text())
self.xdel = float(self.config_tab.xdel.text())

self.ymin = float(self.config_tab.ymin.text())
self.ymax = float(self.config_tab.ymax.text())
self.ydel = float(self.config_tab.ydel.text())

self.zmin = float(self.config_tab.zmin.text())
self.zmax = float(self.config_tab.zmax.text())
self.zdel = float(self.config_tab.zdel.text())

if self.model3D_flag:
# self.domain_diagonal = vtkLineSource()
Expand All @@ -1746,7 +1749,7 @@ def reset_plot_range(self):
self.plot_xmax = float(self.xmax)
self.plot_ymin = float(self.ymin)
self.plot_ymax = float(self.ymax)
print("--------vis_base() reset_plot_range(): plot_ymin,ymax= ",self.plot_ymin,self.plot_ymax)
# print("--------vis_base() reset_plot_range(): plot_ymin,ymax= ",self.plot_ymin,self.plot_ymax)
except:
pass

Expand Down Expand Up @@ -1955,7 +1958,7 @@ def open_directory_cb(self):


def reset_model(self):
print("--------- vis_base: reset_model ----------")
# print("--------- vis_base: reset_model ----------")
self.cell_scalars_filled = False

# Verify initial.xml and at least one .svg file exist. Obtain bounds from initial.xml
Expand Down
7 changes: 1 addition & 6 deletions bin/vis_tab.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,14 +129,8 @@ def __init__(self, studio_flag, rules_flag, nanohub_flag, config_tab, microenv_t
self.physiboss_node_dict = {}

self.reset_model_flag = True
self.xmin = -80
self.xmax = 80
self.xdel = 20
self.x_range = self.xmax - self.xmin

self.ymin = -50
self.ymax = 100
self.ydel = 20
self.y_range = self.ymax - self.ymin

self.aspect_ratio = 0.7
Expand Down Expand Up @@ -365,6 +359,7 @@ def plot_voxel_grid(self):
# ymin = self.ymin + yoffset

xs = np.arange(self.xmin,self.xmax+1,self.xdel) # DON'T try to use np.linspace!
# print("xmin,max,del=",self.xmin,self.xmax,self.xdel)
# print("xs= ",xs)
ys = np.arange(self.ymin,self.ymax+1,self.ydel)
# print("ys= ",ys)
Expand Down

0 comments on commit 0239574

Please sign in to comment.