Dear all,
I am running customized analyzes and would like to adress different types of MTF inputs. However, changing the MTF Type does not seem to work properly. I am not an expert in python or the ZOS API, so there might be an error in the code.
But all other settings work properly. Here is a simplified part of the code with which I tested:
---
tf = System.Analyses.New_Analysis(ZOSAPI.Analysis.AnalysisIDM.FftThroughFocusMtf)
mtf_settings = mtf.GetSettings()
mtf_settings.Wavelength.SetWavelengthNumber(wavenumber)
mtf_settings.Field.SetFieldNumber(0)
mtf_settings.Frequency = frequency
mtf_settings.NumberOfSteps = 40
mtf_settings.DeltaFocus = 1.5
mtf_settings.Type = ZOSAPI.Analysis.Settings.Mtf.MtfTypes.SquareWave
mtf_settings.SampleSize = ZOSAPI.Analysis.SampleSizes.S_256x256
mtf.ApplyAndWaitForCompletion()
------
I checked with the debugger, what happens from step to step - and the type value is passed correctly and translated into the correct number of the 'enum' list of types. But the graphics window does not use this type.
The other way round - I preconfigured my settings file with 'SquareWave' input and looked what type number is shown in the settings by use of the debugger. The number is '9' - which is out of the enum range of type.
Can anyone help to identify what is wrong?
Thanks a lot and kind regards!