Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
calng
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
Model registry
Operate
Environments
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
calibration
calng
Commits
8d3ea1c8
Commit
8d3ea1c8
authored
3 years ago
by
David Hammer
Browse files
Options
Downloads
Patches
Plain Diff
Revert "Enable transposition from weird DAQ axis order on GPU"
This reverts commit
c606771a
.
parent
38f4cd3d
No related branches found
No related tags found
1 merge request
!12
Snapshot: field test deployed version as of end of run 202201
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/calng/JungfrauCorrection.py
+4
-29
4 additions, 29 deletions
src/calng/JungfrauCorrection.py
with
4 additions
and
29 deletions
src/calng/JungfrauCorrection.py
+
4
−
29
View file @
8d3ea1c8
...
@@ -3,7 +3,6 @@ import enum
...
@@ -3,7 +3,6 @@ import enum
import
cupy
import
cupy
import
numpy
as
np
import
numpy
as
np
from
karabo.bound
import
(
from
karabo.bound
import
(
BOOL_ELEMENT
,
DOUBLE_ELEMENT
,
DOUBLE_ELEMENT
,
KARABO_CLASSINFO
,
KARABO_CLASSINFO
,
OUTPUT_CHANNEL
,
OUTPUT_CHANNEL
,
...
@@ -99,14 +98,10 @@ class JungfrauGpuRunner(base_gpu.BaseGpuRunner):
...
@@ -99,14 +98,10 @@ class JungfrauGpuRunner(base_gpu.BaseGpuRunner):
def
_get_gain_map_for_preview
(
self
):
def
_get_gain_map_for_preview
(
self
):
return
self
.
input_gain_map_gpu
return
self
.
input_gain_map_gpu
def
load_data
(
self
,
image_data
,
input_gain_map
,
cell_table
,
daq_transpose
=
False
):
def
load_data
(
self
,
image_data
,
input_gain_map
,
cell_table
):
"""
Experiment: loading all three in one function as they are tied
"""
"""
Experiment: loading all three in one function as they are tied
"""
if
daq_transpose
:
self
.
input_data_gpu
.
set
(
image_data
)
self
.
input_data_gpu
[:]
=
cupy
.
asarray
(
image_data
).
transpose
()[
0
]
self
.
input_gain_map_gpu
.
set
(
input_gain_map
)
self
.
input_gain_map_gpu
[:]
=
cupy
.
asarray
(
input_gain_map
).
transpose
()[
0
]
else
:
self
.
input_data_gpu
.
set
(
image_data
)
self
.
input_gain_map_gpu
.
set
(
input_gain_map
)
if
self
.
burst_mode
:
if
self
.
burst_mode
:
self
.
cell_table_gpu
.
set
(
cell_table
)
self
.
cell_table_gpu
.
set
(
cell_table
)
...
@@ -258,7 +253,6 @@ class JungfrauCorrection(BaseCorrection):
...
@@ -258,7 +253,6 @@ class JungfrauCorrection(BaseCorrection):
_calcat_friend_class
=
JungfrauCalcatFriend
_calcat_friend_class
=
JungfrauCalcatFriend
_constant_enum_class
=
JungfrauConstants
_constant_enum_class
=
JungfrauConstants
_managed_keys
=
BaseCorrection
.
_managed_keys
.
copy
()
_managed_keys
=
BaseCorrection
.
_managed_keys
.
copy
()
_schema_cache_fields
=
BaseCorrection
.
_schema_cache_fields
.
copy
()
_image_data_path
=
"
data.adc
"
_image_data_path
=
"
data.adc
"
_cell_table_path
=
"
data.memoryCell
"
_cell_table_path
=
"
data.memoryCell
"
...
@@ -287,22 +281,6 @@ class JungfrauCorrection(BaseCorrection):
...
@@ -287,22 +281,6 @@ class JungfrauCorrection(BaseCorrection):
.
commit
(),
.
commit
(),
)
)
(
BOOL_ELEMENT
(
expected
)
.
key
(
"
dataFormat.daqTranspose
"
)
.
displayedName
(
"
Transpose axes from DAQ
"
)
.
description
(
"
Data on daqOutput channel has interesting axis order. In online
"
"
deployments, this means that a transpose is needed before correction.
"
)
.
assignmentOptional
()
.
defaultValue
(
True
)
.
reconfigurable
()
.
commit
(),
)
JungfrauCorrection
.
_schema_cache_fields
.
add
(
"
dataFormat.daqTranspose
"
)
JungfrauCorrection
.
_managed_keys
.
add
(
"
dataFormat.daqTranspose
"
)
(
(
OUTPUT_CHANNEL
(
expected
)
OUTPUT_CHANNEL
(
expected
)
.
key
(
"
preview.outputGainMap
"
)
.
key
(
"
preview.outputGainMap
"
)
...
@@ -363,10 +341,7 @@ class JungfrauCorrection(BaseCorrection):
...
@@ -363,10 +341,7 @@ class JungfrauCorrection(BaseCorrection):
cell_table
=
cell_table
[
np
.
newaxis
]
cell_table
=
cell_table
[
np
.
newaxis
]
try
:
try
:
self
.
kernel_runner
.
load_data
(
self
.
kernel_runner
.
load_data
(
image_data
,
image_data
,
data_hash
.
get
(
"
data.gain
"
),
cell_table
data_hash
.
get
(
"
data.gain
"
),
cell_table
,
daq_transpose
=
self
.
_schema_cache
[
"
dataFormat.daqTranspose
"
]
)
)
except
ValueError
as
e
:
except
ValueError
as
e
:
self
.
log_status_warn
(
f
"
Failed to load data:
{
e
}
"
)
self
.
log_status_warn
(
f
"
Failed to load data:
{
e
}
"
)
...
...
This diff is collapsed.
Click to expand it.
David Hammer
@hammerd
mentioned in commit
3566342d
·
2 years ago
mentioned in commit
3566342d
mentioned in commit 3566342d031db1bb435b6430f100afdbaaa6c4bf
Toggle commit list
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