Skip to main content
Question

zos-API exporting FFT MTF results

  • April 21, 2026
  • 1 reply
  • 14 views

nzin

Hi All, 

I’m trying to use python to export data from the FFT MTF analysis. I want to export data only up to 20 lp/mm, but when I try to do this, I only get a series out to 40 lp/mm. I also tried a different frequency above 40 lp/mm, and it only will output the data out to 40 lp/mm. 

    newWin = TheAnalyses.New_FftMtf()

    newWin_settings = newWin.GetSettings()

    newWin_settings.MaximumFrequency = 20

    newWin_settings.SampleSize = ZOSAPI.Analysis.SampleSizes.S_128x128

    newWin.ApplyAndWaitForCompletion()

    newWin_Results = newWin.GetResults()

    data = newWin_Results.GetDataSeries(1)

    xRaw = data.XData.Data

    x = np.array(tuple(xRaw))

    print(x)

Does anyone know how to make it so that I only get data up to a specified frequency? 

1 reply

David.Nguyen
Luminary
Forum|alt.badge.img+2

@nzin

 

I adapted your code for ZOSPy (2.1.5) and tried it on the Double Gauss 28 degree field sample file.

import numpy as np
import zospy as zp

zos = zp.ZOS()
oss = zos.connect("extension")

newWin = oss.Analyses.New_FftMtf()

newWin_settings = newWin.GetSettings()
newWin_settings.MaximumFrequency = 12.3
newWin_settings.SampleSize = zp.constants.Analysis.SampleSizes.S_128x128

newWin.ApplyAndWaitForCompletion()

newWin_Results = newWin.GetResults()

data = newWin_Results.GetDataSeries(1)
xRaw = data.XData.Data
x = np.array(tuple(xRaw))
print(np.max(x))

I used a frequency of 12.3 to be extra sure it wasn’t a sort of default value.

The script output is (only printing maximum of x):

Maximum frequency: 12.3

I am using 2026 R1.

Perhaps you have a file to share with us that we can try with the script?

Take care,

 

David