Skip to content

Commit

Permalink
Adding warnings for missing metadata in ASDF files.
Browse files Browse the repository at this point in the history
  • Loading branch information
geojunky committed Apr 29, 2024
1 parent b4ff260 commit c897a44
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions seismic/ASDFdatabase/_FederatedASDFDataSetImpl.py
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,15 @@ def decode_tag(tag, type='raw_recording'):
for ids, ds in enumerate(self.asdf_datasets):
coords_dict = ds.get_all_coordinates()

# report any missing metadata
wsta = set(list(ds.waveforms.list()))
msta = set(list(coords_dict.keys()))
if (len(wsta) != len(msta)):
missing = set(wsta) - set(msta)
print('WARNING: {} stations with missing metadata found in {}..'.\
format(len(missing), self.asdf_file_names[ids]))
# end if

for k in coords_dict.keys():
if(not masterinv):
masterinv = ds.waveforms[k].StationXML
Expand Down

0 comments on commit c897a44

Please sign in to comment.