and there is one ZPL file to calculate the position of wavelength and resolution of the spectrometer.
I just wonder the gRAYY] command get which point on the image surface?
since there arechief ray, centroid , middle and vertex ( I guess something similar to spot diagram)
(and I have searched the zemax help, only got this, hmm ,which ray intercept?
)
thank you !
Page 1 / 1
Hi Yang,
RAYY(x) will give you the Y-coordinate intercept of the ray previously defined by RAYTRACE. Which is why the help file says RAYY(x) is only valid after a RAYTRACE. The RAYTRACE syntax is:
RAYTRACE hx, hy, px, py, wavelength
As you can see in your code snippet, hx, hy, px, and py are all 0. Therefore, it is the Y-coordinate intercept of the chief ray of your system.
Let me know if this makes sense.
Take care,
David
hi David
Thank you! it is cleared.
And about the spectrometer designing tutorial, since the diffraction encircled energy is optimized with a DENC 3(y-centroid) operand, just in my opinion , it is also better to calculate the y location referring to a y-centroid of wavelength correspondently?
and checked the zemax help again , I just cannot get a centroid position command similar to RAYY() …. and try to use below
Step1 set a CEHY (in this case) operand in the merit function editor
Step2 Set the wavelength parameter of the merit function editor by SETOPERAND
Step3 Get the value of the CEHY operand by OPER
Step4 Step2~Step3 Loop
or is there some command can directly get the position of centroid?
Hi Yang,
I think you did the right thing, or I cannot think of a better solution. There’s also CENY that would give you the centroid X coordinate based on a grid of rays sent through the system. It might be worth comparing the execution time of CEHY and CENY, assuming the accuracy is similar.
Thank you so much! That’ s really helpful! Actually, I was just wondering how to do interact between Merit Function Operand value between macro. Then your advice comes ! Thanks very much, I will try it out.