def test_coordinate_extraction_but_no_stationxml(tmpdir): """ Tests what happens if no stationxml is defined for a station. """ asdf_filename = os.path.join(tmpdir.strpath, "test.h5") data_path = os.path.join(data_dir, "small_sample_data_set") data_set = ASDFDataSet(asdf_filename) for filename in glob.glob(os.path.join(data_path, "*.mseed")): data_set.add_waveforms(filename, tag="raw_recording") # If not stationxml exists it should just return an empty dictionary. assert data_set.get_all_coordinates() == {}
def test_extract_all_coordinates(example_data_set): """ Tests the extraction of all coordinates. """ data_set = ASDFDataSet(example_data_set.filename) assert data_set.get_all_coordinates() == { "AE.113A": { "latitude": 32.7683, "longitude": -113.7667, "elevation_in_m": 118.0}, "TA.POKR": { "latitude": 65.1171, "longitude": -147.4335, "elevation_in_m": 501.0}}