Development of Self-made LSM Software using in Neuroscience

One of the main and modern visualization method in neuroscience is two-photon microscopy. However, scientists need to upgrade their microscopy system so regular because they are interested to get more specific data. Self-developed microscopy system allows to modify the construction of microscope in not-complicated manner depending on specialized experimental models and scientific tasks. Earlier we reported about building of self-made laser scanning microscope (LSM) using in neuroscience both for in vivo and in vitro experiments. Here we will report how to create software AMAScan for LSM controlling in MATLAB. The work was performed with financial support of the government represented by the Ministry of Education and Science of the Russian Federation, the unique identifier of the project is RFMEFI58115X0016, the agreement on granting a subsidy №14.581.21.0016 dated 14.10.2015.


Introduction
Application of modern techniques offer high resolution properties for living systems research is significant key for neurobiology progress. there are certain peculiarities arising from the specifics of experiments using this technique. In one case, for example, the analysis of the morphological cell data of hippocampal slices of the brain of rodents, other experiments in vivo depending on the design using the full-sphere of the virtual reality or, for example, in the form of a cylindrical hover platform. Working with selected methods require both of high-technology equipment availability and knowledge and skills to applying non-trivial mathematical algorithms for control two-photon microscopy system [1] and for well-formed data analysis [2,3].
To improve the quality of the resulting images it is necessary to use not only advantages of the technical (physical) characteristics of the microscope [4][5][6][7], but also good program support. Control of system is realized either exactly by using digital-to-analog (DAC) and analog-to-digital (ADC) converter(s) (e.g. National Instruments boards and others) or by using control element of microscope components (e.g. USB, RS232 connection). However, development of cross functional and convenient software to control the system is very important object for researchers. For achieving these goals developers could use commercially available software (ScanImage, Micro-Manager, YouScope or others) or create their own software using Matlab, LabView, Python or others. In case of software development researcher could create few sub-programs for each of elements controlled by software (e.g. manipulators, focus, lasers, scanners, acousto-optic modulator (AOM), detectors and others). After this step sub-programs could be combine to one main program which will control all of them and synchronize their integrated work. Having practical experience researchers could develop design of their software more friendly for end user than commercially available software because of their sector-specific goals. We are presenting all the microscope components interaction at the Figure 1. Software architecture is divided by program logical and graphical parts. Each part is working separately. This modularity allows to unify system and create it more flexible for operators. Moreover, software (full edition or program logics part without graphical part) could be started in command line. This article may be regarded as a quick reference to laboratory staff who are wishing to control their own microscopy system and modernization of this software for achieving different scientific goals. Motion control windows are identical for motion of system parts for Z and X-Y directions ( Figure 2). Z translation motorized stage is using for vertical movement of platform with fixed objective and photomultiplier tubes (PMTs). Using this stage researcher can focus on object using differential interference contrast (DIC). X-Y translation motorized stage is using for finding region of interest (ROI) in axial plane. Motion control windows for Z and X-Y directions movement are separate in main software window, however they are using same principles of controlling by researcher. Researcher can set movement speed manually or using pre-defined modes ("Slow", "Medium", "Fast"). Also researcher can change movement speed and step size in special area using PC mouse buttons. Clicking to mouse left button, researcher double increase step size, clicking to mouse right button, researcher double decrease step size, scrolling of mouse wheel, researcher change movement speed. Speed value and absolute position of stages could be also found in motion control window. Modular-programmable product is working using RS-232 signal channel and can get threedimensional position value (Z and X-Y). This channel could be used for setting high-precision step, movement speed, movement coordinate values independently for each from three translation motorizes stages. After focusing using DIC mode and finding ROI researcher should change microscope settings to multiphoton mode. In this mode researcher is using central control system (PC software). At first researcher is choosing scan mode, size of ROI (μm 2 ), resolution (pixel 2 ), scanning speed (μs/pixel or/and frame/sec). After that researcher is setting supply voltage of PMTs which is defined gain of PMTs. However, researcher should remember that gain increasing is inducing noise/signal ratio. PMTs control windows are identical for both PMTs (Figure 3, left "PMT Control"). As this software is module based, researcher can increase number of channels (PMTs) up to unlimited value (usually 2-4 PMTs).

Scan system
Researcher also can choose colour scheme (hue-saturation-value (HSV), jet, hot, colour shadows (gray, red, blue, green etc)) for drawing results of scanning. Using buttons "Start Scan" and "Stop Scan" in Acquisition window researcher can start and stop scanning process. Also researcher can set scanning rate (pixels/sec) (Figure 3, middle). Scanning rate is defined by DAC (in our case National Instruments board) and in our case could be in the range of 100 000 to 5 000 000 samples (pixels) per second. Also in this window scanning frame number (Frame Number), time for movement of X and Y galvano mirrors (TimeCalculatingArray), time for sending scanning trajectory to National Instruments PCI-6110 board (TimeQueue), scanning time for one frame (TimeScanning) are shown. Scale ratio of ROI could be set at Scan Area window (Figure 3 rate, colour scheme, scanning image resolution during scanning process. Each frame is saving in defined folder automatically (researcher should choose this folder in Save/Load window) as a 14-or 16-bit *.TIF image depending on using digitizer.

Laser settings
Laser beam is characterized by Chameleon laser settings. Software AMAScan allow for set and change wavelength of interest. Acousto-optic modulator (AOM) allow for change laser beam intensity before hitting biological object (e.g. brain slice). Laser and AOM control windows are shown at the Figure 4, right. There researcher can connect and disconnect to laser or/and AOM, get status (connected or disconnected, current parameters, e.g. wavelength, intensity and frequency of AOM sound wave), turn on or turn of AOM, open and close laser shutter. Software is using RS-232 signal channel for setting up these parameters. Photodetectors are installed in close proximity to the aperture of lenses, besides, the fluorescence beam doesn't pass the way back through the scanning module, but directly gets onto the detector. The use of several dyes simultaneously is often the necessary requirement in multiphoton microscopy. Therefore the design of the microscope detector allows to make fast change of emission filters and dichroic mirror ( Figure 5). The standard cube for filters mounted on the slider like "swalow-tail" that is easily inserted and taken out from the detector is used for this purpose and significantly facilitates the work of the researcher. The multiphoton detector must also be equipped with means of electronic protection and a shutter preventing the damage of the photo multiplier and increase in its performance term. Modern microscopy systems allow to mount up to 4-6 detectors depending on researcher goals. PMTs efficiency depends on gain value which is represented as supply voltage. PMTs are operated at high voltage potential (usually up to 1 200 V). Further, the metal housing of the PMT is connected to the photocathode (potential) so that it becomes a high voltage potential when the product is operated at a negative high voltage (anode grounded). High voltage power supply is controlled by input voltage (usually 5 V). Regulation of this input voltage is possible using analog output of National Instruments board.

Service
For aligning laser beam and adjusting optics for experiments, researcher need to do all the calibration procedures using scanners coordinates as (0; 0). In this position laser beam should pass through centers of all optical elements. After that researcher should scan circular area and measure any aberrations under the objective at the focal plane. There is necessary to detect any defects of optical way during setting system up. This manipulations could be started at Beam Calibration Setup service form.

Conclusion
As a result of development of the own two-photon system taking into account all special characteristics allows to lower the expenses and to increase the quality of methods helping to improve the quality of the obtained data, enables to conduct researches on live samples with the minimum damage of fabric, makes possible to carry out researches of the data of morphological slices of mice or rats hippocampus, as well as researches on live samples, that is carrying out experiments in vivo. Control of system is realized either exactly by using DACs and ADCs or by using control element of microscope components (e.g. USB, COM connection). However, development of cross functional and convenient software to control the system is very important object for researchers. For achieving these goals developers could use commercially available software or create their own software using Matlab, LabView, Python or others. In case of software development researcher could create few subprograms for each of elements controlled by software. After this step sub-programs could be combine to one main program which will control all of them and synchronize their integrated work. Having practical experience researchers could develop design of their software more friendly for end user than commercially available software because of their sector-specific goals. This article may be regarded as a quick reference to laboratory staff who are wishing to develop their own microscopy system and create own software for LSM controlling. Such example is shown at the Figure 6 (AMAScan software).