diff --git a/geomagio/processing/copy_absolutes.py b/geomagio/processing/copy_absolutes.py index f5f127633f2152d9010ae18bebfa45111c0f2004..aa786e052fbe9f96a68566e5668e71c002fea71b 100644 --- a/geomagio/processing/copy_absolutes.py +++ b/geomagio/processing/copy_absolutes.py @@ -87,15 +87,14 @@ def create_reading_metadata(reading: Reading) -> Metadata: created_by="absolutes_test.py", network="NT", updated_by=reviewer, - starttime=reading.absolutes[0].starttime, - endtime=reading.absolutes[2].endtime, + starttime=min([m.time for m in reading.measurements if m.time]), + endtime=max([m.time for m in reading.measurements if m.time]), station=reading.metadata["station"], metadata=reading_dict, ) ) return metadata - # TODO: should reading starttime/endtime be for range of measurement times? pass