[obspy-users] saving many files in miniseed
krischer at geophysik.uni-muenchen.de
Wed Nov 15 09:59:29 CET 2017
I don't understand how this can work at all. This is invalid Python code:
#here I try to save them all in miniseed channels
for da in len(s_OTIS):
da.write(da.id <http://da.id> + ".mseed" , format='MSEED' )
len(s_OTIS) returns a integer and one cannot loop/iterate over an
integer. You have to loop over the stream.
I assume you actually ran a version in which this worked. I furthermore
assume you only end up with three files because you give the same name
to all, independent of the times at which each trace has data?
On 15.11.17 00:13, gonzalo antonio fernandez marañon wrote:
> Dear Obspy forum,
> Again thank you for reading it, now I have 1000 one - hour Seisan files.
> so I tried the following code to separe a specific station (the
> station is called OTIS):
> #! /bin/bash
> import os
> from obspy.core import read
> s=read('*MAN*') #extensio of a seisan file
> # here the stream s_OTIS has only OTIS channels which is good.
> #here I try to save them all in miniseed channels
> for da in len(s_OTIS):
> da.write(da.id <http://da.id> + ".mseed" , format='MSEED' )
> bust i just save the last three events, if you have any feedback, I
> woul thank you a lot for your time.
> Thank you a lot
> st2 = st.select(station="R*")
> obspy-users mailing list
> obspy-users at lists.swapbytes.de
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the obspy-users