You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
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
The text was updated successfully, but these errors were encountered:
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
The text was updated successfully, but these errors were encountered: