|
|
||
|
|
||
|
Welcome to X26A Information For Users Beamline Information Contact Information Configuration Info Beamline Status Software Manual Software Downloads Recent News Beamtime Schedules NSLS X26A NSLS X27A APS Sector 13 X26A Science Publications Science Highlights Required Acknowledgement External Links NSLS WebSite NSLS PASS BNL WebSite BNL Visitor's Guide GSECARS Website |
The Prosilica GC 1350C CCD Camera
Starting up the soft-IOC and configuring the MEDM screen
With the IOC streaming images from the Prosilica CCD the next thing we need to do is get ImageJ started, that's what we'll be using to view the images through an EPICS plugin Mark wrote. There should be an ImageJ icon on the desktop to start it up. ImageJ and the EPICS areaDetector plugin
Mark has also written a companion plugin that will display a dynamically updated line profile. This is handy, for example, if you want to observe the beam profile on the YAG or ZnS phosphor in real time during focusing. To use this, draw a line through the object you want profiled then select "Plugins -> EPICS_areaDetector -> Dynamic profiler". This will open a new window that will display in real time the intensity in each pixel under the line that was drawn in the image stream. Using ImageJ to mark the beam and calibrating the image scaling One of the most important things we use the optical image for is to tell you where the beam is on your sample. With the old Toshiba CCD we did this with a manually adjustable X-Y crosshair. But alas...it requires an analog signal. In ImageJ this is easily done with the crosshair button. You select the tool, click on the image where the beam is, and tada...all done. The crosshair will remain in the same position even if you zoom in and out of the image. We will mark the beam position for you when we set up your experiment, but I have a feeling there will be instances where we will accidentally close the image window or erase the crosshair mark. But that's OK, it turns out that ImageJ let's you save the coordinates of the crosshair as an roi. So after we mark the beam, we we will do is save the position in your data director under the file name "Beam.roi" . If you accidentally lose the crosshair all you'll need to do is open this file using "File -> Open -> Beam.roi" and it'll return to where it was marked. Another useful aspect of ImageJ is that it allows for scale calibration. Once an image is calibrated you'll be able to measure distances and areas in micrometers. The easiest way to do this is to open an image that has been precalibrated. Again, we'll do this for you before you start, but in case you need to reapply the scaling, simply get the image stream running as described above. Once running, open our calibrated image in ImageJ, it'll be called "X26A_Scale.tif" and it will open in a separate window. Now with this window selected choose Analyze -> Set Scale... from the ImageJ menu. A window will pop up showing the scaling for this image (basically microns per pixel), just check the box labeled "Global" and select "OK". This will apply this scaling to all open windows including the video stream. Once you've done that you can draw a line using the line tool or an area using the freehand roi tool and measure the distance or area you've defined by selecting Analyze -> Measure. You can even save an image from the video stream for posterity with a scale bar attached for future reference. To do this you'll first need a snapshot. This is actually really easy to do by simply going to the areaDetector plugin toolbar (which is most likely minimized on tha taskbar) and clicking the Snap button. With this snapshot you now have a couple of ways to get a calibrated scale bar on the image before saving it. The option I like best is to use ImageJ's scale bar tools. You can access these if they aren't open alreadey by clicking on the >> button at the rightmost side of the ImageJ toolbar and selecting Scale Bar Tools for Microscopes. This will change the set of tool buttons displayed and one of these should be a little icon that looks like a teeny weeny microscope. If you select this you'll see an option labeled X26A. Go ahead and select this and then click on the icon that looks like a scale bar with um next to it. This will pop up some menu boxes. In the first menu there's a listing for "current spatial calibration" in which you should select 5X from the drop down list. This is the objective lens we use most often. Select OK and another menu pops up asking you how big a scale bar you'd like on your image. The default is 100 um and once you've chosen you'll see a modified image with a scale bar at the bottom and various bits of information about when the frame was collected, etc. The second way to insert a scale bar is a bit simpler, simply go to "Analyze -> Tools -> Scale bar". Using Stage_Widget to mark the beam and save JPEG of sample ImageJ provides staff a convenient real-time method of interfacing with our Prosilica CCD. But for users it can be inconvenient to interface with during a run. We have simplified this somewhat by providing you an IDL routine that lets you rapidly accomplish several tasks in saving a record of current stage motor positions on a sample. The Stage_Widget IDL program will let you:
To run the program simply type "Stage_Widget" at the IDL> prompt. The widget displayed to the right should open. The top of the widget contains a menu option called "Image Directory". By default the images are saved on the PC that is running the soft-ioc for the Prosilica, mapped as directory I on the control PC. This lets you change the directory to which the images are saved. Next there is a "Save position as" field. The idea is to enter text...a name, for this position that you would like to have saved and recall at a later time. In the example to the right, we've entered "point1". You have to hit ENTER after you've typed the name in order to get this to take, and when you do you will get a little acknowledgement at the bottom that it was saved. What this does is read all the stage motor positions and create a small text file in X:\stagexyz with the name, in this case, point1.dat. It's best to avoid long file names, keep it simple, avoid punctuation. What you will also notice is that as soon as you hit ENTER you will also get a visual display of the CCD in the bottom window of the widget. If you also go and look in the directory you defined as your Image Directory, you should also now find a file called point1.jpg, which is a screen capture of this point. If you ever want to move back to this position, you just put "point1" in the "Move stage to:' field, hit ENTER, and away it goes. You'll also see a response at the bottom of where it is moving the stages to. You also see two checkboxes in the widget labeled "Mark Beam" and "Show Beam". The Mark Beam option is intended to be used at the beginning of a run to mark the beam position on the screen. When the checkbox is selected, clicking in the display window (you'll note a crosshair) will mark the beam with a red "L". The lower left corner or the L should mark the pixel where the beam is. This also creates a file in your image directory labeled beam.sav that contains the pixel value of the beam. This file is used for visible image capture using our scan routines, so ONLY do this if you absolutely know what you're doing! A backup file is created to prevent overwrites, but my recommendation is just leave this option to the beamline staff or talk to them about redefining the beam position first. It will save you headaches down the road. When the Show Beam option is selected the L beam marker is always displayed along with a view of the sample. Changing image gain and frame rate Okees, let's go back to the Prosilica adl screen for a moment. In the Readout section of the adl there are some options for adjusting the size of the image that's shown and whether the image is monochrome or RGB color. You'll notice in the example shown above that the sensor size is listed as 1360 X and 1024 Y and that the region Start and Size are shown as 0,0 and 1360,1024 respectively. These settings will output the full active area of the CCD. We could specify that only a small region of interest (yes...ROI) be output instead by changing these values accordingly. Usually, though, you'll want to output the full active area but you do have an option of having this be displayed smaller image by binning the CCD. Changing the X,Y binning to 2,2 will give a full image that's half the pixel size. You'll also notice that you'll get a bit faster response from the CCD in doing so, but there's a downside in that a binned image can only be displayed monochromatically. For a full 1360 x 1024 image we can switch between color and black & white by changing the Color mode between RGB1 and Mono. In monochromatic mode you'll be able to apply some odd psychadelic color schemes to your image using LUT's. This can be useful both for giving you some googlyeyed entertainment at 3:00 am in the morning and for enhancing the intensity variations in objects. We use this, for example, in better visualizing the beam shape on a YAG phosphor. To do this once you have a monochromatic image, go to the ImageJ toolbar and using the >> button select the Lookup tables toolbar menu. The LUT button will give you a listing of various color tables that can be applied.The Readout frame also provides control for the CCD gain (for our purposes let's consider this the image brightness). This can be varied between 1 and 22. The other area of interest I wanted to pint out here is the Collect frame from which we can adjust the image frame rate. We'll do this by adjusting the Exposure time and Acquire period. Both will affect how fast the frames update, but in general it's best to keep the exposure time as low as possible. For the GC 1360C this is 0.05. The Acquire period can then be considered the direct inverse of the frame rate and can be adjusted accordingly depending on your needs. |
|
| Beamline X26A receives support the following organizations: | ||