Closed capitanevs closed 4 years ago
I started working on this.
Foundation.FindFocus
call will be just a placeholder right now.
Foundation.FocusSweep
might be different now than it used to be.
Rename Focus Sweep Calculation => Through-Focus Scan Find Focus Calculation => Find Best Focus I would also reverse the order of the Tabs.
Add (in a fancy position, in the tab) the followin descriptions (I would try below all the commands and field etc). (1) Use this if you are interested in
(2) "Use this if you are interested in
Fields of (1) "Start [mm]" "Stop [mm]" "Step [mm]"
to be continued
Through-Focus Scan works properly
Find Best Focus tab must be improved: what is the result of the FocusFind function? How is it supposed to be displayed?
About "Find Best Focus Tab"
Results of FocusFind
are
Return
--------
Results : struct-like class
with the following attributes
- BestField : 1d-array (complex)
Field at the best focus
- BestDefocus : scalar (real)
Defocus of the best spot
- BestHew : scalar (real)
Half energy width of the best spot
- OptResult : OptimizationResult object
Contains the results of the optimization
This is what I have figured out. Best Defocus and BestHew can be easily displayed as a string output. -One possibility is to put them in the Left panel, like that: If we do that, we can add the helper button which copies the BestDefocus value in the field "Central Point" of the next tab.
We might use the formatting function.
Best Field It shall be displayed as Intensity, actually, not as field (so abs(E)**). It will have its own tab, (Field Intensit, best focus is good).
Let's put the phase as well.
Nothing more (no HEW plot).
LibWiser.Units.SmartFormatter(0.0015) +'m'`
On Through-Focus Scan
If this is a call
ResultList, HewList, SigmaList, More = lw.Foundation.FocusSweep(FocussingElement, NewDefocusList, DetectorSize = DetectorSize)
you get
Plot2) From
NewDefocusList
, HewList
and
NewDefocusList
, SigmaList
They are two ways of computing the spot size. A legend is needed: "HEW" and "Sigma" as labels will be good.
Plot3) From ResultList, which is like that
so
IntensityList = [_.Intensity for _ in ResultList]
The title of each plot should contain the corresponding defocus value (NewDefocusList[i]
, here) and HEW value (HewList[i]
here)
Plot1)
I have just realized I do not have a function for that:-) So... let's skip Plot1 for the moment ;-)
What else
We may want to add some "textual output" as for the other box, but not now.
Comments?
How to display Best Field from Find Best Focus? Intensity is complex, do you want to show only abs(Intensity)? Which x-axis to take?
Yes, wiser computes the fields (as they are necessary for propagation) but we always display intensity. In certain cases I already have fillee the "intensity" attribute, as in CoreOptics.ComoutationData. If there is not, just compute the intensity as: Intensity is abs(field)**2 Good question about the coordinate. I will have a look(not ad the desk now). Try to have a look at the attribhtes of the result. If there is an "S" , it s the man.
-- Inviato da myMail per Android Venerdì, 18 Settembre 2020, 09:34AM +02:00 da aljosahafner notifications@github.com :
How to display Best Field from Find Best Focus? Intensity is complex, do you want to show only abs(Intensity)? Which x-axis to take? — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub , or unsubscribe .
The detector shall allow the 3 following operations: 1) Compute the field in the nominal position (or corrected with SmallDisplacement) => Single computation. We call .ComputeField. 2) Compute the field in the best focus (not existing yet, we should call Foundation.FindFocus function) 3) Perform a scan of the field through the focus (already existing, calls Foundation.FocusSweep)
t.b.d