Skip to content

Commit 2c4bdb3

Browse files
committed
Merge branch 'develop' of github.com:GeoscienceAustralia/hiperseis into develop
2 parents 424cfb7 + 1a5712f commit 2c4bdb3

File tree

1 file changed

+11
-13
lines changed

1 file changed

+11
-13
lines changed

seismic/ASDFdatabase/utils.py

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -95,19 +95,17 @@ def append(self, inv: Inventory):
9595
pass
9696

9797
if (type(self.cha_dict[nc][sc][lc][cc]) == defaultdict):
98-
self.cha_dict[nc][sc][lc][cc] = cha
99-
else:
100-
# update start/end dates for existing channels
101-
ocha = self.cha_dict[nc][sc][lc][cc]
102-
if(ocha.start_date and cha.start_date):
103-
if (ocha.start_date > cha.start_date): ocha.start_date = cha.start_date
104-
elif(ocha.start_date is None and cha.start_date):
105-
ocha.start_date = cha.start_date
106-
# end if
107-
108-
if(ocha.end_date and cha.end_date):
109-
if(ocha.end_date < cha.end_date): ocha.end_date = cha.end_date
110-
# end if
98+
cha_copy = copy.deepcopy(cha)
99+
100+
"""
101+
Channel start- and end-dates in the inventory do not reflect actual waveform
102+
data holdings. We therefore set the start- and end-times to None, so usable
103+
data is not lost e.g. when rotating waveform data for which corresponding
104+
metadata for the correct timeframes do not exist.
105+
"""
106+
cha_copy.start_date = None
107+
cha_copy.end_date = None
108+
self.cha_dict[nc][sc][lc][cc] = cha_copy
111109
# end if
112110
# end for
113111
# end for

0 commit comments

Comments
 (0)