summaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authorEugeniy Mikhailov <evgmik@gmail.com>2014-05-13 15:35:26 -0400
committerEugeniy Mikhailov <evgmik@gmail.com>2014-05-13 15:58:56 -0400
commitd1b62466d81b164656588ac1c55acff15ee9ea43 (patch)
treecce78f90b0768361c4a268b946848842e1e47456 /misc
downloadoptics_toolkit-d1b62466d81b164656588ac1c55acff15ee9ea43.tar.gz
optics_toolkit-d1b62466d81b164656588ac1c55acff15ee9ea43.zip
initial
The optics_toolkit code taken from http://mercury.pr.erau.edu/~greta9a1/downloads/index.html the older version is also available at mathwork web site http://www.mathworks.com/matlabcentral/fileexchange/15459-basic-paraxial-optics-toolkit
Diffstat (limited to 'misc')
-rw-r--r--misc/fresnel2.m29
-rw-r--r--misc/fresneliso.m56
-rw-r--r--misc/incomplete/Hermite_Orthogonality.nb147
-rw-r--r--misc/incomplete/Hermite_overlap.m17
-rw-r--r--misc/incomplete/optics_code.txt8
-rw-r--r--misc/incomplete/prop_fft1.m2
-rw-r--r--misc/r2f/CVI_BICC_BK7_r2f_index.txt34
-rw-r--r--misc/r2f/CVI_BICC_SIO2_r2f_index.txt28
-rw-r--r--misc/r2f/CVI_BICX_BK7_r2f_index.txt105
-rw-r--r--misc/r2f/CVI_BICX_SIO2_r2f_index.txt62
-rw-r--r--misc/r2f/CVI_PLCC_BK7_r2f_index.txt52
-rw-r--r--misc/r2f/CVI_PLCC_SIO2_r2f_index.txt58
-rw-r--r--misc/r2f/CVI_PLCX_BK7_r2f_index.txt150
-rw-r--r--misc/r2f/CVI_PLCX_SIO2_r2f_index.txt104
-rw-r--r--misc/r2f/f2r.m130
-rw-r--r--misc/r2f/r2f.m130
16 files changed, 1112 insertions, 0 deletions
diff --git a/misc/fresnel2.m b/misc/fresnel2.m
new file mode 100644
index 0000000..a674cec
--- /dev/null
+++ b/misc/fresnel2.m
@@ -0,0 +1,29 @@
+% Returns the reflectivities as a function of incident angle. rs and rp are
+% NxM matrixes, each row corresponds to a particular wavelength and each column
+% to a particular angle (i.e. wavelength is labeled by N and angle by M).
+%
+% na = Nx1, Nx2 or Nx3 matrix of indexes of the medium on the near side of the interface (i.e. the ambient medium).
+% May be given as a 1xm vector (m=1,2,3) if nb does not change with na.
+% na(N,1), na(N,2) and na(N,3) are the isotropic indices as defined in Orfanidi's function fresnel.m
+% (which is called by this function). The firstindex would often label the indices at different wavelengths.% nb = Nx1, Nx2 or Nx3 matrix of indexes of the medium on the far side of the interface.
+% May be given as a 1xm vector (m=1,2,3) if na does not change with nb.
+% nb(N,1), nb(N,2) and nb(N,3) are the isotropic indices as defined in Orfanidi's function fresnel.m
+% (which is called by this function). The firstindex would often label the indices at different wavelengths.
+% theta = vector of angles of incidence in degrees.
+%
+% Relies on the function fresnel.m by Orfanidis which must be in the path.
+% If only 1-D matrixes are needed and the medium is isotropic, use fresneliso.m instead. It is much faster.
+
+function [rs rp]=fresnel2(na,nb,theta)
+
+if size(na,1)==1
+ na=repmat(na,size(nb));
+elseif size(nb,1)==1
+ nb=repmat(nb,size(na));
+end
+
+rs=zeros(size(nb,1),length(theta)); rp=rs;
+
+for s=1:size(nb,1)
+ [rs(s,:) rp(s,:)]=fresnel(na(s,:),nb(s,:),theta);
+end \ No newline at end of file
diff --git a/misc/fresneliso.m b/misc/fresneliso.m
new file mode 100644
index 0000000..fd9ee02
--- /dev/null
+++ b/misc/fresneliso.m
@@ -0,0 +1,56 @@
+% fresneliso.m - Fresnel reflection coefficients for isotropic media with either indices _or_ lambda as vectors
+%
+% Usage: [rs,rp] = fresnel(na,nb,theta)
+%
+% na,nb = refractive indices of left and right media. May be vectors if lambda is not.
+% theta = incident angle(s) in degrees. May be a vector if na and nb are vectors.
+% rs,rp = reflection coefficients for p and s polarizations
+%
+% Modified by Andri M. Gretarsson from fresnel.m written by Orfanidi. August 2008.
+
+function [rs,rp] = fresnel(na,nb,theta)
+
+if nargin==0, help fresnel; return; end
+
+if length(na)==1
+ na=ones(size(nb))*na;
+elseif length(nb)==1
+ nb=ones(size(na));
+end
+theta = pi*theta/180;
+
+if length(nb) == 1
+ Na = 1./sqrt(cos(theta).^2/na^2 + sin(theta).^2/na^2);
+ xe = (na*sin(theta)).^2; % used for s-pol
+ xm = (Na.*sin(theta)).^2; % used for p-pol
+
+ rs = (na*cos(theta) - sqrt(nb^2 - xe)) ./ ...
+ (na*cos(theta) + sqrt(nb^2 - xe));
+
+ if na==nb,
+ rp = (na - nb) / (na + nb) * ones(1,length(theta));
+ else
+ rp = (na*na * sqrt(nb^2 - xm) - nb*nb * sqrt(na^2 - xm)) ./ ...
+ (na*na * sqrt(nb^2 - xm) + nb*nb * sqrt(na^2 - xm));
+ end
+elseif length(theta) == 1
+ Na = 1./sqrt(cos(theta)^2./na.^2 + sin(theta)^2./na.^2);
+ xe = (na*sin(theta)).^2; % used for s-pol
+ xm = (Na*sin(theta)).^2; % used for p-pol
+
+ rs = (na*cos(theta) - sqrt(nb.^2 - xe)) ./ ...
+ (na*cos(theta) + sqrt(nb.^2 - xe));
+
+ if na==nb,
+ rp = (na - nb) ./ (na + nb);
+ else
+ rp = (na.*na .* sqrt(nb.^2 - xm) - nb.*nb .* sqrt(na.^2 - xm)) ./ ...
+ (na.*na .* sqrt(nb.^2 - xm) + nb.*nb .* sqrt(na.^2 - xm));
+ end
+
+else
+ error('Either na and nb must have length 1 _or_ theta must have length 1.');
+end
+
+
+
diff --git a/misc/incomplete/Hermite_Orthogonality.nb b/misc/incomplete/Hermite_Orthogonality.nb
new file mode 100644
index 0000000..07c4501
--- /dev/null
+++ b/misc/incomplete/Hermite_Orthogonality.nb
@@ -0,0 +1,147 @@
+(************** Content-type: application/mathematica **************
+ CreatedBy='Mathematica 5.0'
+
+ Mathematica-Compatible Notebook
+
+This notebook can be used with any Mathematica-compatible
+application, such as Mathematica, MathReader or Publicon. The data
+for the notebook starts with the line containing stars above.
+
+To get the notebook into a Mathematica-compatible application, do
+one of the following:
+
+* Save the data starting with the line of stars above into a file
+ with a name ending in .nb, then open the file inside the
+ application;
+
+* Copy the data starting with the line of stars above to the
+ clipboard, then use the Paste menu command inside the application.
+
+Data for notebooks contains only printable 7-bit ASCII and can be
+sent directly in email or through ftp in text mode. Newlines can be
+CR, LF or CRLF (Unix, Macintosh or MS-DOS style).
+
+NOTE: If you modify the data for this notebook not in a Mathematica-
+compatible application, you must delete the line below containing
+the word CacheID, otherwise Mathematica-compatible applications may
+try to use invalid cache data.
+
+For more information on notebooks and Mathematica-compatible
+applications, contact Wolfram Research:
+ web: http://www.wolfram.com
+ email: info@wolfram.com
+ phone: +1-217-398-0700 (U.S.)
+
+Notebook reader applications are available free of charge from
+Wolfram Research.
+*******************************************************************)
+
+(*CacheID: 232*)
+
+
+(*NotebookFileLineBreakTest
+NotebookFileLineBreakTest*)
+(*NotebookOptionsPosition[ 2986, 97]*)
+(*NotebookOutlinePosition[ 3685, 120]*)
+(* CellTagsIndexPosition[ 3641, 116]*)
+(*WindowFrame->Normal*)
+
+
+
+Notebook[{
+Cell[BoxData[
+ \(Clear[x, y, n1, n2, m1, m2]\)], "Input"],
+
+Cell[CellGroupData[{
+
+Cell[BoxData[{
+ \(u1[n1_, x_] = \
+ HermiteH[n1, \(\@2\) \((x)\)/\((w)\)]\ *\
+ Exp[\(-\[ImaginaryI]\) \(k\ \((x)\)^2\)\/\(2\ R\)\ - \ \
+\((x)\)^2\/\((w)\)^2]\ *\ \((2/\[Pi])\)\^\(1/4\)/\((2^n1\ \(n1!\)\ \
+w)\)\^\(1/2\)\n\), "\n",
+ \(\(u2[n2_, x_] = \
+ HermiteH[n2, \(\@2\) x/w]\ *\
+ Exp[\(-\[ImaginaryI]\) \(k\ x^2\)\/\(2\ R\)\ - \
+ x^2\/w^2]*\((2/\[Pi])\)\^\(1/4\)/\((2^n2\ \(n2!\)\ \
+w)\)\^\(1/2\);\)\)}], "Input"],
+
+Cell[BoxData[
+ \(\(\[ExponentialE]\^\(\(-\(\(\[ImaginaryI]\ k\ x\^2\)\/\(2\ R\)\)\) - \
+x\^2\/w\^2\)\ \((2\/\[Pi])\)\^\(1/4\)\ HermiteH[n1, \(\@2\ \
+x\)\/w]\)\/\@\(2\^n1\ w\ \(n1!\)\)\)], "Output"]
+}, Open ]],
+
+Cell[CellGroupData[{
+
+Cell[BoxData[
+ \(Simplify[
+ Integrate[
+ Conjugate[u1[1, x]]*
+ u2[1, x], {x, \(-\[Infinity]\), \[Infinity]}], {b > 0, a > 0,
+ k > 0, R > 0, w > 0}]\)], "Input"],
+
+Cell[BoxData[
+ \(1\)], "Output"]
+}, Open ]],
+
+Cell[CellGroupData[{
+
+Cell[BoxData[{
+ \(\(n = {1, 2, 3, 4, 5};\)\), "\n",
+ \(2^\((n - 1)\)\ \(n!\)\)}], "Input"],
+
+Cell[BoxData[
+ \({1, 4, 24, 192, 1920}\)], "Output"]
+}, Open ]]
+},
+FrontEndVersion->"5.0 for Microsoft Windows",
+ScreenRectangle->{{0, 1600}, {0, 1111}},
+WindowSize->{749, 819},
+WindowMargins->{{221, Automatic}, {Automatic, 94}},
+Background->RGBColor[0.988235, 0.996078, 0.686275]
+]
+
+(*******************************************************************
+Cached data follows. If you edit this Notebook file directly, not
+using Mathematica, you must remove the line containing CacheID at
+the top of the file. The cache data will then be recreated when
+you save this file from within Mathematica.
+*******************************************************************)
+
+(*CellTagsOutline
+CellTagsIndex->{}
+*)
+
+(*CellTagsIndex
+CellTagsIndex->{}
+*)
+
+(*NotebookFileOutline
+Notebook[{
+Cell[1754, 51, 60, 1, 35, "Input"],
+
+Cell[CellGroupData[{
+Cell[1839, 56, 470, 10, 205, "Input"],
+Cell[2312, 68, 200, 3, 74, "Output"]
+}, Open ]],
+
+Cell[CellGroupData[{
+Cell[2549, 76, 191, 5, 61, "Input"],
+Cell[2743, 83, 35, 1, 34, "Output"]
+}, Open ]],
+
+Cell[CellGroupData[{
+Cell[2815, 89, 97, 2, 61, "Input"],
+Cell[2915, 93, 55, 1, 34, "Output"]
+}, Open ]]
+}
+]
+*)
+
+
+
+(*******************************************************************
+End of Mathematica Notebook file.
+*******************************************************************)
+
diff --git a/misc/incomplete/Hermite_overlap.m b/misc/incomplete/Hermite_overlap.m
new file mode 100644
index 0000000..22c854a
--- /dev/null
+++ b/misc/incomplete/Hermite_overlap.m
@@ -0,0 +1,17 @@
+function cAB=Hermite_overlap(paramsA,paramsB)
+
+lA=params(:,1);
+mA=params(:,2);
+qA=params(:,3);
+lambda=paramsA(:,4);
+
+lB=params(:,1);
+mB=params(:,2);
+qB=params(:,3);
+
+
+q0A=i*imag(qA);
+q0B=i*imag(qB);
+
+
+
diff --git a/misc/incomplete/optics_code.txt b/misc/incomplete/optics_code.txt
new file mode 100644
index 0000000..f9b40d5
--- /dev/null
+++ b/misc/incomplete/optics_code.txt
@@ -0,0 +1,8 @@
+
+By specifying the reflection coefficient at each cavity mirror
+as an external function, we can couple cavities together. The reflection function can include
+an input field such as from an input beam or an attached cavity.
+
+
+
+
diff --git a/misc/incomplete/prop_fft1.m b/misc/incomplete/prop_fft1.m
new file mode 100644
index 0000000..5ec7cf1
--- /dev/null
+++ b/misc/incomplete/prop_fft1.m
@@ -0,0 +1,2 @@
+% Uses a 1 dimensional fourier transform to propagate an axially symmetric field.
+function prop_fft1(); \ No newline at end of file
diff --git a/misc/r2f/CVI_BICC_BK7_r2f_index.txt b/misc/r2f/CVI_BICC_BK7_r2f_index.txt
new file mode 100644
index 0000000..db98963
--- /dev/null
+++ b/misc/r2f/CVI_BICC_BK7_r2f_index.txt
@@ -0,0 +1,34 @@
+%R.O.C. f for 1064nm
+%[mm] [mm]
+5.5 -5.1
+8.6 -8.2
+10.8 -10.3
+12.7 -12.2
+20.9 -20.3
+23.4 -22.9
+26.1 -25.4
+26.1 -25.4
+26.1 -25.4
+26.4 -25.7
+51.8 -50.8
+51.8 -50.8
+77.6 -76.3
+103.4 -101.7
+103.4 -101.6
+103.4 -101.7
+129.1 -127.1
+154.9 -152.3
+206.4 -203.3
+206.4 -203.3
+206.4 -203.3
+309.4 -305.3
+309.4 -305.0
+309.4 -305.3
+412.4 -407.0
+412.4 -406.7
+412.4 -407.0
+515.8 -509.0
+515.8 -508.7
+618.4 -610.3
+618.4 -610.0
+618.4 -610.3
diff --git a/misc/r2f/CVI_BICC_SIO2_r2f_index.txt b/misc/r2f/CVI_BICC_SIO2_r2f_index.txt
new file mode 100644
index 0000000..2209be6
--- /dev/null
+++ b/misc/r2f/CVI_BICC_SIO2_r2f_index.txt
@@ -0,0 +1,28 @@
+%R.O.C. f for 1064nm
+%[mm] [mm]
+20.9 -22.9
+1030.5 -1145.9
+1030.5 -1145.9
+26.1 -28.7
+1030.5 -1145.6
+36.4 -40.1
+51.8 -57.3
+51.8 -57.3
+51.8 -57.3
+72.5 -80.3
+77.6 -85.9
+103.4 -114.5
+103.4 -114.6
+154.9 -171.7
+154.9 -172.3
+206.4 -229.2
+206.4 -229.5
+257.9 -286.8
+257.9 -286.8
+412.4 -458.3
+412.4 -458.3
+515.8 -573.6
+515.8 -573.2
+515.8 -573.6
+618.4 -687.3
+257.9 -286.5
diff --git a/misc/r2f/CVI_BICX_BK7_r2f_index.txt b/misc/r2f/CVI_BICX_BK7_r2f_index.txt
new file mode 100644
index 0000000..beec1a5
--- /dev/null
+++ b/misc/r2f/CVI_BICX_BK7_r2f_index.txt
@@ -0,0 +1,105 @@
+%R.O.C. f for 1064nm
+%[mm] [mm]
+9.4 10.1
+9.8 10.1
+9.7 10.2
+12.5 13.2
+14.4 15.3
+14.9 15.2
+17.4 18.2
+18.8 19.3
+19.7 20.3
+21.4 22.3
+25.2 25.4
+25.2 25.4
+25.5 25.8
+25.0 25.4
+25.1 25.8
+24.2 25.4
+23.9 25.4
+24.5 25.8
+25.3 25.4
+29.8 30.5
+34.9 35.6
+35.6 35.5
+38.1 38.7
+37.0 38.7
+40.2 40.7
+51.0 50.7
+51.0 50.8
+50.7 50.8
+50.6 50.8
+50.6 50.8
+49.3 50.9
+48.9 50.8
+48.9 50.8
+51.2 50.9
+49.3 51.6
+61.3 60.9
+61.0 61.0
+60.4 61.0
+61.8 61.3
+63.4 64.5
+76.8 76.2
+76.6 76.3
+76.6 76.3
+76.1 76.2
+76 76.3
+75.4 76.2
+77.3 77.0
+77.3 77.4
+76.5 77.5
+7.7 8.2
+76.9 81.7
+81.8 81.3
+80.8 81.3
+92.0 91.5
+102.7 101.7
+102.6 101.7
+102.4 101.8
+102.1 101.7
+102.1 101.7
+101.6 101.6
+101.6 101.6
+128.4 127.1
+128.8 127.5
+128.2 127.2
+128.2 127.2
+128.0 127.1
+127.7 127.1
+127.5 127.0
+128.4 127.1
+150.0 149.7
+154.0 152.7
+153.7 152.7
+153.4 152.5
+190.0 188.7
+205.7 203.3
+205.7 203.4
+205.6 203.5
+205.6 203.5
+205.4 203.4
+205.2 203.6
+205.2 203.3
+205.7 203.3
+206.6 205.3
+257.1 254.2
+256.8 254.2
+308.5 304.8
+308.5 304.8
+308.5 305.2
+360.0 355.8
+360.0 355.9
+411.5 406.5
+411.5 406.7
+514.6 508.2
+514.6 508.3
+514.6 508.4
+617.6 610.0
+1029.8 1016.7
+1029.8 1016.7
+1029.8 1016.7
+2006.6 1981.6
+2060 2033.4
+2060.0 2033.2
+2060.0 2033.2
diff --git a/misc/r2f/CVI_BICX_SIO2_r2f_index.txt b/misc/r2f/CVI_BICX_SIO2_r2f_index.txt
new file mode 100644
index 0000000..ac88b8d
--- /dev/null
+++ b/misc/r2f/CVI_BICX_SIO2_r2f_index.txt
@@ -0,0 +1,62 @@
+%R.O.C. f for 1064nm
+%[mm] [mm]
+76.9 85.9
+14.4 17.1
+17.4 20.5
+19.7 22.8
+19.1 22.8
+21.4 25.0
+25.2 28.6
+25.0 28.6
+23.9 28.4
+25.5 29.0
+29.8 34.3
+35.6 40.0
+35.4 40.0
+35.2 40.0
+38.1 43.5
+51.1 57.2
+51.0 57.2
+50.6 57.2
+49.3 57.0
+48.9 57.0
+61.4 68.7
+61.0 68.6
+64.4 72.7
+76.8 85.9
+76.6 85.9
+76.1 85.8
+75.5 85.8
+75.4 85.8
+91.2 102.9
+102.7 114.6
+102.4 114.5
+102.4 114.3
+102.1 114.5
+308.5 343.8
+102.5 114.5
+101.6 114.4
+514.6 572.7
+572.7 637.3
+1029.8 1145.6
+1029.8 1145.6
+1029.8 1145.6
+2060.0 2291.1
+2060.0 2291.1
+103.4 115.3
+103.1 116.3
+128.4 143.2
+128.2 143.1
+128.0 143.2
+127.5 143.0
+127.9 143.1
+128.7 144.3
+154.0 171.7
+153.7 171.7
+153.4 171.8
+205.7 229.1
+205.6 229.1
+205.6 229.1
+205.4 229.0
+205.2 229.1
+256.8 286.3
diff --git a/misc/r2f/CVI_PLCC_BK7_r2f_index.txt b/misc/r2f/CVI_PLCC_BK7_r2f_index.txt
new file mode 100644
index 0000000..0135840
--- /dev/null
+++ b/misc/r2f/CVI_PLCC_BK7_r2f_index.txt
@@ -0,0 +1,52 @@
+%R.O.C. f for 1064nm
+%[mm] [mm]
+103.4 -204.1
+128.8 -254.2
+128.8 -254.2
+130.8 -258.2
+207.7 -410.0
+257.5 -508.3
+257.5 -508.3
+309.1 -610.1
+309.1 -610.1
+10.3 -20.3
+12.9 -25.5
+25.8 -50.9
+12.9 -25.5
+25.8 -50.9
+15.5 -30.6
+25.8 -50.9
+15.5 -30.6
+25.8 -50.9
+15.5 -30.6
+26.2 -51.7
+19.6 -38.7
+30.94 -61.0
+25.8 -50.9
+38.6 -76.2
+38.6 -76.2
+38.6 -76.2
+38.6 -76.2
+38.6 -76.2
+51.5 -101.7
+51.5 -101.7
+51.5 -101.7
+51.5 -101.7
+51.5 -101.7
+51.5 -101.7
+51.5 -101.7
+64.4 -127.1
+64.4 -127.1
+64.4 -127.1
+64.4 -127.1
+77.3 -152.6
+77.3 -152.6
+77.3 -152.6
+77.3 -152.6
+90.8 -179.2
+103.0 -203.3
+103.0 -203.3
+103.0 -203.3
+103.0 -203.3
+103.0 -203.3
+103.0 -203.3
diff --git a/misc/r2f/CVI_PLCC_SIO2_r2f_index.txt b/misc/r2f/CVI_PLCC_SIO2_r2f_index.txt
new file mode 100644
index 0000000..655560c
--- /dev/null
+++ b/misc/r2f/CVI_PLCC_SIO2_r2f_index.txt
@@ -0,0 +1,58 @@
+%R.O.C. f for 1064nm
+%[mm] [mm]
+12.9 -28.7
+493.0 -1096.5
+10.3 -22.9
+11.2 -24.9
+12.9 -28.7
+13.1 -29.1
+15.5 -34.5
+19.6 -43.6
+20.6 -45.8
+25.8 -57.4
+25.8 -57.4
+25.8 -57.4
+25.8 -57.4
+25.8 -57.4
+25.8 -57.4
+38.6 -85.8
+38.6 -85.8
+39.2 -87.2
+39.2 -87.2
+51.5 -114.5
+51.5 -114.5
+51.5 -114.5
+51.5 -114.5
+51.5 -114.5
+51.5 -114.5
+64.4 -143
+64.4 -143.2
+64.4 -143.2
+64.4 -143.2
+64.4 -143.2
+77.3 -171.9
+77.3 -171.9
+77.3 -171.9
+77.3 -171.9
+103.0 -229.1
+103.0 -229.1
+103.0 -229.1
+128.8 -286.5
+128.8 -286.5
+154.5 -343.6
+154.5 -343.6
+180.3 -401.0
+180.3 -401.0
+206.6 -459.5
+206.6 -459.5
+257.5 -572.7
+257.5 -572.7
+309.1 -687.5
+309.1 -687.5
+412.1 -916.5
+515.1 -1145.6
+515.1 -1145.6
+515.1 -1145.6
+772.6 -1718.3
+772.6 -1718.3
+772.6 -1718.3
diff --git a/misc/r2f/CVI_PLCX_BK7_r2f_index.txt b/misc/r2f/CVI_PLCX_BK7_r2f_index.txt
new file mode 100644
index 0000000..12440da
--- /dev/null
+++ b/misc/r2f/CVI_PLCX_BK7_r2f_index.txt
@@ -0,0 +1,150 @@
+%R.O.C. f for 1064nm
+%[mm] [mm]
+9.3 18.4
+10.3 20.3
+11.3 22.3
+8.8 17.4
+9.3 18.4
+10.3 20.3
+13.1 25.9
+51.5 101.7
+206 406.6
+1.8 3.6
+3.1 6.1
+5.2 10.3
+5.2 10.3
+6.4 12.6
+7.7 15.2
+7.7 15.2
+12.9 25.5
+12.9 25.5
+12.9 25.5
+12.9 25.5
+12.9 25.5
+15.5 30.6
+15.5 30.6
+16 31.6
+16.5 32.6
+16.5 32.6
+18 35.5
+18 35.5
+18 35.5
+18 35.5
+18 35.5
+19.6 38.7
+20.6 40.7
+20.6 40.7
+20.6 40.7
+25.8 50.9
+25.8 50.9
+25.8 50.9
+25.8 50.9
+25.8 50.9
+25.8 50.9
+25.6 50.5
+25.8 50.9
+30.9 61
+30.9 61
+30.9 61
+30.9 61
+32.5 64.1
+32.7 64.5
+36.1 71.3
+36.1 71.3
+38.6 76.2
+38.6 76.2
+38.6 76.2
+38.6 76.2
+38.6 76.2
+38.6 76.2
+39.2 77.4
+39.2 77.4
+41.2 81.3
+41.2 81.3
+43.8 86.5
+46.2 91.2
+51.5 101.7
+51.5 101.7
+51.5 101.7
+51.5 101.7
+51.5 101.7
+51.5 101.7
+54.1 106.8
+56.7 111.9
+61.8 122
+64.4 127.1
+64.4 127.1
+64.4 127.1
+64.4 127.1
+65.4 129.1
+65.4 129.1
+65.4 129.1
+67 132.2
+69.5 137.2
+72.1 142.3
+77.3 152.6
+77.3 152.6
+77.3 152.6
+77.3 152.6
+77.3 152.6
+78.5 154.9
+78.5 154.9
+82.4 162.6
+82.4 162.6
+87.6 172.9
+91.2 180
+103 203.3
+103 203.3
+103 203.3
+103 203.3
+103 203.3
+103 203.3
+128.8 254.2
+128.8 254.2
+128.8 254.2
+128.8 254.2
+129.6 255.8
+130.8 258.2
+138.4 271.3
+154.5 305
+178.5 352.3
+180.3 355.9
+180.3 355.9
+180.3 355.9
+185 365.2
+206 406.6
+206.7 408
+238.4 470.6
+250 493.5
+257.5 508.3
+257.5 508.3
+257.5 508.3
+257.5 508.3
+309.1 610.1
+309.1 610.1
+309.1 610.1
+360.6 711.8
+360.6 711.8
+386.6 762.5
+386.6 762.5
+412.1 813.4
+412.1 813.4
+463.5 914.9
+463.5 914.9
+515.1 1016.7
+515.1 1016.7
+515.1 1016.7
+772.6 1525
+772.6 1525
+1030.2 2033.4
+1030.2 2033.4
+1545 3049.5
+1545 3049.5
+2060 4066
+2060 4066
+2575 5082.6
+2575 5082.6
+3863 7624.8
+3863 7624.8
+5151 10167.1
+5151 10167.1
diff --git a/misc/r2f/CVI_PLCX_SIO2_r2f_index.txt b/misc/r2f/CVI_PLCX_SIO2_r2f_index.txt
new file mode 100644
index 0000000..ab57e02
--- /dev/null
+++ b/misc/r2f/CVI_PLCX_SIO2_r2f_index.txt
@@ -0,0 +1,104 @@
+%R.O.C. f for 1064nm
+%[mm] [mm]
+1.5 3.3
+3.1 6.9
+4.1 9.1
+5.2 11.6
+7.7 17.1
+9.3 20.7
+12.9 28.7
+12.9 28.7
+12.9 28.7
+16.0 35.6
+18.0 40.0
+20.6 45.8
+25.8 57.4
+25.8 57.4
+30.9 68.7
+30.9 68.7
+51.5 114.5
+51.5 114.5
+64.4 143.2
+64.4 143.2
+64.4 143.2
+64.4 143.2
+65.4 145.5
+65.4 145.5
+67.0 149.0
+72.1 160.4
+72.1 160.4
+77.3 171.9
+77.3 171.9
+77.3 171.9
+77.3 171.9
+82.4 183.3
+91.2 202.8
+101.0 224.6
+103.0 229.1
+103.0 229.1
+128.8 286.5
+130.8 290.9
+154.5 343.6
+180.3 401.0
+206.0 458.2
+1030.2 2291.2
+1545.0 3436.2
+2060.0 4581.5
+2575.0 5726.9
+3863.0 8591.5
+5151.0 11456.1
+5.2 11.6
+6.4 14.2
+7.7 17.1
+10.3 22.9
+12.9 28.7
+12.9 28.7
+13.1 29.1
+18.0 40.0
+19.6 43.6
+20.6 45.8
+25.8 57.4
+25.8 57.4
+30.9 68.7
+30.9 68.7
+33.7 75.0
+33.7 75.0
+38.6 85.8
+38.6 85.8
+38.6 85.8
+38.6 85.8
+41.2 91.6
+41.2 91.6
+45.8 101.9
+46.4 103.2
+51.5 114.5
+51.5 114.5
+51.5 114.5
+51.5 114.5
+61.8 137.4
+64.4 143.2
+100.0 222.4
+103.0 229.1
+103.0 229.1
+103.0 229.1
+128.8 286.5
+154.5 343.6
+154.5 343.6
+180.3 401.0
+257.5 572.7
+257.5 572.7
+257.5 572.7
+309.1 687.5
+306.0 680.6
+309.1 687.5
+309.1 687.5
+360.6 802.0
+360.6 802.0
+515.1 1145.6
+515.1 1145.6
+515.1 1145.6
+772.6 1718.3
+1030.2 2291.2
+1545.0 3436.2
+2060.0 4581.5
+2575.0 5726.9
diff --git a/misc/r2f/f2r.m b/misc/r2f/f2r.m
new file mode 100644
index 0000000..27b6e1c
--- /dev/null
+++ b/misc/r2f/f2r.m
@@ -0,0 +1,130 @@
+%---------------------------------------------------------------------------
+% SYNTAX: R=f2r(f <,lenstype>)
+% <...> indicates optional arguments
+%
+%
+% Uses a lookup table or a formula to obtain the focal length of a
+% spherical lens for 1064 nm light from the radius of curvature.
+%
+%
+%
+% INTPUT ARGUMENTS:
+% f = focal length of the lens [mm]
+% lenstype = Defines the source to use for the conversion. Can be on of
+% the following:
+%
+% cvi_plcx_bk7 -- CVI corp. plano-convex, BK7 lenses
+% cvi_bicx_bk7 -- CVI corp. bi-convex, BK7 lenses
+% cvi_plcc_bk7 -- CVI corp. plano-concave, BK7 lenses
+% cvi_bicc_bk7 -- CVI corp. bi-concave, bK7 lenses
+% cvi_plcx_sio2 -- CVI corp. plano-convex, Fused Silica lenses
+% cvi_bicx_sio2 -- CVI corp. bi-convex, Fused Silica lenses
+% cvi_plcc_sio2 -- CVI corp. plano-concave, Fused Silica lenses
+% cvi_bicc_sio2 -- CVI corp. bi-concave, Fused Silica lenses
+% default -- uses the formula R=2f.
+%
+% OUTPUT ARGUMENTS:
+% R = radius of curvature [mm]
+%
+%---------------------------------------------------------------------------
+% SYNTAX: f=f2r(f <,lenstype>)
+%-------------------------------------------------------------------------------
+
+function R=f2r(f,varargin);
+
+if nargin>=2, lenstype=varargin{1}; else lenstype='default'; end
+
+switch lower(lenstype)
+ case 'default'
+ R=f/2;
+ case 'cvi_plcx_bk7'
+ rawdata=load('CVI_PLCX_bK7_r2f_index.txt');
+ [data(:,1),sortorder]=sort(rawdata(:,2)); % f now in 1st col, in ascending order
+ data(:,2)=rawdata(sortorder',1); % R in 2nd column
+ [posn,exactmatch]=pos(data(:,1),f);
+ f_found=data(posn,1);
+ R=data(posn,2);
+ if ~exactmatch
+ disp(['f is not found in the catalog table. Closest f is ',num2str(f_found),' mm.']);
+ end
+ disp(['f = ',num2str(f_found),' -> R = ',num2str(R),' mm.']);
+ case 'cvi_bicx_bk7'
+ rawdata=load('CVI_BICX_BK7_r2f_index.txt');
+ [data(:,1),sortorder]=sort(rawdata(:,2)); % f now in 1st col, in ascending order
+ data(:,2)=rawdata(sortorder',1); % R in 2nd column
+ [posn,exactmatch]=pos(data(:,1),f);
+ f_found=data(posn,1);
+ R=data(posn,2);
+ if ~exactmatch
+ disp(['f is not found in the catalog table. Closest f is ',num2str(f_found),' mm.']);
+ end
+ disp(['f = ',num2str(f_found),' -> R = ',num2str(R),' mm.']);
+ case 'cvi_plcc_bk7'
+ rawdata=load('CVI_PLCC_bK7_r2f_index.txt');
+ [data(:,1),sortorder]=sort(rawdata(:,2)); % f now in 1st col, in ascending order
+ data(:,2)=rawdata(sortorder',1); % R in 2nd column
+ [posn,exactmatch]=pos(data(:,1),f);
+ f_found=data(posn,1);
+ R=data(posn,2);
+ if ~exactmatch
+ disp(['f is not found in the catalog table. Closest f is ',num2str(f_found),' mm.']);
+ end
+ disp(['f = ',num2str(f_found),' -> R = ',num2str(R),' mm.']);
+ case 'cvi_bicc_bk7'
+ rawdata=load('CVI_BICC_BK7_r2f_index.txt');
+ [data(:,1),sortorder]=sort(rawdata(:,2)); % f now in 1st col, in ascending order
+ data(:,2)=rawdata(sortorder',1); % R in 2nd column
+ [posn,exactmatch]=pos(data(:,1),f);
+ f_found=data(posn,1);
+ R=data(posn,2);
+ if ~exactmatch
+ disp(['f is not found in the catalog table. Closest f is ',num2str(f_found),' mm.']);
+ end
+ disp(['f = ',num2str(f_found),' -> R = ',num2str(R),' mm.']);
+ case 'cvi_plcx_sio2'
+ rawdata=load('CVI_PLCX_SIO2_r2f_index.txt');
+ [data(:,1),sortorder]=sort(rawdata(:,2)); % f now in 1st col, in ascending order
+ data(:,2)=rawdata(sortorder',1); % R in 2nd column
+ [posn,exactmatch]=pos(data(:,1),f);
+ f_found=data(posn,1);
+ R=data(posn,2);
+ if ~exactmatch
+ disp(['f is not found in the catalog table. Closest f is ',num2str(f_found),' mm.']);
+ end
+ disp(['f = ',num2str(f_found),' -> R = ',num2str(R),' mm.']);
+ case 'cvi_bicx_sio2'
+ rawdata=load('CVI_BICX_SIO2_r2f_index.txt');
+ [data(:,1),sortorder]=sort(rawdata(:,2)); % f now in 1st col, in ascending order
+ data(:,2)=rawdata(sortorder',1); % R in 2nd column
+ [posn,exactmatch]=pos(data(:,1),f);
+ f_found=data(posn,1);
+ R=data(posn,2);
+ if ~exactmatch
+ disp(['f is not found in the catalog table. Closest f is ',num2str(f_found),' mm.']);
+ end
+ disp(['f = ',num2str(f_found),' -> R = ',num2str(R),' mm.']);
+ case 'cvi_plcc_sio2'
+ rawdata=load('CVI_PLCC_SIO2_r2f_index.txt');
+ [data(:,1),sortorder]=sort(rawdata(:,2)); % f now in 1st col, in ascending order
+ data(:,2)=rawdata(sortorder',1); % R in 2nd column
+ [posn,exactmatch]=pos(data(:,1),f);
+ f_found=data(posn,1);
+ R=data(posn,2);
+ if ~exactmatch
+ disp(['f is not found in the catalog table. Closest f is ',num2str(f_found),' mm.']);
+ end
+ disp(['f = ',num2str(f_found),' -> R = ',num2str(R),' mm.']);
+ case 'cvi_bicc_sio2'
+ rawdata=load('CVI_BICC_SIO2_r2f_index.txt');
+ [data(:,1),sortorder]=sort(rawdata(:,2)); % f now in 1st col, in ascending order
+ data(:,2)=rawdata(sortorder',1); % R in 2nd column
+ [posn,exactmatch]=pos(data(:,1),f);
+ f_found=data(posn,1);
+ R=data(posn,2);
+ if ~exactmatch
+ disp(['f is not found in the catalog table. Closest f is ',num2str(f_found),' mm.']);
+ end
+ otherwise
+ error('lenstype not recognized');
+ end
+end \ No newline at end of file
diff --git a/misc/r2f/r2f.m b/misc/r2f/r2f.m
new file mode 100644
index 0000000..8d6fcdf
--- /dev/null
+++ b/misc/r2f/r2f.m
@@ -0,0 +1,130 @@
+%---------------------------------------------------------------------------
+% SYNTAX: f=r2f(R <,lenstype>)
+% <...> indicates optional arguments
+%
+%
+% Uses a lookup table or a formula to obtain the focal length of a
+% spherical lens for 1064 nm light from the radius of curvature.
+%
+%
+%
+% INTPUT ARGUMENTS:
+% R = radius of curvature [mm]
+% lenstype = Defines the source to use for the conversion. Can be on of
+% the following:
+%
+% cvi_plcx_bk7 -- CVI corp. plano-convex, BK7 lenses
+% cvi_bicx_bk7 -- CVI corp. bi-convex, BK7 lenses
+% cvi_plcc_bk7 -- CVI corp. plano-concave, BK7 lenses
+% cvi_bicc_bk7 -- CVI corp. bi-concave, bK7 lenses
+% cvi_plcx_sio2 -- CVI corp. plano-convex, Fused Silica lenses
+% cvi_bicx_sio2 -- CVI corp. bi-convex, Fused Silica lenses
+% cvi_plcc_sio2 -- CVI corp. plano-concave, Fused Silica lenses
+% cvi_bicc_sio2 -- CVI corp. bi-concave, Fused Silica lenses
+% default -- uses the formula R=2f.
+%
+% OUTPUT ARGUMENTS:
+% f = focal length of the lens [mm]
+%
+%---------------------------------------------------------------------------
+% SYNTAX: f=r2f(R <,lenstype>)
+%-------------------------------------------------------------------------------
+
+function f=r2f(R,varargin);
+
+if nargin>=2, lenstype=varargin{1}; else lenstype='default'; end
+
+switch lower(lenstype)
+ case 'default'
+ f=2*R;
+ case 'cvi_plcx_bk7'
+ rawdata=load('CVI_PLCX_bK7_r2f_index.txt');
+ [data(:,1),sortorder]=sort(rawdata(:,1)); % R now in 1st col, in ascending order
+ data(:,2)=rawdata(sortorder',2); % f in 2nd column
+ [posn,exactmatch]=pos(data(:,1),R);
+ Rfound=data(posn,1);
+ f=data(posn,2);
+ if ~exactmatch
+ disp(['R is not found in the catalog table. Closest R is ',num2str(Rfound),' mm.']);
+ end
+ disp(['R = ',num2str(Rfound),' -> R = ',num2str(f),' mm.']);
+ case 'cvi_bicx_bk7'
+ rawdata=load('CVI_BICX_BK7_r2f_index.txt');
+ [data(:,1),sortorder]=sort(rawdata(:,1)); % R now in 1st col, in ascending order
+ data(:,2)=rawdata(sortorder',2); % f in 2nd column
+ [posn,exactmatch]=pos(data(:,1),R);
+ Rfound=data(posn,1);
+ f=data(posn,2);
+ if ~exactmatch
+ disp(['R is not found in the catalog table. Closest R is ',num2str(Rfound),' mm.']);
+ end
+ disp(['R = ',num2str(Rfound),' -> R = ',num2str(f),' mm.']);
+ case 'cvi_plcc_bk7'
+ rawdata=load('CVI_PLCC_bK7_r2f_index.txt');
+ [data(:,1),sortorder]=sort(rawdata(:,1)); % R now in 1st col, in ascending order
+ data(:,2)=rawdata(sortorder',2); % f in 2nd column
+ [posn,exactmatch]=pos(data(:,1),R);
+ Rfound=data(posn,1);
+ f=data(posn,2);
+ if ~exactmatch
+ disp(['R is not found in the catalog table. Closest R is ',num2str(Rfound),' mm.']);
+ end
+ disp(['R = ',num2str(Rfound),' -> R = ',num2str(f),' mm.']);
+ case 'cvi_bicc_bk7'
+ rawdata=load('CVI_BICC_BK7_r2f_index.txt');
+ [data(:,1),sortorder]=sort(rawdata(:,1)); % R now in 1st col, in ascending order
+ data(:,2)=rawdata(sortorder',2); % f in 2nd column
+ [posn,exactmatch]=pos(data(:,1),R);
+ Rfound=data(posn,1);
+ f=data(posn,2);
+ if ~exactmatch
+ disp(['R is not found in the catalog table. Closest R is ',num2str(Rfound),' mm.']);
+ end
+ disp(['R = ',num2str(Rfound),' -> R = ',num2str(f),' mm.']);
+ case 'cvi_plcx_sio2'
+ rawdata=load('CVI_PLCX_SIO2_r2f_index.txt');
+ [data(:,1),sortorder]=sort(rawdata(:,1)); % R now in 1st col, in ascending order
+ data(:,2)=rawdata(sortorder',2); % f in 2nd column
+ [posn,exactmatch]=pos(data(:,1),R);
+ Rfound=data(posn,1);
+ f=data(posn,2);
+ if ~exactmatch
+ disp(['R is not found in the catalog table. Closest R is ',num2str(Rfound),' mm.']);
+ end
+ disp(['R = ',num2str(Rfound),' -> R = ',num2str(f),' mm.']);
+ case 'cvi_bicx_sio2'
+ rawdata=load('CVI_BICX_SIO2_r2f_index.txt');
+ [data(:,1),sortorder]=sort(rawdata(:,1)); % R now in 1st col, in ascending order
+ data(:,2)=rawdata(sortorder',2); % f in 2nd column
+ [posn,exactmatch]=pos(data(:,1),R);
+ Rfound=data(posn,1);
+ f=data(posn,2);
+ if ~exactmatch
+ disp(['R is not found in the catalog table. Closest R is ',num2str(Rfound),' mm.']);
+ end
+ disp(['R = ',num2str(Rfound),' -> R = ',num2str(f),' mm.']);
+ case 'cvi_plcc_sio2'
+ rawdata=load('CVI_PLCC_SIO2_r2f_index.txt');
+ [data(:,1),sortorder]=sort(rawdata(:,1)); % R now in 1st col, in ascending order
+ data(:,2)=rawdata(sortorder',2); % f in 2nd column
+ [posn,exactmatch]=pos(data(:,1),R);
+ Rfound=data(posn,1);
+ f=data(posn,2);
+ if ~exactmatch
+ disp(['R is not found in the catalog table. Closest R is ',num2str(Rfound),' mm.']);
+ end
+ disp(['R = ',num2str(Rfound),' -> R = ',num2str(f),' mm.']);
+ case 'cvi_bicc_sio2'
+ rawdata=load('CVI_BICC_SIO2_r2f_index.txt');
+ [data(:,1),sortorder]=sort(rawdata(:,1)); % R now in 1st col, in ascending order
+ data(:,2)=rawdata(sortorder',2); % f in 2nd column
+ [posn,exactmatch]=pos(data(:,1),R);
+ Rfound=data(posn,1);
+ f=data(posn,2);
+ if ~exactmatch
+ disp(['R is not found in the catalog table. Closest R is ',num2str(Rfound),' mm.']);
+ end
+ otherwise
+ error('lenstype not recognized');
+ end
+end \ No newline at end of file