Skip to main content

Hi,

 

I am  trying to calculate multimode fiber coupling efficiency by using Geometric Image Analysis through GETTEXTFILE, and I want to do this for different fields and wavelengths. I am trying to change field# and wavelength# by MODIFYSETTINGS, but looks like these two parameters are not allowed to be changed. Following is the list of parameters that MODIFYSETTINGS provides:

 

 

I wonder if anyone knows how to make the changes so I can do this calculation using ZPL.

 

Thanks!

Jizuo

Hi Jizuo,

 

As you have noted, the field and wave numbers don’t seem to be editable with MODIFYSETTINGS in ZPL. One solution, if you want to keep using ZPL, is to manually create multiple CFG files prior to running the macro. Each CFG file would have a field and wave number that is identified in its name, and whenever you run an analysis, you start by specifying the CFG file you require with:

OPENANALYSISWINDOW type, settingsfilename

 

For example, you could have a CFG file syntax like so:

MyCFGFile_<field_number>_<wave_number>.CFG

 

And so, for field 1, and wavelength 1, your CFG file is called: MyCFGFile_1_1.CFG, and for field 1, and wavelength 2, it is: MyCFGFile_1_2.CFG, ...etc.

Then, when you call OPENANALYSISWINDOW, you specified which CFG file to use, therefore, which field and wavenumber:

OPENANALYSISWINDOW “IMA”, “C:\MyCFGFile_1_1.CFG”

 

It does require you to create those CFG files manually once before though.

Otherwise, I think you have to use the ZOSAPI until it gets implemented (if ever) in ZPL. In the ZOSAPI, the field and wave numbers are already implemented:

And so, you can access those directly with:

# Open Geometric Image Analysis
MyIma = TheSystem.Analyses.New_GeometricImageAnalysis()


# Retrieve settings
MyImaSettings = MyIma.GetSettings()


# Modify field number to field 2
MyImaSettings.Field.SetFieldNumbr(2)


# Apply settings and run analysis
MyIma.ApplyAndWaitForCompletion()

 

I hope this helps. Take care,

 

David


Reply