added notch toggle
This commit is contained in:
@@ -3,6 +3,7 @@
|
|||||||
"ach_norm_enabled": false,
|
"ach_norm_enabled": false,
|
||||||
"s11_norm_enabled": false,
|
"s11_norm_enabled": false,
|
||||||
"subtract_mean_ascan": false,
|
"subtract_mean_ascan": false,
|
||||||
|
"hardcoded_notch_enabled": false,
|
||||||
"axis": "abs",
|
"axis": "abs",
|
||||||
"cut": 0.0,
|
"cut": 0.0,
|
||||||
"max": 12.0,
|
"max": 12.0,
|
||||||
|
|||||||
@@ -84,6 +84,7 @@ class BScanProcessor(BaseProcessor):
|
|||||||
"ach_norm_enabled": False, # Toggle ACH normalization from JSON
|
"ach_norm_enabled": False, # Toggle ACH normalization from JSON
|
||||||
"s11_norm_enabled": False, # Toggle S21 normalization using two S11 files
|
"s11_norm_enabled": False, # Toggle S21 normalization using two S11 files
|
||||||
"subtract_mean_ascan": False, # Subtract mean A-scan from each sweep in B-scan
|
"subtract_mean_ascan": False, # Subtract mean A-scan from each sweep in B-scan
|
||||||
|
"hardcoded_notch_enabled": True, # Enable/disable hardcoded notch filtering
|
||||||
"axis": "abs", # "real", "abs", or "phase"
|
"axis": "abs", # "real", "abs", or "phase"
|
||||||
# "data_limitation": None, # None, "ph_only_1", "ph_only_2"
|
# "data_limitation": None, # None, "ph_only_1", "ph_only_2"
|
||||||
"cut": 0.824, # Cut parameter (meters)
|
"cut": 0.824, # Cut parameter (meters)
|
||||||
@@ -131,6 +132,12 @@ class BScanProcessor(BaseProcessor):
|
|||||||
type="toggle",
|
type="toggle",
|
||||||
value=cfg["subtract_mean_ascan"],
|
value=cfg["subtract_mean_ascan"],
|
||||||
),
|
),
|
||||||
|
UIParameter(
|
||||||
|
name="hardcoded_notch_enabled",
|
||||||
|
label="Notch filter",
|
||||||
|
type="toggle",
|
||||||
|
value=cfg["hardcoded_notch_enabled"],
|
||||||
|
),
|
||||||
UIParameter(
|
UIParameter(
|
||||||
name="axis",
|
name="axis",
|
||||||
label="Ось",
|
label="Ось",
|
||||||
@@ -978,6 +985,9 @@ class BScanProcessor(BaseProcessor):
|
|||||||
mask = np.ones_like(freq_hz, dtype=float)
|
mask = np.ones_like(freq_hz, dtype=float)
|
||||||
bands = _HARDCODED_NOTCH_BANDS_HZ
|
bands = _HARDCODED_NOTCH_BANDS_HZ
|
||||||
|
|
||||||
|
if not bool(self._config.get("hardcoded_notch_enabled", True)):
|
||||||
|
return s_complex, mask
|
||||||
|
|
||||||
if not bands:
|
if not bands:
|
||||||
return s_complex, mask
|
return s_complex, mask
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user