Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
experiment-control
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
whuie2
experiment-control
Commits
f3d608e0
Commit
f3d608e0
authored
3 years ago
by
camera computer
Browse files
Options
Downloads
Patches
Plain Diff
adjustment to usage of ImageLabel
parent
81127967
No related branches found
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
lib/imaging.py
+13
-3
13 additions, 3 deletions
lib/imaging.py
with
13 additions
and
3 deletions
lib/imaging.py
+
13
−
3
View file @
f3d608e0
...
...
@@ -314,7 +314,12 @@ class FluorescenceScanData(ImagingData):
for
label
,
array
in
self
.
arrays
.
items
():
m
=
label_pat
.
match
(
label
.
label
if
isinstance
(
label
,
ImageLabel
)
else
label
)
if
m
is
not
None
:
array_reps
[
ImageLabel
(
m
.
group
(
1
),
label
.
savedir
)].
append
(
array
)
array_reps
[
ImageLabel
(
m
.
group
(
1
),
label
.
savedir
if
isinstance
(
label
,
ImageLabel
)
else
None
)
].
append
(
array
)
else
:
print
(
f
"
[imaging] skip averaging for improperly formatted label
'
{
label
}
'"
)
averaged_arrays
=
{
...
...
@@ -444,7 +449,12 @@ class DailyMeasurementData(ImagingData):
for
label
,
array
in
self
.
arrays
.
items
():
m
=
label_pat
.
match
(
label
.
label
if
isinstance
(
label
,
ImageLabel
)
else
label
)
if
m
is
not
None
:
array_reps
[
ImageLabel
(
m
.
group
(
1
),
label
.
savedir
)].
append
(
array
)
array_reps
[
ImageLabel
(
m
.
group
(
1
),
label
.
savedir
if
isinstance
(
label
,
ImageLabel
)
else
None
)
].
append
(
array
)
else
:
print
(
f
"
[imaging] skip averaging for improperly formatted label
'
{
label
}
'"
)
averaged_arrays
=
{
...
...
@@ -596,11 +606,11 @@ class DailyMeasurementData(ImagingData):
s
.
append
(
np
.
sqrt
(
(
float
(
data
[
"
sx
"
])
**
2
+
float
(
data
[
"
sy
"
])
**
2
)
/
2
)
)
N
.
append
(
float
(
data
[
"
N
"
]))
elif
m_pre
is
not
None
:
s0
.
append
(
np
.
sqrt
(
(
float
(
data
[
"
sx
"
])
**
2
+
float
(
data
[
"
sy
"
])
**
2
)
/
2
)
)
N
.
append
(
float
(
data
[
"
N
"
]))
else
:
print
(
f
"
[imaging] skip TOF free-space resonance processing for
"
f
"
improperly formatted label
'
{
label
}
'"
)
...
...
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