iris web services client - anyone see this problme recently?

Something seems to have drastically changed recently in the web service interface to iris dmc. A script I last used about a year ago no longer works. Several issues:
1. I formerly used the fdsn client, but the current document has no such thing. I changed that line to

from obspy.iris import Client

This constructor then works, although it probably does next to nothing:
client=Client("IRIS")

2. Using ipython and some tracebacks from the exception handler I think something is getting botched in the url generator code. You should be able to cut and paste lines below to recreate the problem I'm seeing:

net='TA'
sta='D03D'
chan='BH*'

Note:
In [22]: print net, sta, chan
TA D03D BH*

Then:
from obspy import UTCDateTime
out='foo.dat'
stime=UTCDateTime(float(1388534670.01))
etime=UTCDateTime(float(1389137254.38))

Note:
In [26]: print stime
2014-01-01T00:04:30.010000Z

In [27]: print etime
2014-01-07T23:27:34.380000Z

Problem is when I then run:
client.timeseries(net,sta,"*","*",stime,etime,out)

I get this from ipython:

Hi Gary,

I'm not sure why you think obspy.fdsn was replaced by obspy.iris. In
fact, it is the opposite; obspy.iris is older, partly deprecated, and
possibly even soon to be removed. I do not even think IRIS leaves many
of those services available any more. You should go back to using
obspy.fdsn.

If you still have issues with obspy.fdsn, that is certainly something
that should be rectified.

Hi Gary,

note that you are using obspy.iris which uses the old IRIS web services. To get access to the new FDSN compatible web services you have to use obspy.fdsn. So to fix you problem you either have to write

from obspy.iris import Client
client = Client() # Do not pass ‘IRIS’ there but a full URL if you really want to

or (strongly recommended)

from obspy.fdsn import Client
client = Client(“IRIS”)

and then use

client.get_waveforms(…)

This will utilize the new fdsn web services. In that case the client constructor actually does quite a bit and discovers what that particular FDSN web service implementation is capable of.

http://docs.obspy.org/packages/obspy.fdsn.html

Cheers!

Lion

Thanks, Lion. Turned out that the original code I started from actually had it right and used the fdsn client. Some confusion on my part got me running in circles and I chased the wrong problem. I'm chasing some different issues now, but hopefully I can solve that on my own. You definitely broke the chasing my tail problem so thank you.

The root of the problem was I was led astray by this web page:
http://docs.obspy.org/tutorial/code_snippets/retrieving_data_from_datacenters.html

Which contained a stub for the iris client that is clearly not appropriate. Urge you to update that page since the iris client seems to have been depricated. I made an incorrect conclusion when I looked at that page. A time stamp on the page would have also avoided this confusion on my part.

Again, many thanks.
Gary Pavlis

I do not even think IRIS leaves many
of those services available any more.

All of the services mentioned on http://docs.obspy.org/packages/obspy.iris.html#module-obspy.iris using interfaces at http://service.iris.edu/irisws/
remain available from IRIS and there are no plans to remove them anytime soon.

It was the IRIS services that were directly replaced by FDSN services (dataselect, station and event) that were removed, but the rest remain.

Hi Gary and others,

Which contained a stub for the iris client that is clearly not
appropriate. Urge you to update that page since the iris client seems
to have been depricated. I made an incorrect conclusion when I looked
at that page. A time stamp on the page would have also avoided this
confusion on my part.

I reworked the tutorial page on data downloading in response to this. As this is fairly opinionated I would like to invite everyone to have a look and join the discussion on github:

https://github.com/obspy/obspy/pull/1091

Cheers!

Lion

Thank you for doing that Lion. This is much improved.

I do have this comment though. Here is a quote on iris client:

"There is probably little use for the services ObsPy has interfaces for when using ObsPy, as ObsPy nowadays has functions that can do the same which is almost always faster than a web request. We keep them around for special uses and for people who don�t want their old codes to break."

Probably should be rephrased (perhaps what you meant by opinionated). I think it is confusing. Are you referring to services like prefiltering data and response corrections? Point is what those "functions that can do the same" are is ambiguous.

Probably would be better to just list what services you support and leave it at that.

Gary