Closed kainenutt closed 1 year ago
Solution uploaded to Jacob's-Updated-Version branch. Issue will remain open for monitoring purposes.
Note: This issue does not affect the cell placement step, but only the diffusion simulation step (which is how it eluded my attention for so long). Cell centers were also being overwritten with fiber centers. Unless I missed something else, I think the issue is resolved... still keeping the issue open to allow for further commenting.
At the end of the place_cells function in the setup/set_voxel_configuration file, there is a loop over output_arg (iterating over the number of cells). Line of code below:
for i in range(output_arg.shape[0]):
cells.append(objects.cell(cell_center = output_arg[i,0:3], cell_radius=cell_radii[0], cell_diffusivity = water_diffusivity))
sys.stdout.write('\n')
return cells
We tried to change cell_radius=cell_radii[0] to cell_radius=cell_radii[i] -- this throws an index out of array dimension error. We will have to find a way to pass the correct cell radius to this object when cell_radii[0] =/= cell_radii[1]. My first idea would be messy. Perhaps just a simple "if i <= num_cells[0]: ..... cell_radii[0] else: cell_radii[1]"?
I noticed a high-impact error in the way the cell diffusion is simulated. In the objects file, cell radius is hard coded to 1.0 and cell diffusivity is set to 3.0.
Suggested fix in progress: Update objects.py to remove hard-coded radii and diffusivity, replaced with params set in cli.py (cell_radii and water diffusivity). This explains the strange cellularity test results that I have obtained. Update imminent.