oclock 1.3.0__tar.gz → 1.3.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. {oclock-1.3.0 → oclock-1.3.2}/.gitignore +6 -6
  2. {oclock-1.3.0 → oclock-1.3.2}/AccuracyTests.md +89 -89
  3. oclock-1.3.2/Examples.ipynb +452 -0
  4. {oclock-1.3.0 → oclock-1.3.2}/LICENSE +674 -674
  5. {oclock-1.3.0 → oclock-1.3.2}/MANIFEST.in +5 -5
  6. oclock-1.3.2/PKG-INFO +394 -0
  7. {oclock-1.3.0 → oclock-1.3.2}/README.md +373 -369
  8. {oclock-1.3.0 → oclock-1.3.2}/example.py +20 -20
  9. {oclock-1.3.0 → oclock-1.3.2}/oclock/__init__.py +34 -34
  10. {oclock-1.3.0 → oclock-1.3.2}/oclock/__main__.py +39 -39
  11. {oclock-1.3.0 → oclock-1.3.2}/oclock/event.py +195 -195
  12. {oclock-1.3.0 → oclock-1.3.2}/oclock/general.py +134 -134
  13. {oclock-1.3.0 → oclock-1.3.2}/oclock/loop.py +129 -129
  14. {oclock-1.3.0 → oclock-1.3.2}/oclock/performance.py +122 -122
  15. {oclock-1.3.0 → oclock-1.3.2}/oclock/timer.py +200 -196
  16. oclock-1.3.2/oclock.egg-info/PKG-INFO +394 -0
  17. {oclock-1.3.0 → oclock-1.3.2}/setup.cfg +35 -35
  18. {oclock-1.3.0 → oclock-1.3.2}/setup.py +4 -4
  19. {oclock-1.3.0 → oclock-1.3.2}/tests/test_oclock.py +86 -86
  20. oclock-1.3.0/Examples.ipynb +0 -278
  21. oclock-1.3.0/PKG-INFO +0 -390
  22. oclock-1.3.0/oclock.egg-info/PKG-INFO +0 -390
  23. {oclock-1.3.0 → oclock-1.3.2}/media/countdown.gif +0 -0
  24. {oclock-1.3.0 → oclock-1.3.2}/media/img/precisetimer_macos_1000ms.png +0 -0
  25. {oclock-1.3.0 → oclock-1.3.2}/media/img/precisetimer_macos_100ms.png +0 -0
  26. {oclock-1.3.0 → oclock-1.3.2}/media/img/precisetimer_macos_10ms.png +0 -0
  27. {oclock-1.3.0 → oclock-1.3.2}/media/img/precisetimer_macos_1ms.png +0 -0
  28. {oclock-1.3.0 → oclock-1.3.2}/media/img/precisetimer_macos_40ms.png +0 -0
  29. {oclock-1.3.0 → oclock-1.3.2}/media/img/precisetimer_windows_1000ms.png +0 -0
  30. {oclock-1.3.0 → oclock-1.3.2}/media/img/precisetimer_windows_100ms.png +0 -0
  31. {oclock-1.3.0 → oclock-1.3.2}/media/img/precisetimer_windows_10ms.png +0 -0
  32. {oclock-1.3.0 → oclock-1.3.2}/media/img/precisetimer_windows_1ms.png +0 -0
  33. {oclock-1.3.0 → oclock-1.3.2}/media/img/precisetimer_windows_40ms.png +0 -0
  34. {oclock-1.3.0 → oclock-1.3.2}/media/img/ribosome.png +0 -0
  35. {oclock-1.3.0 → oclock-1.3.2}/media/img/timer_interval_exceeded.png +0 -0
  36. {oclock-1.3.0 → oclock-1.3.2}/media/img/timer_macos_1000ms.png +0 -0
  37. {oclock-1.3.0 → oclock-1.3.2}/media/img/timer_macos_100ms.png +0 -0
  38. {oclock-1.3.0 → oclock-1.3.2}/media/img/timer_macos_10ms.png +0 -0
  39. {oclock-1.3.0 → oclock-1.3.2}/media/img/timer_macos_1ms.png +0 -0
  40. {oclock-1.3.0 → oclock-1.3.2}/media/img/timer_macos_40ms.png +0 -0
  41. {oclock-1.3.0 → oclock-1.3.2}/media/img/timer_windows_1000ms.png +0 -0
  42. {oclock-1.3.0 → oclock-1.3.2}/media/img/timer_windows_100ms.png +0 -0
  43. {oclock-1.3.0 → oclock-1.3.2}/media/img/timer_windows_10ms.png +0 -0
  44. {oclock-1.3.0 → oclock-1.3.2}/media/img/timer_windows_1ms.png +0 -0
  45. {oclock-1.3.0 → oclock-1.3.2}/media/img/timer_windows_40ms.png +0 -0
  46. {oclock-1.3.0 → oclock-1.3.2}/oclock/countdown.py +0 -0
  47. {oclock-1.3.0 → oclock-1.3.2}/oclock.egg-info/SOURCES.txt +0 -0
  48. {oclock-1.3.0 → oclock-1.3.2}/oclock.egg-info/dependency_links.txt +0 -0
  49. {oclock-1.3.0 → oclock-1.3.2}/oclock.egg-info/requires.txt +0 -0
  50. {oclock-1.3.0 → oclock-1.3.2}/oclock.egg-info/top_level.txt +0 -0
