Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No warning of multiple epochs given when translating inventory #53

Open
kkappler opened this issue Aug 9, 2021 · 0 comments
Open

No warning of multiple epochs given when translating inventory #53

kkappler opened this issue Aug 9, 2021 · 0 comments

Comments

@kkappler
Copy link
Collaborator

kkappler commented Aug 9, 2021

When multiple instances of the same channel inhabit a stationxml, only one instance (the first one it seems) is returned by the translator from inventory to experiment. There is not necessarily wrong but one might expect a warning that of the three distinct channels in the file, two of them are being ignored by the translator.

Attached to this issue is a .txt file. This file is actually a staitonxml file, with the extension changed from .xml to .txt so that github would allow me to upload it. This file has three separate descriptions of channel LQ2, spanning the following three separate epochs:
2003-03-13T22:35:00 - 2003-09-12T18:54:00
2003-09-12T18:54:00 - 2005-03-15T16:45:00
2005-03-15T16:45:00 - 2005-05-18T22:15:00

fdsn-station_pkd_LQ2_20030912-20050315.txt

When I execute the following code:

'''
from obspy.core.inventory.inventory import read_inventory
from mt_metadata.timeseries.stationxml import XMLInventoryMTExperiment
xml_filename = "fdsn-station_pkd_LQ2_20030912-20050315.xml"
inventory = read_inventory(xml_filename)
translator = XMLInventoryMTExperiment()
experiment = translator.xml_to_mt(inventory_object=inventory)
print(experiment)
'''

The result is:

Experiment Contents

Number of Surveys: 1
Survey ID: None
Number of Stations: 1
--------------------
Station ID: PKD
Number of Runs: 1
--------------------
Run ID: 001
Number of Channels: 1
Recorded Channels: ey
Start: 2003-03-13T22:35:00+00:00
End: 2003-09-12T18:54:00+00:00
--------------------

There was no warning about multiple instances of the same channel, and it looks like it only populated the first of the three. Not 100% sure what we want the behaviour to be, but there should probably be some warning that the experiement has fewer channels than the inventory

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant