Skip to content

Commit

Permalink
Merge pull request #100 from PhysiCell-Tools/development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
rheiland authored Jun 18, 2023
2 parents 0de1bf8 + a55e365 commit 9bf10d0
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 21 deletions.
2 changes: 1 addition & 1 deletion VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.26.3
2.26.4
39 changes: 24 additions & 15 deletions bin/ics_tab.py
Original file line number Diff line number Diff line change
Expand Up @@ -935,15 +935,19 @@ def hex_pts_box(self):
for xval in np.arange(x_min,x_max, x_spacing):
# xval_offset = xval + (y_idx%2) * self.cell_radius
xval_offset = self.x0_value + xval + (y_idx%2) * self.cell_radius

xlist.append(xval_offset)
yval_offset = yval + self.y0_value
ylist.append(yval_offset)
# self.csv_array = np.append(self.csv_array,[[xval,yval,zval, cell_type_index]],axis=0)
self.csv_array = np.append(self.csv_array,[[xval_offset,yval_offset, zval, cell_type_index]],axis=0)
rlist.append(rval)
self.cell_radii.append(self.cell_radius)
count+=1

if xval_offset < self.plot_xmin or xval_offset > self.plot_xmax \
or yval_offset < self.plot_ymin or yval_offset > self.plot_ymax:
continue
else:
xlist.append(xval_offset)
ylist.append(yval_offset)
# self.csv_array = np.append(self.csv_array,[[xval,yval,zval, cell_type_index]],axis=0)
self.csv_array = np.append(self.csv_array,[[xval_offset,yval_offset, zval, cell_type_index]],axis=0)
rlist.append(rval)
self.cell_radii.append(self.cell_radius)
count+=1
else: # 3D

# for z in np.arange(z_min, z_max, z_spacing):
Expand Down Expand Up @@ -1072,14 +1076,19 @@ def hex_pts_annulus(self):
# # plt.plot(xval_offset,yval,'ro',markersize=30)

xval_offset += self.x0_value
xlist.append(xval_offset)
yval_offset = yval + self.y0_value
ylist.append(yval_offset)
# self.csv_array = np.append(self.csv_array,[[xval_offset,yval,zval, cell_type_index]],axis=0)
self.csv_array = np.append(self.csv_array,[[xval_offset,yval_offset,zval, cell_type_index]],axis=0)
rlist.append(rval)
self.cell_radii.append(self.cell_radius)
count+=1

if xval_offset < self.plot_xmin or xval_offset > self.plot_xmax \
or yval_offset < self.plot_ymin or yval_offset > self.plot_ymax:
continue
else:
xlist.append(xval_offset)
ylist.append(yval_offset)
# self.csv_array = np.append(self.csv_array,[[xval_offset,yval,zval, cell_type_index]],axis=0)
self.csv_array = np.append(self.csv_array,[[xval_offset,yval_offset,zval, cell_type_index]],axis=0)
rlist.append(rval)
self.cell_radii.append(self.cell_radius)
count+=1

self.numcells_l.append(count)

Expand Down
4 changes: 2 additions & 2 deletions bin/populate_tree_cell_defs.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ def validate_cell_defs(cell_defs_elm, skip_validate):
if skip_validate:
logging.debug(f'Continuing in spite of these missing elements.')
else:
# logging.debug(f'\n A configuration file (.xml) for the PMB needs to explicitly \nprovide all required parameters for each <cell_definition>.\nIt cannot use the legacy hierarchical format where only\n partial parameters are provided and the rest are inherited from a parent.")
# logging.debug(f'\n A configuration file (.xml) for the Studio needs to explicitly \nprovide all required parameters for each <cell_definition>.\nIt cannot use the legacy hierarchical format where only\n partial parameters are provided and the rest are inherited from a parent.")
warn_user = """
A configuration file (.xml) for the PMB needs to explicitly
A configuration file (.xml) for the Studio needs to explicitly
provide all required parameters for each <cell_definition>.
It cannot use the legacy hierarchical format where only
partial parameters are provided and the rest are inherited from a parent.
Expand Down
11 changes: 8 additions & 3 deletions bin/rules_tab.py
Original file line number Diff line number Diff line change
Expand Up @@ -1972,11 +1972,16 @@ def fill_gui(self):
# print(f'{full_rules_fname} is not a valid file')
# logging.error(f'{full_rules_fname} is not a valid file')

# if no rules are defined in the .xml, set default folder, file and enable them in the tab
else: # should empty the Rules tab
# self.rules_text.setPlainText("")
self.rules_folder.setText("")
self.rules_file.setText("")
self.rules_enabled.setChecked(False)
# self.rules_folder.setText("")
# self.rules_file.setText("")
# self.rules_enabled.setChecked(False)
self.rules_folder.setText("config")
self.rules_file.setText("rules.csv")
self.rules_enabled.setChecked(True)

# self.rules_table.clear() # NO, this is not the droid you're looking for
self.clear_rules()
return
Expand Down

0 comments on commit 9bf10d0

Please sign in to comment.