Key words

1 Introduction

Light-based approaches have emerged as a powerful tool to investigate the circuit organization and the functional mechanisms underlying the information processing in an intact brain [1]. This stems from the fact that using light, with respect to other investigation methods, allows recording the physiological variations, e.g., neuronal firing, membrane potential, and neurotransmitter release, with enhanced cellular specificity and high spatial resolution, ranging from extended circuits down to the subcellular compartments. These optical techniques rely on engineered fluorescent reporters like GECIs (Genetically Encoded Calcium Indicators) [2] or GEVI (Genetically Encoded Voltage Indicators) [3], whose absorption efficiency or fluorescence emission yield depends on calcium ion concentration or cell membrane potential. GCaMP is currently, by far, the most commonly used GECI in neuroscience. The molecular structure comprises a green fluorescent protein (EGFP) bound, through a M13 fragment of a Myosin Light Chain, to Calmodulin (CaM) [4]. CaM is a calcium-binding protein that, with the increase of intracellular calcium concentration following the firing of an action potential, induces a conformational change to the overall configuration resulting in an increase in the fluorescence intensity detected. In 2013, a family of ultrasensitive calcium reporters, GCaMP6, was introduced [5] and later improved with the family of GCamp7 [6]. These molecules are characterized by changes in fluorescence that can reach up to 1100% and decay times ranging from 950 to 250 milliseconds. In appropriate signal-to-noise ratio conditions (SNR), these molecules enable the detection of  a single AP with scores as high as 94%. Along with EGFP-derived sensors, molecular variants with emission spectrum shifted toward the red region have been engineered [7, 8]. RCaMPs and R-GECOs (Red Genetically Encoded Calcium indicators for Optical imaging) are the main families of red reporters. They are obtained by subtituting the fluorescence reporter with mRuby and mApple, respectively. Compared to green indicators, typically excited at 920–930 nm and emitting in the 490–560 nm interval, RCaMPs are optimally excited around 1100 nm and emit around 590 nm. These reporters, in combination with optical approaches, enable the recording of the neuronal activity in the brain circuit of a living organism with cellular or even sub-cellular resolution.

From the circuit and systems neuroscience perspective, reconstructing cellular activity offers a powerful tool to look into brain mechanisms. However, the data obtained provide mostly correlative information, i.e., the activation of a certain neuronal sub-population occurring with the modification of a sensory or behavioral parameter [9]. Indeed, in this case, the possibility of validating the putative circuit mechanism and confirming its predictions on the expected dynamics of the system is still lacking. Ideally, for this purpose, one would like to record the change in the system activity when boundary conditions or network properties are artificially controlled.

The recent development and the constant improvement of light-activated modulators of the membrane potential offer, in this sense, an additional tool to intervene non-invasively and non-destructively into the circuits and probe the circuit mechanisms, i.e., to measure the circuit output under controlled conditions, at cellular resolution [10, 11]. Such tools can be genetically encoded to target designed neuronal populations with exogenous light-sensitive ion channels or pumps (termed “actuators” or “opsins”) [12]. These all rely on a retinal, a polyene chromophore typically found in animal mechanisms of light conversion. When the retinal absorbs a photon, it isomerizes and originates a series of conformational changes that end up in the peculiar activity of these proteins, e.g., ion diffusion or transport across the cellular membrane. The physiological effect originating from light stimulation is a change in the concentration of different ions, ultimately resulting in the modulation of the polarization level of the cell membrane potential. Several opsins are used in neuroscience, and are grouped into two main classes, depending on the promotion or suppression of the firing of action potential induced by light. On one side, one can find actuators with depolarizing effects, like ChR2, C1V1, ChrimsonR, and Chronos, typically used to kick the membrane potential of excitable cells above the threshold for action potential firing. In certain cases, the temporal kinetics of the elicited photocurrent is sufficiently fast to allow control of the neuronal firing with submillisecond precision and repeated firing up to 100 Hz. On the other side, there are light-gated molecules with hyperpolarizing effects, like eNpHR and GtACRs, whose light-based activation moves the membrane potential in a range preventing action potential firing or strongly reducing its probability [13]. Depending on their structure and properties associated with the photocycle, these molecules present different photocurrent magnitudes, ion selectivity, photocurrent kinetics, and spectral sensitivity. All these parameters strongly impact either the kind of neuronal modulation achievable or the optimal method to obtain it in combination with concurrent activity recordings.

In this chapter, we describe the hardware components to probe 3D brain circuits at cellular resolution. We present currently reported light-based architectures for 3D imaging and 3D photostimulation based on multiphoton absorption. We highlight the most relevant aspects associated with the integration of these two components in the same experimental paradigm.

2 Methods

2.1 Molecular and Technical Constraints

In general, all-optical probing of brain circuits relies on the possibility of concurrently recording and modulating neuronal activity with high resolution [14]. This assumes the compresence of light-gated actuators and light-based activity reporters within the same preparation and, in some cases, within the same excitation volume. Then, combining these two families of tools together in the same experimental scenario requires evaluating the biochemical and biophysical properties of these molecules along with technical aspects and working constraints associated with their use.

2.2 Absorption Characteristics and Its Impact

