Skip to main content

I want to setting imageDelta of fftpsf on ZOS-API-MATLAB

 

my matlab code is below

 

I wonder How can I command imageDelta.

When I try ' newWin_Settings.ImageDelta = 0.5; '

There's some error with ' Attempted to index object 'null' '

 

In ZOS-API help document, We can handle imageDelta with 'double'

 

How do I input into MATLAB so I can change imagedelta of fftpsf?

 

my MATLAB code... 

----------------------------

    TheAnalyses = TheSystem.Analyses;
    newWin = TheAnalyses.New_FftPsf();
    newWin_Settings = newWin.GetSettings();
    newWin_Settings.SampleSize = ZOSAPI.Analysis.Settings.Psf.PsfSampling.PsfS_512x512 ;
    newWin_Settings.ImageDelta = 0.5; 

    
    newWin.ApplyAndWaitForCompletion();
    newWin_Results = newWin.GetResults();
     
   dataSeries = newWin_Results.DataSeries(1);
    psf= dataSeries.YData.Data.double; %psf

----------------------------

Hello,

I have connected Matlab with the Interactive extension on \Zemax\Samples\Sequential\Objectives\Cooke 40 degree field.zmx. I then tried this:

TheApplication=ans;
TheSystem = TheApplication.PrimarySystem;
newWin = TheSystem.Analyses.New_FftPsf();
newWin_Settings = newWin.GetSettings();
newWin_Settings.ImageDelta= 0.8;
newWin.ApplyAndWaitForCompletion();

It works well and then I can see on the interface that it works.

Then for the results, you can check what the is returned:

 

As you can see, the FFT PSF does not return a DataSeries but a DataGrid.

So the syntax would be:

newWin_values =newWin_Results.GetDataGrid(0).Values.double;

This would be a matrix of values. You may want to have a look at that article: https://my.zemax.com/en-US/Knowledge-Base/kb-article/?ka=KA-01650

Do not hesitate if you have any further questions.

Sandrine