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
8a9da540
Commit
8a9da540
authored
3 months ago
by
Shavers, Nicholas H
Browse files
Options
Downloads
Patches
Plain Diff
necessary tweaks: urlInterval brought back, remove need for cdf extension on input-file
parent
b4123eb1
No related branches found
No related tags found
1 merge request
!368
Imagcdf factory mvp
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
geomagio/Controller.py
+3
-3
3 additions, 3 deletions
geomagio/Controller.py
geomagio/imagcdf/ImagCDFFactory.py
+2
-0
2 additions, 0 deletions
geomagio/imagcdf/ImagCDFFactory.py
with
5 additions
and
3 deletions
geomagio/Controller.py
+
3
−
3
View file @
8a9da540
...
@@ -7,8 +7,6 @@ from typing import List, Optional, Tuple, Union
...
@@ -7,8 +7,6 @@ from typing import List, Optional, Tuple, Union
from
obspy.core
import
Stream
,
UTCDateTime
from
obspy.core
import
Stream
,
UTCDateTime
from
geomagio.imagcdf.ImagCDFFactory
import
ImagCDFFactory
from
.algorithm
import
Algorithm
,
algorithms
,
AlgorithmException
,
FilterAlgorithm
from
.algorithm
import
Algorithm
,
algorithms
,
AlgorithmException
,
FilterAlgorithm
from
.DerivedTimeseriesFactory
import
DerivedTimeseriesFactory
from
.DerivedTimeseriesFactory
import
DerivedTimeseriesFactory
from
.PlotTimeseriesFactory
import
PlotTimeseriesFactory
from
.PlotTimeseriesFactory
import
PlotTimeseriesFactory
...
@@ -504,8 +502,10 @@ def get_input_factory(args):
...
@@ -504,8 +502,10 @@ def get_input_factory(args):
input_factory_args
[
"
output
"
]
=
args
.
output
input_factory_args
[
"
output
"
]
=
args
.
output
# stream/url arguments
# stream/url arguments
if
args
.
input_file
is
not
None
:
if
args
.
input_file
is
not
None
:
if
input_type
in
[
"
netcdf
"
,
"
miniseed
"
,
"
imagcdf
"
]:
if
input_type
in
[
"
netcdf
"
,
"
miniseed
"
]:
input_stream
=
open
(
args
.
input_file
,
"
rb
"
)
input_stream
=
open
(
args
.
input_file
,
"
rb
"
)
elif
input_type
in
[
"
imagcdf
"
]:
input_factory_args
[
"
inputFile
"
]
=
args
.
input_file
#imagcdf file is binary but lib used accepts a file path
else
:
else
:
input_stream
=
open
(
args
.
input_file
,
"
r
"
)
input_stream
=
open
(
args
.
input_file
,
"
r
"
)
elif
args
.
input_stdin
:
elif
args
.
input_stdin
:
...
...
This diff is collapsed.
Click to expand it.
geomagio/imagcdf/ImagCDFFactory.py
+
2
−
0
View file @
8a9da540
...
@@ -54,6 +54,7 @@ class ImagCDFFactory(TimeseriesFactory):
...
@@ -54,6 +54,7 @@ class ImagCDFFactory(TimeseriesFactory):
urlTemplate
=
"
file://{obs}_{dt}_{t}.cdf
"
,
urlTemplate
=
"
file://{obs}_{dt}_{t}.cdf
"
,
inputFile
:
Optional
[
str
]
=
None
,
inputFile
:
Optional
[
str
]
=
None
,
output
:
Optional
[
str
]
=
"
iaga2002
"
,
output
:
Optional
[
str
]
=
"
iaga2002
"
,
urlInterval
:
int
=
-
1
):
):
"""
"""
Initialize the ImagCDFFactory with default parameters.
Initialize the ImagCDFFactory with default parameters.
...
@@ -73,6 +74,7 @@ class ImagCDFFactory(TimeseriesFactory):
...
@@ -73,6 +74,7 @@ class ImagCDFFactory(TimeseriesFactory):
type
=
type
,
type
=
type
,
interval
=
interval
,
interval
=
interval
,
urlTemplate
=
urlTemplate
,
urlTemplate
=
urlTemplate
,
urlInterval
=
urlInterval
)
)
self
.
inputFile
=
inputFile
self
.
inputFile
=
inputFile
self
.
output
=
(
self
.
output
=
(
...
...
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