Stations to DataFrameΒΆ

Station data can be converted to a dataframe using the predefined DataFrameExtractor. This creates an entry for each channel, an inventory with channel information is needed. In the future we hope to make this a bit more general to handle inventories with only station level information.

[1]:
import obspy

import obsplus

inv = obspy.read_inventory()
inv_df = obsplus.stations_to_df(inv)
inv_df.head()
[1]:
network station location channel seed_id latitude longitude elevation depth azimuth dip sample_rate start_date end_date
0 GR FUR HHZ GR.FUR..HHZ 48.162899 11.2752 565.0 0.0 0.0 -90.0 100.0 2006-12-16 NaT
1 GR FUR HHN GR.FUR..HHN 48.162899 11.2752 565.0 0.0 0.0 0.0 100.0 2006-12-16 NaT
2 GR FUR HHE GR.FUR..HHE 48.162899 11.2752 565.0 0.0 90.0 0.0 100.0 2006-12-16 NaT
3 GR FUR BHZ GR.FUR..BHZ 48.162899 11.2752 565.0 0.0 0.0 -90.0 20.0 2006-12-16 NaT
4 GR FUR BHN GR.FUR..BHN 48.162899 11.2752 565.0 0.0 0.0 0.0 20.0 2006-12-16 NaT