In the design of all-optical experimental paradigms, one aims at rendering the imaging and the photostimulation processes as much independent one from the other as possible: avoiding the imaging process to drive the activation of the opsin, hence altering the state of the expressing cells, and taking care that opsin photostimulation does not compromise the expected functionality of the activity reporter or the integrity of the signal extracted (see also Chap. 2). While it is possible to control many of the experimental parameters to keep such ideal working conditions, less straightforward is to engineer the biophysical and chemical properties of the molecules in use, that ultimately represent the first working constraint. Even considering molecule pairs maximizing orthogonality, the overlap between the absorption spectra is a condition frequently present, and it can result in important effects of “crosstalk” [15] (Fig. 1). Thus, the combination of an actuator with a reporter becomes possible at the condition of identifying suitable imaging or photostimulation parameters, e.g., wavelength, pixel dwell time, power density, and field of view, that minimize spurious activation of the actuator or reporter signal contamination [20,21,22,23,24,25]. The identification of a suitable molecular pair comes with the optimization of the optical parameter based on light sources available on the market. In general, the space of the optical parameters one can tune is sufficiently large, allowing the design of experimental protocols also with low orthogonality, where the extent of spectral overlap becomes considerable.

Fig. 1
An image illustrates the spectral properties of depolarizing actuators, hyperpolarizing actuators, reporters, and reporters' emission and tau off over different wavelengths.

Spectral properties of the most common actuator-reporter pairs, used for all-optical approaches. In the upper part are reported the light-driven actuators. The range with a 2P action spectrum greater than 60% is shown with a darkened mark indicating the wavelengths corresponding to the activation peak. On the right side, the corresponding τOFF is reported. This indicates the photocurrent decay time at the offset of the illumination. In the lower part, excitation and emission spectra are presented for the most common activity reporters. Black lines highlight the actuator-reporter pairs reported [67,17,18,19]

2.3 Photocurrent Integration and Spurious Opsin Activation

In the design of an all-optical investigation protocol, one important aspect to consider is the mechanism of photocurrent integration at the cell membrane level and the impact the imaging process per se could have on the alteration of the network state [26]. This originates from the photocurrent generated from the simultaneous or quasi-simultaneous activation of multiple molecules that spatiotemporally add together their contributions. While photocurrent spatio-temporal integration is the key element for an effective photostimulation, this represents a constraint for imaging purposes, with opsins absorbing significantly at wavelengths used for imaging. Indeed, upon saturating excitation, net charge transfer across the membrane is proportional to the channel conductance and the opsin de-activation time constant, usually called τOFF, i.e., the time required after the light offset for the evoked current to return back to zero (Fig. 1). The value of τOFF can almost cover two orders of magnitude (from 1 to 2 ms for the fastest opsin, Chronos, to several tens of milliseconds in the case of C1V1 and ReachR) and can impact in the extent of opsin activation due to the imaging process [27]. It is known that, keeping all the other parameters constant, opsins with longer τOFF support more effectively a current integration process in the temporal domain, resulting in greater net charge transfer, potentially enhancing the effect of spurious opsin activation associated with the imaging process. Along with the imaging light power density at the focal position, it is then critical to tune other imaging acquisition parameters to render the total light dose sustainable and negligible the impact of the imaging process on the network state. Currently, this is achieved by sparsening the pixilation matrix of the images or equivalently extending the field of view and reducing the pixel dwell time or the line scan time. On the other side, this solution for limiting the spurious activation of the opsin impacts on SNR of the signal reporting the neuronal activity. It becomes, then, a matter of properly balanced expression levels of the molecules and experimental parameters to work on optimal conditions.

2.4 Off-Target Activation and Somatic Opsin Targeting

The possibility of using all-optical approaches to probe brain circuits critically depends, along with recording the neuronal activity without perturbing the system, on the capability to target the neuronal modulation with high spatial precision and selectivity. This assumes that the photostimulation impacts exclusively or mostly on the identified targets, i.e., sets of neuronal somata. This is a goal not straightforward to achieve as dendrites and axons from many different cells surround the targeted cell body and constitute a dense mesh of neuronal processes, frequently expressing themselves the opsin. This represents a possible issue of off-target activation, i.e., indirect photostimulation of neuronal components other than those targeted. This is beyond the limit of the hardware design, independently from the specific optical implementation to drive the light-based actuator. To overcome this limitation, in the last years, many labs developed light-driven actuators specifically targeted to the cell soma, importantly reducing the expression along the axons and the other processes [28,29,30]. This frequently results in more efficient stimulation (in terms of required power density), and the strong reduction of indirect effects mediated by passing-by neuronal processes.

3 Hardware Implementations for 3D Recordings of Neuronal Activity

There are many hardware layouts reported for recording neuronal activity at different depths within the sample, either with sequential scanning of diffraction-limited spots in raster or random schemes either with longitudinally or laterally extended excitation profiles [1, 31,32,33] (see also Chap. 10). Ideal methods may depend on different factors, like the light scattering, the labeling sparseness of the sample, and ultimately on the question addressed. Here we focus on the general architecture implementing 3D raster-scanning of diffraction-limited multiphoton excitation, as this is currently the method offering the highest flexibility [34]. Three main components generally characterize this scheme, in some cases partially overlapping (Fig. 2): a first one, starting with the source and including all the optical elements required for intensity modulation and for the spatial conditioning of the beam; a second one devoted to longitudinal scanning of the excitation spot along the light propagation direction (Z); and a third one, for the deflection of the excitation beam in the lateral direction (XY).

Fig. 2
A flowchart illustrates an image source, a modulation unit, beam conditioning, longitudinal scanning, lateral scanning, and an objective. It depicts the layout for 3 D image.

