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.
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.
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?
We use 3 different kinds of cookies. You can choose which cookies you want to accept. We need basic cookies to make this site work, therefore these are the minimum you can select. Learn more about our cookies.