Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
geomag-algorithms
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ghsc
National Geomagnetism Program
geomag-algorithms
Commits
bac04f9e
Commit
bac04f9e
authored
4 years ago
by
Cain, Payton David
Browse files
Options
Downloads
Patches
Plain Diff
Check for data length in process_step
parent
46b5cb9a
No related branches found
No related tags found
2 merge requests
!146
Release CMO metadata to production
,
!17
Implement hourly/daily filtering products
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
geomagio/algorithm/FilterAlgorithm.py
+3
-4
3 additions, 4 deletions
geomagio/algorithm/FilterAlgorithm.py
with
3 additions
and
4 deletions
geomagio/algorithm/FilterAlgorithm.py
+
3
−
4
View file @
bac04f9e
...
...
@@ -267,6 +267,9 @@ class FilterAlgorithm(Algorithm):
self
.
align_trace
(
step
,
trace
)
# data to filter
data
=
trace
.
data
# check that there is still enough data to filter
if
len
(
data
)
<
numtaps
:
continue
filtered
=
self
.
firfilter
(
data
,
window
,
decimation
)
stats
=
Stats
(
trace
.
stats
)
stats
.
delta
=
output_sample_period
...
...
@@ -301,10 +304,6 @@ class FilterAlgorithm(Algorithm):
input_starttime
=
starttime
-
shift
offset
=
int
(
1e-6
+
(
input_starttime
-
start
)
/
step
[
"
input_sample_period
"
])
data
=
data
[
offset
:]
# check that there is still enough data to filter
if
len
(
data
)
<
numtaps
:
data
=
[]
starttime
=
starttime
-
step
[
"
input_sample_period
"
]
trace
.
stats
.
starttime
=
starttime
trace
.
data
=
data
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment