Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
EXDF-tools
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
dataAnalysis
EXDF-tools
Commits
8b6fa28d
Commit
8b6fa28d
authored
1 year ago
by
Philipp Schmidt
Browse files
Options
Downloads
Patches
Plain Diff
Minor text, comment and code formatting improvements
parent
5f8cdf9d
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/exdf/data_reduction/builtins.py
+4
-1
4 additions, 1 deletion
src/exdf/data_reduction/builtins.py
src/exdf/data_reduction/writer.py
+4
-5
4 additions, 5 deletions
src/exdf/data_reduction/writer.py
with
8 additions
and
6 deletions
src/exdf/data_reduction/builtins.py
+
4
−
1
View file @
8b6fa28d
...
@@ -199,7 +199,8 @@ class AgipdGain(ReductionMethod):
...
@@ -199,7 +199,8 @@ class AgipdGain(ReductionMethod):
'
explicit gain sources
'
)
'
explicit gain sources
'
)
return
return
self
.
log
.
info
(
f
'
Found
{
domain
}
'
)
self
.
log
.
info
(
f
'
No detector specified, detected
{
domain
}
'
f
'
automatically
'
)
agipd_sources
=
f
'
{
domain
}
/DET/*CH0:xtdf
'
agipd_sources
=
f
'
{
domain
}
/DET/*CH0:xtdf
'
else
:
else
:
...
@@ -214,6 +215,8 @@ class AgipdGain(ReductionMethod):
...
@@ -214,6 +215,8 @@ class AgipdGain(ReductionMethod):
# Unfortunately HED uses a different domain for
# Unfortunately HED uses a different domain for
# its AGIPD control devices, hardcode it here
# its AGIPD control devices, hardcode it here
# for convenience.
# for convenience.
# TODO: This could also be solved via a CalCat
# query.
domain
=
domain
.
replace
(
'
_DET_
'
,
'
_EXP_
'
)
domain
=
domain
.
replace
(
'
_DET_
'
,
'
_EXP_
'
)
control_source
=
f
'
{
domain
}
/MDL/FPGA_COMP
'
control_source
=
f
'
{
domain
}
/MDL/FPGA_COMP
'
...
...
This diff is collapsed.
Click to expand it.
src/exdf/data_reduction/writer.py
+
4
−
5
View file @
8b6fa28d
...
@@ -31,8 +31,8 @@ def apply_by_key(op_name):
...
@@ -31,8 +31,8 @@ def apply_by_key(op_name):
def
op_handler
(
self
):
def
op_handler
(
self
):
for
source_glob
,
key_glob
,
*
args
in
self
.
_filter_ops
(
op_name
):
for
source_glob
,
key_glob
,
*
args
in
self
.
_filter_ops
(
op_name
):
for
source
in
fnmatch
.
filter
(
self
.
_sources
,
source_glob
):
for
source
in
fnmatch
.
filter
(
self
.
_sources
,
source_glob
):
keys
=
self
.
_custom_keys
.
get
(
source
,
keys
=
self
.
_custom_keys
.
get
(
set
(
self
.
_data
[
source
].
keys
()))
source
,
set
(
self
.
_data
[
source
].
keys
()))
for
key
in
fnmatch
.
filter
(
keys
,
key_glob
):
for
key
in
fnmatch
.
filter
(
keys
,
key_glob
):
op_func
(
source
,
key
,
*
args
)
op_func
(
source
,
key
,
*
args
)
...
@@ -82,8 +82,8 @@ class ReduceWriter(SourceDataWriter):
...
@@ -82,8 +82,8 @@ class ReduceWriter(SourceDataWriter):
self
.
_ops
=
sum
(
methods
.
values
(),
[])
self
.
_ops
=
sum
(
methods
.
values
(),
[])
if
not
self
.
_ops
:
if
not
self
.
_ops
:
self
.
log
.
warning
(
'
Sum of reduction methods yielded
no operations
'
self
.
log
.
warning
(
'
Sum of reduction methods yielded
'
'
to apply
'
)
'
no operations
to apply
'
)
self
.
_sources
=
sorted
(
data
.
all_sources
)
self
.
_sources
=
sorted
(
data
.
all_sources
)
self
.
_touched_sources
=
set
()
self
.
_touched_sources
=
set
()
...
@@ -117,7 +117,6 @@ class ReduceWriter(SourceDataWriter):
...
@@ -117,7 +117,6 @@ class ReduceWriter(SourceDataWriter):
'
Source may not be affected by both select-entries and
'
'
Source may not be affected by both select-entries and
'
'
select-xtdf operations
'
)
'
select-xtdf operations
'
)
if
self
.
_rechunked_keys
.
keys
()
&
self
.
_compressed_keys
.
keys
():
if
self
.
_rechunked_keys
.
keys
()
&
self
.
_compressed_keys
.
keys
():
raise
ReduceMethodError
(
'
Key may not be affected by both
'
raise
ReduceMethodError
(
'
Key may not be affected by both
'
'
compress-keys and rechunk-keys
'
)
'
compress-keys and rechunk-keys
'
)
...
...
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