-
Type:
Task
-
Status: In Progress (View Workflow)
-
Priority:
Normal
-
Resolution: Unresolved
-
Labels:None
Created on 2025-03-21 10:21:48 by Didier Vibert. % Done: 100
implement an opening (i.e. dilatation of the erosion) or a single erosion of the mask (the mask elements are true for valid samples) after applying the filters.
TODO:
- add a check that the wavelengths are regularly sampled (this check is already implemented in C++ CSpectrumSpectralAxis for log lambda sampling)
- insert this morphological modification of the mask in the python code @Spectrum.init@, just after applying the mask and before checking the wavelength.
- add some parameters (in the filter section ?) to activate either opening | erosion | nothing, and the kernel size.
if in the filters section, it could be a dedicated filter to put at the end of the list:
<pre>
"key": "OPENING", # or "EROSION"
"instruction": "",
"value": 1 # number of neighboring pixels to consider: ie kernel = [1,1,1] for value 1, [1,1,1,1,1] for value 2 etc...
</pre>