Scanner & Camera settings
The remaining settings will mostly need to be set interactively once Zapit has started. Let's start the software:
You should see some messages at the command line then after a short delay the GUI will appear. The image is a live camera feed. Place an object in the field of view and focus. Now you will set the scanner and camera settings.
Setting the image orientation
You should confirm that the image itself is not inverted! If it is, there is a chance that the beam will go the Left hemisphere when you asked for the Right. This will not be obvious unless you look at the sample itself!
Make some target with a clear left/right/up/down directions. If the on-screen image does not look as expected, alter the flipImageUD
or flipImageLR
parameters under camera
until it does. True 1
and false is 0
. For a 180 degree flip, set both of these to 1. After editing the YML you will need to restart Zapit for your changes to take effect.
Setting the scanner orientation
Start the laser and Zapit. Press "Point Mode" in the GUI and click on a location in the image feed. Adjust "Exposure" if needed. The desired position is shown by the red circle. The beam will not go to the desired position because the calibration has not yet been performed. However it is a good idea for the beam to go in the same direction as the mouse cursor. You can verify this by clicking "Cat & Mouse" and moving the mouse cursor over the field of view. If the beam motion seems inverted in its behavior, it can be corrected with scanners.invertXscanner
or scanners.invertYscanner
. Close Zapit and alter the appropriate settings to 1
(true) or 0 (false) as needed. Restart Zapit and verify. Once done you should have the beam going in the correct direction when you point but with an offset. There is an automatic scanner calibration which will take care of this later.
Exposure settings
You will see a camera.default_exposure
and a calibrateScanners.beam_calib_exposure
. These are both changed via the GUI and you can ignore them.
Scale settings
camera.micronsPerPixel
is the number of microns per pixel at the sensor. To obtain this, find the pixel size in your camera spec sheet (for example, the Basler ACA1920-40um, has a pixel size of 5.86 microns) then divide that by the magnification of your optical system. Our suggest setup for mouse brains, for example, has an f=100 mm objective and an f=50 mm tube lens. This yields a magnification of 0.5 and a pixel size of 11.72 microns.
scanners.voltsPerPixel
is used to map scanner control voltage to a pixel location on the screen. A reasonable default value for this assuming an f=100 mm objective and Saturn5 Scanners is 0.022
. This value does not depend on the number of microns per pixel the system is set to. Having a reasonably accurate value is necessary for the the "Point Spacing" and "Border Buffer" settings used during scanner calibration to be accurate. However, so long as the system can calibrate itself, an accurate voltsPerPixel value is not important. To set this value, start Zapit and wipe any existing scanner calibration there may be (hZP.wipeScannerCalib
). Set the system to "Cat and Mouse" mode. Place the red circle near the middle of the field of view (0/0) and align final fold mirror until the beam points at the circle. Now move the circle and ensure the beam remains near the circle throughout. If the gain of the laser spot if obviously larger or smaller, edit the value of hZP.settings.scanners.voltsPerPixel
at the command line until the mismatch has gone. e.g.
You don't have to be spot on: just ensure there is no obvious gain difference. The scanner calibration procedure should get rid of any residual mismatches.
Assigning values to settings at the command line as shown above will change the values in the user settings file. So when you quit and re-start Zapit, these settings will persist. Do not assume you can revert settings applied this way by restarting Zapit.
Last updated