Commit 39922d25 authored by Pierre Paleo's avatar Pierre Paleo
Browse files

Plug unsharp mask type in nabu config

parent 1a6d2e90
......@@ -196,6 +196,12 @@ nabu_config = {
"validator": float_validator,
"type": "optional",
},
"unsharp_type": {
"default": "gaussian",
"help": "Which type of unsharp mask filter to use. Available values are gaussian (UnsharpedImage = (1 + coeff)*originalPaganinImage - coeff * ConvolvedImage) and laplacian (UnsharpedImage = originalPaganinImage + coeff * ConvolvedImage). Default is gaussian.",
"validator": unsharp_method_validator,
"type": "optional",
},
"padding_type": {
"default": "edge",
"help": "Padding type for the filtering step in Paganin/CTF. Available are: mirror, edge, zeros",
......
......@@ -15,6 +15,14 @@ phase_retrieval_methods = {
"ctf": "CTF",
}
unsharp_methods = {
"gaussian": "gaussian",
"log": "log",
"laplacian": "log",
"none": None,
"": None,
}
padding_modes = {
"edges": "edge",
"edge": "edge",
......
......@@ -341,6 +341,14 @@ def phase_method_validator(val):
replacements=phase_retrieval_methods
)
@validator
def unsharp_method_validator(val):
return name_range_checker(
val,
set(unsharp_methods.values()),
"unsharp mask method",
replacements=phase_retrieval_methods
)
@validator
def padding_mode_validator(val):
......
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