The UCLA ims‐1270 uses a reflective light microscope with a fixed zoom to show where the ion beam is hitting the sample. However, manually moving the sample stage is a time consuming process. This procedure allows for images acquired elsewhere to be mapped to the sample stage. After being mapped, they can easily be zoomed in and out. This means that locations of interest for analysis can be found much more rapidly.
Please follow the Sample Preparation Guidelines, with regards to mounting, polishing, and coating the samples. To use the RIPS programs you also need digital images of your sample. We recommend that you acquire a high resolution reflective light image of your entire sample. We have a digital camera and microscope set up for this purpose.
The images that you acquire can be from any technique, and can be saved in any format Inkscape (see Appendix sec:Inkscape ) can import including .png, .tif, .tiff, .jpg, .jpeg, .pdf, .bmp, as well as others. However, you will need to be able to identify three locations that correspond to the ims‐1270 SIMS reflective light microscope image.
There are two ways to identify your locations. You can either define your sage coordinates first (using start_dialog.pl) and then import your image and tag it, or you can import your image, and tag while saving your points using correlator.html and then running quick_run.pl or svg_generator.pl .
Open up Inkscape and import images. If you have one image, just import it. If you have multiple images import correlated images into the same layer, and import uncorrelated images into different layers. (see subsec:layers for how to work with Inkscape layers) After importing images open correlator.html.
When you find a location using the ims‐1270 that corresponds to location in your image, tag the image using the upper‐left corner of the rectangle tool (press ‘F4’ to bring it up), and type the CAMECA coordinates into correlator.html . Make certain that the rectangle color matches the color of the line you typed in. If you are color blind you can use the RGBA in the fill tab of ‘Fill in Stroke’ dialog (press ‘Shift+Ctrl+F’ to bring it up), to edit the color so it matches (with an extra ‘ff’ at the end for alpha).
After tagging all the locations (three for each layer), save the ‘.svg’ image in the same (or a sub‐directory) of where the perl files are. Then press ‘Output .txt file’. This should make a new window. Save this file as your samplename.txt in the same (or sub‐directory) of where the perl files are.
Double click on run_quick.pl (which runs svg_generator.pl, fit_function.pl, and remove_rectangles.pl) or run each of those scripts in that order. After running run_quick.pl you should have a new ‘.svg’ file with the same basename as your ‘.txt’ file. If you open up the new ‘.svg’ file it will automatically put you in the ‘SIMS Target’ layer, so all you need to do is tag your points for analysis.
To begin, open up startdialog.pl (you can either double click on it or use the command line, see Appendix sec:Command Line for help). This should open up a command prompt window asking you what you will want to name your file. Type in the name and press ‘enter’. It will automatically append .svg (Scalable Vector Graphics) to the end if you do not end your filename that way. If you choose a name that conflicts with an existing file, it will prompt you again before moving on.
The program will then ask you how many stage points you wish to identify. As mentioned above, each image you wish to fit must have three points identified on the stage. Because corresponding stage points and image points are correlated by color, the code supports up to the identification of 12 points.
The program will then prompt you for the x and y coordinates of each of the stage points you wish to identify. The coordinates should be entered from the CAMECA stage settings, and range from ‐11000 to 11000 in the x and y directions (each step is one micron), although this program will allow you to exceed these dimensions. After you have found every point, the program will show you what you have entered, and allow you to fix any errors before continuing and saving your stage points to a .svg file.
The generated .svg file will have four layers. The top layer ‘SIMS Targets’ will be used in Section sec:Analysis Points , the next layer ‘Guides’ is a number of overlays, one of which is a gird with the line centers 1 mm apart, the other is a circle and rectangle approximating the stage display. Anything in the layer or sublayers of ‘Guides’ is ignored in further steps. The next layer ‘Transform 1’ will be used in Section sec:Registering_Pts and has two sublayers, and the last layer ‘Base’ has the locations of the stage points saved in it in the sublayer ‘Base Points’. Open up the generated .svg file with Inkscape (see Appendix sec:Inkscape for help with Inkscape). Make a new layer for each image you are going to import. These layers must be top level layers (not within any other layer). The images themselves can be in any sublayer, however the program transforms everything within one top level layer, so unless you have multiple images that already aligned perfectly with each other, you should put your images in different top‐level layers.
Make certain you are in the appropriate layer (press ‘Shift’+‘Ctrl’+‘L’ if the layer window isn’t open) and then import each image you want by clicking on ‘File’ then ‘Import...’ and selecting the appropriate image.
Make certain that you are in the appropriate layer, and draw rectangles to indicate the points you are registering each image with. Set the color so it matches the point you want to transform it to. The program uses the upper‐left corner of the rectangles. You can use more than three rectangles per top level layer, but the program will only take the first three that match.
If you have registered points correctly, fit_function.pl will transform all of your images so they fit the stage correctly. It will generate a new file, with ‘.new.svg’ replacing the old filename’s ‘.svg’.
If you want to remove all of your rectangles (they should be no longer needed). Run remove_rectangles.pl . This will make a new file without rectangles, with the ‘.svg’ previous filename replaced with ‘.er.svg’. If you run fit_function.pl and then remove_rectangles.pl your resulting file will have ‘.new.er.svg’ attached to its end.
Draw rectangles in the layer ‘SIMS Targets’ (see Appendix sec:Inkscape if you need help) for every point you wish to analyze. Like before, the upper left‐hand corner of the rectangle is the actual point that is saved.
The order in which the analysis occurs is set using the ‘id’ field in the object properties (‘Shift’+‘Ctrl’+‘O’ to open in Inkscape). If left unaltered the order in which you add the rectangles will be the order in which they are analyzed because the ‘id’ field must be unique and Inkscape automatically increments this value. The actual matching is done using an alphabetical ordering (20 is after 3, but 100 is before 004).
The ‘Label’ field in the object properties is saved as a comment in the .hpl file. This field is completely optional, but suggested to describe your analysis points.
When all points have been identified, save the file and double click on svg2hpl.pl . Like fit_function.pl, this will take the last modified .svg file, with more options if you use the command line. It should prompt you for a filename for your .hpl file, and then generate your .hpl file. Move this file to the Sun workstation and load it. You should see all the points you made. It is recommended that you double check your locations before running your analysis.
There are UNIX‐style man pages (help files) done through PERL’s pod documentation for each of the PERL scripts. Documentation can be viewed by typing ‘perldoc’ before the script name, or by giving the ‘‐man’ option from the command‐line.
To run one of the scripts using the command line, first open up the command window or terminal. Then navigate to the directory where the script is, (normally this is cd directory ). When you are in the right directory, type perl then the name of the script you want to run. Help for all of the PERL scripts can be found by typing perldoc before the script name.
To open up a command window in Windows XP, click on the start menu, click ‘Run’ type ‘Command’ and press enter. Wikipedia has a list of all the DOS command options. The most important ones are dir (which lists files in a directory), cd directory (which means go to the directory), erase file (which means remove file), and cls (which clears the screen). Help on how to use most commands can be found by typing help commandname.
To open up a command window (terminal) in Mac OS X, click on ‘Finder’, click on ‘Applications’, click on ‘Utilities’, and click on ‘Terminal’ or ‘X11’. Wikipedia has a list of the major common Unix commands, and how they work. The most important ones include ls (which lists the files in a directory, although depending on the system dir also works), cd directory (which means to go to the directory), rm file (which means to remove file), and clear (which clears the screen). Help on how to use most commands can be found by typing man commandname, or info commandname.
Inkscape is a free software vector graphics program. It abides by the GPL Version 2 meaning anyone is free to distribute it, as long as they distribute how they made any changes to the program if they make any changes to the program and distributed the changed program. It is a vector graphics program, meaning it uses colors that filling an area defined by vectors, rather than the more traditional explicitly defining colors using pixels defining a color. Inkscape attempts to implement the SVG 1.1 Specification, so any other program that implements the specification correctly should be able to be used in place of Inkscape. A complete manual for Inkscape can be found on the web through ‘Help’ then ‘Inkscape Manuel’ explaining all of the functions in detail. The following is a short, less comprehensive, explanation of some of the functions.
The current layer will have gray bar over its name, which will be dark gray if you are in the layer window, and light gray if you are in the editor window. If you paste or import something, it will be placed in the current layer. Layers can have sublayers as well, and sublayers’ names can be seen or hidden by clicking on the light gray box with either a plus or minus sign in it.
Layers can be locked to stop all editing in that layer to avoid accidentally changing things in them. This is controlled by the padlock to the left of the layer name. If a layer is locked, all of that layer’s sublayers are locked as well.
All the objects in one layer, and its sublayers can be hidden by clicking on the eye symbol to the far left of the layer’s name. While layers are hidden, they cannot be edited. Likewise the opacity for one layer is applied to all of its sublayers as well. The PERL script fit_function.pl uses this feature of propagating changes to the sublayers, to transform the coordinate system of the top layers, which cause both the images and points in the sublayers to transform as well so they fit the base points correctly.
The order of layers determines if objects in one layer are above or below another. Higher layers have their objects above lower layers, and objects within a layer are higher than objects in that layer’s sublayers.
To import an image, first make certain you are in the right layer, and that the layer is visible and editable. Then click on ‘File’ and then ‘Import’ or press ‘Ctrl’ + ‘I’. Browse for the image you want and double click on it (or click ‘Open’). The image should appear in the layer you were in.
To draw a rectangle, like before, check that you are in the right layer, and that the layer is visible and editable. Then press ‘F4’ to bring up the rectangle tool, and use the mouse to draw. Keep in mind that only the upper left‐hand corner is used for determining rotation, or the location for SIMS analysis. After drawing the rectangle, click on the color you want from the bar along the bottom of the screen, or use the eyedropper tool (pres ‘F7’ to use it) to select a color from someplace visible on the image.
To set the Object Properties of an object, right click on the object, and select ‘Object Properties’. This can also be done by selecting the object and clicking on ‘Object’ then ‘Object Properties’ or pressing ‘Shift’+‘Ctrl’+‘O’. See Section sec:Analysis Points for how the Object Properties are used.
This procedure could be run on any computer and operating system. The two major dependencies, PERL and Inkscape are both free software, and while pre‐compiled binaries are available for many systems, the source for both is also available. Be sure to install the Math::MatrixReal module, which can be downloaded by typing in ‘cpan’ into the command‐line after PERL has been installed. The Math::MatrixReal module is needed for the matrix inversion of fit_function.pl .
The following programs developed for the UCLA SIMS lab can be downloaded: correlator.html , run_quick.pl , svg_generator.pl , startdialog.pl , fit_function.pl , remove_rectangles.pl , svg2hpl.pl , txt2hpl.pl , and hpl2txt.pl .
The documentation (this file in .tex format) is also available. Also the following free ‘libre’ software programs are mirrored there: ActivePerl 126.96.36.1994 , Math::MatrixReal for ActivePerl 188.8.131.524 , Inkscape 0.46 , and WinSCP v.4.17 .