General hardware layout for 3D imaging. This typically includes three elements: the first one with the source and the intensity modulation unit, a component of the optical path designed for scanning the beam along the longitudinal direction (in blue), and a module for scanning the excitation beam along the lateral dimension (in red). The different elements are conjugated by means of relay optics

Ti:Sapphire-based sources are typically adopted for optical recordings of neuronal activity. Fluorescence emission from the activity reporter is excited deep in the brain tissue via multiphoton absorption of 180–250 fs light pulses in the IR range of the spectrum and delivered at the sample at a repetition rate of 40–100 MHz. The fluorescence emitted is detected with photomultiplier tubes and solid-state detectors [35], resulting in functional signals with a high SNR, as far as a sufficient photon density of the ballistic excitation component is preserved, and the scattered component does not contaminate the image background level. A Pockels cell is usually used as an intensity modulation unit to finely and rapidly control the imaging beam power at the sample. As the beam diameter is typically below 2 mm at this stage, optical elements for expanding the beam size are inserted, considering the target size at the level of the objective pupil and the magnification realized by the combination of the scan lens and the tube lens.

The more common design for functional recordings across a 3D brain volume is based on optical modules or elements enabling the imaging beam to scan the sample along the light propagation direction (longitudinal, Z). This has been traditionally implemented with the mechanical movement of the imaging objective by means of a piezoelectric actuator [36]. More recently a series of approaches, prevalently based on the control of the curvature of the light wavefront at the Back Focal Plane (BFP) of the objective, have been refined to remotely control the effective focal position while keeping the objective still [31]. To reconstruct the activity, the beam is deflected sequentially to different positions of the field of view. To achieve the lateral scanning within the region of interest, imaging systems adopt a pair of galvanometric mirrors or acousto-optic deflectors.

3.1 Remote Configurations for 3D Beam Scanning

In general, scanning a diffraction-limited beam in a volume of the sample relies on the possibility to modulate the light wavefront at the BFP of a lens or an objective. Indeed, superimposing a spatial gradient or a curvature into the phase of the electric field of a planar light wavefront leads upon propagation, respectively, to a lateral or a longitudinal offset of the beam focus at the Frontal Focal Plane, FFP (Fig. 5). These two planes are said to be Fourier conjugated, and the light distribution at the FFP represents the results of the diffraction of the wavefront modulated at the BFP. To easily impose such modulation of the light wavefront, the BFP of the objective is optically conjugated using relay optics to a remote plane, where the element for introducing the wavefront modulation can be more conveniently placed. This is, for instance, the design realized by the tube lens-scan lens pair and the galvanometric scanner. If more than one modulator has to be employed, e.g., to impose both a vertical and horizontal tilt and a curvature, then either all the modulators are placed very close together near the focal plane of the scan lens, or they are distributed in multiple places and conjugated by additional relay optics to the BFP of the objective.

3.2 Methods for Scanning the Sample Along the Lateral Dimension

The most common way for scanning the sample along the lateral dimension relies on a pair of galvanometric mirrors, conjugated to the BFP of the objective. These are 3–6 mm wide mirrors mounted with an orthogonal optical axis whose orientations can be tuned by proper control signals. A change in the orientation with respect to the propagation of the incoming beam introduces a linear phase gradient to the wavefront, resulting in the lateral offset of the beam with respect to the center of the field of view (FOV). In a raster scanning scheme, one mirror sweeps over a line, and the other jumps from one line to the following one. With a typical pixel dwell time of about 4 μs, this design results in a frame acquisition time lower than a second for a mesh of 512 × 512 pixels. An 8–12 kHz resonant galvanometric mirror can replace the line scanning galvo, reducing the line acquisition time to 62–41 μs, respectively, and increasing the acquisition rates up to 30–45 frames per second for a pixel matrix of 512 × 512 elements. In this second scenario, there is no direct possibility to adjust the pixel dwell time and its extremely short value, typically 120–80 ns, heavily impacts the number of collected photons per pixel and, ultimately, the image SNR. In parallel to the solutions described above, to steer the light beams, it is possible to modulate the light wavefront in an inertia-free approach using acousto-optic deflectors (AODs) [37, 38]. These are active optical elements with a crystal window bonded to a piezoelectric transducer. When this is driven by an electrical signal at high frequency, it induces an acoustic wave traveling along the crystal in a particular direction. Based on the photoelastic effect, this generates a diffraction grating so that an optical beam propagating through the crystal in the direction orthogonal to the acoustic wave experiences an angular deviation that is proportional to the driving frequency. A pair of consecutive and orthogonal AODs can be used as a scanner to tilt the light wavefront in both the lateral axes. AOD-based scanners are characterized by bandwidths between 30 and 40 kHz, corresponding to a typical beam resetting time between 15 and 25 μs that accounts for the time needed for the acoustic wave to cover the distance corresponding to the effective optical window. While in a random access scheme, these numbers allow for extremely high and unparalleled temporal resolution in the recordings, the acquisition rates in full-frame raster scanning mode can be comparable with those achieved with a resonant scanner, i.e., 30 Hz. Diffraction efficiency and group delay dispersion are two other important figures that a design with an AOD scanner should deal with to obtain good imaging performances [39].

3.3 Methods for Scanning the Sample Along the Longitudinal Dimension

Adjusting remotely the longitudinal position of an excitation spot generally relies on the possibility to impose a curvature on the wavefront profile in a plane optically conjugated to the BFP of the objective. Considering the sole imaging purposes, possibly the simplest implementation is to place a lens with a controllable focal length, either at the level of the BFP downstream of the XY scanner and the scan lens-tube lens pair or in a plane optically conjugated to the BFP, upstream the scanner. An electrically tunable lens (ETL) is an example of such a device, which is composed of a liquid volume enclosed between a glass and an elastic polymer membrane, i.e., effectively a plano-convex liquid lens [40]. An electromagnetic coil driven by an electric current exerts pressure on the liquid, increasing the membrane curvature and thus the lens focal power. ETLs are capable of relatively fast settling times, typically between 5 and 15 ms, in response to a step-like control signal and can easily reach, depending on the objective properties, a few hundreds of microns of focal range with limited distortion of the point spread function (PSF) (Fig. 3). ETL driving, either with staircase-like or sawtooth control signals, in coordination with the frame acquisition allows for the plane-after-plane acquisition of a volume. According to a similar scheme, a tunable acoustic gradient index of refraction lens (or TAG lens) can be used to quickly scan the sample longitudinal dimension [41, 42]. In this case, high-frequency driving of a piezoelectric actuator generates in a viscous medium a cylindrical acoustic wave whose constructive interference produces periodic changes in medium density and, consequently, in the lens optical power. The resonance frequency of these devices, typically a few hundreds of kHz, results in axial scanning times in the order of a few microseconds. In this case, volume information is acquired not plane-by-plane moving along the longitudinal axis but section-by-section aligned to it. A critical parameter to evaluate for the positioning of an ETL or a TAG lens is the effective aperture of the optical window with respect to beam diameter at the designed position along the optical train.

Fig. 3
A diagram illustrates the basic configuration for multiphoton imaging with an electrically tunable lens, galvo mirrors, tube lens, and scan lens.

Multiphoton imaging across multiple planes in the olfactory bulb of a mouse expressing GCaMP6f. A basic configuration for multiphoton imaging is complemented with an electrically tunable lens to sample quasi-simultaneously different planes of the brain volume. Four different planes are shown with activity profiles extracted from the corresponding cells

Spatial light modulators (SLMs) based on a matrix of nematic liquid crystal represent a valid alternative for imposing a curvature profile [43,44,45]. These optical elements use the birefringent properties of the liquid crystal molecules to tune with a control voltage the effective refractive index of the individual cells within the matrix and control the phase delay of the different spatial components of a propagating wavefront [46,47,48,49,50]. These devices can encode relatively large wavefront curvature leveraging the large number of pixels and the possibility of phase folding, resembling the scheme of a Fresnel lens. For these systems, liquid crystal relaxation times pose the major restriction to the refresh rate of the diffractive optical element encoding the phase correction. Still, it can reach 300–400 Hz, allowing resettling times close to 2.5–5 ms. Faster switching times can be obtained by moving to deformable or tunable mirrors (DM) [51]. Indeed, these later devices can achieve currently important maximal phase strokes with sub-millisecond resettling times. As SLMs and DMs are more conveniently operating in reflection mode, the preferred position of these remote re-focusing devices is upstream of the XY scanner, where also more space is available for beam conditioning according to the optical window and the working mode of these devices. With respect to ETL or TAG lens, an advantage of SLMs and DMs is that, along with the wavefront correction required for the defocus, it becomes possible to superimpose additional phase corrections to the wavefront to compensate for aberrations induced by other optical elements, including the objective and the sample [44]. If a faster longitudinal scanning speed is required, a variable curvature to the wavefront can be added with an acousto-optic lens, which is implemented with a combination of the same acousto-optic deflectors (AOD) used for lateral scanning, as described previously [39, 52]. When the acousto-optic deflector is driven with a frequency ramp, the acoustic wave renders a gradient of local spatial frequency which locally deviates the wave front by different amounts, resulting in a focusing effect, with a focal length being proportional to the rate at which the frequency changes. Since the frequency changes over time, the position of the focus is not steady but it drifts laterally with a constant speed. Employing a pair of consecutive AODs, driven with the same frequency ramp but with acoustic waves traveling in opposite directions, results in two drifts that cancel each other out. Another way of longitudinally shifting the excitation spot is by conjugating the focal plane of the imaging objective with the focal plane of another “remote” objective, where a fast translating mirror is placed in the FFP [53,54,55]. The beam injected in this z-focusing arm enters the remote objective and gets focused in a spot at its (fixed) focal plane. When it is then reflected back by the mirror, it behaves as a point source which then gets focused by the other objective at the sample, where an image of it is formed. When the BFP of the remote objective is conjugated to the XY scanner and to the BFP of the main objective, longitudinally shifting the remote mirror shifts the actual position of the point source and consequently shifts the position of its image at the sample plane. This configuration leveraging the lightweight mirror and the availability of accurate piezo actuators can achieve settling time in the order of 1 ms and travel ranges of several hundreds of micrometers. To further extend the bandwidth limits of the scanning process, solutions based on temporal multiplexing have been proposed to sample non-simultaneously points at different z-planes without actually changing the setting of any optical components [56]. This approach relies on the fact that the fluorescence decay time of the reporter, typically 2–4 ns, is shorter than the interpulse interval of the excitation sources, usually 10–12 ns. In these conditions, an optical module can be designed to split the original beam into a n-number of components which are temporally delayed one from the other with an amount of time (0, τfl, 2 ∙ τfl, . . , n ∙ τfl, with. . , n ∙ τfl ≤ interpulse interval) covering the fluorescence decay and are corrected with different degrees of wavefront divergence. Upon recombination of the components, this results in a compound beam encoding a set of n different curvatures of the beam wavefront, each addressing a different z-planes in a different time window corresponding to the delay introduced. Temporal demultiplexing of the fluorescence signal with fast acquisition electronics according to the same interleaving scheme allows to reconstruct the neuronal activity from different planes with minimal interplane interference.

4 Hardware Implementations for 3D Modulation of Neuronal Activity

The general architecture of an optical train for high-resolution 3D photostimulation is designed after the principle of obtaining the sufficient integration of the light-induced charge transfer across the membrane. This results in layouts formed by two components: a first one, starting with the source and including all the optical elements required for beam intensity modulation and for the spatial conditioning of the beam; a second one, downstream to the first one, integrating optical components and systems for the generation of the arbitrary distributions of the electric field at the sample (Fig. 4). The scheme for the first part envisages the use of pulsed and high peak energy laser sources to activate light-gated actuators via a multiphoton absorption process. This is instrumental to access components of the neuronal circuit laying in the deep layers of a scattering preparation and to contain the spatial profile of excitation along the light propagation direction, taking advantage of the non-linear dependence of the multiphoton absorption on the excitation power. Along with traditional Ti:Sapphire, more recently for photostimulation are preferred laser sources based on oscillators and amplifiers with high pulse energy, up to 100 μJ range, and low repetition rate, 500 kHz – 5 MHz [26, 57, 58]. Indeed, for the same average power at the sample, the probability of multiphoton absorption scales with the inverse of the laser emission duty cycle, allowing, with an increase in the available pulse photon density, a more efficient activation of the molecules at saturation and targeting larger populations of cells. The basic optical train for the first part includes, along with a light shuttering module, a stage for the modulation of the source intensity. This is typically based on passive optical components, like the combination of the half-wave plate with a Polarizing Beam Splitter (PBS), or active elements based on electro-optic or opto-acoustic mechanisms, such as Pockels cell or Acousto-optic Modulators (AOM), respectively. The final stage of this section includes the optical components for the conditioning of the laser beam to match the constraints of the optical elements for the generation of the intensity distribution in the following section. It usually includes a set of lenses in a Galilean telescope configuration to set the beam diameter and the beam divergence level and waveplate for the rotation of the direction of the polarization of the light according to the requirements of the downstream optical elements.

Fig. 4
The flow chart illustrates an optical train for high-resolution 3D photostimulation. It includes a photostimulation score, a modulation unit, and beam conditioning followed by an objective at the bottom.

Scheme representing some of the hardware configurations for photostimulation in two- or three-dimensions. Starting from the left side, we report the solution for sequential photostimulation with diffraction-limited spot with spatially extended photostimulation patches (in gray). Then, the parallel configurations are indicated, relaying on scanning of multiplexed beamlets (yellow), scanless simultaneous excitation of multiple patches without (green), and with temporal focusing (red)

4.1 The General Features of a Photostimulation Train

The core components for 3D light-assisted modulation of neuronal circuits are optical configurations engineered to generate arbitrary light distributions in the sample space and are generally grouped into two main classes [26]: sequential and parallel excitation approaches (Fig. 4). In the first design, a single beam, either diffraction-limited or with an engineered PSF, quickly travels across the investigation volume to excite sequentially multiple regions of interest, corresponding for instance to a designated subset of neurons or portions of the corresponding regions. In the second scenario, the wavefront of the original beam is engineered to result in the sample in arbitrary distributions of multiple beamlets, each of these exciting at the same time a different cell within the targeted subset. In the next sessions, we describe currently reported layouts for both the photostimulation approaches and the critical parameters corresponding.

4.2 Sequential 3D Photostimulation

In sequential or single-spot cell-resolution photostimulation, excitation light is focused on the sample in a single spot at a time. This spot can range from a diffraction-limited excitation volume scanned sequentially over portions of the cell membrane or a single, extended illumination profile tailored around the typical size of the cell soma. Steering the beam along the lateral direction and re-directing the excitation spot is then instrumental either to reach sufficient photocurrent integration or to target multiple cells. This design can be implemented with a pair of orthogonal galvanometric mirrors or acousto-optic deflectors conjugated to the objective Back Focal Plane (BFP) by a scan lens plus tube lens pair [59,60,61]. Both these devices offer sufficient bandwidths to shift in a few microseconds the excitation spot within the same cell body along a spiral or raster trajectory and/or to jump from one cell to the other of the identified subset. In principle, with the coordinated control of the light intensity, the power could be distributed in an arbitrary spatial pattern, and a group of cells could be stimulated quasi-simultaneously with cell-matched excitation power density. As the size of the excitation spot dictates the number of light-gated molecules recruited, the same parameter ultimately impacts the integration time Ti, i.e., the total amount of time that the excitation spot is addressed to a certain cell. Ti typically ranges within 1–15 milliseconds, and its optimization – depending on the cell membrane time constant, the light power density, and the density of light-gated molecules – is critical to elicit the expected physiological effect. Extension of the sequential paradigms in three dimensions has only been partially reported at the moment. Optically conjugating an upstream electrically tunable lens (ETL) to a galvanometric scanner, makes it possible to realize a 3D point scanning manipulation arm with 6–15 milliseconds of typical commutation time to shift the beam from one plane to the other [62]. This figure could be substantially improved to a few tens of microseconds considering a design relying on acousto-optic deflectors to achieve a shift of the beam along the longitudinal direction, either as a standalone z-module or integrated into a 3D acousto-optic lens. 3D-2P-AOD systems with random access technology designed for functional imaging are currently becoming commercially available. These should be, in principle, capable of also supporting a sequential 3D photostimulation paradigm, but so far, there is no related report.

Moving from scanning a diffraction-limited excitation volume to scanning spatially extended excitation is an effective strategy to enhance the photocurrent integration in the spatial domain and ultimately improve the photostimulation bandwidth. Extending the excitation volume is typically achieved using Gaussian beams with reduced or low Numerical Aperture (NA) [61]. This solution comes with the elongation of the excitation profile along the light propagation direction that scales with the effective lateral size of the excitation spot and that can quickly exceed substantially the typical cell diameter. A way to limit the extension of the excitation spot along the light propagation direction independently from the shape lateral size is to integrate into the optical path an arm for Temporal Focusing upstream of the beam XY scanner [25, 63]. This technique relies on a diffractive element, typically a grating, to introduce a position-dependent delay into the diffracted spectral components of the incoming light pulse. This leads to the temporal stretching of the pulse envelope everywhere along the optical path but the focal position, where the delayed components reconstitute the original intensity distribution as a superposition of different beamlets (see also Chaps. 1 and 9 of this volume). SLMs and ETL, optically conjugated upstream  of a galvanometric scanner, can be used to control the position of photostimulation in 3D, with typical repositioning times ranging from 3 to 15 milliseconds. In this case, the resulting modulation of the wavefront at the BFP of the objective would account for a first component associated with a lateral offset introduced at the level of the galvanometric mirrors and a second component for the axial offset introduced by the SLM/ETL.

4.3 Parallel 3D Photostimulation

Parallel photostimulation approaches are based on the possibility to generate simultaneously a set of beamlets, each targeting a different position in the sample volume. Most of the current strategies for 3D light shaping rely on Computer Generated Holography (CGH, Fig. 5) [46,47,48, 64,65,66], a powerful technique to achieve patterned illumination at the sample plane through phase modulation of the laser beam in a plane conjugated to the BFP of the objective.

Fig. 5
This image illustrates a parallel 3D photo stimulation. It is based on the possibility to generate simultaneously a set of beamlets, each targeting a different position in the sample volume.

Computer-Generated Holography. Engineering the light wavefront at the BFP allows for rendering arbitrary light intensity distributions at the sample. Introducing a phase correction resembling a Fresnel lens results in a change in the convergence properties of a propagating beam, moving the position of the focus longitudinally. Similarly, with a linear gradient of phase delay applied at the BFP, the position of the focus is moved laterally. Multiplexing different diffractive optical elements (DOEs) allows for rendering arbitrary light distribution at the sample

As described above, in the case of controlling the focal position using SLMs, in CGH it is possible to impose spatial maps of phase corrections on the light wavefront to render the desired distribution of the excitation. Basic phase modulation patterns imposed at the objective BFP, like linear phase gradients (x, y) and parabolic phase profiles (z), resemble the effects of a combination of prisms and lenses and allow to split the original beam at different x, y, z coordinates. Super-imposing these individual correction maps in one single phase map, also called Diffractive Optical Element (DOE), operates like an optical multiplexer that can encode alone for hundreds of points in a designed 3D geometry at the sample volume. DOEs can be superimposed to a propagating beam either with static phase masks engraved in glass or quartz material or using SLMs to dynamically update the light distribution. One important aspect of CGH is its versatility. An optical path based on this approach can be used as a stand-alone photostimulation module (3D-CGH) [20, 67] or, in combination with other components, to integrate the multiplexing capabilities as a stage in more extended photostimulation optical trains (MTF-CGH [68], 3D-SHOT [63] and 3D-CGH spiral [69]). In the first scenario (3D-CGH), the diffractive optical elements encode along with the positions of the foci in the sample volume also for their actual lateral shape. Indeed, iterative algorithms based on Fourier transforms can compute phase maps to render a 3D distribution of bidimensional illumination profiles tailored independently around the specific structures of interest in the sample. These excitation foci can range from ensembles of dots, patches of stimulation of any arbitrary geometries or their combinations. One aspect associated with 3D CGH is that, while the lateral (XY) dimension of the excitation spots, supporting the process of photocurrent integration, can be imposed simply by specifying the desired intensity mask, the longitudinal (Z) extension of the illumination profile, being dictated by the laws of diffraction, scales linearly with the lateral size of the rendered shape. Depending on the experimental conditions, in particular the characteristic cell size, sparseness of the light-gated actuator expression, or its cellular localization, this feature can impact the effective resolution achievable in targeting neuromodulation. For neuronal modulation with 3D-CGH, it is then important to identify a trade-off between the acceptable spatial resolution and the photostimulation patch size to maximize the photocurrent integration area. In order to relax these constraints and to extend the performances and efficiency of the 2P-based photostimulation, a few approaches have been developed, combining the power of the 3D-CGH approach with other optical components. In one of the first approaches reported, the beam multiplexing capability of CGH is combined with the spiral scanning based on downstream a galvanometric scanner [24]. In this implementation, similar to the sequential approach described above, diffraction-limited spots are quickly scanned with the same coordinated trajectory over different cells. The objective wavefront at the BFP in this scheme accounts for a fixed component, a DOE imposed with the SLM and encoding a distribution of foci centered on the cell bodies, plus a time-varying component encoded by the galvo pair to scan the spiral over the designated cells. As far as the power density is kept under control, this approach can offer the best longitudinal confinement of the photostimulation pattern, corresponding to the PSF extension of a diffraction-limited spot. From the implementation with 2D parallel excitation, this approach can be extended in 3D, taking advantage of control of the third dimension allowed by CGH [59]. In alternative to the 3D-CGH spiral scanning, beam multiplexing supported by phase modulation has been combined with temporal focusing. Independently from the particular type of implementation, the general scheme consists of a step for shaping the beam amplitude, followed by a path with a dispersive element for Temporal Focusing (TF) [63], and finally completed with a stage for the spatial multiplexing with multipoint CGH based on a SLM. Shaping of the beam amplitude can be obtained either directly with a low-NA Gaussian beam to get circular profiles [70] or using CGH, Generalized Phase Contrast (GPC), and other amplitude modulation methods for tailoring the illumination patterns with top hat profiles [68] (see also Chap. 1). Most frequently the beam shaping is used to generate a single intensity profile at the level of the dispersive element for TF, resulting upon CGH-based multiplexing in the rendering of a set of exact replicas of the original shape. However, it is possible, by properly tiling and aligning the optical window of the beam shaper and of the multiplexer, to generate groups of replicas of different shapes [67, 68].

5 Setting Up an All-Optical 3D Investigation System

Combining light-based recording and modulation of neuronal activity at high resolution is, in general, a delicate task. One should identify and validate the experimental approach depending on the  tool's molecular properties and available techniques' capabilities. Even if this is rarely the case, the optimal hardware configuration definition should ideally come toward the end of a more extended development pipeline. Identifying suitable light-based molecules is the first phase in this kind of pipeline. Indeed, one should first characterize the effective functionality and operativity ranges of the light-based molecules, e.g., the molecules' action spectrum, the SNR ratio of the signal, or the change in membrane potential induced with the excitation power. Even though most of these characteristics could be found reported in the literature, these features should be verified with the actual working conditions/preparations of the planned experiments. After the initial phase for the characterization of the intrinsic properties of the approach (e.g., working parameters for photostimulation), in the following phase, one should ideally evaluate its compatibility with the typical working conditions of the second concomitant approach, e.g., GCaMP6s imaging. In particular, it should be assessed whether the first approach perturbates the state and/or the functionality of the molecules and the optimal working conditions required for the second one. Here is typically where the impact of the molecule crosstalk can be characterized and the effective capability of the techniques estimated. Unsurprisingly, one will have to deal with a set of experimental tradeoffs, gauging, for instance, between the SNR of the recordings and the level of the spurious activation or between the light power density of the photostimulation and the acceptable signal contamination level due to the photostimulation picked-up in the activity recordings. In this challenging task, even if not strictly related to the hardware configurations or the molecular properties, the optimization of the data acquisition chains and the design of algorithms to filter and clean the recorded signals are tools available to potentially relax the working conditions, at least partially.

5.1 The Hardware Integration

Different can be the optical configurations to support an all-optical circuit probing framework. It is clear that integrating and coordinating two components requires the identifying the appropriate hardware solutions and the proper software capabilities. From the point of view of the hardware integration, the photostimulation train and the imaging train integrating the 3D scanning, once a valid reporter-actuator pair is identified, can be considered as two components, mostly independent: different sources, beam size diameters, intensity modulation units, and working wavelengths. The two components, on the other side, become dependent one from the other when reaching the point of combining the two excitation beams along a common segment of the optical path to finally reach the objective back aperture. How and where multiplexing or combining the two optical trains are two important aspects to consider. Typically, the solutions adopted take advantage of either the polarization state of the two beams or their spectral separation. In the first scenario, the seeding beams, typically leaving the source with horizontal polarization, are constrained and routed in such a way to arrive at the point of combination with two linear and orthogonal polarization states, one horizontally and one vertically aligned to the respective propagation directions. At that point, a polarizing beam splitter, properly oriented to reflect one of the beams and transmit the other, acts as a beam combiner to launch them along the same path (see Note 1). Alternatively, when flexibility in the excitation wavelength is not required, a proper dichroic mirror, either long-pass or short-pass, can serve as a beam combining element. Working with a defined wavelength for the imaging beam and the photostimulation beam allows for reducing the optical components required for conditioning the beams and, so, minimizing undesired reflections. In general, defining the beam combining architecture is not just a matter of the optical component to use but also of identifying a convenient position along the optical train where joining the two components. This should be evaluated in terms of the available space, the minimization of the introduced distortion in the light wavefront, and the constraints dictated by the focal distances of the corresponding optical paths. It is convenient to illustrate possible integration layouts, to consider the most general scenario of an imaging system, presenting a XY scanning assembly based on a pair of galvanometric mirrors, followed by the scan lens-tube lens pair (Fig. 6). The most frequent design envisages that the imaging and the photostimulation paths run independently and merge downstream the XY scanner. This, combined with a remote system for z-scanning the imaging spot, allows the uncoupling of the two paths, where the imaging z-scanning assembly is positioned upstream of the XY scanner and the photostimulation fed into the train downstream to it. An element for combining imaging and photostimulation beams can be placed in three different positions: upstream (1), in between (2), and downstream the scan lens–tube lens pair (3) (Fig. 6). While it could be hard to precisely predict the impact of such element on the propagation characteristic of the imaging beam, it is important to consider the degree of flexibility associated with these three solutions. Indeed, moving from solution (1) to (3), one gains progressively more freedom to conjugate the photostimulation modulation plane to the BFP. While with design (1) the photostimulation beam is ultimately conjugated to the BFP using as relay optics the scan lens–tube lens pair, in (3) one has all the flexibility to design the relay component to the BFP of the objective independently from the imaging path and potentially to accomodate the requirements of the photostimulation train, independently by its complexity.

