How to let cells die after a certain number of steps
4 weeks ago by
cellDict=CompuCell.getPyAttrib(cell) # attach a dictionary to this cell
cellDict["createdMCS"] = mcs # add a dictionary item for the step the cell was created.
print "CellID=", cell.id," dictionary element createdMCS=",cellDict["createdMCS"]
Elsewhere you have another chunk of python code that determines how old a cell is and kills it if it is too old;
for cell in self.cellList:
if cell.type == "The type of cell that you want to track and kill":
cellDict=CompuCell.getPyAttrib(cell) # get the dictionary for this cell
if (mcs - cellDict["createdMCS"]) > 100 : # kill if the cell is > 100 mcs old
Please login to add an answer/comment or follow this question.