Author Topic: ACQ file format and explanation of parameters  (Read 361 times)

John Donovan

  • Administrator
  • Emeritus
  • *****
  • Posts: 2355
  • Other duties as assigned...
    • Probe Software
ACQ file format and explanation of parameters
« on: June 08, 2018, 09:42:18 am »
I don't want to get too "down into the weeds" on this, but a couple of users have asked about the format of the .ACQ file and so here's a short(?) explanation.

First of all, as mentioned previously, the ACQ files are ASCII (text) files using the Windows application "Configuration Settings" style.  Just like the PictureSnapApp.ini file (or the Probewin.ini file).  It just has a different extension than ".ini".

The Probe Image x-ray mapping .PrbImg file is the same style.  All PI imaging parameters are saved in ASCII text including the floating point data (in Base 64 encoding).

If you open the supplied DEMO4_FEI.ACQ file in any text editor (NotePad, TextPad, etc.) you will see this section at the top. I've added comments here:

[Stage]
PictureSnap mode="1"                                     ; 0 = 2 point calibration, 1 = three point calibration
Number of calibration points="3"                         ; number of calibration points (can be 2 or 3)
Number of Z calibration points="3"                       ; number of points with z calibrations (can be 0 or 3)
Screen reference point1 (twips)="16065,22905"            ; point #1 screen X and Y reference in twips (0,0 is upper left of image)
Screen reference point2 (twips)="9225,14610"             ; point #2 screen X and Y reference in twips (0,0 is upper left of image)
Stage reference point1="1.2,-14.58267"                   ; point #1 stage X and Y calibration in Stage_Units units
Stage reference point2="-13.10437,1.242862"              ; point #2 stage X and Y calibration in Stage_Units units
X_Polarity="0"                                           ; X axis stage orientation (0 = cartesian, -1 = anti-cartesian)
Y_Polarity="0"                                           ; Y axis stage orientation (0 = cartesian, -1 = anti-cartesian)
Stage_Units=mm                                           ; native stage units (mm, um or nm)
ACQScreenDPI="1"                                         ; the monitor DPI setting when image was calibrated (usually 1, 1.25 or 1.5)
Screen Z reference point1 (dummy)="0"                    ; point #1 dummy value for screen Z reference (always zero)
Screen Z reference point2 (dummy)="0"                    ; point #2 dummy value for screen Z reference (always zero)
Stage Z reference point1="14.64604"                      ; point #1 Z axis stage calibration position
Stage Z reference point2="14.64638"                      ; point #2 Z axis stage calibration position
Screen reference point3 (twips)="25815,5520"             ; point #3 screen X and Y reference in twips (0,0 is upper left of image)
Stage reference point3="18.05213,22.73664"               ; point #3 stage Z calibration in Stage_Units units
Screen Z reference point3 (dummy)="0"                    ; point #3 dummy value for screen Z reference (always zero)
Stage Z reference point3="14.64638"                      ; point #3 stage Z calibration in Stage_Units units
ACQFileVersion="1"                                       ; ACQ file version number

The next section is the annotation section. These include both point and FOV annotations.  All annotation coordinates are in screen coordinates (twips) which are monitor DPI dependent and hence why we also include the system DPI in the above section:

[annotations]
NumberOfAnnotations="6"                                  ; number of point annotations
AnnotationString1=Mycol 32-23429                         ; point annotation #1 text
AnnotationScreenXPosition1="4625.809"                    ; point annotation #1 X screen reference (in twips) (0,0 is upper left of image)
AnnotationScreenYPosition1="9337.929"                    ; point annotation #1 Y screen reference (in twips) (0,0 is upper left of image)
AnnotationScreenZPosition1="0"                           ; point annotation #1 Z screen reference (in twips) (dummy)
AnnotationScreenXPosition2="25493.4"                     ; point annotation #2, etc. etc.
AnnotationScreenYPosition2 = "20809.46"
AnnotationScreenZPosition2 = "0"
AnnotationScreenXPosition3 = "26068.28"
AnnotationScreenYPosition3 = "20477.19"
AnnotationScreenZPosition3 = "0"
AnnotationScreenXPosition4 = "19838.13"
AnnotationScreenYPosition4 = "19452.38"
AnnotationScreenZPosition4 = "0"
AnnotationScreenXPosition5 = "18839.69"
AnnotationScreenYPosition5 = "20539.9"
AnnotationScreenZPosition5 = "0"
AnnotationScreenXPosition6 = "12817.26"
AnnotationScreenYPosition6 = "19073"
AnnotationScreenZPosition6 = "0"

[FOVannotations]
FOVNumberOfAnnotations="2"                               ; number of FOV annotations
FOVAnnotationsText_1=Mycol area 595-01                   ; FOV annotation #1 text
FOVAnnotationsScreenX1_1="15123.13"                      ; FOV annotation #1 upper left X screen reference (in twips) (0,0 is upper left of image)
FOVAnnotationsScreenY1_1="2136.219"                      ; FOV annotation #1 upper left Y screen reference (in twips) (0,0 is upper left of image)
FOVAnnotationsScreenZ1_1="0"                             ; FOV annotation #1 upper left Z screen reference (in twips) (dummy)
FOVAnnotationsScreenX2_1="15232.91"                      ; FOV annotation #1 lower right X screen reference (in twips)
FOVAnnotationsScreenY2_1 = "2267.257"                    ; FOV annotation #1 lower right Y screen reference (in twips)
FOVAnnotationsScreenZ2_1 = "0"                           ; FOV annotation #1 lower right Z screen reference (in twips) (dummy)
FOVAnnotationsText_2=FOV area near Mycol 32-23429        ; FOV annotation #2, etc., etc.
FOVAnnotationsScreenX1_2 = "5015.454"
FOVAnnotationsScreenX2_2 = "5484.546"
FOVAnnotationsScreenY1_2 = "10417.92"
FOVAnnotationsScreenY2_2 = "10942.08"
FOVAnnotationsScreenZ1_2 = "0"
FOVAnnotationsScreenZ2_2 = "0"

Finally we have the sub image locations from the Image Locator feature stored. As in the FOV annotations we utilize the two corners (UL and LR) in screen coordinates.  Note however that these image corners are calculated from the stage calibration in the sub image ACQ file at the time the image in imported into PictureSnapApp.

[images]
NumberOfImages="1"                                       ; number of sub images referenced
Image1=DEMO3_FEI.BMP                                     ; image #1 file name (BMP, GIF or JPG) (must reside in same folder as the main ACQ file)
SubImageScreenX1_1="18868.9"                             ; image #1 X upper left screen reference (in twips) (0,0 is upper left of image)
SubImageScreenY1_1="10126.61"                            ; image #1 Y upper left screen reference (in twips) (0,0 is upper left of image)
SubImageScreenZ1_1="0"                                   ; image #1 Z upper left screen reference (in twips) (dummy)
SubImageScreenX2_1="19955.67"                            ; image #1 X lower right screen reference (in twips)
SubImageScreenY2_1="11019.18"                            ; image #1 Y lower right screen reference (in twips)
SubImageScreenZ2_1="0"                                   ; image #1 Z lower right screen reference (in twips) (dummy)
                                                         ; etc., etc.

When one clicks the Calibrate Image button in PictureSnapApp, the stage calibration coordinates are stored in the main ACQ file, but also, the stage coordinates of the sub image ACQ files are updated to reflect the new stage calibration of the main ACQ file. I may have sprained my brain on the math, but it works.  This sub image ACQ stage calibration update is especially important when moving images (and sub images) from one instrument to another where large changes in the stage calibration coordinates may occur.  Or even when reloading a specimen into a different sample holder position. Particularly if one wants to load the sub images into the main PSA window.

Anyway , it 's all automatic and transparent to the user now!

Here is how to treat the twip values when reading the ACQ file in your own code (remember it's always 15 twips per pixel if the DPI is 1.0):

' Modify based on screen DPI ratio
If ACQScreenDPI_Stored! <> ACQScreenDPI_Current! Then
DPI_Ratio! = ACQScreenDPI_Stored! / ACQScreenDPI_Current!
cpoint1x! = cpoint1x! * DPI_Ratio!   ' x reference screen coordinates
cpoint1y! = cpoint1y! * DPI_Ratio!   ' y reference screen coordinates
cpoint1z! = cpoint1z! * DPI_Ratio!   ' z reference screen coordinates

cpoint2x! = cpoint2x! * DPI_Ratio!   ' x reference screen coordinates
cpoint2y! = cpoint2y! * DPI_Ratio!   ' y reference screen coordinates
cpoint2z! = cpoint2z! * DPI_Ratio!   ' z reference screen coordinates

cpoint3x! = cpoint3x! * DPI_Ratio!   ' x reference screen coordinates
cpoint3y! = cpoint3y! * DPI_Ratio!   ' y reference screen coordinates
cpoint3z! = cpoint3z! * DPI_Ratio!   ' z reference screen coordinates
End If
« Last Edit: June 08, 2018, 02:17:53 pm by John Donovan »
John J. Donovan, Pres. 
(541) 343-3400

"Not Absolutely Certain, Yet Reliable"