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
6623570e
Commit
6623570e
authored
Sep 15, 2017
by
Peter Jansweijer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added proper fig_alpha_error
parent
7c6b58e2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
8 deletions
+6
-8
analyze_sellmeier.py
sw/insitu_alpha/analyze_sellmeier.py
+6
-8
No files found.
sw/insitu_alpha/analyze_sellmeier.py
View file @
6623570e
...
...
@@ -497,27 +497,25 @@ if __name__ == "__main__":
ax
.
plot
(
x_clean
,
alpha_lin_clean
,
color
=
'blue'
,
dashes
=
[
5
,
5
,
5
,
5
],
label
=
'linear'
)
ax
.
legend
(
loc
=
'lower right'
,
fontsize
=
'medium'
)
"""
fig_alpha_error
=
plt
.
figure
(
"Sellmeier/Linear Error wavelength"
)
ax
=
fig_alpha_error
.
add_subplot
(
111
)
ax.set_title("
Sellmeier/Linear Error a function of wavelength
")
ax
.
set_title
(
"
Time error due to using linear instead of 5-term sellmeier
"
)
if
use_itu_channels
:
ax
.
set_xlabel
(
'ITU Channel number'
)
else
:
ax
.
set_xlabel
(
'Wavelenth [nm]'
)
ax.set_ylabel('
%
error
')
ax
.
set_ylabel
(
'
time error [ps]
'
)
#ax1.text(0.01, 0.95, 'fiber delayCoefficient (alpha) derived using', transform=ax.transAxes)
#ax1.text(0.01, 0.90, 'linear and 5-term Sellmeier fit', transform=ax.transAxes)
ax
.
axhline
(
0
,
color
=
'gray'
)
ax
.
axvline
(
fixed_lambda
*
1e9
,
color
=
'red'
)
arr_clean
=
numpy
.
array
(
alpha_clean
)
arr_lin_clean
=
numpy
.
array
(
alpha_lin_clean
)
alpha_error1 = (arr_clean - arr_lin_clean)*100/arr_clean
alpha_error2 = (arr_clean - arr_lin_clean)*200/(arr_clean + arr_lin_clean)
ax.plot(x_clean, alpha_error1, label='error')
ax.plot(x_clean, alpha_error2, label='error')
alpha_error
=
(
y_clean
*
(
arr_lin_clean
-
arr_clean
))
/
(
2
*
(
arr_lin_clean
+
2
))
ax
.
plot
(
x_clean
,
alpha_error
,
label
=
'time error'
)
ax
.
legend
(
loc
=
'lower right'
,
fontsize
=
'medium'
)
"""
alpha_file
=
open
(
name
+
".out"
,
"w"
)
alpha_file
.
write
(
"file: "
+
insitu_file
+
"
\n
"
)
...
...
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