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
ca966e7f
Commit
ca966e7f
authored
Sep 07, 2017
by
Peter Jansweijer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
new color mapping
parent
b5d83a3c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
8 deletions
+11
-8
analyze_sellmeier.py
sw/insitu_alpha/analyze_sellmeier.py
+11
-8
No files found.
sw/insitu_alpha/analyze_sellmeier.py
View file @
ca966e7f
...
...
@@ -462,12 +462,15 @@ if __name__ == "__main__":
ax
.
set_xlabel
(
'Wavelenth [nm]'
)
ax
.
text
(
0.01
,
0.85
,
"1st order linear tangent: "
+
str
(
tangent
)
+
" [ps/nm]"
,
transform
=
ax
.
transAxes
)
ax
.
plot
(
x
,
y
,
color
=
'red'
,
label
=
'original data'
)
# Original datapoints
ax
.
plot
(
x
,
ly
,
"."
,
color
=
'red'
,
label
=
'best fit 5-term Sellmeier'
)
# 5-term Sellmeier best fit
ax
.
plot
(
x
,
ly
+
tol
,
"."
,
color
=
'gray'
,
label
=
'tolerances'
)
# 5-term Sellmeier best fit with + tolerances
ax
.
plot
(
x
,
ly
-
tol
,
"."
,
color
=
'gray'
)
# 5-term Sellmeier best fit with - tolerances
ax
.
plot
(
x_clean
,
y_clean
,
color
=
'blue'
,
label
=
'data, outliers removed'
)
# cleaned array in [nm]
ax
.
plot
(
x_clean
,
ly_clean
,
color
=
'green'
,
label
=
'5-term Sellmeier fit'
)
# final clean 5th order sellmeier fit in [nm]
with_tolerances
=
True
ax
.
plot
(
x
,
y
,
color
=
'blue'
,
label
=
'data'
)
# Original datapoints
if
with_tolerances
:
ax
.
plot
(
x
,
ly
,
"."
,
color
=
'gray'
,
label
=
'best fit 5-term Sellmeier'
)
# 5-term Sellmeier best fit
ax
.
plot
(
x
,
ly
+
tol
,
"."
,
color
=
'#c0c0c0'
,
label
=
'tolerances'
)
# 5-term Sellmeier best fit with + tolerances
ax
.
plot
(
x
,
ly
-
tol
,
"."
,
color
=
'#c0c0c0'
)
# 5-term Sellmeier best fit with - tolerances
ax
.
plot
(
x_clean
,
y_clean
,
color
=
'red'
,
label
=
'data, outliers removed'
)
# cleaned array in [nm]
ax
.
plot
(
x_clean
,
ly_clean
,
color
=
'green'
,
label
=
'5-term Sellmeier fit'
)
# final clean 5th order sellmeier fit in [nm]
ax
.
legend
(
loc
=
'lower right'
,
fontsize
=
'medium'
)
fig
.
savefig
(
insitu_file
+
".png"
)
...
...
@@ -486,8 +489,8 @@ if __name__ == "__main__":
ax
.
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'
)
ax
.
plot
(
x_clean
,
alpha_clean
,
color
=
'
blue
'
,
label
=
'5-term Sellmeier'
)
ax
.
plot
(
x_clean
,
alpha_lin_clean
,
color
=
'
green
'
,
label
=
'linear'
)
ax
.
plot
(
x_clean
,
alpha_clean
,
color
=
'
green
'
,
label
=
'5-term Sellmeier'
)
ax
.
plot
(
x_clean
,
alpha_lin_clean
,
color
=
'
blue
'
,
label
=
'linear'
)
ax
.
legend
(
loc
=
'lower right'
,
fontsize
=
'medium'
)
alpha_file
=
open
(
name
+
".out"
,
"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