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
60dc9ac9
Commit
60dc9ac9
authored
3 years ago
by
David Hammer
Browse files
Options
Downloads
Patches
Plain Diff
Update descriptions
parent
3673e6fc
No related branches found
Branches containing commit
No related tags found
Tags containing commit
3 merge requests
!12
Snapshot: field test deployed version as of end of run 202201
,
!3
Base correction device, CalCat interaction, DSSC and AGIPD devices
,
!1
WIP: Add DSSC device
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/Correction/dssc_correction.py
+46
-49
46 additions, 49 deletions
src/Correction/dssc_correction.py
with
46 additions
and
49 deletions
src/Correction/dssc_correction.py
+
46
−
49
View file @
60dc9ac9
...
@@ -69,18 +69,18 @@ class DsscCorrection(calibrationBase.CalibrationReceiverBaseDevice):
...
@@ -69,18 +69,18 @@ class DsscCorrection(calibrationBase.CalibrationReceiverBaseDevice):
.
key
(
"
askConnectedReadersToSendMySources
"
)
.
key
(
"
askConnectedReadersToSendMySources
"
)
.
displayedName
(
"
Request sources from connected RunToPipe
"
)
.
displayedName
(
"
Request sources from connected RunToPipe
"
)
.
description
(
.
description
(
"
Only relevant for development environment. When running
"
"
Only relevant for development environment. When running
without a
"
"
without a
CAL_MANAGER, we need to tell RunToPipe instances
"
"
CAL_MANAGER, we need to tell RunToPipe instances
which sources to
"
"
which sources to
send us.
"
"
send us.
"
)
)
.
commit
(),
.
commit
(),
BOOL_ELEMENT
(
expected
)
BOOL_ELEMENT
(
expected
)
.
key
(
"
doAnything
"
)
.
key
(
"
doAnything
"
)
.
displayedName
(
"
Enable input processing
"
)
.
displayedName
(
"
Enable input processing
"
)
.
description
(
.
description
(
"
Toggle handling of input (at all). If False, the input
"
"
Toggle handling of input (at all). If False, the input
handler of
"
"
handler of
this device will be skipped. Useful to decrease
"
"
this device will be skipped. Useful to decrease
logspam if device is
"
"
logspam if device is
misconfigured.
"
"
misconfigured.
"
)
)
.
assignmentOptional
()
.
assignmentOptional
()
.
defaultValue
(
True
)
.
defaultValue
(
True
)
...
@@ -90,10 +90,11 @@ class DsscCorrection(calibrationBase.CalibrationReceiverBaseDevice):
...
@@ -90,10 +90,11 @@ class DsscCorrection(calibrationBase.CalibrationReceiverBaseDevice):
.
key
(
"
applyCorrection
"
)
.
key
(
"
applyCorrection
"
)
.
displayedName
(
"
Enable correction(s)
"
)
.
displayedName
(
"
Enable correction(s)
"
)
.
description
(
.
description
(
"
Toggle whether or not correction(s) are applied to image data.
"
"
Toggle whether not correction(s) are applied to image data. If
"
"
If false, this device still reshapes data to output shape,
"
"
false, this device still reshapes data to output shape, applies the
"
"
applies the pulse filter, and casts to output dtype. Useful for
"
"
pulse filter, and casts to output dtype. Useful if constants are
"
"
inspecting the raw data in the same format as corrected data.
"
"
missing / bad, or if data is sent to application doing its own
"
"
correction.
"
)
)
.
assignmentOptional
()
.
assignmentOptional
()
.
defaultValue
(
True
)
.
defaultValue
(
True
)
...
@@ -106,10 +107,8 @@ class DsscCorrection(calibrationBase.CalibrationReceiverBaseDevice):
...
@@ -106,10 +107,8 @@ class DsscCorrection(calibrationBase.CalibrationReceiverBaseDevice):
.
key
(
"
fastSources
"
)
.
key
(
"
fastSources
"
)
.
displayedName
(
"
Fast data sources
"
)
.
displayedName
(
"
Fast data sources
"
)
.
description
(
.
description
(
"
Sources to fast data as provided in channel metadata.
"
"
Sources to get data from. Only incoming hashes from these sources
"
"
Provide in the form source@path.in.hash to identify both source
"
"
will be processed.
"
"
and path in the source data hash.
\n
"
"
Currently ignores the path.in.hash part (for hardcoded image.data)
"
)
)
.
assignmentMandatory
()
.
assignmentMandatory
()
.
commit
(),
.
commit
(),
...
@@ -117,11 +116,10 @@ class DsscCorrection(calibrationBase.CalibrationReceiverBaseDevice):
...
@@ -117,11 +116,10 @@ class DsscCorrection(calibrationBase.CalibrationReceiverBaseDevice):
.
key
(
"
pulseFilter
"
)
.
key
(
"
pulseFilter
"
)
.
displayedName
(
"
Pulse filter
"
)
.
displayedName
(
"
Pulse filter
"
)
.
description
(
.
description
(
"
Filter pulses: will be evaluated as array of indices to keep from data.
"
"
Filter pulses: will be evaluated as array of indices to keep from
"
"
Can be anything which can be turned into numpy uint16 array.
"
"
data. Can be anything which can be turned into numpy uint16 array.
"
"
Numpy is available as np.
"
"
Numpy is available as np. Take care not to include duplicates. If
"
"
Take care not to include duplicates.
"
"
empty, will not filter at all.
"
"
If empty, will not filter at all.
"
)
)
.
assignmentOptional
()
.
assignmentOptional
()
.
defaultValue
(
""
)
.
defaultValue
(
""
)
...
@@ -131,10 +129,9 @@ class DsscCorrection(calibrationBase.CalibrationReceiverBaseDevice):
...
@@ -131,10 +129,9 @@ class DsscCorrection(calibrationBase.CalibrationReceiverBaseDevice):
.
key
(
"
outputShmemBufferLength
"
)
.
key
(
"
outputShmemBufferLength
"
)
.
displayedName
(
"
Output buffer length
"
)
.
displayedName
(
"
Output buffer length
"
)
.
description
(
.
description
(
"
Corrected trains are written to shared memory locations.
"
"
Corrected trains are written to shared memory locations. These are
"
"
These are pre-allocated and re-used. This parameter
"
"
pre-allocated and re-used. This parameter determines how big (number
"
"
determines how big (number of trains) the circular buffer
"
"
of trains) the circular buffer will be.
"
"
will be.
"
)
)
.
assignmentOptional
()
.
assignmentOptional
()
.
defaultValue
(
50
)
.
defaultValue
(
50
)
...
@@ -200,9 +197,9 @@ class DsscCorrection(calibrationBase.CalibrationReceiverBaseDevice):
...
@@ -200,9 +197,9 @@ class DsscCorrection(calibrationBase.CalibrationReceiverBaseDevice):
.
key
(
"
dataFormat.inputDataShape
"
)
.
key
(
"
dataFormat.inputDataShape
"
)
.
displayedName
(
"
Input data shape
"
)
.
displayedName
(
"
Input data shape
"
)
.
description
(
.
description
(
"
Image data shape in incoming data (from reader / DAQ).
"
"
Image data shape in incoming data (from reader / DAQ).
This value is
"
"
Value
computed from pixelsX, pixelsY, and memoryCells -
"
"
computed from pixelsX, pixelsY, and memoryCells -
this field just
"
"
this slot is just
show
ing
you what is currently expected.
"
"
show
s
you what is currently expected.
"
)
)
.
readOnly
()
.
readOnly
()
.
initialValue
([])
.
initialValue
([])
...
@@ -211,9 +208,9 @@ class DsscCorrection(calibrationBase.CalibrationReceiverBaseDevice):
...
@@ -211,9 +208,9 @@ class DsscCorrection(calibrationBase.CalibrationReceiverBaseDevice):
.
key
(
"
dataFormat.outputDataShape
"
)
.
key
(
"
dataFormat.outputDataShape
"
)
.
displayedName
(
"
Output data shape
"
)
.
displayedName
(
"
Output data shape
"
)
.
description
(
.
description
(
"
Image data shape for data output from this device.
"
"
Image data shape for data output from this device.
This value is
"
"
Value
computed from pixelsX, pixelsY, and the size of the pulse filter -
"
"
computed from pixelsX, pixelsY, and the size of the pulse filter -
"
"
this
slot is
just show
ing
what is currently expected.
"
"
this
field
just show
s
what is currently expected.
"
)
)
.
readOnly
()
.
readOnly
()
.
initialValue
([])
.
initialValue
([])
...
@@ -245,14 +242,14 @@ class DsscCorrection(calibrationBase.CalibrationReceiverBaseDevice):
...
@@ -245,14 +242,14 @@ class DsscCorrection(calibrationBase.CalibrationReceiverBaseDevice):
.
displayedName
(
"
Pulse (or stat) for preview
"
)
.
displayedName
(
"
Pulse (or stat) for preview
"
)
.
description
(
.
description
(
"
If this value is ≥ 0, the corresponding index from data will be
"
"
If this value is ≥ 0, the corresponding index from data will be
"
"
sliced for the preview. If this value is ≤ 0, preview will be one
"
"
sliced for the preview. If this value is ≤ 0, preview will be one
of
"
"
of
the following stats:
\n
"
"
the following stats:
"
"
-1: max
\n
"
"
-1: max
,
"
"
-2: mean
\n
"
"
-2: mean
,
"
"
-3: sum
\n
"
"
-3: sum
,
"
"
-4: stdev
\n
"
"
-4: stdev
.
"
"
Max means selecting the pulse with the maximum integrated value.
"
"
Max means selecting the pulse with the maximum integrated value.
The
"
"
The
others are computed across all filtered pulses in the train.
"
"
others are computed across all filtered pulses in the train.
"
)
)
.
assignmentOptional
()
.
assignmentOptional
()
.
defaultValue
(
0
)
.
defaultValue
(
0
)
...
@@ -262,10 +259,10 @@ class DsscCorrection(calibrationBase.CalibrationReceiverBaseDevice):
...
@@ -262,10 +259,10 @@ class DsscCorrection(calibrationBase.CalibrationReceiverBaseDevice):
.
key
(
"
preview.trainIdModulo
"
)
.
key
(
"
preview.trainIdModulo
"
)
.
displayedName
(
"
Train modulo for throttling
"
)
.
displayedName
(
"
Train modulo for throttling
"
)
.
description
(
.
description
(
"
Preview will only be
s
en
t
for trains whose ID modulo this
number
"
"
Preview will only be
g
en
erated
for trains whose ID modulo this
"
"
is zero. Higher values means fewer preview updates. Should be
"
"
number
is zero. Higher values means fewer preview updates. Should be
"
"
adjusted based on input rate. Keep in mind that the GUI has
"
"
adjusted based on input rate. Keep in mind that the GUI has
limited
"
"
limited
refresh rate anyway and that network is precious.
"
"
refresh rate anyway and that network is precious.
"
)
)
.
assignmentOptional
()
.
assignmentOptional
()
.
defaultValue
(
6
)
.
defaultValue
(
6
)
...
@@ -282,8 +279,8 @@ class DsscCorrection(calibrationBase.CalibrationReceiverBaseDevice):
...
@@ -282,8 +279,8 @@ class DsscCorrection(calibrationBase.CalibrationReceiverBaseDevice):
.
key
(
"
performance.rateUpdateInterval
"
)
.
key
(
"
performance.rateUpdateInterval
"
)
.
displayedName
(
"
Rate update interval
"
)
.
displayedName
(
"
Rate update interval
"
)
.
description
(
.
description
(
"
Maximum interval (seconds) between updates of the rate.
"
"
Maximum interval (seconds) between updates of the rate.
Mostly
"
"
Mostly
relevant if not rateUpdateOnEachInput or if input is slow.
"
"
relevant if not rateUpdateOnEachInput or if input is slow.
"
)
)
.
assignmentOptional
()
.
assignmentOptional
()
.
defaultValue
(
1
)
.
defaultValue
(
1
)
...
@@ -301,10 +298,10 @@ class DsscCorrection(calibrationBase.CalibrationReceiverBaseDevice):
...
@@ -301,10 +298,10 @@ class DsscCorrection(calibrationBase.CalibrationReceiverBaseDevice):
.
key
(
"
performance.rateUpdateOnEachInput
"
)
.
key
(
"
performance.rateUpdateOnEachInput
"
)
.
displayedName
(
"
Update rate on each input
"
)
.
displayedName
(
"
Update rate on each input
"
)
.
description
(
.
description
(
"
Whether or not to update the device rate for each input
"
"
Whether or not to update the device rate for each input
(otherwise
"
"
(otherwise
only based on rateUpdateInterval).
"
"
only based on rateUpdateInterval).
Note that processed trains are
"
"
Note that processed trains are always registered - this just
"
"
always registered - this just impacts when the rate is computed
"
"
impacts when the rate is computed
based on this.
"
"
based on this.
"
)
)
.
assignmentOptional
()
.
assignmentOptional
()
.
defaultValue
(
False
)
.
defaultValue
(
False
)
...
@@ -332,8 +329,8 @@ class DsscCorrection(calibrationBase.CalibrationReceiverBaseDevice):
...
@@ -332,8 +329,8 @@ class DsscCorrection(calibrationBase.CalibrationReceiverBaseDevice):
.
key
(
"
performance.lastProcessingDuration
"
)
.
key
(
"
performance.lastProcessingDuration
"
)
.
displayedName
(
"
Processing time
"
)
.
displayedName
(
"
Processing time
"
)
.
description
(
.
description
(
"
Amount of time spent in processing latest train.
"
"
Amount of time spent in processing latest train.
Time includes
"
"
Time includes
generating preview and sending data.
"
"
generating preview and sending data.
"
)
)
.
unit
(
Unit
.
SECOND
)
.
unit
(
Unit
.
SECOND
)
.
metricPrefix
(
MetricPrefix
.
MILLI
)
.
metricPrefix
(
MetricPrefix
.
MILLI
)
...
...
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