!---------------------------------------------------------------------- ! ! THIS PROGRAM IS AN UNPUBLISHED WORK FULLY PROTECTED BY THE UNITED ! STATES COPYRIGHT LAWS AND IS CONSIDERED A TRADE SECRET BELONGING TO ! THE COPYRIGHT HOLDER. COPYRIGHT (C) ZYGO CORPORATION. ! ! Version: 1.1 ! ! File: ptntrace.scr ! ! Author: John Cordero. 06/02/05 ! ! Description: Displays pixel trace plot if SWLI data available. ! Algorithm is as follows: ! 1. If no data available, return err. ! 2. Save the value of remove fringes control. ! 3. If remove fringes on, turn it off. ! 4. Save swli data to tmp swli file (if from measurement) ! 4.a. If save tmp swli fails, try reloading swli file ! 4.a.i. If unable to reload, return err "Unable to load swli". ! This means there is no swli data available. ! 5. Reload swli tmp data file. ! 5.a. If unable to load swli tmp data file, return err "Unable to load swli". ! This means there is no swli data available. ! 6. Set Remove Fringes control back to original if changed. ! 7. Open intensity window ! 8. Open intensity filled plot ! 9. Open point trace window ! 10. Open Point trace plot. ! 11. Remove tmp swli file ! ! !---------------------------------------------------------------------- intensityWin$ = "Films Intensity Map" ! Intensity Window intensityplot$ = "Films Filled Plot" ! Intensity Plot pointracewin$ = "Films Point Trace" ! Point Trace Window pointtraceplot$ = "Films Point Trace Plot" ! Point Trace Plot dim datafile$[512] tmpswli$ = "tmpswli.swl" ! Temporary swli data file datafile$ = tmpswli$ locdata$ = "tmplocdata.dat" ! Temporary data file loadretry = 0 ! load retries cameraSizeX = 0 ! camera size ! 1. If no data available, return err. ! Check data availability by looking at camera size control. ! If no data available, this produces an error. on error goto DATALOADERR cameraSizeX = getval (getid ("attributes / interferometer / camera size x"), "") ! 2. Save the value of remove fringes control. rmvfringes$ = getval$(getid ("Controls / Acquisition / Remove Fringes")) rmvfringes$ = upc$ (rmvfringes$) ! 3. If remove fringes on, turn it off. if ( rmvfringes$ = "YES" ) then setstr( getid ("Controls / Acquisition / Remove Fringes"), "NO") rmvChange = 1 else rmvChange = 0 endif ! 4. Save swli data to tmp swli file (if from measurement) SAVESWLIDATA: on error goto SWLISAVEERR saveswli(datafile$) ! 5. Reload swli tmp data file. LOADSWLIDATA: on error goto SWLILOADERR loadswli(datafile$) ! 6. Set Remove Fringes control back to original if changed. if ( rmvChange = 1 ) then setstr( getid ("Controls / Acquisition / Remove Fringes"), "YES") endif off error ! bring up intensity map ! 7. Open intensity window openwin (getwinid (intensityWin$) ) ! 8. Open intensity filled plot openwin (getwinid (intensityplot$) ) ! bring up point trace map ! 9. Open point trace window openwin (getwinid (pointracewin$) ) ! 10. Open Point trace plot. openwin (getwinid (pointtraceplot$) ) ! reset remove fringes option if ( rmvChange = 1 ) then setstr( getid ("Controls / Acquisition / Remove Fringes"), "YES") endif ! 11 sysErr = execute("del " & tmpswli$) end !---------------------------------------------------------------------- SWLILOADERR: off error x = dialog( "Unable to load SWLI data", 2) if ( rmvChange = 1 ) then setstr( getid ("Controls / Acquisition / Remove Fringes"), "YES") endif end !---------------------------------------------------------------------- SWLISAVEERR: off error on error goto DATAFILEERR datafile$ = getval$(getid("Attributes / Miscellaneous / DataFile")) if ( loadretry = 0 ) then loadretry = loadretry + 1 goto LOADSWLIDATA else if ( rmvChange = 1 ) then setstr( getid ("Controls / Acquisition / Remove Fringes"), "YES") endif x = dialog( "Unable to save SWLI data", 2) end endif !---------------------------------------------------------------------- DATAFILEERR: off error x = dialog( "Unable to save data", 2) end !---------------------------------------------------------------------- DATALOADERR: off error x = dialog( "No data available", 2) end