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
b84f5c7c
Commit
b84f5c7c
authored
Sep 24, 2018
by
Peter Jansweijer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added timestamp to measurements
parent
78e72a0f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
fiber_crtt_vs_temperature.py
sw/insitu_alpha/fiber_crtt_vs_temperature.py
+3
-2
No files found.
sw/insitu_alpha/fiber_crtt_vs_temperature.py
View file @
b84f5c7c
...
...
@@ -385,7 +385,7 @@ if __name__ == "__main__":
data_file
.
write
((
"#CRTT measurement for ITU Channel "
+
str
(
ch
)
+
"
\n
"
)
.
encode
())
data_file
.
write
((
"#date:"
+
time
.
strftime
(
format
(
"
%
d
%
b
%
Y"
),
timestamp
)
+
"
\n
"
)
.
encode
())
data_file
.
write
((
"#time:"
+
time
.
strftime
(
format
(
"
%
H:
%
M:
%
S"
),
timestamp
)
+
"
\n
"
)
.
encode
())
data_file
.
write
((
"#sfp_channel, ITU channel, ITU wavelength, crtt [ps], drxm, drxs, fiber-spool-temp, wr-slave-temp
\n
"
)
.
encode
())
data_file
.
write
((
"#sfp_channel, ITU channel, ITU wavelength, crtt [ps], drxm, drxs, fiber-spool-temp, wr-slave-temp
, meas-time
\n
"
)
.
encode
())
sfp_ch
=
tunable
.
sfp_channel
(
ch
)
frequency
=
itu_conv
.
itu_2_frequency
(
ch
)
...
...
@@ -477,8 +477,9 @@ if __name__ == "__main__":
if
args
.
t
!=
None
:
# open and configure Digital Multimeter with attached PT100
spool_temp
=
float
(
dmm
.
ask
(
"MEAS:TEMP? FRTD"
))
meas_time
=
time
.
strftime
(
format
(
"
%
H:
%
M:
%
S"
),
time
.
localtime
())
print
(
"sfp_channel: "
,
sfp_ch
,
"itu_channel: "
,
ch
,
"crtt average over "
+
str
(
crtt_measurement
)
+
" measurements: "
+
str
(
crtt_mean
)
+
" fiber-spool temp: "
+
str
(
spool_temp
))
data_file
.
write
((
str
(
sfp_ch
)
+
", "
+
str
(
ch
)
+
", "
+
str
(
wavelength
)
+
", "
+
str
(
crtt_mean
)
+
", "
+
str
(
curr_drxm
)
+
", "
+
str
(
curr_drxs
)
+
", "
+
str
(
spool_temp
)
+
", "
+
str
(
curr_temp
)
+
"
\n
"
)
.
encode
())
data_file
.
write
((
str
(
sfp_ch
)
+
", "
+
str
(
ch
)
+
", "
+
str
(
wavelength
)
+
", "
+
str
(
crtt_mean
)
+
", "
+
str
(
curr_drxm
)
+
", "
+
str
(
curr_drxs
)
+
", "
+
str
(
spool_temp
)
+
", "
+
str
(
curr_temp
)
+
"
, "
+
str
(
meas_time
)
+
"
\n
"
)
.
encode
())
except
:
print
(
"### exception during crtt_measurements."
)
...
...
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