From b84089ae55fa8182771b088bf713a13c27c743b4 Mon Sep 17 00:00:00 2001 From: Alex Wernle <awernle@usgs.gov> Date: Tue, 26 Nov 2024 10:23:50 -0700 Subject: [PATCH] Making attributes Optional in pydantic style. --- geomagio/algorithm/SpikesAlgorithm.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/geomagio/algorithm/SpikesAlgorithm.py b/geomagio/algorithm/SpikesAlgorithm.py index 326adb1e..5a4cfa19 100644 --- a/geomagio/algorithm/SpikesAlgorithm.py +++ b/geomagio/algorithm/SpikesAlgorithm.py @@ -18,13 +18,13 @@ class SpikesAlgorithm(MetadataAlgorithm): Attributes ---------- window_size: int - Size of the rolling window for dynamic alignment (no shrinking or padding). + Size of the rolling window for dynamic alignment (no shrinking or padding). Defaults to 1000. threshold: int - Threshold for spike detection (threshold * sigma). + Threshold for spike detection (threshold * sigma). Defaults to 6. """ - window_size: int - threshold: int + window_size: Optional[int] = 1000 + threshold: Optional[int] = 6 def _despike( self, signal: Trace, timestamps: List[UTCDateTime] -- GitLab