handling relative/absolute time correctly and consistently #110
Replies: 3 comments 2 replies
-
In the process of revising the documentation on timing and writing an expanded document on timing I recognized we MUST add a standardized attribute to the schema. Here is the yaml entry I recommend:
These attribute should not be required but needs to be supported as there are many cases where timing precision is a necessary constraint. The second may not be necessary but a minor addition worth putting in for completeness. |
Beta Was this translation helpful? Give feedback.
-
Yes, but even though our code base may not currently use these attributes having them defined as a concept is important. There are lots of examples like that were we could and perhaps should anticipate attributes people will want. Another example would be moment tensor components that would be essential for anyone working with methods comparing synthethics and data. There are undoubtedly others. We might want to look at the attributes in css3.0 as a starting point. Another example is the ISC's database schema that is an extension of CS3.0. Not at the top of our needs, but something probably worth putting on the to-do list someday. |
Beta Was this translation helpful? Give feedback.
-
Roger that. I'd add only one suggestion. This would be an excellent topic for our advisory group - whatever we want to call them. |
Beta Was this translation helpful? Give feedback.
-
In an email a few days ago I summarized this problem as follows:
Begin email
Let me explain why this exists - it was not present in my earliest version of this library.d
There are several real life data cases with which we need to be concerned:
Top of list happens to data with valid UTC time.
Active source data exist in three variants of relative time:
a. Virtually no absolute time reference except what might be in written field notes (oldest data)
b. Approximate time stamps. Most newer active source instruments have a system clock that gives only approximate time. e.g. I have some data from Homestake where the data logger only recorded a time stamp on the segy data files to the nearest 1 s. That is common.
c. Active source data assembled with a true time stamp. Type example are modern long range refraction experiments where the instruments have gps time.
So, the reason for the boolean is to flag cases like 2a and 2b and some situations for 3 where if a shift time is posted it won't be reliable. Those case, in fact, argues for separate getters and setters that I don't think are all their right now._
End email
One thing this email didn't explicitly state but which is a key concept is that data can have time defined as relative but actually be based on utc time. The library handles this with the internal boolean variable "t0_shift_is_valid" in BasicTimeSeries. After the discussion above I actually fixed a bug that had existed in the rtoa code that handle the t0_shift_is_valid logic correctly.
The point for here is that we implemented code to handle storing and retrieving a boolean we used to distinguish cases when the internal time shift variable was reliable or not. I believe that is working right? I think the only residual issue is what the python API should have to make sure we can correctly handle these issues. Ian, can you please clarify what you think we need that may be lacking or what needs to be changes?
Beta Was this translation helpful? Give feedback.
All reactions