-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathnewLensFormat.m
51 lines (43 loc) · 1.24 KB
/
newLensFormat.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
thisLens = lensC('filename','dgauss.22deg.100.0mm.dat');
thisLens.fileWrite('dgauss.22deg.100.0mm.dat.json');
edit(thisLens.fullFileName);
%{
opts.indent = ' ';
jsonwrite('dgauss.22deg.100.0mm.dat.json',thisLens,opts)
%}
thisLens.bbmCreate;
jsonwrite('thisLens.json',thisLens,opts)
edit thisLens.json
%% Read in the 2ELLens txt file and write it as a JSON file
thisLens = lensC;
fullFileName = fullfile(ilensRootPath,'data','lens',[thisLens.name,'.json'])
thisLens.fileWrite(fullFileName);
%% Add the full file path to the lens object so we know just which file was read in
%
% Extending to biconic
%
% add radiusX, radiusY, for each surface. These define the
% curvature of the surface in the x and y dimensions (1/radiusX) is
% the curvature in that dimension.
%
% conicConstantX and conicConstanY
%
% Surface types
% diaphagm (could be aperture)
% Maybe we separate refractive into
% spherical
% biconic
% We have refractive default to spherical
%
% Surface shift and tilt
% For each surface there is a potential (x,y) shift
% deltaX
% deltaY
%
% For tilt we add
% rotateX - Rotation around the x-axis is pitch
% rotateY - Rotation around the y-axis is yaw
%
%
% Microlens object slot
%