Hello,
I am trying to develop a ZPL macro that will be used in my merit function so that different wavelengths and different fields will all share the same MTF. I am currently getting very good results with my code, but it is a little bit slow at roughly 8 seconds per cycle which is worrisome as I am currently only doing 1 field with 3 wavelengths. I was wondering how GETMTF actually works since it seems like it is calculating the entire MTF and only extracts the value for a single specified frequency when GETMTF is ran. For my purpose, it would be more efficient to calculate the entire MTF once for each wavelength/field, and then I could just grab the values directly from the MTF rather than having to run a loop combined with GETMTF to get the values I need to calculate MSE. Please let me know if you have any suggestions on making my code more efficient or any alternative methods to solve this problem.