Showing content from http://mail.python.org/pipermail/python-dev/attachments/20171024/e8bbe036/attachment-0001.html below:
<div dir="auto">Thanks Thomas, it was interesting! You confirmed that time.time_ns() and other system clocks exposed by Python are inappropriate for sub-nanosecond physical experiment.<div dir="auto"><br></div><div dir="auto">By the way, you mentionned that clocks are not synchronized. That's another revelant point. Even if system clocks are synchronized on a single computer, I read that you cannot reach nanosecond resolution for a NTP synchronization even in a small LAN.</div><div dir="auto"><br></div><div dir="auto">For large systems or distributed systems, a "global (synchronized) clock" is not an option. You cannot synchronize clocks correctly, so your algorithms must not rely on time, or at least not too precise resolution.</div><div dir="auto"><br></div><div dir="auto">I am saying that to again repeat that we are far from sub-second nanosecond resolution for system clock.</div><div dir="auto"><br></div><div dir="auto">Victor</div></div><div class="gmail_extra"><br><div class="gmail_quote">Le 24 oct. 2017 01:39, "Thomas Jollans" <<a href="mailto:tjol@tjol.eu">tjol@tjol.eu</a>> a écrit :<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 22/10/17 17:06, Wes Turner wrote:<br>
> There are current applications with greater-than nanosecond precision:<br>
><br>
> - relativity experiments<br>
> - particle experiments<br>
><br>
> Must they always use their own implementations of time., datetime.<br>
> __init__, fromordinal, fromtimestamp ?!<br>
><br>
> - <a href="https://scholar.google.com/scholar?q=femtosecond" rel="noreferrer" target="_blank">https://scholar.google.com/<wbr>scholar?q=femtosecond</a><br>
> - <a href="https://scholar.google.com/scholar?q=attosecond" rel="noreferrer" target="_blank">https://scholar.google.com/<wbr>scholar?q=attosecond</a><br>
> - GPS now supports nanosecond resolution<br>
> -<br>
<br>
Sure, but in these kinds of experiments you don't have a "timestamp" in<br>
the usual sense.<br>
<br>
You'll have some kind of high-precision "clock", but in most cases<br>
there's no way and no reason to synchronise this to wall time. You end<br>
up distinguishing between "macro-time" (wall time) and "micro-time"<br>
(time in the experiment relative to something)<br>
<br>
In a particle accelerator, you care about measuring relative times of<br>
almost-simultaneous detection events with extremely high precision.<br>
You'll also presumably have a timestamp for the event, but you won't be<br>
able or willing to measure that with anything like the same accuracy.<br>
<br>
While you might be able to say that you detected, say, a muon at<br>
01:23:45.6789 at Ît=543.6ps*, you have femtosecond resolution, you have<br>
a timestamp, but you don't have a femtosecond timestamp.<br>
<br>
In ultrafast spectroscopy, we get a time resolution equal to the<br>
duration of your laser pulses (fs-ps), but all the micro-times measured<br>
will be relative to some reference laser pulse, which repeats at >MHz<br>
frequencies. We also integrate over millions of events - wall-time<br>
timestamps don't enter into it.<br>
<br>
In summary, yes, when writing software for experiments working with high<br>
time resolution you have to write your own implementations of whatever<br>
data formats best describe time as you're measuring it, which generally<br>
won't line up with time as a PC (or a railway company) looks at it.<br>
<br>
Cheers<br>
Thomas<br>
<br>
<br>
* The example is implausible not least because I understand muon<br>
chambers tend to be a fair bit bigger than 15cm, but you get my point.<br>
______________________________<wbr>_________________<br>
Python-Dev mailing list<br>
<a href="mailto:Python-Dev@python.org">Python-Dev@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/python-dev" rel="noreferrer" target="_blank">https://mail.python.org/<wbr>mailman/listinfo/python-dev</a><br>
Unsubscribe: <a href="https://mail.python.org/mailman/options/python-dev/victor.stinner%40gmail.com" rel="noreferrer" target="_blank">https://mail.python.org/<wbr>mailman/options/python-dev/<wbr>victor.stinner%40gmail.com</a><br>
</blockquote></div></div>
RetroSearch is an open source project built by @garambo
| Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4