Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
tomotools
Nabu
Commits
2f4b1351
Commit
2f4b1351
authored
Jun 09, 2020
by
Pierre Paleo
Browse files
make double_flatfield more readable with sigma_filter
parent
4bb98441
Pipeline
#26951
failed with stages
in 1 minute and 3 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
nabu/preproc/double_flatfield.py
View file @
2f4b1351
...
...
@@ -115,6 +115,8 @@ class DoubleFlatField(CCDProcessing):
self
.
output_is_mlog
=
output_is_mlog
self
.
average_is_on_log
=
average_is_on_log
self
.
sigma_filter
=
sigma_filter
if
self
.
sigma_filter
is
not
None
and
abs
(
float
(
self
.
sigma_filter
))
<
1e-4
:
self
.
sigma_filter
=
None
self
.
filter_mode
=
filter_mode
proc
=
lambda
x
,
o
:
np
.
copyto
(
o
,
x
)
if
self
.
input_is_mlog
:
...
...
@@ -158,7 +160,7 @@ class DoubleFlatField(CCDProcessing):
acc
/=
radios
.
shape
[
0
]
if
self
.
sigma_filter
is
not
None
and
abs
(
float
(
self
.
sigma_filter
))
>
1e-4
:
if
self
.
sigma_filter
is
not
None
:
acc
=
acc
-
gaussian_filter
(
acc
,
self
.
sigma_filter
,
mode
=
self
.
filter_mode
)
self
.
doubleflatfield
=
self
.
postproc
(
acc
)
# Handle small values to avoid issues when dividing
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment