Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DM-15760: Change first/last validity from exposure ID to datetime #90

Merged
merged 1 commit into from Sep 26, 2018

Conversation

timj
Copy link
Member

@timj timj commented Sep 26, 2018

No description provided.

@timj timj requested a review from TallJimbo September 26, 2018 19:05
@timj timj changed the title Change first/last validity from exposure ID to datetime DM-15760: Change first/last validity from exposure ID to datetime Sep 26, 2018
First exposure identifier included in the range (inclusive). may
be zero to indicate an open interval.
Date of first exposure included in the range (inclusive). May
be far in the past to indicate an open interval.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we say TAI explicitly here to avoid any possibility of confusion in the future?

And this is mostly off-topic, but it got me thinking: do you think we should by using MJDs for all of our datetimes in the Registry to avoid the possibility of people using database datetime UDFs that are inappropriate for our time systems?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TAI MJD might be safer (and we don't need millisecond accuracy). Shall I make that change on this ticket?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're welcome to make it on this ticket as far as I'm concerned, but note that that will involve some code changes, maybe including some that extend beyond daf_butler, as we actually are populating the datetime_begin (etc) fields.

Just curious: what kind of accuracy would that give us?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Single 64bit float using MJD is about 1 micro second accuracy I think. Integer MJD day and 64-bit float for fractional day seems to be 0.02 ns.

@timj timj merged commit 37a24ae into master Sep 26, 2018
@timj timj deleted the tickets/DM-15760 branch September 26, 2018 23:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants