Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
Bacteria Drug UV analysis
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
DISCO Beamline
Bacteria Drug UV analysis
Commits
a2a1fcd0
Commit
a2a1fcd0
authored
Dec 9, 2020
by
hugo chauvet
Browse files
Options
Downloads
Patches
Plain Diff
improve visualisation of data for fixed time experiments
parent
913c1e00
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/bactos_viewver.py
+29
-11
29 additions, 11 deletions
src/bactos_viewver.py
with
29 additions
and
11 deletions
src/bactos_viewver.py
+
29
−
11
View file @
a2a1fcd0
...
...
@@ -1225,15 +1225,17 @@ class BactosViewver():
Fonction pour tracer les profils de fluo
"""
ax1
,
ax2
,
ax3
,
ax4
,
ax5
,
ax6
=
self
.
figure
.
get_axes
()
for
ax
in
(
ax3
,
ax4
,
ax5
,
ax6
):
ax
.
clear
()
# Est qu'on est en temps ou en positions
if
max
(
self
.
times
)
==
0
:
istime
=
False
else
:
istime
=
True
# Get axis from figure object
ax1
,
ax2
,
ax3
,
ax4
,
ax5
,
ax6
=
self
.
figure
.
get_axes
()
for
ax
in
(
ax3
,
ax4
,
ax5
,
ax6
):
ax
.
clear
()
# Check si on a au moins une bacterie de selectionnée
if
sum
(
self
.
selected_bactos
):
if
istime
:
...
...
@@ -1242,7 +1244,9 @@ class BactosViewver():
ax3
.
set_xlabel
(
'
Temps
'
)
else
:
[
ax3
.
plot
(
0
,
self
.
i1
[
0
,
i
],
'
o
'
,
color
=
self
.
bactos_colors
[
i
])
for
i
,
val
in
enumerate
(
self
.
selected_bactos
)
if
val
]
#[ax3.plot(0, self.i1[0, i], 'o', color=self.bactos_colors[i]) for i, val in enumerate(self.selected_bactos) if val]
ax3
.
scatter
([
0
]
*
len
(
self
.
i1
[
0
,
self
.
selected_bactos
]),
self
.
i1
[
0
,
self
.
selected_bactos
],
c
=
self
.
bactos_colors
[
self
.
selected_bactos
])
ax3
.
plot
(
self
.
i1
[
0
,
self
.
selected_bactos
].
mean
(),
'
ko
'
,
ms
=
12
)
ax3
.
set_xlabel
(
'
mean in black
'
)
...
...
@@ -1253,12 +1257,22 @@ class BactosViewver():
ax4
.
plot
(
self
.
i2
[:,
self
.
selected_bactos
].
mean
(
1
),
'
k--
'
,
lw
=
2
)
ax4
.
set_xlabel
(
'
Temps
'
)
else
:
[
ax4
.
plot
(
0
,
self
.
i2
[
0
,
i
],
'
o
'
,
color
=
self
.
bactos_colors
[
i
])
for
i
,
val
in
enumerate
(
self
.
selected_bactos
)
if
val
]
#[ax4.plot(0, self.i2[0, i], 'o', color=self.bactos_colors[i]) for i, val in enumerate(self.selected_bactos) if val]
ax4
.
scatter
([
0
]
*
len
(
self
.
i2
[
0
,
self
.
selected_bactos
]),
self
.
i2
[
0
,
self
.
selected_bactos
],
c
=
self
.
bactos_colors
[
self
.
selected_bactos
])
ax4
.
plot
(
self
.
i2
[
0
,
self
.
selected_bactos
].
mean
(),
'
ko
'
,
lw
=
2
,
ms
=
12
)
ax4
.
set_xlabel
(
'
mean in black
'
)
ax4
.
set_ylabel
(
'
F1 fluo (TRP)
'
)
#Min-max for static as min(min(F1),min(F2)) and max(max(F1), max(F2))
if
not
istime
:
minF1F2
=
np
.
min
((
self
.
i1
[
0
,
self
.
selected_bactos
].
min
(),
self
.
i2
[
0
,
self
.
selected_bactos
].
min
()))
-
20
maxF1F2
=
np
.
max
((
self
.
i1
[
0
,
self
.
selected_bactos
].
max
(),
self
.
i2
[
0
,
self
.
selected_bactos
].
max
()))
+
20
ax3
.
set_ylim
(
minF1F2
,
maxF1F2
)
ax4
.
set_ylim
(
minF1F2
,
maxF1F2
)
# Plot du ratio du controle
ratio_ctrl
=
compute_control_ratio
(
self
.
selected_file
,
self
.
ListCtrl
.
value
)
# print("control ratio shape:")
...
...
@@ -1269,7 +1283,7 @@ class BactosViewver():
ax5
.
plot
(
ratio_ctrl
.
mean
(
1
),
'
k--
'
,
lw
=
2
)
ax5
.
set_xlabel
(
'
Temps
'
)
else
:
ax5
.
plot
([
0
]
*
ratio_ctrl
.
shape
[
1
],
ratio_ctrl
[
0
],
'
o
'
)
ax5
.
plot
([
0
]
*
ratio_ctrl
.
shape
[
1
],
ratio_ctrl
[
0
],
'
o
'
,
alpha
=
0.1
,
mec
=
'
None
'
)
ax5
.
plot
(
0
,
ratio_ctrl
.
mean
(),
'
ko
'
,
ms
=
12
)
ax5
.
set_xlabel
(
'
mean in black
'
)
...
...
@@ -1289,7 +1303,9 @@ class BactosViewver():
[
ax6
.
plot
(
Idrug
[:,
i
],
color
=
self
.
bactos_colors
[
i
])
for
i
,
val
in
enumerate
(
self
.
selected_bactos
)
if
val
]
ax6
.
set_xlabel
(
'
Temps
'
)
else
:
[
ax6
.
plot
(
0
,
Idrug
[
0
,
i
],
'
o
'
,
color
=
self
.
bactos_colors
[
i
])
for
i
,
val
in
enumerate
(
self
.
selected_bactos
)
if
val
]
#[ax6.plot(0, Idrug[0, i], 'o', color=self.bactos_colors[i]) for i, val in enumerate(self.selected_bactos) if val]
ax6
.
scatter
([
0
]
*
len
(
Idrug
[
0
,
self
.
selected_bactos
]),
Idrug
[
0
,
self
.
selected_bactos
],
c
=
self
.
bactos_colors
[
self
.
selected_bactos
])
ax6
.
set_xlabel
(
''
)
ax6
.
set_ylabel
(
'
F2-mean(F2ctrl/F1ctrl)*F1
'
)
...
...
@@ -1315,9 +1331,11 @@ class BactosViewver():
ax6
.
plot
(
ratio
[:,
self
.
selected_bactos
].
mean
(
1
),
'
k--
'
,
lw
=
2
)
ax6
.
set_xlabel
(
'
Temps
'
)
else
:
[
ax6
.
plot
(
0
,
ratio
[
0
,
i
],
'
o
'
,
color
=
self
.
bactos_colors
[
i
])
for
i
,
val
in
enumerate
(
self
.
selected_bactos
)
if
val
]
#[ax6.plot(0, ratio[0, i], 'o', color=self.bactos_colors[i]) for i, val in enumerate(self.selected_bactos) if val]
ax6
.
scatter
([
0
]
*
len
(
ratio
[
0
,
self
.
selected_bactos
]),
ratio
[
0
,
self
.
selected_bactos
],
c
=
self
.
bactos_colors
[
self
.
selected_bactos
])
ax6
.
plot
(
ratio
[
0
,
self
.
selected_bactos
].
mean
(),
'
ko
'
,
ms
=
12
)
ax6
.
set_xlabel
(
'
mean i
s
black
'
)
ax6
.
set_xlabel
(
'
mean i
n
black
'
)
ax6
.
set_ylabel
(
'
F2/F1
'
)
ax6
.
set_title
(
'
for position POS%i
'
%
self
.
selected_pos
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment