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
be350ade
Commit
be350ade
authored
Apr 09, 2019
by
Peter Jansweijer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added selection for scientific or 1 digit precision decimal [ps] output in file
parent
4bbb7ed4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
1 deletion
+11
-1
calc_diff.py
sw/insitu_alpha/calc_diff.py
+11
-1
No files found.
sw/insitu_alpha/calc_diff.py
View file @
be350ade
...
...
@@ -62,11 +62,21 @@ def save_plot(out_file, name, nameref, measurement_str, measurement_lst, outlier
meas_arr
=
numpy
.
array
(
measurement_lst
)
mean
=
meas_arr
.
mean
()
stdev
=
meas_arr
.
std
(
ddof
=
1
)
# output in [ps] with one digit
mean_str
=
"{0:.1f}"
.
format
(
mean
*
1e12
)
stdev_str
=
"{0:.1f}"
.
format
(
stdev
*
1e12
)
#out_file.write("outliers: " + str(outliers) + "\n")
#out_file.write("mean: " + str(mean) + "\n")
#out_file.write("stdev: " + str(stdev) + "\n")
out_file
.
write
(
str
(
mean
)
+
", "
+
str
(
stdev
)
+
", "
+
str
(
outliers
)
+
", "
+
str
(
measurement_str_shortend
)
+
"
\n
"
)
ScientificNotation
=
False
if
ScientificNotation
:
out_file
.
write
(
str
(
mean
)
+
", "
+
str
(
stdev
)
+
", "
+
str
(
outliers
)
+
", "
+
str
(
measurement_str_shortend
)
+
"
\n
"
)
else
:
out_file
.
write
(
mean_str
+
", "
+
stdev_str
+
", "
+
str
(
outliers
)
+
", "
+
str
(
measurement_str_shortend
)
+
"
\n
"
)
fig
=
plt
.
figure
(
"PPS_skew_fiberspool - PPS_skew_reference [ps]"
)
ax
=
fig
.
add_subplot
(
111
)
...
...
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