Solved

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

  • 13 April 2022
  • 2 replies
  • 328 views

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!

icon

Best answer by MichaelH 13 April 2022, 17:25

View original

2 replies

Userlevel 6
Badge +2

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.

Thanks a lot Michael!

Reply