Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
ptblab
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Daniele Nicolodi
ptblab
Commits
cd4fa064
Commit
cd4fa064
authored
4 months ago
by
Daniele Nicolodi
Browse files
Options
Downloads
Patches
Plain Diff
treewide: Remove trailing whitespace
parent
404a424d
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
mkt50servo.py
+1
-1
1 addition, 1 deletion
mkt50servo.py
pm6681.py
+3
-3
3 additions, 3 deletions
pm6681.py
ptblab/rpc.py
+1
-1
1 addition, 1 deletion
ptblab/rpc.py
tests/test_win32time.py
+4
-4
4 additions, 4 deletions
tests/test_win32time.py
with
9 additions
and
9 deletions
mkt50servo.py
+
1
−
1
View file @
cd4fa064
...
...
@@ -17,7 +17,7 @@ def main(filename, device, datadir, dataname):
"""
Data logging for Anton Paar MKT50 over RS232.
"""
instr
=
mkt50
.
MKT50
(
device
)
output
=
rpc
.
Client
(
cryo124k
.
ADDRESS
,
cryo124k
.
TIMEOUT
)
servo
=
control
.
PI
(
setpoint
=
124.00
,
p
=
2.0
,
i
=
2.0e-3
,
o
=
6.60
)
...
...
This diff is collapsed.
Click to expand it.
pm6681.py
+
3
−
3
View file @
cd4fa064
...
...
@@ -14,11 +14,11 @@ def main(device, address):
d
=
SerialGPIB
(
device
,
address
)
r
=
d
.
query
(
'
*IDN?
'
)
print
(
r
.
decode
(
'
ascii
'
))
data
=
datalogger
.
open_data_file
(
r
'
o:\4-3\4-31\P013\Data
'
,
'
counter
'
,
None
)
acquiring
=
True
def
terminate
(
*
args
):
nonlocal
acquiring
acquiring
=
False
...
...
This diff is collapsed.
Click to expand it.
ptblab/rpc.py
+
1
−
1
View file @
cd4fa064
...
...
@@ -31,7 +31,7 @@ class Server:
class
Client
:
"""
Simple synchronous RPC client.
"""
def
__init__
(
self
,
address
,
timeout
=
1.0
):
self
.
ctx
=
zmq
.
Context
()
self
.
socket
=
self
.
ctx
.
socket
(
zmq
.
REQ
)
...
...
This diff is collapsed.
Click to expand it.
tests/test_win32time.py
+
4
−
4
View file @
cd4fa064
...
...
@@ -7,7 +7,7 @@ import click
@click.option
(
'
--interval
'
,
metavar
=
'
SEC
'
,
type
=
float
,
default
=
None
,
help
=
'
Set system interrupt interval.
'
)
@click.option
(
'
-n
'
,
metavar
=
'
N
'
,
type
=
int
,
default
=
1000
,
help
=
'
Number of iterations.
'
)
def
main
(
interval
,
n
):
r
=
time
.
get_clock_info
(
'
time
'
).
resolution
print
(
'
stated clock source resolution: {:.6f} s
'
.
format
(
r
))
rmin
,
rmax
,
rcurr
=
win32time
.
get_resolution
()
...
...
@@ -16,7 +16,7 @@ def main(interval, n):
if
interval
:
rcurr
=
win32time
.
set_resolution
(
interval
)
print
(
'
set system interrupt interval: {:.6f} s
'
.
format
(
rcurr
))
r
=
[]
for
x
in
range
(
n
):
...
...
@@ -26,13 +26,13 @@ def main(interval, n):
if
t2
!=
t1
:
break
r
.
append
(
t2
-
t1
)
print
(
'
measured resolution
'
)
print
(
'
mean: {:.6f} s
'
.
format
(
statistics
.
mean
(
r
)))
print
(
'
median: {:.6f} s
'
.
format
(
statistics
.
median
(
r
)))
print
(
'
min: {:.6f} s
'
.
format
(
min
(
r
)))
print
(
'
max: {:.6f} s
'
.
format
(
max
(
r
)))
if
__name__
==
'
__main__
'
:
main
()
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment