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
Merge requests
!81
Convert output mseed to float32
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Convert output mseed to float32
ghsc/users/pcain/geomag-algorithms:mseed-float32
into
master
Overview
2
Commits
4
Pipelines
0
Changes
1
Merged
Cain, Payton David
requested to merge
ghsc/users/pcain/geomag-algorithms:mseed-float32
into
master
3 years ago
Overview
2
Commits
4
Pipelines
0
Changes
1
Expand
Converts stream data written by MiniSeedFactory to be float32
0
0
Merge request reports
Compare
master
version 1
d9a5ba87
3 years ago
master (base)
and
latest version
latest version
988d480c
4 commits,
3 years ago
version 1
d9a5ba87
1 commit,
3 years ago
1 file
+
5
−
2
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
geomagio/edge/MiniSeedInputClient.py
+
5
−
2
Options
@@ -16,11 +16,14 @@ class MiniSeedInputClient(object):
MiniSeedServer hostname
port: int
MiniSeedServer port
encoding: str
Floating point precision for output data
"""
def
__init__
(
self
,
host
,
port
=
2061
):
def
__init__
(
self
,
host
,
port
=
2061
,
encoding
=
"
FLOAT32
"
):
self
.
host
=
host
self
.
port
=
port
self
.
encoding
=
encoding
self
.
socket
=
None
def
close
(
self
):
@@ -71,6 +74,6 @@ class MiniSeedInputClient(object):
self
.
connect
()
# convert stream to miniseed
buf
=
io
.
BytesIO
()
stream
.
write
(
buf
,
format
=
"
MSEED
"
,
reclen
=
512
)
stream
.
write
(
buf
,
encoding
=
self
.
encoding
,
format
=
"
MSEED
"
,
reclen
=
512
)
# send data
self
.
socket
.
sendall
(
buf
.
getvalue
())
Loading