Skip to content
Snippets Groups Projects
Commit bce0ea0c authored by Wernle, Alexandra Nicole's avatar Wernle, Alexandra Nicole
Browse files

Changed starttime and endtime to use list comprehension

parent e3df094b
No related branches found
No related tags found
1 merge request!189Add absolutes
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment