Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
School_project
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
encinass1u
School_project
Merge requests
!2
Update README.md
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Update README.md
Student
into
main
Overview
0
Commits
51
Pipelines
0
Changes
1
Merged
encinass1u
requested to merge
Student
into
main
3 years ago
Overview
0
Commits
51
Pipelines
0
Changes
1
Expand
0
0
Merge request reports
Viewing commit
40f1d43b
Prev
Next
Show latest version
1 file
+
55
−
0
Side-by-side
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
40f1d43b
Cell behavior Codes
· 40f1d43b
encinass1u
authored
3 years ago
Cell_behavior_initial_steps/Gts_selection.py
0 → 100644
+
55
−
0
Options
#Gst generator,it is possible to choose a type of texture for the cell couture.
import
numpy
as
np
import
pickle
import
random
import
matplotlib.pyplot
as
ptl
import
copy
from
matplotlib
import
pyplot
as
plt
import
random
from
scipy
import
ndimage
from
bio2mslib.inout.inout
import
WriteData
as
WD
import
os
#Selection of desire treated surface, Gts
First_Pickle
=
True
square_grid
=
False
highs_grid
=
False
diagonal
=
True
if
First_Pickle
==
True
:
#L is the matrix dimension
L
=
12
Lx
=
np
.
linspace
(
0
,
L
,
12
)
Ly
=
np
.
linspace
(
0
,
L
,
12
)
#G is the ground, an empty matrix to add the desire surface
G
=
np
.
zeros
((
L
,
L
))
#Gts us the ground for treated surface
Gts
=
copy
.
deepcopy
(
G
)
if
square_grid
==
True
:
# #Square grid
for
i
in
range
(
1
,
len
(
Lx
)
-
1
):
for
j
in
range
(
1
,
len
(
Ly
)
-
1
):
if
((
i
%
2
)
!=
0
)
or
((
j
%
2
)
==
0
):
Gts
[
i
,
j
]
=
0.5
elif
highs_grid
==
True
:
for
i
in
range
(
1
,
len
(
Lx
)
-
1
):
for
j
in
range
(
1
,
len
(
Ly
)
-
1
):
if
i
==
0
or
j
==
0
or
i
==
len
(
Lx
)
-
1
or
j
==
len
(
Ly
)
-
1
:
Gst
[
i
,
j
]
=
0.5
elif
i
==
1
or
j
==
1
or
i
==
len
(
Lx
)
-
2
or
j
==
len
(
Ly
)
-
2
:
Gts
[
i
,
j
]
=
0.7
elif
diagonal
==
True
:
for
i
in
range
(
1
,
len
(
Lx
)
-
1
):
for
j
in
range
(
1
,
len
(
Ly
)
-
1
):
if
(
i
==
j
):
Gts
[
i
,
j
]
=
0.5
else
:
with
open
(
'
G_surface_empty.pkl
'
,
'
rb
'
)
as
csv_file
:
Gts
=
pickle
.
load
(
csv_file
)
with
open
(
'
G_surface_empty.pkl
'
,
'
wb
'
)
as
csv_file
:
pickle
.
dump
(
Gts
,
csv_file
)
im
=
plt
.
imshow
(
Gts
,
cmap
=
"
copper_r
"
)
plt
.
show
()
Loading