Fig. 6
An image illustrates an integration assembly of imaging beams via z scan assembly and photo-stimulation beams via photo-stimulation assembly

Layout of the integration scheme of the imaging and photostimulation arms. In cerulean is indicated the path of the imaging beam with the assembly to control the z-position upstream of the XY scanner. In red are shown the possible insertion points of the photostimulation path with respect to the optical components required for imaging

5.2 Beam Co-registration Procedures

The first aspect to consider is evaluating how the three light beams used for the two approaches (excitation of the light-gated actuator, excitation of the fluorescent reporter, and fluorescence emission by the reporter) are reaching or leaving the sample, whether these beams travel through the same objective, and whether the objective is kept still during the acquisition. This is usually the most common case [20, 23, 54, 69] but are also possible architectures relying on independent arms, one for photostimulation and fluorescence collection with a moving objective, the other for reporter excitation [62]. Having one objective still assumes the use of remote optical components for 3D control of both the excitation beams. Remote control is instrumental in compensating for subtle differences in the beam divergence characteristics of the different paths or chromatic aberrations, and it facilitates the co-registration of the excitation beams in the sample volume and the synchronization of the control signals. For co-registration of the excitation beams, it is generally considered the essential procedure allowing the calculation of the affine transformations mapping the reference system for the photostimulation into the reference system for the imaging. The goal is to obtain a precise transformation that converts the position information X, Y, and Z in the sample space into the corresponding commands for targeting the photostimulation beam and the imaging beam to that precise point. Typically, this relies on the use of a detection arm equipped with a CMOS/CCD camera and is achieved with the sequential illumination of a series of points in a 3D lattice, first with the imaging beam and then with the photostimulation beam, while moving the objective to bring the current excitation point in focus at the camera plane. Alternatively, without using a camera but relying on the PMTs, it is possible to use photobleaching of a fluorescent sample to measure the positions of the points within the lattice (see Note 2).

5.3 Spatial Uniformity and Addressable Field of View

In many optical systems, it is frequent to experience a progressive degradation of the optical performances depending on the spatial distance from the center of the field of view. This appears, for instance, as an increase in the dimensions of the PSF for the imaging path or a decrease in the effective light power density for the photostimulation approach. This usually originates from a non-uniform diffraction efficiency of the optical elements. On the other side, mapping such non-uniformities is required to identify of the effective volume addressable with the imaging and the photostimulation beams under the constraints of the resolution, SNR ratio requirements, and working conditions identified in the previous phases. This typically requires a procedure similar to the one used for beam co-registration but refined in order to extract, along with the XYZ positions of the points in the lattice space, the change in the intensity, the eventual deformation of the excitation profiles, and the presence of possible aberrations. It is important to note that in a certain measure, it is possible to develop corrective strategies and partially compensate for the optical components' limitations. This is normal for the diffraction efficiency of a SLM when included in the optical arm for photostimulation based. Because of the low-pass filtering effects originating from the SLM working principle [46], the efficiency curve measured at the sample shows a rapid decrease with the increasing distance from the center of the optical system (see Note 3).

6 Notes

  1. 1.

    The PBS-based solution offers the maximal flexibility for tuning the excitation wavelengths but requires a careful evaluation of the impact of a relatively bulky optical element like a PBS introduced in a segment of the optical train where the beams are usually not collimated. Indeed, it is expected that the presence of a PBS could modify the characteristic of the original light wavefront in that position or introduce, to a certain extent, additional pulse dispersion. This could potentially result in deterioration of the PSF, longitudinal shifts in the focal position, and loss of multiphoton absorption efficiency.

  2. 2.

    The co-registration procedure also provides the information about the accessible field of view implicitly for the two excitation beams and the degree of spatial variation of the imaging/photostimulation efficiency within the addressable volume. It is then important to consider a solution where this procedure can be easily and quickly performed, ideally in an automatic approach.

  3. 3.

    Compensating for the non-uniformity: acting at the level of the computational engine that is used to calculate the diffraction optical elements loaded on the SLM, one, based on the mapping obtained, can balance the weights of the corresponding features, to control precisely the intensity and counterbalance eventual losses due to the diffraction efficiency curve [67].

7 Conclusions

In this chapter, we described the current state of the art of the hardware configurations allowing all-optical investigation of the neuronal circuits in vivo in three dimensions. This is a field where the development of molecular tools and the technological advancement continuously provide novel possibilities for designing and refining experimental approaches that can extend the perspective of investigating the neuronal dynamics in living organisms. Despite the availability of technical solutions, the community has only partially capitalized on these tools to explore brain mechanisms. This is indeed not just a matter of the hardware required, but poses a series of questions, and challenges, also from the point of view of the design of the experimental protocol, the analysis of the data, and the interpretation of the outcome.