Skip to main content
Solved

How do I get center coordinates from Huygens PSF in the ZOS-API?


Yonatan

Hi,

I’m trying to extract data of Huygens PSF in Matlab through the API.

I want to get the center coordinates and I thought the HeaderData will include it. But looks like the HeaderData is empty.

 

PSF_Results = PSF_Win.GetResults();

string(PSF_Results.HeaderData.Lines)

 

ans = 

  1×0 empty string array
 

The MetaData and the DataGrids seems to work fine and contains the data.

Am I missing something? Is there other place that I can pull the coordinates from there?

 

Thanks!

Best answer by MichaelH

Hi Yonatan,

It looks like the header data for the Huygens PSF never got hooked up in the API and there is no way to get this data directly from the API.  You can use the PSF_Results.GetTextFile(filename) to save the text results and manually parse the header data. 

Also, you could use the Merit Function Editor with CEHX/CEHY to get the Centroid coordinates (this is slightly different than the Center coordinates but might be easier to use).  If you want the CEHX/CEHY, you can either insert these into the MFE (which would provide quicker evaluation) or you can use TheSystem.MFE.GetOperandValue() method.

View original
Did this topic help you find an answer to your question?

3 replies

MichaelH
Luminary
Forum|alt.badge.img+2
  • Luminary
  • 336 replies
  • Answer
  • April 13, 2022

Hi Yonatan,

It looks like the header data for the Huygens PSF never got hooked up in the API and there is no way to get this data directly from the API.  You can use the PSF_Results.GetTextFile(filename) to save the text results and manually parse the header data. 

Also, you could use the Merit Function Editor with CEHX/CEHY to get the Centroid coordinates (this is slightly different than the Center coordinates but might be easier to use).  If you want the CEHX/CEHY, you can either insert these into the MFE (which would provide quicker evaluation) or you can use TheSystem.MFE.GetOperandValue() method.


Yonatan
  • Author
  • Single Emitter
  • 1 reply
  • April 25, 2022

Thanks a lot Michael!


A_Ke
  • Single Emitter
  • 1 reply
  • January 3, 2025

Hi there,

I live with that workaround of using PSF_Results.GetTextFile(filename) , but it slows down my code. Saving a text file and then parsing it takes some time.

So, I think this issue is not really well solved.

Can you tell me more about why it is never hooked?

Kind regards!


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings