The example shows how variables and macros may be defined to allow a sequence of operations to be defined for one file and easily adapted to apply to other files. The example shows how regions of input files may be defined and corrected for spatial distortion, provided of course that the spatial distortion has been previously defined (See Section 16, Page ). This example should be easy to modify for other sequences of operations which need to be repeated.
Two variables are defined, #IN for the input file and #OUT for the output file to contain the corrected image. The START MACRO command is used to open a macro, and within the macro the variables #IN and #OUT are used instead of the real files names. The STOP MACRO command closes the macro. Prior to using the macro, the variables are re-defined to different file names. (The text has been created by FIT2D using the OPEN LOG command to create a listing of terminal I/O, see Section 15.63, Page ).
First the variables for the input and output files are defined:
Main menu: ENTER COMMAND [VARIABLE]:variable ENTER VARIABLE NAME [#IN]:#IN ENTER VARIABLE VALUE [test.dat]:lyso1.gel Main menu: ENTER COMMAND [INPUT DATA]:variable ENTER VARIABLE NAME [#IN]:#OUT ENTER VARIABLE VALUE [lyso1.gel]:lyso1.cor
Now the macro is created using the variables rather than the direct file names:
Main menu: ENTER COMMAND [INPUT DATA]:start macro FILE NAME [fit2d.mac]:lyso.mac Main menu: ENTER COMMAND [SET CURVE STYLES]:input FILE FORMAT [IMAGEQUANT]:imagequant DATA FILE NAME [test.dat]:#IN LEFT-HAND PIXEL OF IMAGE REGION [1]: LOWER PIXEL OF IMAGE REGION [1]: RIGHT-HAND PIXEL OF IMAGE REGION (Range: 1 to 1152) [1152]: UPPER PIXEL OF IMAGE REGION (Range: 1 to 1482) [1482]: INFO: Full image size = 1152 * 1482 pixels Main menu: ENTER COMMAND [IMAGE]:reg X-MINIMUM VALUE (Range: 0.0 to 1152.00) [.50000]:10 Y-MINIMUM VALUE (Range: 0.0 to 1482.00) [.50000]:90 X-MAXIMUM VALUE (Range: 10.0000 to 1152.00) [1151.50]:1120 Y-MAXIMUM VALUE (Range: 90.0000 to 1482.00) [1481.50]:1410 Main menu: ENTER COMMAND [IMAGE]:calibrat Calibration sub-menu: ENTER COMMAND [SPATIAL CORRECTION]:input Name of file for spatial distortion interpolation function FILE NAME [176.spline]:176.spline Calibration sub-menu: ENTER COMMAND [SPATIAL CORRECTION]: INFO: The corrected pixel dimension in X is 176.4269 microns INFO: The corrected pixel dimension in Y is 175.8364 microns INFO: Number of rows re-binned = 100 ( 7%)
(Here some program information output has been missed out.)
INFO: Number of rows re-binned = 1300 ( 98%) INFO: Time for re-binning = 57.68 seconds Calibration sub-menu: ENTER COMMAND [EXIT]: DESTROY DYNAMIC ARRAYS [NO]: Main menu: ENTER COMMAND [EXCHANGE]: Main menu: ENTER COMMAND [IMAGE]:out FILE FORMAT [FIT2D STANDARD FORMAT]:dump DUMP FILE NAME [fit2d.dump]:#OUT INFO: Data region is 1152 * 1482 pixels RECORD LENGTH (BYTES) (Range: 1 to 6000) [2304]: FIRST RECORD FOR OUTPUT (Range: 1 to 100000) [1]: BIG ENDIAN FORMAT INTEGERS [NO]:y INFO: Data minimum value = .0000000E+00 INFO: Data maximum value = .5378928E+09 LOWER LIMIT OF RANGE (Range: -1.700E+38 to 5.379E+08) [0.0]: UPPER LIMIT OF RANGE (Range: 0.0 to 1.700E+38) [5.379E+08]: Main menu: ENTER COMMAND [INPUT DATA]:stop
The first image has been, input corrected, and output. In doing this, we have saved the entered operations as a macro. Now the variables can be re-defined to refer to new input and output files:
Main menu: ENTER COMMAND [EXIT]:variable ENTER VARIABLE NAME [#OUT]: ENTER DATA TYPE OF VARIABLE:string ENTER VARIABLE VALUE [lyso1.cor]:lyso2.cor Main menu: ENTER COMMAND [INPUT DATA]:varia ENTER VARIABLE NAME [#OUT]:#IN ENTER DATA TYPE OF VARIABLE:s ENTER VARIABLE VALUE [lyso2.cor]:lyso2.gel
Now the command macro is used to run the previously created macro file. The same variables are used, but now they refer to different files:
Main menu: ENTER COMMAND [INPUT DATA]:macro FILE NAME [lyso.mac]:lyso.mac Main menu: ENTER COMMAND [IMAGE]:INPUT DATA FILE FORMAT [IMAGEQUANT]:IMAGEQUANT DATA FILE NAME [grid1.gel]:#IN LEFT-HAND PIXEL OF IMAGE REGION [1]: LOWER PIXEL OF IMAGE REGION [1]: RIGHT-HAND PIXEL OF IMAGE REGION (Range: 1 to 1152) [1152]: UPPER PIXEL OF IMAGE REGION (Range: 1 to 1482) [1482]: INFO: Full image size = 1152 * 1482 pixels Main menu: ENTER COMMAND [IMAGE]:REGION X-MINIMUM VALUE (Range: 0.0 to 1152.00) [.50000]:1.0000000E+01 Y-MINIMUM VALUE (Range: 0.0 to 1482.00) [.50000]:9.0000000E+01 X-MAXIMUM VALUE (Range: 10.0000 to 1152.00) [1151.50]:1.1200000E+03 Y-MAXIMUM VALUE (Range: 90.0000 to 1482.00) [1481.50]:1.4100000E+03 Main menu: ENTER COMMAND [IMAGE]:CALIBRATION Calibration sub-menu: ENTER COMMAND [SPATIAL CORRECTION]:INPUT SPATIAL Name of file for spatial distortion interpolation function FILE NAME [176.spline]:176.spline Calibration sub-menu: ENTER COMMAND [SPATIAL CORRECTION]:SPATIAL CORR INFO: The corrected pixel dimension in X is 176.4269 microns INFO: The corrected pixel dimension in Y is 175.8364 microns INFO: Number of rows re-binned = 100 ( 7%)
(Here some program information output has been missed out.)
INFO: Number of rows re-binned = 1300 ( 98%) INFO: Time for re-binning = 56.05 seconds Calibration sub-menu: ENTER COMMAND [EXIT]:EXIT DESTROY DYNAMIC ARRAYS [NO]:NO Main menu: ENTER COMMAND [EXCHANGE]:EXCHANGE Main menu: ENTER COMMAND [IMAGE]:OUTPUT DATA FILE FORMAT [FIT2D STANDARD FORMAT]:DUMP DUMP FILE NAME [fit2d.dump]:#OUT INFO: Data region is 1152 * 1482 pixels RECORD LENGTH (BYTES) (Range: 1 to 6000) [2304]: FIRST RECORD FOR OUTPUT (Range: 1 to 100000) [1]: BIG ENDIAN FORMAT INTEGERS [NO]:YES INFO: Data minimum value = .0000000E+00 INFO: Data maximum value = .1259027E+10 LOWER LIMIT OF RANGE (Range: -1.700E+38 to 1.259E+09) [0.0]: UPPER LIMIT OF RANGE (Range: 0.0 to 1.700E+38) [1.259E+09]: