From a2c5652023342847b83e31e13b46c61ff01d56b3 Mon Sep 17 00:00:00 2001 From: "E. Joshua Rigler" <erigler@usgs.gov> Date: Fri, 7 Oct 2016 16:28:57 -0600 Subject: [PATCH] Added commented code to smooth locally --- geomagio/algorithm/SqDistAlgorithm.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/geomagio/algorithm/SqDistAlgorithm.py b/geomagio/algorithm/SqDistAlgorithm.py index c3686fb8c..1141a1fdc 100644 --- a/geomagio/algorithm/SqDistAlgorithm.py +++ b/geomagio/algorithm/SqDistAlgorithm.py @@ -436,6 +436,14 @@ class SqDistAlgorithm(Algorithm): # performance. r[i + 1] = gamma * (1 - alpha) * et / m + ## this properly smooths SQ locally; figure out if we need an + ## input parameter to control this, or if we just fix it to a + ## reasonable, but static value; also, figure out how/if r + ## needs to be changed -EJR 8/2016 + #s[i + m] = s[i] + gamma * (1 - alpha) * et / 61. + #s[i+m-30:i+m] = s[i+m-30:i+m] + gamma * (1-alpha) * et / 61. + #s[i+1:i+30+1] = s[i+1:i+30+1] + gamma * (1-alpha) * et / 61. + # update and append to s using equation-error formulation s[i + m] = s[i] + gamma * (1 - alpha) * et -- GitLab