Commit 2f4b1351 authored by Pierre Paleo's avatar 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
......@@ -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
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment