dataless Parser and RESP

Dear ObsPy community,

I would like to adjust the seed Parser function or writeRESP function (not sure which one I need to tweak) such that I can add more information into RESP files created with the writeRESP function. In particular I would like to add info about the channel orientation to the RESP file, which commonly doesn’t seem to be in there. So I have to tell the functions to additionally read/write some fields of Seed Blockette 52 …

Could you point out to me which parts of the scripts I would have to change for this?

Thanks a lot and best regards,

Florian

Hi Florian,

RESP files unfortunately don't have coordinates or channel orientations.
So if you write those to it its no longer a well-formed RESP file in
some sense. Programs might and likely will break with these files. I
don't think there is a formal RESP specification so I guess the ultimate
authorities are rdseed and evalresp.

I'd advise you to just use StationXML files if possible which are a
superior alternative.

If not: here is the function you'd have to edit:
https://github.com/obspy/obspy/blob/45180e543bb99ded420af8a86117d1fb1750739e/obspy/io/xseed/parser.py#L383-L454

We will most likely not add that functionality to ObsPy as it creates
invalid files.

Cheers!

Lion

Hi Lion,

thanks for the fast reply. I was already expecting something like this, since I never saw channel orientation in a RESP file. Anyways, thanks for the instructions!

Best,
Florian

Dear ObsPy,

I'm trying to plot this file (https://www.dropbox.com/s/azm4e14zi7dmzt1/HL.SMTH..HHN.D.2016.015?dl=0). It contains the data of one day for a single station's channel.

I run at python shell:
from obspy import read
s=read('HL.SMTH..HHN.D.2016.015')
s.plot()

Then I got this warning, and the plot is a mess:

/usr/local/lib/python2.7/dist-packages/matplotlib/axes/_base.py:2787: UserWarning: Attempting to set identical left==right results
in singular transformations; automatically expanding.
left=735978.0, right=735978.0
   'left=%s, right=%s') % (left, right))

Machine#1:
python 2.7.6
obspy 0.10.2
matplotlib 1.5.1

Printing the stats, looks well.
If I use s.plot(type='dayplot'), plot is OK.
Plots of the previous (014) and the next (016) day are OK.
Obspy-scan shows a gap -fake- at the entire day (015) when plotting the entire year.

However, using Machine#2:
python 2.7.6
obspy 0.10.2
matplotlib 1.4.3 (older version than mahine#1)

Plot of 015 is OK.

Any ideas?

Thank you in advance,
Nikos

Hi Nikos,

this is bug due to a change in matplotlib 1.5 and is fixed in master
branch (https://github.com/obspy/obspy/issues/1225). For obspy 0.10.2
you probably have to go back to matplotlib 1.4 to avoid this.

T