Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Javier Quinteros
dastools
Commits
e5ec372d
Commit
e5ec372d
authored
Jan 17, 2020
by
Javier Quinteros
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bugfix: Wrong block executed when metadata was requested
parent
c18556d4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
12 deletions
+13
-12
dasscripts/dasconv.py
dasscripts/dasconv.py
+13
-12
No files found.
dasscripts/dasconv.py
View file @
e5ec372d
...
...
@@ -566,18 +566,19 @@ def main():
else
:
tr0
+=
Trace
(
data
=
data
[
0
],
header
=
data
[
1
])
else
:
with
open
(
'%s.mseed'
%
(
curstream
),
'wb'
)
as
fout
:
# Do not call the decimate method if it is not needed
# 1: no decimation
if
args
.
decimate
>
1
:
tr0
.
decimate
(
args
.
decimate
)
# Use the headers from the decimated Trace
tr1
=
Trace
(
data
=
tr0
.
data
.
astype
(
td
.
datatype
),
header
=
tr0
.
stats
)
st
=
Stream
([
tr1
])
logs
.
info
(
'Storing channel %s'
%
curstream
)
st
.
write
(
fout
,
format
=
'MSEED'
)
if
not
args
.
metadata
:
with
open
(
'%s.mseed'
%
(
curstream
),
'wb'
)
as
fout
:
# Do not call the decimate method if it is not needed
# 1: no decimation
if
args
.
decimate
>
1
:
tr0
.
decimate
(
args
.
decimate
)
# Use the headers from the decimated Trace
tr1
=
Trace
(
data
=
tr0
.
data
.
astype
(
td
.
datatype
),
header
=
tr0
.
stats
)
st
=
Stream
([
tr1
])
logs
.
info
(
'Storing channel %s'
%
curstream
)
st
.
write
(
fout
,
format
=
'MSEED'
)
if
__name__
==
'__main__'
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment