Skip to main content
Question

If I want to iterate through different zbf files as input for POP, could this be done in zpl?


icybird

Is there a way to iterate through a list of zbf as input for POP? Could this be done in Macro? Any examples to refer to?

Thanks very much.

2 replies

David.Nguyen
Luminary
Forum|alt.badge.img+2
  • Luminary
  • 1123 replies
  • December 21, 2023

Hi @icybird,

 

Strictly speaking, there is the MODIFYSETTINGS keyword that can be used with:

POP_SOURCEFILE: The file name if the starting beam is defined by a ZBF file, DLL, or multimode file.

 

Note that:

The settings file must be manually created prior to using MODIFYSETTING

 

In my tests, there’s something odd with the case though. If you don’t write the file name with the right case-sensitivity, the script doesn’t complain but the File setting is empty. Not sure why this is happening, but better make sure you type case sensitive file names.

Here’s an example of how to use the ZPL keyword:

FORMAT 2.0

FOR ii, 32, 64, 32
	# ZBF file name
	file_name$ = "test_one_" + $STR(ii) + ".zbf"

	# Change the ZBF file name
	MODIFYSETTINGS "<path_to_cfg_file>", POP_SOURCEFILE, file_name$

	# Create a new analysis
	OPENANALYSISWINDOW "pop"
NEXT

In my example, I’m using two ZBF files that I already had that were named “test_one_32.zbf” and “test_one_64.zbf”.

Depending on what you want to do with the POP results though, it might be better suited to use the ZOS-API.

Let me know if that helps and take care,

 

David


icybird
  • Author
  • Infrared
  • 11 replies
  • December 22, 2023

Hi David,

Thank you very much for the hint!


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings