Skip to content

Commit 5d98359

Browse files
committed
Update: Gaussian filter
1 parent 0f19598 commit 5d98359

File tree

4 files changed

+9
-10
lines changed

4 files changed

+9
-10
lines changed

README.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,10 @@ will print a detailed usage message to the screen:
9090
--engine-writer {h5netcdf,netcdf4,zarr}
9191
specify the engine used to write the target product
9292
file. (default: None)
93-
--gaussian-filter GAUSSIAN_FILTER
94-
specify the full width at half maximum (pixels) of
95-
a lateral Gaussian filter applied to the forecast.
96-
If not specified no filter is applied. (default:
97-
None)
93+
--gaussian-filter FWHM
94+
specify the full width at half maximum (pixels) of a
95+
lateral Gaussian filter applied to the forecast. If
96+
not specified no filter is applied. (default: None)
9897
--horizon {1,2,3,4,5,6,7}
9998
specify the forecast horizon (days). (default: None)
10099
--log-level {debug,info,warning,error,off}

wqf/config/wqf.config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ engine_reader:
2020
## Detect the writer engine automatically
2121
engine_writer:
2222

23-
## No lateral Gaussian filter [0.5, 1.0, 1.5, 2.0, 2.5, 3.0] is applied
24-
gaussian_filter:
23+
## No lateral Gaussian filter is applied
24+
fwhm:
2525

2626
## The default forecast horizon
2727
horizon: 1

wqf/operators/forecastop.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,9 @@ def run(self, source: Dataset) -> Dataset: # noqa: D102
6565
)
6666
feats, names = self._features(source)
6767
array = f.apply_to(*feats, names=names)
68-
if self._args.gaussian_filter is not None:
68+
if self._args.fwhm is not None:
6969
g = Gaussian(array.dtype)
70-
array = g.apply_to(array, fwhm=self._args.gaussian_filter)
70+
array = g.apply_to(array, fwhm=self._args.fwhm)
7171

7272
builder = DatasetBuilder()
7373
for name, value in sorted(

wqf/parser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ def _add_options(parser):
120120
"If not specified no filter is applied.",
121121
type=float,
122122
required=False,
123-
dest="gaussian_filter",
123+
dest="fwhm",
124124
)
125125
parser.add_argument(
126126
"--horizon",

0 commit comments

Comments
 (0)