Skip to content
Snippets Groups Projects
Commit bd768270 authored by Wilbur, Spencer Franklin's avatar Wilbur, Spencer Franklin
Browse files

Addressed Josh's comment regarding disclaimer added to trace object retrieved from FDSN client.

parent 11e761e9
No related branches found
No related tags found
1 merge request!291Committing two new files, FDSNSNCL and FDSNFactory. The factory is modeled...
......@@ -313,21 +313,17 @@ class FDSNFactory(TimeseriesFactory):
TimeseriesUtility.pad_timeseries(timeseries, starttime, endtime)
# Retrieve and set metadata for each trace
disclaimer_texts = [
"DISCLAIMER",
"This is provisional data. Any data secured from the USGS database that are identified as provisional have not received Director's approval and are subject to revision. Source and Authority: U.S. Geological Survey Manual, Section 500.24",
]
for trace in timeseries:
if "comments" in trace.stats:
trace.stats.comments.extend(
[
"DISCLAIMER",
"This is provisional data. Any data secured from the USGS database that are identified as provisional have not received Director's approval and are subject to revision. Source and Authority: U.S. Geological Survey Manual, Section 500.24",
"DISCLAIMER",
]
) # input string
else:
trace.stats.comments = [
"DISCLAIMER",
"This is provisional data. Any data secured from the USGS database that are identified as provisional have not received Director's approval and are subject to revision. Source and Authority: U.S. Geological Survey Manual, Section 500.24",
"DISCLAIMER",
]
if "comments" not in trace.stats:
trace.stats.comments = []
# Check if the disclaimer is already in the comments to avoid duplication
if not any("DISCLAIMER" in comment for comment in trace.stats.comments):
trace.stats.comments.extend(disclaimer_texts)
def _set_metadata(
self,
......
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