Efficient access to Station in Inventory given network code and station code

I am trying to use information in the Station objects retrieved via fdsn.get_stations() (longitude, latitude, azimuth, dip) to add the distance and back azimuth information to a stream and rotate to ENZ components (some components are 123 or 12Z and rotated relative to ENZ).

Given a station's network and station codes from a trace in a Stream object, what is the recommended (efficient) way to access the corresponding station in an Inventory object? Is there an equivalent method/function to Stream.select? For example, is there something equivalent to:

station = inventory.select(network='BK', station='BRIB')
or
station = inventory['BK']['BRIB']

Thanks,
Brad

Hi Brad,

your first example

station = inventory.select(network='BK', station='BRIB’)

is by coincidence exactly what we implemented in the current master :wink: You will either have to update to the latest dev version or wait for the next release. Alternatively you can add it to your code in some fashion as its only a couple of lines.

Cheers!

Lion

Thanks for the info. This functionality is very useful, so I'll switch from 0.9.2 to master.

Cheers,
Brad