Change Input Polarization in Polarization Transmission using ZPL Macro
I am trying to create Mueller matrix for my polarimeter's optical design by finding the system's transmission for known states of input polarization. For this I have written a ZPL Macro to fetch a list of input polarization values from a .txt file and create corresponding polarization transmission files.
Problem: For the whole macro run, it is unable to take in any input polarization from the .txt file containing the list of polarization values. Instead, it creates transmission files only for the polarization which is already loaded in the transmission tab when starting the macro(nominally Jx = 1, Jy = 0 ) . I am attaching the ZPL macro below. Let me know how can I fix this problem.
"""
!macro to set the number of field points and get transmission data
!SETSYSTEMPROPERTY 101, 12
!polarization input data path
filename$="D:\Polarization_calibration\CalibrationInput.txt"
print, filename$
OPEN filename$
FOR j,1,5,1
FORMAT 1 INT
READ slno, jx, jy
PRINT slno, jx, jy
SETSYSTEMPROPERTY 60, jx
SETSYSTEMPROPERTY 61, jy
SETSYSTEMPROPERTY 62, 0
SETSYSTEMPROPERTY 63, 0
UPDATE ALL
FORMAT 1.6
PRINT jx, jy
OPENANALYSISWINDOW "Tra"
name$ = "_" + $STR(j)
!path where the file has to be stored
main_name$ = "D:\Test\Config_1\transmission"
final_name$ = main_name$ + + name$ + ".txt"
GETTEXTFILE final_name$, "TRA"
CONVERTFILEFORMAT final_name$, 1
PRINT, "Transmission data Generated!!!"
NEXT
"""
Problem: For the whole macro run, it is unable to take in any input polarization from the .txt file containing the list of polarization values. Instead, it creates transmission files only for the polarization which is already loaded in the transmission tab when starting the macro(nominally Jx = 1, Jy = 0 ) . I am attaching the ZPL macro below. Let me know how can I fix this problem.
"""
!macro to set the number of field points and get transmission data
!SETSYSTEMPROPERTY 101, 12
!polarization input data path
filename$="D:\Polarization_calibration\CalibrationInput.txt"
print, filename$
OPEN filename$
FOR j,1,5,1
FORMAT 1 INT
READ slno, jx, jy
PRINT slno, jx, jy
SETSYSTEMPROPERTY 60, jx
SETSYSTEMPROPERTY 61, jy
SETSYSTEMPROPERTY 62, 0
SETSYSTEMPROPERTY 63, 0
UPDATE ALL
FORMAT 1.6
PRINT jx, jy
OPENANALYSISWINDOW "Tra"
name$ = "_" + $STR(j)
!path where the file has to be stored
main_name$ = "D:\Test\Config_1\transmission"
final_name$ = main_name$ + + name$ + ".txt"
GETTEXTFILE final_name$, "TRA"
CONVERTFILEFORMAT final_name$, 1
PRINT, "Transmission data Generated!!!"
NEXT
"""
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.