@@ -1,7 +1,7 @@
1
- *egg-info*
2
- *pycache*
3
- .vscode/
4
- .eggs/
5
- build/
6
- dist/
1
+ *egg-info*
2
+ *pycache*
3
+ .vscode/
4
+ .eggs/
5
+ build/
6
+ dist/
7
7
  .ipynb_checkpoints/
@@ -1,90 +1,90 @@
1
-
2
- # Accuracy test
3
-
4
- This file summarizes accuracy test for loops of constant duration using the `oclock.Timer` class. Tests are done using the performance_test function (see *Readme.md*), e.g.
5
- ```python
6
- from oclock.performance import performance_test
7
- performance_test(dt=0.1, nloops=1000, fmax=0.5, plot=True, precise=True)
8
- ```
9
-
10
- Below are some results on timing accuracy in an Unix Environment (MacOS) and Windows, using `nloops=1000`, `fmax=0.5` for various values of `dt`. *Regular Timer* means with `precise=False` while *Precise Timer* means with `precise=True`.
11
-
12
- ## Unix
13
-
14
- ### Regular Timer
15
-
16
- | Requested `dt` (ms) | 1000 | 100 | 40 | 10 | 1 |
17
- |:----------------------------------:|:------:|:-------:|:-------:|:-------:|:-------:|
18
- | average `dt` - requested `dt` (ms) | 0.0012 | 0.00012 | 0.00016 | 0.00005 | 0.00023 |
19
- | standard deviation in `dt` (ms) | 0.48 | 0.36 | 0.31 | 0.23 | 0.08 |
20
-
21
- Corresponding graphs:
22
-
23
- ![](https://raw.githubusercontent.com/ovinc/oclock/master/media/img/timer_macos_1000ms.png)
24
-
25
- ![](https://raw.githubusercontent.com/ovinc/oclock/master/media/img/timer_macos_100ms.png)
26
-
27
- ![](https://raw.githubusercontent.com/ovinc/oclock/master/media/img/timer_macos_400ms.png)
28
-
29
- ![](https://raw.githubusercontent.com/ovinc/oclock/master/media/img/timer_macos_10ms.png)
30
-
31
- ![](https://raw.githubusercontent.com/ovinc/oclock/master/media/img/timer_macos_1ms.png)
32
-
33
-
34
- ### Precise Timer
35
-
36
- | Requested `dt` (ms) | 1000 | 100 | 40 | 10 | 1 |
37
- |:----------------------------------:|:------:|:-------:|:-------:|:-------:|:-------:|
38
- | average `dt` - requested `dt` (ms) | 3.6E-5 | 3.4E-5 | 2.8E-5 | 3.0E-5 | 1.2E-5 |
39
- | standard deviation in `dt` (ms) | 0.0118 | 0.0104 | 0.0117 | 0.0105 | 0.0073 |
40
-
41
- ![](https://raw.githubusercontent.com/ovinc/oclock/master/media/img/precisetimer_macos_1000ms.png)
42
-
43
- ![](https://raw.githubusercontent.com/ovinc/oclock/master/media/img/precisetimer_macos_100ms.png)
44
-
45
- ![](https://raw.githubusercontent.com/ovinc/oclock/master/media/img/precisetimer_macos_400ms.png)
46
-
47
- ![](https://raw.githubusercontent.com/ovinc/oclock/master/media/img/precisetimer_macos_10ms.png)
48
-
49
- ![](https://raw.githubusercontent.com/ovinc/oclock/master/media/img/precisetimer_macos_1ms.png)
50
-
51
-
52
- ## Windows
53
-
54
- ### Regular Timer
55
-
56
- | Requested `dt` (ms) | 1000 | 100 | 40 | 10 | 1 |
57
- |:----------------------------------:|:-----:|:-------:|:-------:|:-------:|:---:|
58
- | average `dt` - requested `dt` (ms) | 0.014 | 0.0015 | 0.0013 | 1.2 | 1.1 |
59
- | standard deviation in `dt` (ms) | 7.0 | 7.1 | 7.0 | 5.6 | 1.9 |
60
-
61
-
62
- ![](https://raw.githubusercontent.com/ovinc/oclock/master/media/img/timer_windows_1000ms.png)
63
-
64
- ![](https://raw.githubusercontent.com/ovinc/oclock/master/media/img/timer_windows_100ms.png)
65
-
66
- ![](https://raw.githubusercontent.com/ovinc/oclock/master/media/img/timer_windows_400ms.png)
67
-
68
- ![](https://raw.githubusercontent.com/ovinc/oclock/master/media/img/timer_windows_10ms.png)
69
-
70
- ![](https://raw.githubusercontent.com/ovinc/oclock/master/media/img/timer_windows_1ms.png)
71
-
72
-
73
- ### Precise Timer
74
-
75
-
76
- | Requested `dt` (ms) | 1000 | 100 | 40 | 10 | 1 |
77
- |:----------------------------------:|:------:|:-------:|:-------:|:-------:|:-------:|
78
- | average `dt` - requested `dt` (ms) | 1.3E-5 | 1.5E-5 | 1.6E-5 | 6.7E-6 | 1.5E-6 |
79
- | standard deviation in `dt` (ms) | 0.0066 | 0.0100 | 0.0088 | 0.0068 | 0.0036 |
80
-
81
-
82
- ![](https://raw.githubusercontent.com/ovinc/oclock/master/media/img/precisetimer_windows_1000ms.png)
83
-
84
- ![](https://raw.githubusercontent.com/ovinc/oclock/master/media/img/precisetimer_windows_100ms.png)
85
-
86
- ![](https://raw.githubusercontent.com/ovinc/oclock/master/media/img/precisetimer_windows_400ms.png)
87
-
88
- ![](https://raw.githubusercontent.com/ovinc/oclock/master/media/img/precisetimer_windows_10ms.png)
89
-
1
+
2
+ # Accuracy test
3
+
4
+ This file summarizes accuracy test for loops of constant duration using the `oclock.Timer` class. Tests are done using the performance_test function (see *Readme.md*), e.g.
5
+ ```python
6
+ from oclock.performance import performance_test
7
+ performance_test(dt=0.1, nloops=1000, fmax=0.5, plot=True, precise=True)
8
+ ```
9
+
10
+ Below are some results on timing accuracy in an Unix Environment (MacOS) and Windows, using `nloops=1000`, `fmax=0.5` for various values of `dt`. *Regular Timer* means with `precise=False` while *Precise Timer* means with `precise=True`.
11
+
12
+ ## Unix
13
+
14
+ ### Regular Timer
15
+
16
+ | Requested `dt` (ms) | 1000 | 100 | 40 | 10 | 1 |
17
+ |:----------------------------------:|:------:|:-------:|:-------:|:-------:|:-------:|
18
+ | average `dt` - requested `dt` (ms) | 0.0012 | 0.00012 | 0.00016 | 0.00005 | 0.00023 |
19
+ | standard deviation in `dt` (ms) | 0.48 | 0.36 | 0.31 | 0.23 | 0.08 |
20
+
21
+ Corresponding graphs:
22
+
23
+ ![](https://raw.githubusercontent.com/ovinc/oclock/master/media/img/timer_macos_1000ms.png)
24
+
25
+ ![](https://raw.githubusercontent.com/ovinc/oclock/master/media/img/timer_macos_100ms.png)
26
+
27
+ ![](https://raw.githubusercontent.com/ovinc/oclock/master/media/img/timer_macos_400ms.png)
28
+
29
+ ![](https://raw.githubusercontent.com/ovinc/oclock/master/media/img/timer_macos_10ms.png)
30
+
31
+ ![](https://raw.githubusercontent.com/ovinc/oclock/master/media/img/timer_macos_1ms.png)
32
+
33
+
34
+ ### Precise Timer
35
+
36
+ | Requested `dt` (ms) | 1000 | 100 | 40 | 10 | 1 |
37
+ |:----------------------------------:|:------:|:-------:|:-------:|:-------:|:-------:|
38
+ | average `dt` - requested `dt` (ms) | 3.6E-5 | 3.4E-5 | 2.8E-5 | 3.0E-5 | 1.2E-5 |
39
+ | standard deviation in `dt` (ms) | 0.0118 | 0.0104 | 0.0117 | 0.0105 | 0.0073 |
40
+
41
+ ![](https://raw.githubusercontent.com/ovinc/oclock/master/media/img/precisetimer_macos_1000ms.png)
42
+
43
+ ![](https://raw.githubusercontent.com/ovinc/oclock/master/media/img/precisetimer_macos_100ms.png)
44
+
45
+ ![](https://raw.githubusercontent.com/ovinc/oclock/master/media/img/precisetimer_macos_400ms.png)
46
+
47
+ ![](https://raw.githubusercontent.com/ovinc/oclock/master/media/img/precisetimer_macos_10ms.png)
48
+
49
+ ![](https://raw.githubusercontent.com/ovinc/oclock/master/media/img/precisetimer_macos_1ms.png)
50
+
51
+
52
+ ## Windows
53
+
54
+ ### Regular Timer
55
+
56
+ | Requested `dt` (ms) | 1000 | 100 | 40 | 10 | 1 |
57
+ |:----------------------------------:|:-----:|:-------:|:-------:|:-------:|:---:|
58
+ | average `dt` - requested `dt` (ms) | 0.014 | 0.0015 | 0.0013 | 1.2 | 1.1 |
59
+ | standard deviation in `dt` (ms) | 7.0 | 7.1 | 7.0 | 5.6 | 1.9 |
60
+
61
+
62
+ ![](https://raw.githubusercontent.com/ovinc/oclock/master/media/img/timer_windows_1000ms.png)
63
+
64
+ ![](https://raw.githubusercontent.com/ovinc/oclock/master/media/img/timer_windows_100ms.png)
65
+
66
+ ![](https://raw.githubusercontent.com/ovinc/oclock/master/media/img/timer_windows_400ms.png)
67
+
68
+ ![](https://raw.githubusercontent.com/ovinc/oclock/master/media/img/timer_windows_10ms.png)
69
+
70
+ ![](https://raw.githubusercontent.com/ovinc/oclock/master/media/img/timer_windows_1ms.png)
71
+
72
+
73
+ ### Precise Timer
74
+
75
+
76
+ | Requested `dt` (ms) | 1000 | 100 | 40 | 10 | 1 |
77
+ |:----------------------------------:|:------:|:-------:|:-------:|:-------:|:-------:|
78
+ | average `dt` - requested `dt` (ms) | 1.3E-5 | 1.5E-5 | 1.6E-5 | 6.7E-6 | 1.5E-6 |
79
+ | standard deviation in `dt` (ms) | 0.0066 | 0.0100 | 0.0088 | 0.0068 | 0.0036 |
80
+
81
+
82
+ ![](https://raw.githubusercontent.com/ovinc/oclock/master/media/img/precisetimer_windows_1000ms.png)
83
+
84
+ ![](https://raw.githubusercontent.com/ovinc/oclock/master/media/img/precisetimer_windows_100ms.png)
85
+
86
+ ![](https://raw.githubusercontent.com/ovinc/oclock/master/media/img/precisetimer_windows_400ms.png)
87
+
88
+ ![](https://raw.githubusercontent.com/ovinc/oclock/master/media/img/precisetimer_windows_10ms.png)
89
+
90
90
  ![](https://raw.githubusercontent.com/ovinc/oclock/master/media/img/precisetimer_windows_1ms.png)