optimization using a callback function with extra variable (and more)

32 views
Skip to first unread message

Daniel Mader

unread,
Dec 9, 2010, 11:52:30 AM12/9/10
to OSLO-Talk
Hi, this is my first post so I hope I am following the forum rule
alright :)

My problems are rather simple but due to the utter lack of experience
of my own with OSLO EDU (and lens design software in common) it is
currently an insurmountable obstacle :(

1) I need to optimize a lens layout for a certain focal length while
minimizing for the longitudinal spherical (SA3?) and chromatic
aberrations (in CHR, PAC and PLC).

For the EFL, I set eg. OCM21-10 in order to solve for 10mm. Lpa is
covered by OCM9 (SA3), right? But how do I weigh the chromatic
abberations (PLC, PAC) here?

2) Now, the individual curvatures (and asphere coefficients, that is)
are not fully independent but are a function of a pressure parameter.

For this example, let's just assume that eg. cv3 = -0.5*cv1 (cv2 is
not used, see question 4).

In terms of CCL, the callback function using an extra variable curv
(this extra variable is essential for me!!) should look somewhat like
this, I think:

cmd CBdemo(){
double curv;
cv 1 curv;
cv 3 -0.5*curv;
}

How do I use this correctly? What is the correct declaration of curv
so that OSLO varies this variable during the optimization?

The above callback function I need to enter in Optimize>>Optimization
Conditition..., right? Anything else reqired? Please have a look at
the attached lens file, this is what I am trying, with the result that
both interfaces are plane after the iterations....

3) Is it possible to script this optimization in order to evaluate for
a certain focal range, eg. 0..50mm in steps of 1mm and output the
corresponding results ot the text window (for visualization)? If yes,
how so?

#4) I addition to the previous question: the lenses are liquid filled
membrane lenses, thus it is possible to freely position the aperture
stop and optimize for the distortion of the system. This is what the
2nd interface is for. It should be possible to get a numerical value
for the distortion, too, not just the graphical output in the Ray
Intercept Curves Analysis (standard graphical tools). How so?


Any hint is deeply appreciated! Thanks a million times in advance and
best regards from Salzburg, Austria,

Daniel Mader

Lens description file follows:

// OSLO 6.5 26127 16357 2982
LEN NEW "CBdemo" 0 4
EBR 1.0
ANG 0.0000572957795
DES "DMader"
UNI 1.0
// SRF 0
AIR
TH 1.0e+20
AP 9.9999999995e+13
NXT // SRF 1
GLA BK7
RD 3.9925523816e+264
ET 1.0 1.0
NXT // SRF 2
GLA BK7
ET 1.0 1.0
AST
NXT // SRF 3
AIR
RD -3.9925523816e+264
TH 1.0
NXT // SRF 4
AIR
CBK 1
WV 0.58756 0.48613 0.65627
WW 1.0 1.0 1.0
END 4
DLNR 0 7
DLNR 2 7
OPDF 1.0e-08
OPOC "cbdemo"
VAR NEW
V 1 1 0 CV -0.99 0.99 1.0 0.0001
V 2 3 0 CV -0.99 0.99 1.0 0.0001
END
OPE NEW
O 1 "OCM1" 0.0 "PY"
O 2 "OCM2" 0.0 "PU"
O 3 "OCM3" 0.0 "PYC"
O 4 "OCM4" 0.0 "PUC"
O 5 "OCM5" 0.0 "PAC"
O 6 "OCM6" 0.0 "PLC"
O 7 "OCM7" 0.0 "SAC"
O 8 "OCM8" 0.0 "SLC"
O 9 "OCM9" 1.0 "SA3"
O 10 "OCM10" 0.0 "CMA3"
O 11 "OCM11" 0.0 "AST3"
O 12 "OCM12" 0.0 "PTZ3"
O 13 "OCM13" 0.0 "DIS3"
O 14 "OCM14" 0.0 "SA5"
O 15 "OCM15" 0.0 "CMA5"
O 16 "OCM16" 0.0 "AST5"
O 17 "OCM17" 0.0 "PTZ5"
O 18 "OCM18" 0.0 "DIS5"
O 19 "OCM19" 0.0 "SA7"
O 20 "OCM20" 0.0 "TOTAL_SPH"
O 21 "OCM21-10.0" 1.0 "EFL"
END
Reply all
Reply to author
Forward
0 new messages