Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
W
White Rabbit Calibration
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
White Rabbit Calibration
Commits
2c4f1f20
Commit
2c4f1f20
authored
Jun 01, 2018
by
Peter Jansweijer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added possibility to set output directory
parent
9c65ae01
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
20 deletions
+3
-20
Keysight_53230A.py
sw/lib/Keysight_53230A.py
+3
-20
No files found.
sw/lib/Keysight_53230A.py
View file @
2c4f1f20
...
...
@@ -41,6 +41,7 @@ import sys
import
time
import
scipy
import
struct
import
pdb
#TJP: installed from web python-vxi Alex
import
vxi11
...
...
@@ -49,7 +50,7 @@ import matplotlib.pyplot as plt
############################################################################
def
get_time_interval
(
freq_cnt
,
num_meas
=
1
):
def
get_time_interval
(
freq_cnt
,
num_meas
=
1
,
odir
=
"data/"
):
"""
Measure and save Keysight 53230A time interval
...
...
@@ -74,24 +75,6 @@ def get_time_interval(freq_cnt, num_meas=1):
meas_data
=
[]
for
measurement
in
range
(
num_meas
):
measurement
=
freq_cnt
.
ask
(
"READ?"
)
meas_data
.
append
(
measurement
+
"
\n
"
)
...
...
@@ -102,7 +85,7 @@ def get_time_interval(freq_cnt, num_meas=1):
for
i
in
range
(
len
(
meas_data
)):
data
.
append
(
meas_data
[
i
])
filename
=
"data/"
+
time
.
strftime
(
format
(
"
%
y
%
m
%
d_
%
H_
%
M_
%
S"
),
timestamp
)
+
"_freq_cnt_keysight_53230A"
filename
=
odir
+
time
.
strftime
(
format
(
"
%
y
%
m
%
d_
%
H_
%
M_
%
S"
),
timestamp
)
+
"_freq_cnt_keysight_53230A"
print
(
"save waveform into file:"
,
filename
)
file
=
open
(
filename
,
"w"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment