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
cf20dc74
Commit
cf20dc74
authored
3 years ago
by
David Hammer
Browse files
Options
Downloads
Patches
Plain Diff
Make _update_frame_filter by default call _update_buffers itself
parent
67e1ba2d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!12
Snapshot: field test deployed version as of end of run 202201
,
!3
Base correction device, CalCat interaction, DSSC and AGIPD devices
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/calng/base_correction.py
+5
-4
5 additions, 4 deletions
src/calng/base_correction.py
with
5 additions
and
4 deletions
src/calng/base_correction.py
+
5
−
4
View file @
cf20dc74
...
@@ -639,7 +639,6 @@ class BaseCorrection(PythonDevice):
...
@@ -639,7 +639,6 @@ class BaseCorrection(PythonDevice):
self
,
pathlib
.
Path
.
cwd
()
/
"
calibration-client-secrets.json
"
self
,
pathlib
.
Path
.
cwd
()
/
"
calibration-client-secrets.json
"
)
)
self
.
_update_frame_filter
()
self
.
_update_frame_filter
()
self
.
_update_buffers
()
self
.
_buffered_status_update
=
Hash
(
self
.
_buffered_status_update
=
Hash
(
"
trainId
"
,
"
trainId
"
,
...
@@ -825,9 +824,9 @@ class BaseCorrection(PythonDevice):
...
@@ -825,9 +824,9 @@ class BaseCorrection(PythonDevice):
self
.
log
.
DEBUG
(
f
"
Corrections for dataOutput:
{
str
(
enabled
)
}
"
)
self
.
log
.
DEBUG
(
f
"
Corrections for dataOutput:
{
str
(
enabled
)
}
"
)
self
.
log
.
DEBUG
(
f
"
Corrections for preview:
{
str
(
preview
)
}
"
)
self
.
log
.
DEBUG
(
f
"
Corrections for preview:
{
str
(
preview
)
}
"
)
def
_update_frame_filter
(
self
):
def
_update_frame_filter
(
self
,
update_buffers
=
True
):
"""
Parse frameFilter string (if set) and update cached filter array. May update
"""
Parse frameFilter string (if set) and update cached filter array. May update
dataFormat.filteredFrames
, so one will typically want to
call _update_buffers
dataFormat.filteredFrames
- will therefore by default
call _update_buffers
afterwards.
"""
afterwards.
"""
# TODO: add some validation to preReconfigure
# TODO: add some validation to preReconfigure
self
.
log
.
DEBUG
(
"
Updating frame filter
"
)
self
.
log
.
DEBUG
(
"
Updating frame filter
"
)
...
@@ -871,6 +870,9 @@ class BaseCorrection(PythonDevice):
...
@@ -871,6 +870,9 @@ class BaseCorrection(PythonDevice):
):
):
self
.
log_status_warn
(
"
Invalid frame filter set, expect exceptions!
"
)
self
.
log_status_warn
(
"
Invalid frame filter set, expect exceptions!
"
)
if
update_buffers
:
self
.
_update_buffers
()
def
_update_buffers
(
self
):
def
_update_buffers
(
self
):
"""
(Re)initialize buffers / kernel runner according to expected data shapes
"""
"""
(Re)initialize buffers / kernel runner according to expected data shapes
"""
self
.
log
.
INFO
(
"
Updating buffers according to data shapes
"
)
self
.
log
.
INFO
(
"
Updating buffers according to data shapes
"
)
...
@@ -973,7 +975,6 @@ class BaseCorrection(PythonDevice):
...
@@ -973,7 +975,6 @@ class BaseCorrection(PythonDevice):
self
.
set
(
"
dataFormat.memoryCells
"
,
image_data
.
shape
[
0
])
self
.
set
(
"
dataFormat.memoryCells
"
,
image_data
.
shape
[
0
])
with
self
.
_buffer_lock
:
with
self
.
_buffer_lock
:
self
.
_update_frame_filter
()
self
.
_update_frame_filter
()
self
.
_update_buffers
()
# DataAggregator typically tells us the wrong axis order
# DataAggregator typically tells us the wrong axis order
if
self
.
_schema_cache
[
"
dataFormat.overrideInputAxisOrder
"
]:
if
self
.
_schema_cache
[
"
dataFormat.overrideInputAxisOrder
"
]:
...
...
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