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
b934c9bc
Prev
Next
Show latest version
1 file
+
42
−
0
Side-by-side
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
b934c9bc
Upload New File
· b934c9bc
encinass1u
authored
3 years ago
Gaus_surface.py
0 → 100644
+
42
−
0
Options
#Code to arrange coordinates and values to create the surface for a posterior cell seeding.
import
numpy
as
np
from
Plotting_by_distance
import
data_t
,
L
import
pickle
#Initial matrix filled with 0 with the dimensions of Surface
E
=
np
.
zeros
((
414
,
545
))
#Choose False if its the first time running the code
Existing_surface
=
False
#Open the already existing surface
if
Existing_surface
==
True
:
with
open
(
'
Gts_Surface_T.cvs
'
,
'
rb
'
)
as
csv_file
:
Gts
=
pickle
.
load
(
csv_file
)
else
:
Gts
=
E
#List with the discrete values for each coordinate in the plane
coord_value
=
(
data_t
[:,
2
])
#Iteration start
iter
=
1
#Second iteration
fois
=
1
#Loop to add by row the values of each coordinate
while
fois
<
411
:
fois
+=
1
#Definition of ranges for the values of 0 and 1 of the coordinates
min
=
545
*
fois
max
=
545
*
(
fois
+
1
)
#Part of the coordinate value list that will be introduced in the corresponding row
W
=
coord_value
[
min
:
max
]
#r is the row number
r
=
413
-
fois
for
i
in
range
(
r
-
1
,
r
):
for
j
in
range
(
545
):
#Adding the values of the list to each coordinate
Gts
[
i
,
j
]
=
W
[
j
]
#pickle the information entered in the matrix
with
open
(
'
Gts_Surface_T.cvs
'
,
'
wb
'
)
as
cvs_file
:
pickle
.
dump
(
Gts
,
cvs_file
)
Loading