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
5a25e3cd
Commit
5a25e3cd
authored
9 years ago
by
Eddie McWhirter
Browse files
Options
Downloads
Patches
Plain Diff
Clean up code and comments.
parent
f9d1cfde
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
geomagio/pcdcp/PCDCPParser.py
+3
-2
3 additions, 2 deletions
geomagio/pcdcp/PCDCPParser.py
geomagio/pcdcp/PCDCPWriter.py
+4
-4
4 additions, 4 deletions
geomagio/pcdcp/PCDCPWriter.py
with
7 additions
and
6 deletions
geomagio/pcdcp/PCDCPParser.py
+
3
−
2
View file @
5a25e3cd
...
...
@@ -5,8 +5,9 @@ import numpy
from
datetime
import
datetime
# values that represent missing data points in PCDCP
NINES
=
numpy
.
float64
(
'
99999.99
'
)
NINES
=
numpy
.
float64
(
'
9999999
'
)
NINES_RAW
=
numpy
.
float64
(
'
99999990
'
)
NINES_DEG
=
numpy
.
float64
(
'
9999
'
)
class
PCDCPParser
(
object
):
"""
PCDCP parser.
...
...
This diff is collapsed.
Click to expand it.
geomagio/pcdcp/PCDCPWriter.py
+
4
−
4
View file @
5a25e3cd
from
cStringIO
import
StringIO
from
geomagio
import
TimeseriesFactoryException
,
ChannelConverter
from
geomagio
import
ChannelConverter
import
numpy
import
PCDCPParser
import
textwrap
from
datetime
import
datetime
...
...
@@ -15,7 +14,7 @@ class PCDCPWriter(object):
self
.
empty_value
=
empty_value
def
write
(
self
,
out
,
timeseries
,
channels
):
"""
w
rite timeseries to pcdcp file
"""
W
rite timeseries to pcdcp file
.
Parameters
----------
...
...
@@ -24,8 +23,9 @@ class PCDCPWriter(object):
timeseries : obspy.core.stream
Timeseries object with data to be written.
channels : array_like
Channels to be written from timeseries object
Channels to be written from timeseries object
.
"""
print
"
OUT:
"
,
out
stats
=
timeseries
[
0
].
stats
out
.
write
(
self
.
_format_header
(
stats
,
channels
))
out
.
write
(
self
.
_format_data
(
timeseries
,
channels
))
...
...
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