diff --git a/Cell_behavior_initial_steps/single_cell_prolif_migr.py b/Cell_behavior_initial_steps/single_cell_prolif_migr.py index 5266d2e28a55e828d3464cd2b4815b2c705ea682..973957851d3fc4f662f215f9fdd583804e1e3cc7 100644 --- a/Cell_behavior_initial_steps/single_cell_prolif_migr.py +++ b/Cell_behavior_initial_steps/single_cell_prolif_migr.py @@ -8,7 +8,7 @@ import random from scipy import ndimage from bio2mslib.inout.inout import WriteData as WD import os -from Gts_selection import L, Lx, Ly +from Gts_selection import L from bio2mslib.analysis.models import CellModels as DM from matplotlib.pyplot import figure @@ -21,18 +21,20 @@ if os.path.isdir(path_simulation) == False : os.mkdir(path_simulation) #Reopening choosen surface -with open('Gts_Sample_100.cvs', 'rb') as csv_file: +with open('Gts_Sample.cvs', 'rb') as csv_file: Gts = pickle.load(csv_file) -# #Visual preentation in image of the matrix -# im1 = plt.imshow(Gts, cmap="bone") -# plt.show() #Gs is ground seeded, a copy of the choosen surface to seed the cells, Gs = copy.deepcopy(Gts) #uni_cell is the seeding of a single cell inside the treated surface. -uni_cell = Gs[(86,8)] -Gs[(86,8)] = 1 +uni_cell = Gs[(8,8)] +Gs[(8,8)] = 1.5 +plt.title("Gts, Inital seeding", + size=20) +#images of the cell in the surface +couture= plt.imshow(Gs, cmap="bone") +plt.show() #Variable deffinition for PDE proliferation & migration model Cd = 1*10**-5 #Cell density @@ -48,20 +50,21 @@ time_lapse = 0.1 Gscopy = copy.deepcopy(Gs) Laplace = ndimage.laplace(Gs) #Migration -iter = 0 -while iter<= 15: - for mi in range(1, len(Lx)-1): - for mj in range(1, len(Ly)-1): +iter = 1 +while iter<= 5: + for mi in range(1, L-1): + for mj in range(1, L-1): x = random.randint(-1,1)#horizontal value for the movement of the cell y = random.randint(-1,1)#vertival value for the movement of the cell - if Gs[mi,mj]==1 and (x != 0 or y!= 0) and ((mi+x)<len(Lx)) and ((mj+y)< len(Ly)): - Gs[mi+x,mj+y]= 1 - Gs[mi,mj]=0 + if Gs[mi,mj]==1.5 and (x != 0 or y!= 0) and ((mi+x)<L) and ((mj+y)< L): + Gs[mi+x,mj+y]= 1.5 + Gs[mi,mj]+=0 #Proliferation after migration Gs[mi,mj] = Gscopy[mi,mj] + dt*Dm*Laplace[mi,mj]*(1-(Gscopy[mi,mj]/Cdmax))+CRgrw*1*Gscopy[mi,mj]*(1-(Gscopy[mi,mj]/Cdmax)) - if Gs[mi,mj]>0 and Gs[mi,mj]!=0.7 and Gs[mi,mj]!=0.5 : - Gs[mi,mj]=1 - zoom = True + if Gs[mi,mj]>0 and Gs[mi,mj]!=1 : + Gs[mi,mj]=1.5 + plt.title('Cell migration & proliferation '+str(iter), + size=20) im2 = plt.imshow(Gs, cmap="bone", norm = None) plt.show() name = 'Single_cell_SMAT_sample'+str(iter)+'.png'