Clément Marta Florence

Aurélien Minh Chang

Jeanne Chau

Stan Chacun

Eirini, Nicolo Remercier Dimitrii

Valeria Gilles

Imane I-Wen Thomas

Fabio

Anthony

Verena Hugo

V I Osnath

Haithem

Marc, Rossella, Emmanuelle Cécile Lyle

Juliette Travailler

Marie-Claude Faure

Michel Goldmann

Gérard Louis

Anne Baudot

Marie-Agnès Sari

Mohammed Boubekri

Karine Le-Barch

Xavier Coumoul

Philippe Girard

Michele Aquino

Isabelle Fitton

Je

Anna Devor

Ofer Yizhar

Keywords: optogenetics, two-photon microscopy, computer generated holography, photostimulation, light propagation, heat diffusion, scattering, Erbium-Ytterbium crystals, scanning, action potential, current integration, electrophysiology, opsin

Il m'est aujourd'hui évident que ce qui compte le plus dans une aventure n'est ni le voyage ou la destination, mais les personnes qui nous accompagnent. C'est pourquoi je souhaiterai profiter de ces quelques lignes pour remercier toutes les personnes sans qui le travail présenté dans ce manuscrit n'aurait pu être possible.

Je souhaiterai remercier tout d'abord Valentina Emiliani et Benoît C. Forget, mes deux directeurs de thèse, pour leur soutien tout au long de cette aventure scientifique. Votre confiance

Detailed Summary

Over the past 15 years, a new approach, optogenetics, has allowed the optical manipulation of neuronal activity via the use of exogenous photosensitive proteins called opsins. This field of research has led to major progress in neurosciences, opening incredible prospects for fundamental and medical research. Today, the combination of optogenetic and two-photon illumination strategies allows to control neuronal activity deep in the brain at the scale of a single neuron with a sub millisecond temporal precision. The upcoming challenge of optogenetic is to be able to manipulate with this degree of precision tens, hundreds, or even thousands of cells at a time to identify, for instance, the role of a specific microcircuit of neurons in behavior or to get closer to real physiological stimuli.

The advent of optogenetics techniques came with numerous technological advances such as the development of different illumination strategies, each with its advantages and inconvenients. At the same time, the multiplicity of now available opsins, as well as the fine tuning of their optical properties and expression methods, have opened more choices for neuroscientists. The rapid development of the field with the multiplication of tools and approaches as well as the constant rise in the ambition to tackle more complex biological questions raise the question of establishing optimal experimental conditions for each situation.

Two issues are at the core of the doctoral work presented in this manuscript. First, with the multiplication of the number of target cells to simultaneously photostimulate comes the question of the total amount of the light power sent to and absorbed by the sample, and therefore the possible photodamage. In order to assess this risk and to guide optimization of the experimental conditions, we have developed and verified experimentally a simulation which calculates the spatiotemporal distribution of local heating for various illumination strategies commonly used in two-photon optogenetics. In parallel, we developed also a simulation to reproduce the dynamics of induced current during illumination. By fitting this model to electrophysiology experimental data obtained in our laboratory we were able to simulate these dynamics for the most commonly used illumination strategies, parallel and scanning.

In our model of the spatiotemporal distribution of temperature, we included the propagation of light through a scattering medium (the brain) and the light absorption which will become IX the local heat source. The medium is considered uniform and isotropic for heat diffusion. To validate this model, we experimentally measured the local temperature rise induced by laser heating in a phantom mimicking the optical and thermal properties of the brain. For this we used rare earths (Er, Yb) doped micro-crystals whose luminescence spectrum are temperature dependent. We were able to measure the temperature with a temporal resolution on the order of a few milliseconds and spatial accuracy of a few microns. We found these measurements in excellent agreement with the predictions of the model. We then used our model to calculate the temperature variations during a parallel activation of neurons in vivo expressing the opsin CoChR and found that the photostimulation of a cell causes an increase of the temperature of only a few tenths of a Kelvin. Then, we simulated the heating generated during the simultaneous photostimulation of 100 neurons, in a volume of 300×300×300 µm 3 in order to find the conditions (duration of illumination, distance between the spots) which would limit to 1 Kelvin in such a multiple cells photostimulation experiment. When comparing parallel and scanning illumination our simulation shows, as could be expected, an homogeneous increase of temperature within the cell in the case of the parallel stimulation, while scanning induces a significant heating at the center of the swept beam but a moderate elevation of temperature over the rest of the cell's surface. We have also used our simulation to calculate the local heating in the experimental conditions of the most recent publications in the field of the in vivo optogenetic, including the approaches of simultaneous scans at several depths. Finally, our simulations can help gain insight on the optimization of the temporal sequence of photostimulation of several hundreds of target cells. Thanks to this work, the different teams working in the field of optogenetic will be able to optimize their experimental protocols, in order to ensure a controlled and safe environment for the living cells studied. To this end, a set of MATLAB functions has been made available to the scientific community that allows whoever is interested to simulate his own illumination conditions. Beyond the application to optogenetics, our simulation can be used for any photothermal study of biological tissue such as, for example, therapeutic hyperthermia or thermogenetics.

The second part of my PhD has been focused on the modeling of intracellular currents during photostimulations. Previous work has already been carried out in other laboratories, associating model of population dynamics (Markov processes in continuous time) and experimental data. Nevertheless, this work had never been associated with different techniques of illumination (parallel and scanning), in a two-photon regime, and applied to X different opsins with various kinetic properties. We therefore implemented different models and adjusted their parameters (using conventional minimization algorithms) to fit experimental data recorded within our laboratory for three opsins, Chronos, CoChR and ReaChR. To this end, we have worked with Chinese Hamster Ovary (CHO) cells that we had modified to express the opsins of interest. We then photostimulated the cells during several seconds, with a wide range of illumination power, to obtain a representative sample of the full dynamics of opening and closing of these channels. A three-state (open -desensitized -close) model was sufficient to validate our approach but was insufficient to reproduce the full dynamics of the system, in particular to account for the bi-exponential-off transitions observed experimentally. Therefore, we implemented a four-state model, 2 "closed" and 2 "opened" states with different conductivity which is consistent with biophysical observation of the photocycle of opsins. We have shown the capacity of our model to simulate both the parallel and scanning illumination conditions.

Résumé détaillé

Depuis maintenant une quinzaine d'années, une nouvelle approche, l'optogénétique, permet la manipulation optique de l'activité neuronale à l'aide de protéines photosensibles exogènes appelées opsines, naturellement présentes dans certaines algues photosensibles. Ce pan de la recherche a permis de grands progrès dans le domaine des neurosciences, ouvrant des perspectives incroyables dans le domaine de la recherche fondamentale et médicale.

Aujourd'hui, la combinaison de l'optogénétique à l'illumination bi-photonique permet d'obtenir le contrôle de l'activité neuronale en profondeur à l'échelle de la cellule unique avec une précision temporelle proche de la milliseconde. Le futur de l'optogénétique est donc de pouvoir manipuler avec ce degré de précision des dizaines, centaines, voire milliers de cellules à la fois avec l'objectif de pouvoir, par exemple, éclaircir le rôle que l'activation spécifique d'un « microcircuit » de neurones a dans le contrôle du comportement.

L'avènement de ce domaine de la recherche fondamentale a été porté par et a entraîné avec lui de nombreux progrès technologiques, ainsi que le développement de différentes stratégies d'illumination comportant à la fois des avantages et des inconvénients. Parallèlement, une plus grande diversification des opsines disponibles, ainsi que le raffinement de leur méthode d'expression, ont offert encore plus de choix stratégiques pour les neuroscientifiques. Face à cette multiplication des outils, et aux ambitions sans cesse revues à la hausse pour ce domaine de recherche prometteur, il est devenu important d'être capable de déterminer les conditions optimales d'utilisation de ces techniques afin d'optimiser l'efficacité de ces approches.

Deux questions en particulier mêlant techniques d'illumination and protéines photo sensibles ont motivé le travail de thèse réalisé pendant trois ans et présenté dans ce manuscrit. Tout d'abord, la multiplication du nombre de cellules à activer simultanément pose immédiatement la question de la multiplication de la puissance lumineuse nécessaire envoyée dans l'échantillon, et rapidement celle des possibles dégâts photoinduits. Afin de mieux évaluer ces risques et proposer des pistes d'optimisation, nous avons développé et confirmé expérimentalement une simulation permettant de calculer l'amplitude et la dynamique des échauffements locaux quelle que soit la technique d'illumination utilisée aujourd'hui dans le domaine de l'optogénétique bi-photonique. Ce travail a notamment donné lieu à la publication d'un article de recherche au sein de la revue Cell Reports. Parallèlement, nous avons développé une autre simulation permettant de relier stratégie d'illumination, choix d'opsine et XII dynamique de courant intracellulaire photo induit, en se basant sur l'exploitation de données expérimentales d'électrophysiologie effectuées au sein du laboratoire. En permettant de mieux comprendre les subtilités de chacune des techniques et protéines, nous avons ainsi pu entamer un travail d'optimisation des protocoles de photostimulation à utiliser expérimentalement. Afin de pouvoir évaluer l'échauffement local induit dans les deux grandes familles d'illumination couramment utilisées aujourd'hui (l'approche parallèle et de balayage) et d'en évaluer les risques, nous avons développé et validé un modèle optique et thermique décrivant à la fois la propagation de la lumière au sein d'un tissu diffusant comme le cerveau, et la diffusion de la chaleur photo-induite au sein de celui-ci. Nous avons validé expérimentalement ce modèle en utilisant des particules de verre dopés aux terres rares (Er, Yb), possédant un spectre de luminescence dépendant de la température. Ainsi, il a été possible de mesurer une température en excellent accord avec les prévisions du modèle, avec une résolution temporelle de l'ordre de quelques millisecondes et la précision spatiale de quelques micromètres. Ce modèle a ensuite été utilisé pour calculer les variations de température lors d'une activation parallèle de neurones in-vivo exprimant l'opsine CoChR. Il a ainsi été montré que l'activation d'une cellule provoque une augmentation de la température de seulement quelques dixièmes de Kelvin. Ensuite, nous avons simulé l'échauffement créé lors de la stimulation parallèle de 100 neurones, dans un volume de 300×300×300 µm 3 et à l'aide de notre modèle nous avons montré les conditions (durée d'illumination, distance entre les spots) qui permettent de minimiser les échauffements induits par l'optogénétique en dessous du Kelvin aussi dans le cas de l'activation de plusieurs cellules. Enfin, une comparaison des échauffements induits par les deux stratégies d'illumination (parallèle ou à balayage) a été effectuée, présentant les avantages et défauts inhérents à chacune. Comme attendu, une augmentation homogène de la température au sein de la cellule est obtenue dans le cas de la stimulation parallèle, tandis que le balayage induit un échauffement sensible au centre du faisceau balayé mais une élévation de température modérée dans les zones non illuminées de la cellule. Nous avons de plus utilisé notre simulation afin de calculer l'échauffement local des publications les plus récentes dans le domaine de l'optogénétique invivo, notamment les approches de balayage simultané dans plusieurs plans. Enfin, nous avons montré des pistes d'optimisation à exploiter pour les futures expériences impliquant plusieurs centaines de cibles photostimulées dans une fenêtre temporelle, en optimisant la distribution temporelle des illuminations. Grâce à ces travaux, les différentes équipes travaillant dans le XIII domaine de l'optogénétique pourront optimiser leurs différents protocoles expérimentaux, afin de garantir un environnement contrôlé et sûr aux cellules vivantes étudiées. A cette fin, un jeu de fonctions MATLAB a été mis à la disposition de la communauté scientifique permettant à chacun de modéliser des conditions expérimentales spécifiques. Au-delà de cette application, ce modèle optique et thermique pourra permettre d'optimiser des stratégies d'échauffement (hyperthermie thérapeutique), d'étudier plus en détails la sensibilité des tissus cérébraux à la chaleur, ou d'améliorer les techniques de thermo génétique.

La deuxième grande thématique de ce doctorat portait sur la modélisation des courants intracellulaires lors de photostimulations. De premiers travaux avaient déjà été réalisés dans

Preamble

This manuscript titled 2P optogenetics: Simulation and modeling for optimized thermal dissipation and current integration is organized in 5 chapters.

In the first chapter, after a brief introduction on the physiology of neurons and the principle of electrophysiology, I will introduce the principle of optogenetics and the main results achieved with this revolutionary approach in neuroscience.

In a second chapter I will review and describe the mostly used light delivering approaches for optogenetics brain stimulation.

In chapter III, after a short introduction on light absorption and a description of the main photodamage mechanisms, I will present the model that I have developed to simulate 3D light propagation and heat diffusion in optically scattering samples. The model with its experimental validation is described in detail in the publication A. Picot et al. enclosed in the same Chapter. In the publication, it is also demonstrated the use of the model to predict the temperature rise under the most commonly used illumination configuration for two-photon optogenetics.

In Chapter IV I will present the second part of my thesis, which has been focused on the modeling of the amplitude and temporal evolution of photocurrent under two-photon illumination for different opsins. I will compare the results achieved using a 3-and a 4-state model for a fast, a medium and a slow opsin. Lastly, I will show how knowing the parameters which describe the opsin photo-cycle is possible to predict the photocurrent traces under parallel or scanning illumination.

I.

Neurophotonics

The brain is one of the most fascinating parts of our body, studied for decades through a variety of methods. In order to better understand its mechanisms and organization, it has become increasingly important to consider the brain's smaller components, such as the neurons and how they interact. In search of answers, a field of research known as "neurophotonics" has been developed, using light both to observe and interact with the brain.

1) The neuron: a functional unit of the brain

It was in 1655 that Robert Hooke became the first scientist to develop the concept of the cell as a biological unit. By composing a microscope out of an eyepiece, field lens and objective lens, Hooke analyzed plants (notably cork) and flies. He noted the plants' and insects' considerable organizational similarity, later naming the "cell" in 1667.

Thanks to these early observations and tools, it became possible to progress beyond simple anatomical recognition and thus to define precise cell types: the smaller components of the cell and its inner organization became attainable. Jan Evangelista Purkinje was the first to observe the cells of the nervous system in 1837, just before Theodor Schwann and Matthias Jakob Schleiden proposed in 1838 their cellular theory which defines the cell as the structural and functional unit of plants and animals. At that time, however, this particular theory was considered invalid for the nervous system.

Camillo Golgi and Santiago Ramon y Cajal went on to develop cell staining techniques which enabled finer observation of the structure of the nervous system's cells (Figure 1) and helped

Heinrich Wilhelm Waldeyer to propose his theory of the neuron as the functional component of the nervous system. The key element of the nervous system, the neuron is an excitable cell which can receive, process, and transmit information in the form of chemical or electrical signals. These cells can be specialized in the form of sensory or motor neurons. They consist mainly of a soma cell body, with extensions called dendrites and an axon. The diameter of the soma is of the order of ten micrometers. Dendrites, meanwhile, have a diameter measuring between 0.2 and 5 micrometers and a length of between 10 and 1000 micrometers. Ever since antiquity, the electrical properties of catfishdepicted in bas-reliefshave been known. They were even exploited as a therapeutic tool under the reign of Emperor Claude (41-54 AD). It is only from the seventeenth century that the electrical organs of fish were identified and dissected. Although it was important to understand that these electrical phenomena were occurring in certain specific tissues, it mattered a lot to understand that these events were not restricted to the organ itself, but at the heart of the activity of the nerves and muscles.

The excitable nature of neurons makes them particularly interesting cells. From simple observation to direct interaction, the investigation of neurons is essential for comprehension of how the nervous system operates. Towards the end of the eighteenth century, it was accepted that nerves were able to transmit an electrical signal to the muscles, thereby inducing muscle contraction. Nevertheless, in 1791, Luigi Galvani caused controversy by claiming in his Viribus electricitatis in motu musculari: Commentarius that electricity of animal origin also exists -that a frog's biological tissue is able to generate sufficient electrical impulse through its nerves to induce muscle contraction. From this pioneering discovery stemmed the field of electrophysiology; techniques with which to study and measure currents within biological tissuesincluding those of the brainwould subsequently be refined.

2) Action potential and electrophysiology

Across every cell plasma membrane, ionic concentration gradients are constantly maintained by active transporters, a group of proteins ubiquitously expressed in the plasma membrane [START_REF] Alberts | Molecular Biology of the Cell[END_REF]. The existence of large K + and Na + gradients together with the selective permeability of the plasma membrane for different ions are at the basis of the transmembrane electric potential generation. Specific events can occur and induce a sharp and steep shift in the membrane potential reversing it from a negative value to a positive one. These shifts are called action potentials (AP) and neurons use the propagation of these variations of polarizations to trigger signals transmission, either electrical or chemical, to downstream directly connected neurons (L. Hodgkin & Huxley, 1952). AP is generated in a region close to the neuronal soma and propagates along the axon up to the synapse, the connecting machinery interposed between two connected neurons.

Neurons have heterogeneous properties, and their different firing patterns are a manifestation of these dissimilarities. For instance, neocortical neurons significantly differ in their firing patterns, ranging from regular-spiking cells, which can adapt strongly during sustained stimuli, to fast-spiking cells which can endure sustained firing activity with little or no adaptation [START_REF] Connors | Intrinsic firing patterns of diverse neocortical neurons[END_REF]. In a neuronal circuit, neurons with different membrane properties and firing characteristics will produce different transformations of inputs into outputs and how neurons interact in the networks to process information. The ability to control and observe neuronal firing plays an important role in neuroscience research focused on deep understanding of brain functioning. Neuronal circuits manipulation can go from understanding the role of specific neuronal sub-populations [START_REF] Boyden | A history of optogenetics: the development of tools for controlling brain circuits with light[END_REF] to the monitoring of variations of natural neuron codes to control behavior [START_REF] Dombeck | Functional imaging of hippocampal place cells at cellular resolution during virtual navigation[END_REF].

By activating a subpopulation of cells and monitoring the outcome elsewhere in the brain, it became possible to identify their role. Once their specificity is known, it became possible to design experiments where, by activating such a population via induction of APs, we could study specific behaviors [START_REF] Grunstein | Phasic Firing in Dopaminergic Neurons[END_REF][START_REF] Houweling | Behavioural report of single neuron stimulation in somatosensory cortex[END_REF][START_REF] Huber | Sparse optical microstimulation in barrel cortex drives learned behaviour in freely moving mice[END_REF][START_REF] Li | Burst spiking of a single cortical neuron modifies global brain state[END_REF][START_REF] Szobota | Remote Control of Neuronal Activity with a Light-Gated Glutamate Receptor[END_REF]. Additionally, as it is known that the brain is made of thousands of neurons massively connected, gaining the ability to observe action potentials will help to build connectivity maps of neurons and brain regions [START_REF] Brill | LSPS/Optogenetics to Improve Synaptic Connectivity Mapping: Unmasking the Role of Basket Cell-Mediated Feedforward Inhibition[END_REF][START_REF] Kohara | Cell type-specific genetic and optogenetic tools reveal hippocampal CA2 circuits[END_REF][START_REF] Song | Highly nonrandom features of synaptic connectivity in local cortical circuits[END_REF].

The first challenge of studying electrical events related to cellular physiology and ionic channels dynamics at high resolution has encouraged the development of a family of techniques (electrophysiology), which also enable to both induce and register action potentials. To measure and perturbate the state of polarization of one precise cell, it was necessary to develop techniques that would make possible to probe the electrical activity of the neurons of interest. In the last century, techniques based on the use of micro electrodes have been developed which allow intracellular or extracellular recordings with small-time resolution and robust sensitivity. Indeed, by recording directly using metal, silicon or glass electrodes, it is possible to work with a very high signal-to-noise ratio, without using reporters of the neuronal electrical activity. The development of voltage registrations allowed to have a temporal precision below the millisecond, in the order of magnitude of neuronal signaling.

Since their optimization in the early 1950s, extracellular recordings methods provided many advances in the understanding of the central nervous system [START_REF] Humphrey | Extracellular Single-Unit Recording Methods[END_REF].

Extracellular microelectrodes helped to map the field potentials of single discharging neurons,

answering fundamental questions about dendrites excitability [START_REF] Fourier | FOURIER : Théorie analytique de la chaleur (Chez Firmin Didot[END_REF] or discharge patterns during behavior in awake moving animals [START_REF] Mountcastle | Posterior parietal association cortex of the monkey: command functions for operations within extrapersonal space[END_REF].

Moreover, extracellular recordings allowed D. Hubel and T. Wiesel to record the activity of single neurons in the primary visual cortex of anesthetized cats [START_REF] Hubel | Receptive fields, binocular interaction and functional architecture in the cat's visual cortex[END_REF], and to show how single neurons in this area respond to specific visual stimulus, granting them with the Nobel Prize in 1981.

While extracellular recordings led to important discoveries, the intracellular recording methods became unavoidable thanks to their very high signal-to-noise ratio. Fielding Huxley to deepen our understanding of action potentials and several ion channels [START_REF] Hodgkin | The effect of sodium ions on the electrical activity of the giant axon of the squid[END_REF]. Although the idea of inserting a micro-electrode into a cell was innovative, it soon came up against a significant biological constraint: the membrane of a cell is not adapted to be pierced by an external element for long periods of time. It was then necessary to develop an improvement of the techniques of clamp, which also improved the signal to noise ratio: the "patch-clamp", evolution of the simple clamp, took over in the late 1970s, thanks to the advances of Erwin Neher and Bert Sakmann, who perfected it reaching the capability to measure the activity of a single transmembrane molecule [START_REF] Neher | Single-channel currents recorded from membrane of denervated frog muscle fibres[END_REF]. Here, a glass pipette with tip of a few micrometers wide is brought into contact with the cell membrane. It can adhere very strongly to the cell, forming a gigaseal characterized by the very high resistance (GΩ), electrically isolating the membrane portion from the rest of the cell [START_REF] Ogden | Patch clamp techniques for single channel and whole-cell recording[END_REF]. It is filled with an ionic solution adapted to the type of experiment and the type of cell. Once this step is performed, several variants of the "patchclamp" technique are available, depending on the research objective, ranging from the recording of single-channel currents (in "cell-attached" or "excised patch" configuration), or global currents passing through ionic channels of the cell ("whole cell" or "perforated patch").

Since then, the "patch-clamp" technique became the preferred method to both investigate the role of single channels and to monitor electrical activity of any cell type, either in vitro or in vivo [START_REF] Verkhratsky | History of electrophysiology and the patch clamp[END_REF], including induction and registration of APs.

Despite the strength of this technology, "patch-clamp" has also limitations. First, because of its invasiveness, it is very difficult to probe at the same time more than a few cells. However, brain is made of millions of neurons subdivided in multiple regions and areas, linked to complex chain of events that lead to specific behaviors and outcomes, and it became obvious that the perturbation and observation of tens, hundreds, thousands of neurons during the same experiments would help to answer more questions. Secondly, once again because of the invasiveness, patching a cell is not a reversible process and imply that it is not an adapted approach for long term studies of the same biological material. Finally, the selective inhibition of neurons remains largely inaccessible to electrophysiological approaches [START_REF] Scanziani | Electrophysiology in the age of light[END_REF], closing the door to the manipulation of a biological mechanism that is common in the brain. All these restrictions have challenged the scientific community to develop complementary techniques that could overcome these limitations and allow more flexible approaches for activation and registration of neuronal activity.

3) Optogenetics for neurosciences

Forty years ago, in a totally different framework, bacteriorhodopsin was discovered as a lightactivated ion pump that could be found in microbial organisms [START_REF] Oesterhelt | Rhodopsin-like protein from the purple membrane of Halobacterium halobium[END_REF]. Decades later, after further researches both on bacteriorhodopsin mechanisms and variants that could be found elsewhere, membrane-bound similar proteins that allow ions flux across membrane were discovered, known as halorhodopsins [START_REF] Matsuno-Yagi | Two possible roles of bacteriorhodopsin; a comparative study of strains of Halobacterium halobium differing in pigmentation[END_REF] and channelrhodopsins [START_REF] Nagel | Channelrhodopsin-1: A light-gated proton channel in green algae[END_REF][START_REF] Nagel | Channelrhodopsin-2, a directly light-gated cationselective membrane channel[END_REF]. Two variations of the latest were selected for their ease of expression, conductance and photo sensitivity: Channelrhodopsin-1 and Channelrhodopsin-2 (ChR2).

Two years after the introduction of ChR2, it was demonstrated that the induction of the expression of the gene coding for ChR2 allowed researchers to elicit reliable timely controlled action potentials for the first time in mammalian neurons [START_REF] Boyden | Millisecondtimescale, genetically targeted optical control of neural activity[END_REF]. Since then, interest rapidly grew for proteins such as ChR2 that we will call opsins in this manuscript. Even if this technique defined the optogenetics field and is now an approach of reference for intracellular currents studies, it took decades for researchers to match together the two ideas of combining light and microbial ions channels. Beyond the necessary technical challenges that were mandatory to solve, a few presumptions slowed the access to this technology.

Photocurrent induced by such proteins were expected to be both too weak and not fast enough to manipulate neurons with efficiency. Additionally, because of the origin of these microbial membrane proteins, the expression of such genes was expected to be low and inducing fragility to the neuron membrane [START_REF] Yizhar | Optogenetics in Neural Systems[END_REF].

Once these considerations were overcome, this light-based approach that showed promises to solve patch-clamp techniques limits gave birth to a new neurosciences research domain that was named optogenetics. For some tasks, it allowed researchers to go beyond what electrodes based experiments could offer, such as the independent stimulation of multiple populations of neurons [START_REF] Zhang | Red-shifted optogenetic excitation: A tool for fast neural control derived from Volvox carteri[END_REF], the bistable activation of neurons [START_REF] Berndt | Bi-stable neural state switches[END_REF], or the stimulation of defined second-messenger pathways [START_REF] Airan | Temporally precise in vivo control of intracellular signalling[END_REF][START_REF] Kim | Light-driven activation of β2-adrenergic receptor signaling by a chimeric rhodopsin containing the β2-adrenergic receptor cytoplasmic loops[END_REF].

Even further, it was used to map functional connectivity [START_REF] Petreanu | The subcellular organization of neocortical excitatory connections[END_REF], influence the neuronal dynamic circuits [START_REF] Boyden | Millisecondtimescale, genetically targeted optical control of neural activity[END_REF][START_REF] Cardin | Driving fast-spiking cells induces gamma rhythm and controls sensory responses[END_REF][START_REF] Li | Fast noninvasive activation and inhibition of neural and network activity by vertebrate rhodopsin and green algae channelrhodopsin[END_REF]Zhang et al., 2007) and, finally, to control behavior [START_REF] Grunstein | Phasic Firing in Dopaminergic Neurons[END_REF][START_REF] Huber | Sparse optical microstimulation in barrel cortex drives learned behaviour in freely moving mice[END_REF][START_REF] Szobota | Remote Control of Neuronal Activity with a Light-Gated Glutamate Receptor[END_REF].

II.

Single and two-photon optogenetics 1) Single-photon approach

Wide-field single-photon (1P) approach was the first to be employed for optogenetics stimulation [START_REF] Adamantidis | Neural substrates of awakening probed with optogenetic control of hypocretin neurons[END_REF][START_REF] Anikeeva | Optetrode: A multichannel readout for optogenetic control in freely moving mice[END_REF][START_REF] Aravanis | An optical neural interface: in vivo control of rodent motor cortex with integrated fiberoptic and optogenetic technology[END_REF][START_REF] Boyden | Millisecondtimescale, genetically targeted optical control of neural activity[END_REF][START_REF] Gradinaru | Targeting and Readout Strategies for Fast Optical Neural Control In Vitro and In Vivo[END_REF][START_REF] Huber | Sparse optical microstimulation in barrel cortex drives learned behaviour in freely moving mice[END_REF][START_REF] Nagel | Light activation of Channelrhodopsin-2 in excitable cells of caenorhabditis elegans triggers rapid behavioral responses[END_REF]Zhang et al., 2007), and remains today the approach of reference for neural circuit dissection [START_REF] Makinson | Regulation of Thalamic and Cortical Network Synchrony by Scn8a[END_REF][START_REF] Weible | Rhythmic brain stimulation reduces anxiety-related behavior in a mouse model based on meditation training[END_REF]. This technique has allowed researchers to study correlation and causal interactions in subpopulations of neurons both in vitro [START_REF] Joshi | Cell-Specific Cholinergic Modulation of Excitability of Layer 5B Principal Neurons in Mouse Auditory Cortex[END_REF][START_REF] Morgenstern | Multilaminar networks of cortical neurons integrate common inputs from sensory thalamus[END_REF][START_REF] Petreanu | Channelrhodopsin-2-assisted circuit mapping of long-range callosal projections[END_REF][START_REF] Petreanu | The subcellular organization of neocortical excitatory connections[END_REF][START_REF] Tovote | Midbrain circuits for defensive behaviour[END_REF] and in vivo [START_REF] Adesnik | 293_A neural circuit for spatial summation in visual cortex[END_REF][START_REF] Atallah | Parvalbumin-Expressing Interneurons Linearly Transform Cortical Responses to Visual Stimuli[END_REF][START_REF] Lee | Activation of specific interneurons improves V1 feature selectivity and visual perception[END_REF][START_REF] Tovote | Midbrain circuits for defensive behaviour[END_REF]. [START_REF] Tricoire | Principes et applications de l ' optogénétique en neuroscience[END_REF].

With this technique, population specificity is obtained through genetic and anatomic targeting, (Figure 5), implying that precision and temporal resolution are only constrained by the channels' and cells' properties.

The development of strategies for opsin expression confinement in specific cell types [START_REF] Beltramo | Layer-specific excitatory circuits differentially control recurrent network dynamics in the neocortex[END_REF][START_REF] Cardin | Driving fast-spiking cells induces gamma rhythm and controls sensory responses[END_REF][START_REF] Kuhlman | High-resolution labeling and functional manipulation of specific neuron types in mouse brain by Cre-activated viral gene expression[END_REF], or the addition of optic tools such as optical fibers [START_REF] Aravanis | An optical neural interface: in vivo control of rodent motor cortex with integrated fiberoptic and optogenetic technology[END_REF][START_REF] Penzo | The paraventricular thalamus controls a central amygdala fear circuit[END_REF][START_REF] Wu | Galanin neurons in the medial preoptic area govern parental behaviour[END_REF] has helped to reach deeper regions of the brain. Improvements made to 1P microscopes (such as the use of multipoint-emitting optical fibers or micro-objective-coupled fiber bundles) has even enabled the restriction of illumination to specific brain layers [START_REF] Pisanello | Multipoint-emitting optical fibers for spatially addressable in vivo optogenetics[END_REF] or subcellular structures [START_REF] Guo | Optical interrogation of neural circuits in Caenorhabditis elegans[END_REF][START_REF] Petreanu | The subcellular organization of neocortical excitatory connections[END_REF][START_REF] Szabo | Spatially selective holographic photoactivation and functional fluorescence imaging in freely behaving mice with a fiberscope[END_REF][START_REF] Wyart | Optogenetic dissection of a behavioural module in the vertebrate spinal cord[END_REF].

Even though 1P illumination is the technique most commonly used today, its limitations in term of penetration depth and spatial resolution have motivated the development of other approaches that could bring higher spatial precision. Indeed, when illuminating a large volume with 1P widefield technique, we cannot select with single-cell precision the neuron that we want to photoactivate. This implies that we cannot, for example, in a specific brain region, photoactivate first a defined subgroup of neurons, observe the outcome, and activate another group nearby and repeat the observation. Furthermore, all opsin-expressing neurons are stimulated at the same time, which does not allow to reproduce the spatiotemporal distribution of naturally occurring brain microcircuits activity. Also, widefield illumination does not enable performing connectivity experiment since in that case one needs to interrogate each neuron individually in its environmental context. All these reasons have motivated the development of illumination approaches giving single-cell resolution in depth.

This has inspired at first to replace single-photon excitation by two-photon excitation processes.

2) Two-photon illumination: gains and challenges

In 1P microscopy, which is based on a linear photon absorption process, an orbital electron of the protein to activate (fluorophore, opsin, …) will absorb a photon emitted by the light source. This reaction promotes the electron to an excited state from which it will relax, thereby allowing the emission of a photon of fluorescence, for example. This linear process will imply large amounts of out-of-focus neuron activation, or fluorescence. As an answer, 2P microscopy has shown itself to be highly efficient [START_REF] Denk | Two-photon laser scanning fluorescence microscopy[END_REF][START_REF] Helmchen | Deep tissue two-photon microscopy[END_REF] and, combined with optogenetics techniques, offers a reasonable solution to the resolution issue mentioned above. With this method, two photons are required to bring the electron to an excited state. By using a high-power pulsed laser with a short pulse width (hundreds of femtoseconds), the high density of photons in the excitation area leads to the strong probability that a molecule will absorb two photons quasi-simultaneously. This condition directly implies that we have a quadratic dependence between the fluorescence (or any other non-linear process) and the light intensity, lowering substantially the out-of-focus fluorescence or neuron activation (Figure 6). activation with a 488 nm laser source. On the right, same molecule excited with a 960 nm light source [START_REF] Zipfel | Nonlinear magic: Multiphoton microscopy in the biosciences[END_REF].

Importantly, the two photons must have roughly half of the photon's amount of energy for the 1P excitation process. As a consequence, their wavelength must be twice as big. This has shifted the use of light source from the visible 1P absorption band to the near-infrared.

This aspect has helped 2P microscopy to assess its strength, opening deeper regions of brain for study. Indeed, near-infrared photons are less scattered and absorbed by the brain, as will be discussed later on. For the same reasons, three-photon microscopy (3P) has been developed with the same objectives, allowing even further access in the brain, or to go through the skull [START_REF] Horton | In vivo three-photon imaging of subcortical structures of an intact mouse brain using quantum dots[END_REF].

Therefore, 2P approaches have allowed to improve the axial resolution and penetration depth of the photoactivation techniques. Yet, being able to target with single-cell precision is not enough to guaranty the capability of the optical method to reliably activate neurons and elicit APs. Indeed, as opsins are proteins with a small single-channel conductance (40-80 fS for ChR2 [START_REF] Feldbauer | Channelrhodopsin-2 is a leaky proton pump[END_REF]) and a density of expression which implies a low amount of channels in the femtoliter two-photon focal volume (with a standard objective of 0.7 -0.9 NA and a laser source in the near-infrared 800 -1200 nm, the full width half maximum (FWHM)

of this spot will be ~1 µm) [START_REF] Nagel | Functional expression of bacteriorhodopsin in oocytes allows direct measurement of voltage-dependence of lightinduced h+ pumping[END_REF], the simple addition of 2P techniques is not enough to induce strong enough depolarization for APs. This challenge has spurred the development of more sophisticated 2P illumination strategies in order to be able to photoactivate a large number of channels. They can be split in two categories: the scanning and the parallel techniques.

3) Cellular targeting: from photons to action potentials a) Scanning strategy

One way of increasing the number of activated channels is to scan the soma of the cell of interest with a spot. This strategy has been successfully demonstrated in cell cultures first [START_REF] Rickgauer | Two-photon excitation of channelrhodopsin-2 at saturation[END_REF], then in brain slices [START_REF] Andrasfalvy | Two-photon single-cell optogenetic control of neuronal activity by sculpted light[END_REF] and in vivo [START_REF] Prakash | Two-photon optogenetic toolbox for fast inhibition, excitation and bistable modulation[END_REF]. While this approach is relatively easy to be implemented, it can be limited in temporal precision as it requires to scan the laser source over the cell body or even multiple targets. For N targets, the temporal resolution T of a cycle of sequential photostimulations is given by: 𝑇 = 𝑇 𝑑𝑤𝑒𝑙𝑙 × 𝑁 + 𝑇 𝑚𝑜𝑣𝑒 × (𝑁 -1) Eq. 1 with Tdwell standing for the time spent on a cell to photoactivate it, and Tmove the time to move the laser beam from one cell to another. With this approach, [START_REF] Rickgauer | Two-photon excitation of channelrhodopsin-2 at saturation[END_REF] were able to generate APs with 30 ms temporal resolution [START_REF] Rickgauer | Two-photon excitation of channelrhodopsin-2 at saturation[END_REF]. A raster scanning pattern is showed. Adapted from (Ronzitti et al., 2017a).

The raster scanning pattern is adapted to the cell morphology. The amount of lines, the direction, the scanning speed are various parameters that can be tuned in order to maximize the photoactivation efficiency.

The necessity to define a scanning protocol that will both target a significant number of channels and illuminate them within a specific time window can add constraints to the scanning approach. Indeed, a compromise must be made between the dwell time that will guarantee the opening of the channels, and the scan speed to assure that a maximum of channels will be open simultaneously to reach the action potential. Precisely as explained in

Ref. [START_REF] Rickgauer | Two-photon excitation of channelrhodopsin-2 at saturation[END_REF] :

𝐼(𝑇) 𝐼 𝑚𝑎𝑥 = 𝜏 𝑇 (1 -𝑒 𝑇 𝜏 ) Eq. 2
where 𝐼(𝑇) is the amplitude of the photocurrent during a scan time T, 𝐼 𝑚𝑎𝑥 the whole-cell stimulated current amplitude, 𝜏 the opsin photocurrent decay constant. A scanning pattern that would be n times longer than 𝜏 would imply that the peak photocurrent would reach

(1 -𝑒 -𝑛 ) 𝑛 ⁄ of the whole-cell photocurrent. Therefore, care must be given to the choice of the couple opsin/illumination pattern to ensure that enough photocurrent could be elicited to reliably guarantee an AP. The development of slower opsins with nanoampere-scale currents such as C1V1 enabled to dramatically increase the efficiency of this approach [START_REF] Packer | Two-photon optogenetics of dendritic spines and neural circuits[END_REF][START_REF] Prakash | Two-photon optogenetic toolbox for fast inhibition, excitation and bistable modulation[END_REF], reaching temporal resolution between 5 and 70 ms. However, using slow opsins with scanning approaches add constraints, such as imposing limits to the achievable temporal precision of photo-evoked spikes, with significant in vivo jitter estimated at 5.6 ± 0.8 ms [START_REF] Packer | Simultaneous alloptical manipulation and recording of neural circuit activity with cellular resolution in vivo[END_REF].

One way to improve temporal resolution is to underfill the back aperture of the objective, which increases both the lateral and axial spot size. Increasing the lateral size reduces the number of scanning positions, thus minimizing or even getting to zero the term Tmove, however, it also decreases the technique's precision, because of the increase in the axial size, as well. Temporal focusing approaches (TF) were then associated to the light activation techniques in order to compensate the deterioration of axial resolution. In such technique the pulse is temporally scrambled above and below the focal plane, which remains the only region irradiated at peak powers photoactivation [START_REF] Oron | Scanningless depth-resolved microscopy[END_REF]. This allowed to fast photostimulate multiple cells in vitro and in vivo [START_REF] Andrasfalvy | Two-photon single-cell optogenetic control of neuronal activity by sculpted light[END_REF][START_REF] Rickgauer | Simultaneous cellular-resolution optical perturbation and imaging of place cell firing fields[END_REF], reducing Equation 1 to T = (𝑇 𝑑𝑤𝑒𝑙𝑙 + 𝑇 𝑚𝑜𝑣𝑒 ) × 𝑁.

Recently, multiple cells photostimulation through scanning has been extended to activate tens [START_REF] Packer | Simultaneous alloptical manipulation and recording of neural circuit activity with cellular resolution in vivo[END_REF] or nearly one hundred of cells at the same time at different depths [START_REF] Yang | Simultaneous two-photon imaging and two-photon optogenetics of cortical circuits in three dimensions[END_REF]. To do so, the optic system combines galvanometric mirrors (GM) which will move in a defined way to allow the laser source to perform this scanning pattern, and spatial light modulators (SLM) which will, by modulating the phase of the incoming light source, allow the simultaneous targeting of several cells. With the combination of scanning and multiplexing, the equation for the temporal resolution of photostimulation of several cells at the same time reduces to:

𝑇 = 𝑑 𝑠 𝑆 𝑠 Eq. 3
where ds indicate the whole distance of scanning over a single cell, and Ss the scanning speed of the system.

Lastly, another limitation for the scanning approach is the axial resolution. Indeed, requiring to work with light intensities close to saturation levels of opsin mechanisms at the focal plane, led to out-of-focus excitation above and below the cell of interest that induces significant photocurrent in the neighboring cells [START_REF] Rickgauer | Two-photon excitation of channelrhodopsin-2 at saturation[END_REF]Ronzitti et al., 2017a).

b) Parallel strategy

Alternatively to scanning, the number of excited channels could increase by using parallel approaches where the light propagation is modified to cover the entire target. An efficient way to reach such precise confinement for light propagation is to use computer-generated holography (CGH), as proposed in 2008 [START_REF] Lutz | Holographic photolysis of caged neurotransmitters[END_REF][START_REF] Papagiakoumou | Patterned two-photon illumination by spatiotemporal shaping of ultrashort pulses[END_REF].

Originally developed for generating multiple-trap optical tweezers [START_REF] Curtis | Dynamic holographic optical tweezers[END_REF], the experimental scheme for CGH (Figure 9) consists in computing with a Fourier transformbased iterative algorithm [START_REF] Gerchberg | A pratical algorithm for the determination of the phase from image and diffraction pictures[END_REF] the interference pattern or phasehologram that back-propagating light from a defined target (input image) will form with a reference beam, on a defined "diffractive" plane. The computer-generated phase-hologram is converted into a grey-scale image and then addressed to a SLM, placed at the diffractive plane. In this way, each pixel of the phase-hologram controls, proportionally to the analogous grey-scale-level, the voltage applied across the corresponding pixel of the liquid-crystal matrix, such as the refractive index and thus the phase of each pixel can be precisely modulated. As a result, the calculated phase-hologram is converted into a pixelated refractive screen and illumination of the screen with the laser beam (or reference beam) will generate at the objective focal plane a light pattern reproducing the desired template. This template can be any kind of light distribution in two or three dimensions, ranging from diffraction-limited spots or spots of bigger surface to arbitrary extended light patterns [START_REF] Papagiakoumou | Optogenetics: A Roadmap[END_REF]. After computing, the interference pattern, or hologram, is obtained and addressed to the SLM. At the focal plane of the system, the initial illumination distribution is reproduced. Adapted from [START_REF] Papagiakoumou | Two-photon optogenetics by computer generated holography[END_REF].

Different variations of this approach have been developed over the years, achieving actuation of opsin-expressing neurons in vitro and in vivo [START_REF] Bègue | Two-photon excitation in scattering media by spatiotemporally shaped beams and their application in optogenetic stimulation[END_REF][START_REF] Packer | Two-photon optogenetics of dendritic spines and neural circuits[END_REF][START_REF] Ronzitti | Sub-millisecond optogenetic control of neuronal firing with two-photon holographic photoactivation of Chronos[END_REF][START_REF] Szabo | Spatially selective holographic photoactivation and functional fluorescence imaging in freely behaving mice with a fiberscope[END_REF], or adapted with variations such as the generalized phase contrast technique (GPC) [START_REF] Papagiakoumou | Scanless two-photon excitation of channelrhodopsin-2[END_REF][START_REF] Papagiakoumou | Functional patterned multiphoton excitation deep inside scattering tissue[END_REF].

With parallel illumination, the temporal resolution is only limited by the illumination time and it is possible to use both fast and slow opsins. Therefore, this technique combined with fast opsins allowed to generate action potentials with millisecond temporal resolution (Bègue et al., 2013;[START_REF] Papagiakoumou | Scanless two-photon excitation of channelrhodopsin-2[END_REF], and submillisecond temporal jitter, the mean deviation of latency between the beginning of photostimulation and AP [START_REF] Chaigneau | Two-Photon Holographic Stimulation of ReaChR[END_REF][START_REF] Ronzitti | Sub-millisecond optogenetic control of neuronal firing with two-photon holographic photoactivation of Chronos[END_REF]. When illuminating a sample with a large excitation area, the optical axial resolution can be degraded. As an answer, CGH technique was combined with TF, allowing to preserve the axial resolution (5-10 µm) and the lateral shape of the spot after hundreds of micrometers of light propagation in scattering tissues [START_REF] Bègue | Two-photon excitation in scattering media by spatiotemporally shaped beams and their application in optogenetic stimulation[END_REF][START_REF] Hernandez | Three-dimensional spatiotemporal focusing of holographic patterns[END_REF][START_REF] Papagiakoumou | Functional patterned multiphoton excitation deep inside scattering tissue[END_REF]. The ambition of studying connected networks of neurons have motivated the development of 3D light generation approaches, allowing to generate complex illumination patterns [START_REF] Anselmi | Three-dimensional imaging and photostimulation by remote-focusing and holographic light patterning[END_REF]dal Maschio et al., 2017;[START_REF] Hernandez | Three-dimensional spatiotemporal focusing of holographic patterns[END_REF][START_REF] Packer | Two-photon optogenetics of dendritic spines and neural circuits[END_REF]. Further, this ambition has spurred the development of approaches allowing to simultaneously shine multiple spatiotemporally focused spots [START_REF] Accanto | Multiplexed temporally focused light shaping for high-resolution multi-cell targeting[END_REF][START_REF] Hernandez | Three-dimensional spatiotemporal focusing of holographic patterns[END_REF][START_REF] Pegard | 3D scanless holographic optogenetics with temporal focusing[END_REF][START_REF] Sun | Four-dimensional light shaping: Manipulating ultrafast spatiotemporal foci in space and time[END_REF] (Figure 10). The latest opsins development have led to somatic versions of channels that allowed to reach the single-cell precision, by restricting the expression of the channels to the soma of the neuron [START_REF] Shemesh | Temporally precise single-cellresolution optogenetics[END_REF]. Indeed, the spatial resolution of 2P photostimulation systems can be degraded due to the undesired photostimulation of neurites surrounding the cell of interest.

All of these approaches, combined with the use of high-energy amplified lasers [START_REF] Accanto | Multiplexed temporally focused light shaping for high-resolution multi-cell targeting[END_REF][START_REF] Chaigneau | Two-Photon Holographic Stimulation of ReaChR[END_REF][START_REF] Ronzitti | Sub-millisecond optogenetic control of neuronal firing with two-photon holographic photoactivation of Chronos[END_REF][START_REF] Yang | Simultaneous two-photon imaging and two-photon optogenetics of cortical circuits in three dimensions[END_REF] reaching more than 10 W at laser output and eventually highly sensitive opsins make it now possible to simultaneously target hundreds of cells within mm 3 -size illumination volumes. But the increase of targets rises, at the same time, the question of photodamage and how to minimize it. In the next chapter, we will introduce the different kind of photodamages that we can expect from 2P photostimulations, and the thermal model that we have built in order to evaluate and minimize thermal photodamage.

III.

Photoinduced temperature rise:

Thermal simulation and temperature measurements 1) Light absorption in the brain a) Absorption and the "optical window"

In the brain, several components are responsible for light absorption. Water will be the most absorbing element, followed by chromophores such as blood components (hemoglobin, melanin, …) and proteins such as fluorophores, the latest remaining negligible (see below). [START_REF] Hamblin | Mechanisms of low level light therapy[END_REF].

The absorbance of each of these elements has different wavelength dependence, although as shown in Figure 11, it is possible to define an "optical window" in the range of wavelength (600 -1200 nm) where they have a common minimum. Therefore, using excitation wavelengths in this range will allow focusing light at greater depth.

b) Mono and multi photon absorption processes

A wide range of phenomena can occur during light absorption, depending on the illumination source and its characteristics (wavelength, power, pulse duration). Given a certain wavelength, two parameters are important to define the cascade of events following the photon absorption, the irradiance and the illumination time. In particular, we focus here on the processes, which occur in the near-infrared regime, i.e. at wavelength commonly used for 2P photostimulation. During the first step of a photon absorption, the excited molecule goes to an excited state, this is followed by a cascade of events, Figure 12. For low irradiance (below 10 6 W/cm 2 [START_REF] Boulnois | Photophysical processes in recent medical laser developments: A review[END_REF])), and long illuminations (on the millisecond scale), the molecule can go back to the resting state by transferring its energy in a non-radiative way, thereby inducing local heating. Other very specific chemical reactions can be catalyzed by a long exposure to light with low irradiance. On the other hand, if the irradiance is above the previous threshold, even during a very short period of time (femtoseconds to nanoseconds), there is a high probability of an inverse Bremsstrahlung avalanche effect [START_REF] Vogel | Mechanisms of femtosecond laser nanosurgery of cells and tissues[END_REF]. Here, free electrons are produced in a multi-photon absorption process and they can also absorb photons when they enter into collision with other molecules, generating even more free electrons. If the light intensity is too high, this reaction gets out of control. This is the so-called avalanche effect, inducing the apparition of a plasma of electrons in the sample. For low density plasma, i. e. below the optical breakdown threshold of 10 21 electrons/cm 3 [START_REF] Débarre | Mitigating phototoxicity during multiphoton microscopy of live drosophila embryos in the 1.0-1.2 μm wavelength range[END_REF], this will produce a family of photochemical damages inducing molecules dissociation, or the creation of reactive oxygen species (Figure 12). For plasma density above the optical breakdown threshold this will induce mechanical damages where the cells will undergo supersonic shock wave by the formation of bubbles followed by their explosion. These effects will break the tissue structures and induce cell death.

In typical optogenetics experiments using 2P and parallel illumination, a 3 ms long illumination pulse with a 10 mW mean power over a 100 µm 2 cell surface is enough to elicit an AP. This corresponds to an irradiance of 10 4 W/cm 2 and fluence of 30 J/cm 2 . These conditions are clearly (see Figure 13) in the range of photothermal damage. However, since this average power illumination is obtained from a train of fs pulses, we must also consider the possibility that an individual fs pulse (whose energy is much higher than the average energy) could induce nonlinear damage. For the case of 250 fs pulses at a 500 kHz rate, each individual pulse delivers an irradiance of 8 10 10 W/cm 2 corresponding to a fluence 20 mJ/cm 2 . This is close to the threshold of nonlinear photodamage (see Figure 13) but we never observed such effects. Nonlinear photodamage have been observed at peak fluences around 0.1 J/cm 2 for Chinese hamster ovarian cells [START_REF] König | Pulse-length dependence of cellular response to intense near-infrared laser pulses in multiphoton microscopes[END_REF], 0.5-2 J/cm 2 in water [START_REF] Linz | Wavelength dependence of femtosecond laser-induced breakdown in water and implications for laser surgery[END_REF][START_REF] Noack | Laser-Induced Plasma Formation in Water at Nanosecond to Femtosecond Time Scales : Calculation of Thresholds[END_REF][START_REF] Vogel | Mechanisms of femtosecond laser nanosurgery of cells and tissues[END_REF] and 1.5-2.2 J/cm 2 for porcine corneal stroma [START_REF] Olivié | Wavelength dependence of femtosecond laser ablation threshold of corneal stroma[END_REF]. Several regimes can be discerned based on a level slopes that correspond to J/cm 2 thresholds. Several regimes can be discerned based on a level slopes that correspond to J/cm 2 thresholds. Here we consider the peak irradiance as the irradiance during a single laser pulse (at the femtosecond scale), as opposed to the mean irradiance calculated as the average irradiance during a repetition (at the millisecond scale) of single laser pulses. Adapted from [START_REF] Boulnois | Photophysical processes in recent medical laser developments: A review[END_REF].

For the scanning illumination techniques, peak irradiance can reach 10 12 W/cm 2 . Therefore, the nonlinear photodamages should be the dominant events. In conventional multi-photon scanning imaging, due to the short dwell time and small illumination volume, heating through linear absorption can be considered a negligible source of photodamage [START_REF] Débarre | Mitigating phototoxicity during multiphoton microscopy of live drosophila embryos in the 1.0-1.2 μm wavelength range[END_REF][START_REF] Koester | Ca2+ Fluorescence Imaging with Pico-and Femtosecond Two-Photon Excitation: Signal and Photodamage[END_REF][START_REF] Linz | Wavelength dependence of femtosecond laser-induced breakdown in water and implications for laser surgery[END_REF]. However heating can become an important source of photodamage for repetitive scanning of large areas [START_REF] Hopt | Highly Nonlinear Photodamage in Two-Photon Fluorescence Microscopy[END_REF][START_REF] Podgorski | Brain heating induced by near infrared lasers during multi-photon microscopy[END_REF].

c) Brain sensitivity to thermal variations

We can classify the effects of temperature increase in two categories: physiological variations and irrecoverable damages. Relatively small temperature changes (below 2 K) can, for instance, induce modulations of the shape of APs [START_REF] Hodgkin | The effect of sodium ions on the electrical activity of the giant axon of the squid[END_REF], the firing rate of neurons [START_REF] Reig | Temperature modulation of slow and fast cortical rhythms[END_REF][START_REF] Stujenske | Modeling the Spatiotemporal Dynamics of Light and Heat Propagation for InVivo Optogenetics[END_REF], and the channel conductance [START_REF] Plaksin | Thermal Transients Excite Neurons through Universal Intramembrane Mechanoelectrical Effects[END_REF][START_REF] Shibasaki | Effects of Body Temperature on Neural Activity in the Hippocampus: Regulation of Resting Membrane Potentials by Transient Receptor Potential Vanilloid 4[END_REF][START_REF] Wells | Biophysical Mechanisms of Transient Optical Stimulation of Peripheral Nerve[END_REF] or fluctuation of synaptic responses [START_REF] Andersen | Brain Temperature and Hippocampal Function[END_REF][START_REF] Thompson | Temperature dependence of intrinsic membrane properties and synaptic potentials in hippocampal CA1 neurons in vitro[END_REF]. Furthermore, temperature variations have been used as an inhibitor of neural activity by purposefully cooling the sample [START_REF] Long | Using temperature to analyze temporal dynamics in the songbird motor pathway[END_REF][START_REF] Ponce | Integrating motion and depth via parallel pathways[END_REF].

Figure 14: Brain tissue responses to temperature increases. Alterations severity and intensity will vary with temperature increase. Adapted from [START_REF] Elwassif | Bio-heat transfer model of deep brain stimulation-induced temperature changes[END_REF].

If the temperature increase goes above a certain threshold (3-4 K), the denaturation of proteins will occur; the structure of the cell will be affected; and cell apoptosis will follow [START_REF] Deng | Optogenetics, the intersection between physics and neuroscience: light stimulation of neurons in physiological conditions[END_REF][START_REF] Thomsen | Pathologic Analysis of Photothermal and Photomechanical Effects of Laser Tissue Interactions[END_REF]. Extreme heating can induce edema, coagulation of proteins and inflammatory responses [START_REF] Dewhirst | Basic principles of thermal dosimetry and thermal thresholds for tissue damage from hyperthermia[END_REF][START_REF] Lepock | Cellular effects of hyperthermia: Relevance to the minimum dose for thermal damage[END_REF]. It is important, though, to state that thermal damage thresholds depend on brain area and specific tissue properties [START_REF] Kiyatkin | Brain temperature fluctuations during physiological and pathological conditions[END_REF][START_REF] Sharma | Hyperthermia induced pathophysiology of the central nervous system[END_REF].

2) Publication: Temperature rise under twophoton optogenetics brain stimulation

In this paper, three principal topics are addressed. First, we describe the light propagation and heat diffusion model that we used and the underlying physics. Then, the model is experimentally verified and applied to the typical illumination conditions that are currently used for 2P optogenetics.

For all simulations we considered the absorption of water as the dominant one while we neglected the absorption from the opsins. Indeed when cells are illuminated, only a fraction of emitted photons will reach the retinal targets. To assess that, we first estimated the ratio of photons absorbed during propagation through a given volume of brain tissue. Considering the absorption coefficient of brain matter (0.06 mm -1 [START_REF] Yaroslavsky | Optical properties of selected native and coagulated human brain tissues in vitro in the visible and near infrared spectral range[END_REF])), we estimated that during propagation through the typical size of a cell body (15 µm), approximately 1 out of 10 3 photons are absorbed by this volume of medium. In parallel, we estimated the ratio of photons absorbed by a typical concentration of retinal on a cell membrane. By considering a typical ChR2 retinal cross section (≈260 GM [START_REF] Rickgauer | Two-photon excitation of channelrhodopsin-2 at saturation[END_REF]) and concentration (≈130 molecules/µm 2 [START_REF] Nagel | Functional expression of bacteriorhodopsin in oocytes allows direct measurement of voltage-dependence of lightinduced h+ pumping[END_REF]) reported in literature and considering two-photon absorption probability [START_REF] Rickgauer | Two-photon excitation of channelrhodopsin-2 at saturation[END_REF] for the laser source and the average laser power reported in our publication [START_REF] Picot | Temperature Rise under Two-Photon Optogenetic Brain Stimulation[END_REF] , page 44 of this manuscript, we estimate a 10 -8 photon absorption rate by retinal. Therefore, we can conclude that at the typical micrometric scale of a cell body, the contribution of brain (mostly water) absorption is around 5 orders of magnitude more important than the retinal one On page 32 of this manuscript, we justify why we use the standard Fourier's heat diffusion equation known as:

𝜕𝑇(𝑟 ⃗, 𝑡) 𝜕𝑡 = 𝐷𝛻 2 𝑇(𝑟 ⃗, 𝑡) + 𝑞(𝑟 ⃗, 𝑡) ρ𝐶 Eq. 4
where 𝑞(𝑟 ⃗, 𝑡) = ϕ(𝑟 ⃗, 𝑡)𝜇 𝑎 is the heat source term corresponding to the deposited energy flux per unit of volume from the absorption of laser power, ϕ(𝑟 ⃗, 𝑡) is the irradiance, and 𝜇 𝑎 the absorption coefficient of the medium. We neglected other sources and sink terms due to metabolism, as discussed page 32.

To calculate the heat distribution within the sample of interest at any time frame, we used the Green's function strategy to perform the convolution between the source term and the appropriate Green function for the 3D approach:

1 (4𝜋𝐷𝑡) 3/2 𝑒𝑥𝑝 (- 𝑟 2 4𝐷𝑡
), Eq. 5

The convolution is performed in the Fourier domain and therefore imposes specific numerical conditions which are discussed on pages 58-61. Using the Green function, we were able to deduct 𝑙 𝑡ℎ = √2𝑛𝐷𝑡, where n = 1,2,3 Eq. 6 the thermal diffusion length, depending on D the thermal diffusion coefficient, t the time and n the dimensionality of the system. By using this value that indicates the distance over which heat will diffuse during a specific period of time in the brain, we were able to define the conditions for designing an optogenetic experiment with simultaneous targeting of several neurons (page 50).

To calculate the source term, we made the choice to simulate the scattering properties of the brain by using a phase mask approach (page 57).

Furthermore, linearity of heat diffusion allowed us to simulate a moving laser beam with accumulations of discretized single spots turned on then off, one after the other, along the predesigned scanning trajectory by rewriting the source term as:

𝑞(𝑟 ⃗, 𝑡) = ∑ 𝑞 𝑖 (𝑟 ⃗ -𝑟 𝑖 ⃗ ⃗⃗, 𝑡 -𝑡 𝑖 ) 𝑖 Eq. 7
Where the term representing the scanning source was expressed as a succession of square pulses centered on 𝑟 𝑖 ⃗ ⃗⃗ at time 𝑡 𝑖 and the total spatiotemporal heat distribution was obtained by summing the heat contribution of each individual spot.

At first, we validated the model by comparing the prediction with experimental measurements using temperature-dependent luminescence coming from doped nano particles (pages 34-35).

Once the model has been validated we used it to predict the temperature rise under different illumination conditions for 2P optogenetics.

This work led to the development of a MATLAB package which has been freely shared alongside the publication, so that the scientific community may simulate their own illumination conditions and establish the safest experimental protocols.

Temperature rise under two-photon optogenetics brain stimulation

Alexis Picot 1 , Soledad Dominguez 1 , Chang Liu 2,3 , I-Wen Chen 1 , Dimitrii Tanese 1 , Emiliano

Introduction

Over the past 15 years, optogenetics has become a unique and powerful tool for the investigation of brain circuits, with the capability of controlling neuronal firing and inhibition with millisecond precision and cell specificity [START_REF] Emiliani | All-Optical Interrogation of Neural Circuits[END_REF].

Wide-field single-photon (1P) illumination is the most commonly used method to activate optogenetic actuators [START_REF] Boyden | Millisecondtimescale, genetically targeted optical control of neural activity[END_REF][START_REF] Nagel | Light activation of Channelrhodopsin-2 in excitable cells of caenorhabditis elegans triggers rapid behavioral responses[END_REF]. Combined with strategies that restrict opsin expression in specific neuronal sub-populations [START_REF] Beltramo | Layer-specific excitatory circuits differentially control recurrent network dynamics in the neocortex[END_REF][START_REF] Cardin | Driving fast-spiking cells induces gamma rhythm and controls sensory responses[END_REF][START_REF] Kuhlman | High-resolution labeling and functional manipulation of specific neuron types in mouse brain by Cre-activated viral gene expression[END_REF] and/or optical fibers [START_REF] Aravanis | An optical neural interface: in vivo control of rodent motor cortex with integrated fiberoptic and optogenetic technology[END_REF][START_REF] Penzo | The paraventricular thalamus controls a central amygdala fear circuit[END_REF][START_REF] Wu | Galanin neurons in the medial preoptic area govern parental behaviour[END_REF] to reach deep brain regions, 1P wide-field illumination has been widely applied in neuroscience research, for example inducing synaptic plasticity [START_REF] Zhang | Optical induction of synaptic plasticity using a lightsensitive channel[END_REF], mapping brain circuitry [START_REF] Adesnik | 293_A neural circuit for spatial summation in visual cortex[END_REF] and modulating behaviors [START_REF] Adamantidis | Neural substrates of awakening probed with optogenetic control of hypocretin neurons[END_REF][START_REF] Huber | Sparse optical microstimulation in barrel cortex drives learned behaviour in freely moving mice[END_REF][START_REF] Kitamura | Engrams and circuits crucial for systems consolidation of a memory[END_REF].

Recently, additional strategies for 1P patterned illumination have enabled to further increase photostimulation precision by restricting the illumination on specific brain layers [START_REF] Pisanello | Multipoint-emitting optical fibers for spatially addressable in vivo optogenetics[END_REF] or cellular and subcellular structures [START_REF] Guo | Optical interrogation of neural circuits in Caenorhabditis elegans[END_REF][START_REF] Petreanu | The subcellular organization of neocortical excitatory connections[END_REF][START_REF] Szabo | Spatially selective holographic photoactivation and functional fluorescence imaging in freely behaving mice with a fiberscope[END_REF][START_REF] Wyart | Optogenetic dissection of a behavioural module in the vertebrate spinal cord[END_REF]). Yet, the main constraint of 1P based illumination approaches, remains the limited spatial resolution and penetration depth: wide-field illumination makes it impossible to target an individual cell within a dense neuronal ensemble while 1P patterned approaches have only reached shallow depths [START_REF] Szabo | Spatially selective holographic photoactivation and functional fluorescence imaging in freely behaving mice with a fiberscope[END_REF].

This has spurred the development of more sophisticated light delivering methods using two-photon (2P) excitation. These can be divided in two main categories: scanning approaches [START_REF] Packer | Two-photon optogenetics of dendritic spines and neural circuits[END_REF][START_REF] Packer | Simultaneous alloptical manipulation and recording of neural circuit activity with cellular resolution in vivo[END_REF][START_REF] Prakash | Two-photon optogenetic toolbox for fast inhibition, excitation and bistable modulation[END_REF][START_REF] Rickgauer | Two-photon excitation of channelrhodopsin-2 at saturation[END_REF][START_REF] Yang | Simultaneous two-photon imaging and two-photon optogenetics of cortical circuits in three dimensions[END_REF] where cell photocurrent builds up thanks to the sequential photostimulation of channels or pumps expressed at the target membrane, and parallel approaches (low numerical aperture Gaussian beam, generalized phase contrast, computer generated holography (CGH), temporal focusing), where this is achieved by simultaneous illumination of the entire target [START_REF] Bègue | Two-photon excitation in scattering media by spatiotemporally shaped beams and their application in optogenetic stimulation[END_REF][START_REF] Chaigneau | Two-Photon Holographic Stimulation of ReaChR[END_REF]dal Maschio et al., 2017;[START_REF] Papagiakoumou | Scanless two-photon excitation of channelrhodopsin-2[END_REF][START_REF] Rickgauer | Simultaneous cellular-resolution optical perturbation and imaging of place cell firing fields[END_REF][START_REF] Ronzitti | Sub-millisecond optogenetic control of neuronal firing with two-photon holographic photoactivation of Chronos[END_REF]. The combination of these approaches with ad hoc engineered control tools has enabled in-depth optical control of neuronal firing with millisecond temporal precision and cellular resolution [START_REF] Ronzitti | Sub-millisecond optogenetic control of neuronal firing with two-photon holographic photoactivation of Chronos[END_REF]. Very recently, 2P illumination methods have been extended to the generation of three-dimensional (3D) illumination patterns. This has been achieved by spiral scanning multiplexed holographic foci [START_REF] Packer | Simultaneous alloptical manipulation and recording of neural circuit activity with cellular resolution in vivo[END_REF][START_REF] Yang | Simultaneous two-photon imaging and two-photon optogenetics of cortical circuits in three dimensions[END_REF] or by simultaneous shining of multiple spatiotemporally focused spots [START_REF] Accanto | Multiplexed temporally focused light shaping for high-resolution multi-cell targeting[END_REF][START_REF] Hernandez | Three-dimensional spatiotemporal focusing of holographic patterns[END_REF][START_REF] Pegard | 3D scanless holographic optogenetics with temporal focusing[END_REF][START_REF] Sun | Four-dimensional light shaping: Manipulating ultrafast spatiotemporal foci in space and time[END_REF]. These approaches combined with the use of high-energy fiber lasers [START_REF] Chaigneau | Two-Photon Holographic Stimulation of ReaChR[END_REF][START_REF] Ronzitti | Sub-millisecond optogenetic control of neuronal firing with two-photon holographic photoactivation of Chronos[END_REF][START_REF] Yang | Simultaneous two-photon imaging and two-photon optogenetics of cortical circuits in three dimensions[END_REF] and eventually highly sensitive opsins make it theoretically possible to simultaneously target hundreds of cells within mm 3 -size illumination volumes, i.e. comparable with what is achievable with single fiber visible light illumination, preserving at the same time the single-cell resolution of 2P

illumination. Yet, setting the real limitations for multi-target 2P illumination requires considering possible sources of photodamage. These include both linear effects as thermal damage related to the linear absorption of light, and nonlinear, multiphoton absorption processes, inducing photochemical, ablation damage or optical breakdown [START_REF] Hopt | Highly Nonlinear Photodamage in Two-Photon Fluorescence Microscopy[END_REF][START_REF] Koester | Ca2+ Fluorescence Imaging with Pico-and Femtosecond Two-Photon Excitation: Signal and Photodamage[END_REF][START_REF] Vogel | Mechanisms of femtosecond laser nanosurgery of cells and tissues[END_REF] arising at peak fluences around 0.1 J/cm 2 for Chinese hamster ovarian cells [START_REF] König | Pulse-length dependence of cellular response to intense near-infrared laser pulses in multiphoton microscopes[END_REF], 0.5-2 J/cm 2 in water [START_REF] Linz | Wavelength dependence of femtosecond laser-induced breakdown in water and implications for laser surgery[END_REF][START_REF] Noack | Laser-Induced Plasma Formation in Water at Nanosecond to Femtosecond Time Scales : Calculation of Thresholds[END_REF][START_REF] Vogel | Mechanisms of femtosecond laser nanosurgery of cells and tissues[END_REF] and 1.5-2.2 J/cm 2 for porcine corneal stroma [START_REF] Olivié | Wavelength dependence of femtosecond laser ablation threshold of corneal stroma[END_REF].

Due to the short dwell time and small illumination volume used in conventional multiphoton imaging, heating through linear absorption can be considered a negligible source of photodamage [START_REF] Débarre | Mitigating phototoxicity during multiphoton microscopy of live drosophila embryos in the 1.0-1.2 μm wavelength range[END_REF][START_REF] Kobat | Deep tissue multiphoton microscopy using longer wavelength excitation[END_REF][START_REF] Koester | Ca2+ Fluorescence Imaging with Pico-and Femtosecond Two-Photon Excitation: Signal and Photodamage[END_REF][START_REF] Linz | Wavelength dependence of femtosecond laser-induced breakdown in water and implications for laser surgery[END_REF].

Nevertheless, for repetitive scanning of large areas this can become of increasing importance [START_REF] Hopt | Highly Nonlinear Photodamage in Two-Photon Fluorescence Microscopy[END_REF][START_REF] Podgorski | Brain heating induced by near infrared lasers during multi-photon microscopy[END_REF]. Unlike 2P imaging, parallel optogenetic neuronal activation uses long (milliseconds to seconds) exposure time and/or large illumination area (or amount of targets), therefore thermal phenomena require a careful evaluation [START_REF] Boulnois | Photophysical processes in recent medical laser developments: A review[END_REF]. Many neural functions can be altered when there is a change of temperature [START_REF] Aronov | Natural Changes in Brain Temperature Underlie Variations in Song Tempo during a Mating Behavior[END_REF][START_REF] Christie | FMRI response to blue light delivery in the naïve brain: Implications for combined optogenetic fMRI studies[END_REF][START_REF] Elwassif | Bio-heat transfer model of deep brain stimulation-induced temperature changes[END_REF][START_REF] Kalmbach | Brain surface temperature under a craniotomy[END_REF][START_REF] Wang | Brain temperature and its fundamental properties: A review for clinical neuroscientists[END_REF]. Even small temperature changes can cause modulations of the action potential (AP) shape [START_REF] Hodgkin | The effect of sodium ions on the electrical activity of the giant axon of the squid[END_REF], firing rate of neurons [START_REF] Reig | Temperature modulation of slow and fast cortical rhythms[END_REF][START_REF] Stujenske | Modeling the Spatiotemporal Dynamics of Light and Heat Propagation for InVivo Optogenetics[END_REF], channel conductance [START_REF] Shibasaki | Effects of Body Temperature on Neural Activity in the Hippocampus: Regulation of Resting Membrane Potentials by Transient Receptor Potential Vanilloid 4[END_REF][START_REF] Wells | Biophysical Mechanisms of Transient Optical Stimulation of Peripheral Nerve[END_REF] or fluctuation of the synaptic responses [START_REF] Andersen | Brain Temperature and Hippocampal Function[END_REF][START_REF] Thompson | Temperature dependence of intrinsic membrane properties and synaptic potentials in hippocampal CA1 neurons in vitro[END_REF].

Cell death after denaturation of proteins can also be expected after a temperature increase of 6-8 Kelvin above the physiological resting temperature [START_REF] Deng | Optogenetics, the intersection between physics and neuroscience: light stimulation of neurons in physiological conditions[END_REF][START_REF] Thomsen | Pathologic Analysis of Photothermal and Photomechanical Effects of Laser Tissue Interactions[END_REF].

Notably, thermal damage thresholds also depend on brain area and specific tissue properties [START_REF] Kiyatkin | Brain temperature fluctuations during physiological and pathological conditions[END_REF][START_REF] Sharma | Hyperthermia induced pathophysiology of the central nervous system[END_REF].

Temperature rise under the typical illumination conditions for 1P optogenetics (i.e. widefield illumination through optical fibers and long, 0.5 to 60 s exposure time) has been investigated both theoretically, using Monte-Carlo with Finite Difference Time Domain schemes [START_REF] Stujenske | Modeling the Spatiotemporal Dynamics of Light and Heat Propagation for InVivo Optogenetics[END_REF] or Finite Element Method [START_REF] Shin | Characterization of fiber-optic light delivery and light-induced temperature changes in a rodent brain for precise optogenetic neuromodulation[END_REF], and experimentally using thermo-couples [START_REF] Shin | Characterization of fiber-optic light delivery and light-induced temperature changes in a rodent brain for precise optogenetic neuromodulation[END_REF][START_REF] Stujenske | Modeling the Spatiotemporal Dynamics of Light and Heat Propagation for InVivo Optogenetics[END_REF], quantum dots [START_REF] Podgorski | Brain heating induced by near infrared lasers during multi-photon microscopy[END_REF] or IR cameras [START_REF] Arias-Gil | Measurement, modeling, and prediction of temperature rise due to optogenetic brain stimulation[END_REF].

Recently, Podgorski and his colleagues have modeled and measured heating under 20 to 180 s 2P repeated scanning illumination of a volume measuring 1 mm 2 in surface and 250 µm in depth [START_REF] Podgorski | Brain heating induced by near infrared lasers during multi-photon microscopy[END_REF].

Despite these first investigations, a careful evaluation of brain heating under the different illumination conditions (parallel and scanning) used for 2P optogenetics is still missing.

In

Results

Modeling heat diffusion

Heating during photostimulation (or any experimental procedure involving shining light on or in an object) results from the thermalisation of the energy from the light source absorbed by the tissue.

To model heat diffusion, we considered brain tissue as a uniform and isotropic medium initially at temperature T0, characterized by a thermal diffusion constant (or diffusivity) 𝐷, a specific heat 𝐶, and density ρ (see Table S1). The spatiotemporal distribution of the temperature rise 𝑇(𝑟 ⃗, 𝑡), where 𝑟 ⃗ is the spatial coordinate in 3D and 𝑡 is the time, is obtained from Fourier's heat diffusion equation [START_REF] Fourier | FOURIER : Théorie analytique de la chaleur (Chez Firmin Didot[END_REF] :

𝜕𝑇(𝑟 ⃗, 𝑡) 𝜕𝑡 = 𝐷𝛻 2 𝑇(𝑟 ⃗, 𝑡) + 𝑞(𝑟 ⃗, 𝑡) ρ𝐶 Eq. 1
where 𝑞(𝑟 ⃗, 𝑡) = ϕ(𝑟 ⃗, 𝑡)𝜇 𝑎 is the heat source term corresponding to the deposited energy flux per unit of volume from the absorption of laser power, ϕ(𝑟 ⃗, 𝑡) is the irradiance, and 𝜇 𝑎 the absorption coefficient of the medium. In the 950-1030 wavelength range, water is the main source of absorption while the contribution from the haemoglobin is almost negligible.

Therefore for all simulations (in vitro and in vivo) we used for 𝜇 𝑎 the ex-vivo value given in Ref. [START_REF] Yaroslavsky | Optical properties of selected native and coagulated human brain tissues in vitro in the visible and near infrared spectral range[END_REF], which in this wavelength regime is very close to the in vivo situation [START_REF] Johansson | Spectroscopic method for determination of the absorption coefficient in brain tissue[END_REF].

In living tissue, it is common to use the so-called Pennes bio heat equation (H. [START_REF] Pennes | Analysis of Tissue and Arterial Blood Temperatures in the Resting Human Forearm[END_REF] which would add to the previous equation a source related to metabolic process, 𝑞 𝑚 , and a sink (cooling) term related to blood perfusion, 𝑞 𝑝 , within the tissue:

𝜕𝑇(𝑟 ⃗, 𝑡) 𝜕𝑡 = 𝐷𝛻 2 𝑇(𝑟 ⃗, 𝑡) + 𝑞(𝑟 ⃗, 𝑡) ρ𝐶 + 𝑞 𝑚 -𝑞 𝑝 ρ𝐶 Eq. 2
The sink term is a function of the thermal properties of blood (ρb, Cb), blood flow wb and temperature Tb and is expressed as: 𝑞 𝑝 = ρ 𝑏 𝐶 𝑏 𝑤 𝑏 ((𝑇 0 + 𝑇(𝑟 ⃗, 𝑡)) -𝑇 𝑏 ). In physiological conditions 𝑞 𝑚 and 𝑞 𝑝 should be equal, maintaining tissue temperature constant.

If we take the characteristic values for ρb, Cb and wb [START_REF] Elwassif | Bio-heat transfer model of deep brain stimulation-induced temperature changes[END_REF][START_REF] Stujenske | Modeling the Spatiotemporal Dynamics of Light and Heat Propagation for InVivo Optogenetics[END_REF] and we consider a tissue temperature rise of 1 K, we obtain for the sum of the source and sink term,

𝑞 𝑚 -𝑞 𝑝 ρ𝐶
, a value of roughly -9.2.10 -3 K/s -1 . By taking for 𝑞(𝑟 ⃗, 𝑡) under our experimental conditions, a value of ~6.10 -6 mW/µm 3 (with ϕ(𝑟 ⃗, 𝑡) ~0.1 mW/µm 2 and 𝜇 𝑎 = 6.10 -5 µm -1 ) we obtain for 𝑞(𝑟 ⃗,𝑡) ρ𝐶 a value of roughly 1.7 10 3 K/s -1 , with ρ and 𝐶 taken from Ref. [START_REF] Blumm | Characterization of the thermophysical properties of molten polymers and liquids using the flash technique[END_REF][START_REF] Yizhar | Optogenetics in Neural Systems[END_REF].

In agreement with previous findings [START_REF] Elwassif | Bio-heat transfer model of deep brain stimulation-induced temperature changes[END_REF][START_REF] Stujenske | Modeling the Spatiotemporal Dynamics of Light and Heat Propagation for InVivo Optogenetics[END_REF], we can consider that under the experimental conditions considered in this paper, the main cooling mechanism is through diffusion. We therefore neglected the 𝑞 𝑚 -𝑞 𝑝 ρ𝐶 term and used the Fourier's heat diffusion, equation (1).

To solve equation ( 1) we used Green's function formalism [START_REF] Carslaw | Conduction of Heat in Solids[END_REF]). Green's function 𝐺(𝑟 ⃗, 𝑡) is the solution to an instantaneous point source of heat and 𝑇(𝑟 ⃗, 𝑡) is given by the convolution (over space and time) of this Green's function and the source term 𝑞(𝑟 ⃗, 𝑡). For an infinite media (see STAR Methods), Green's function is readily obtained in analytical form for 1D:

1 √4𝜋𝐷𝑡 𝑒𝑥𝑝 (- 𝑥 2 4𝐷𝑡
), Eq. 3 or 3D diffusion:

1 (4𝜋𝐷𝑡) 3/2 𝑒𝑥𝑝 (- 𝑟 2 4𝐷𝑡
), Eq. 4

where 𝑟 2 = 𝑥 2 + 𝑦 2 + 𝑧 2 .

As the Green's function for the diffusion equation is a Gaussian distribution, it is common, as seen for example in [START_REF] Bird | Transport Phenomena[END_REF][START_REF] Bird | Transport Phenomena[END_REF][START_REF] Bird | Transport Phenomena[END_REF], to define a diffusion length (here a thermal diffusion length) as the standard deviation of this Gaussian distribution: 𝑙 𝑡ℎ = √2𝑛𝐷𝑡, where n = 1,2,3 is the dimensionality of the medium in which the diffusion process occurs.

Convolution of Green's function and the source term must then be carried out over space and time. In order to facilitate this convolution, we expressed the source term as a separable function of space and time, meaning as the product of the function describing independently the spatial and temporal distributions: 𝑞(𝑟 ⃗, 𝑡) = ϕ(𝑟 ⃗, 𝑡)μ 𝑎 = Γ(𝑟 ⃗)Π(𝑡)μ 𝑎 . Spatial distribution Γ(𝑟 ⃗) and time dependence Π(𝑡) of the source term can therefore be treated separately. Further details describing the modelling of the light source propagation, the scattering, the time dependence of source term and the trajectory of the laser beam can be found in the STAR Methods section.

Experimental validation of the model

We tested the accuracy of our model by comparing the theoretical prediction to the We started by comparing simulations, with water coefficient of absorption taken from

Ref. [START_REF] Kedenburg | Linear refractive index and absorption measurements of nonlinear optical liquids in the visible and near-infrared spectral region[END_REF], with experiments in the case of a 500 ms stimulation at 1030 nm wavelength (laser pulse width ~250 fs, repetition rate 10 MHz) focalized to a 15 µmdiameter holographic spot placed 30 µm away from the particle, and we found that our prediction perfectly reproduces both the magnitude and the temporal evolution of the temperature rise (Figure 1A; left panel). To validate the ability of the model to account for the spatial heat distribution, we compared the predicted and experimental values of the temperature rise reached 500 ms after optical excitation, while laterally moving the illumination spot with respect to the particle (Figure 1A; right panel). Finally, we exploit the capability of the model to predict the fast temperature changes and temperature accumulation produced by 2 Hz or 10 Hz stimulation trains (Figure 1B) of 50 ms illumination pulses.

Single spot holographic photostimulation

Here, we use the model to predict the temperature changes produced under exemplary illumination condition for 2P optogenetics using parallel (holographic) illumination (Chen et al., 2017). At the end of the 3 ms illumination time, the model predicts a mean temperature increase of the cell of 0.3 K followed by a rapid temperature decay (reaching 0.05 K after 10 ms). It should be noted that although the temperature increase has a linear dependence with the excitation power, it is not linear with exposure time when diffusion is taken into account. This sublinear dependence can be expressed in terms of the complementary error function and for the typical conditions considered in this paper increasing the exposure time of a factor of 10 rises the temperature of only roughly a factor 2 (Figure S3 B). Although at the onset of heat diffusion the temperature distribution reproduces the speckled intensity distribution typical of CGH, these fluctuations are washed out as soon as the thermal diffusion length (𝑙 𝑡ℎ = √6𝐷𝑡) equals the speckle size (𝑙 𝑡ℎ ≈ 𝜆 = 1,03 𝜇𝑚; i.e. for 𝑡 ≥ 1𝜇𝑠) (Figure S3 A).

We then simulated the effect on thermal response when the same stimulation (illumination time = 3 ms) was repeated at a rate of 10 Hz or 40 Hz (Figure 2B; left panel) to produce AP trains (Figure 2B; right panel). As we can observe, under 10 Hz stimulation, the heat dissipation after each photostimulation pulse is fast enough to bring the cell back to the equilibrium temperature before the arrival of the next photostimulation pulse. Increasing the stimulation repetition rate, generates a heat accumulation after each photostimulation pulse.

However, even at a rate of 100 Hz, after 5 pulses, the accumulated temperature rise does not exceed a few tenths of a degree (Figure 2C) of course this accumulation becomes more relevant for longer illumination times (Figure S3 B).

Multi-spot holographic photostimulation

Here, we consider the temperature rise induced by multiple spots distributed in a volume.

In this case, it is important to consider for each plane the different attenuation of light due to scattering. To this end, the light distribution is obtained by using a holographic phase mask that compensates for the depth-dependent light losses and produces, at each focal depth, holographic spots of equal excitation density. Using a 3D fluorescence stack as a guide (Figure 3A) for placing the spots in 3D, we generated 100 holographic spots within a 300 x 300 x 300 µm 3 volume (excitation power density at each spot ~0.07 mW/µm 2 ) and used our model to predict the corresponding 3D spatiotemporal evolution of the temperature rise (Figure 3B and Movie S1). At the end of the 3 ms stimulation, we found a mean temperature rise, averaged over the 100 spots, of ~1 K (Figure 3C). Due to the high density of spots, the value of the temperature rise at each spot obviously depends on the number and locations of the neighboring spots. For example, at spots generated in the deeper layers and surrounded by several neighboring spots, the local temperature rise can reach up to 1.85 K (Figure 3C), while for spot placed at an average distance greater than the thermal diffusion length (𝑙 𝑡ℎ = √6𝐷𝑡 ~ 50µm) from their nearest neighbor, the temperature rise remains around 0.3 K, i. e.

comparable to the case of the isolated spot reported in Figure 2A.

Simulation of heating effect for different illumination conditions

Here we show how our model can simulate the spatiotemporal temperature distribution generated under spiral scanning illumination and compare the corresponding heat distribution with the one obtained using holographic illumination.

To quantitatively compare the two approaches, we first determined for each of these two approaches the power conditions which allow in vitro AP generation with comparable latencies. To this end, we used an optical system able to perform sequentially holographic and spiral scanning photostimulation on the same cell (see STAR Methods). We found that for both short (3 ms) and long (40 ms) illumination times, the average power necessary to evoke an action potential using holographic illumination was roughly twice larger than with the scanning approach (37.5 mW and 16 mW on average (n = 3) for 3 ms illumination, 5.8 mW and 2.5 mW on average (n = 4) for 40 ms illumination, Figure 4A). Of note, the larger spot in holographic excitation enables the use of a power density roughly 150 times smaller (0.2 mW/µm 2 vs 31 mW/µm 2 for 3 ms illumination, 0.03 mW/µm 2 vs 5 mW/µm 2 for 40 ms illumination). These results confirm what has been recently achieved in vivo using the C1V1 opsin and a laser source tuned to 1MHz (average power for spiral scanning about 1.8 lower than the one used for a 12 m diameter holographic spot) [START_REF] Yang | Simultaneous two-photon imaging and two-photon optogenetics of cortical circuits in three dimensions[END_REF].

These power values were used to simulate the spatiotemporal distribution of the temperature rise using holographic (Figure 4B) and spiral scanning illuminations (Figure 4C)

and two illumination durations (3 ms and 40 ms). The maximum mean temperature is reached, as expected, at the end of the illumination time. After 3 ms of illumination (Figure 4B; left panel; Figure 4C; left panel and Movie S3), it equals ~1.1 K for CGH and ~0.5 K for scanning. In the latter case, the accumulation of heat during the scan leads to a localized temperature peak of ~0.93 K. (about two times higher than the average value) when the laser reaches the center of the spiral. Also, the model enables to predict temperature oscillations at the edge of the cell during the 7 scanning loops. Using longer illumination times (40 ms) enables to decrease the excitation power although it also increases the AP latency, in this case the mean temperature stays below ~0.25 K and ~0.12 K for CGH and scanning, respectively, with a local maximum of ~0.18 K at the center of the cell in the case of spiral scanning (Figure 4B; right panel, Figure 4C; right panel). So far, experimental methods to evaluate light induced heating during optogenetics experiments have used thermocouples, with a millimeter long tip and a diameter ranging between 220 µm and 500 µm which translates into a mm-range sensitive region [START_REF] Podgorski | Brain heating induced by near infrared lasers during multi-photon microscopy[END_REF][START_REF] Shin | Characterization of fiber-optic light delivery and light-induced temperature changes in a rodent brain for precise optogenetic neuromodulation[END_REF][START_REF] Stujenske | Modeling the Spatiotemporal Dynamics of Light and Heat Propagation for InVivo Optogenetics[END_REF] or a thermal camera allowing a spatial resolution of 51 µm [START_REF] Arias-Gil | Measurement, modeling, and prediction of temperature rise due to optogenetic brain stimulation[END_REF]. These probes were well adapted to measure temperature rises averaged on large area but lack the necessary precision to predict the spatial heat distribution induced by 2P patterned light at micrometer scale. The use of quantum dot thermometry could reduce the spatial resolution down to the micrometer scale but required long (typically ~1s) integration time [START_REF] Podgorski | Brain heating induced by near infrared lasers during multi-photon microscopy[END_REF].

Here, we quantify (at high spatio-temporal resolution) the temperature response induced by 2P excitation by using rare-earth doped glass particles. Such particles have the property of emitting a strong temperature-dependent luminescent signal. [START_REF] Aigouy | Scanning thermal imaging of microelectronic circuits with a fluorescent nanoprobe[END_REF][START_REF] Saïdi | Scanning thermal imaging by near-field fluorescence spectroscopy[END_REF]. By probing a single ~10 µm Er/Yb co-doped particle, we manage to significantly increase the photon budget to reach a thermal sensitivity below 0.2 K, a temporal resolution of 4 ms, while reducing the size of the probed region down to a spatial scale comparable to the neuron cell body. To efficiently sample the temporal evolution of heating we used here illumination pulses > 50 ms. More efficient detection schemes will increase sensitivity, enable higher sampling rates and thus the use of shorter illumination pulses. However, the Er/Yb codoped particle lifetime will limit the resolution to ~0.5 ms [START_REF] Wang | Nonlinear spectral and lifetime management in upconversion nanoparticles by controlling energy distribution[END_REF].

After experimental verification of the validity of the model, we have used this to evaluate the spatiotemporal heat distribution under the most commonly used configurations for 2P optogenetics control of neuronal firing: holographic and scanning illumination.

Holographic parallel illumination combined with amplified low repetition rate lasers and sensitive opsins enables to evoke AP and AP trains in vivo using low excitation density (< 0.1 mW/m 2 ) and short illumination time (< 3 ms) [START_REF] Chen | Parallel holographic illumination enables sub-millisecond two-photon optogenetic activation in mouse visual cortex in vivo[END_REF]. Using our model we have

shown that this illumination conditions correspond to less than 0.35 K of mean temperature increase for single-cell activation (Figure 2).

In 2P CGH, the intensity distribution of the excitation patterns present spatial intensity fluctuations that could reach 50% around the mean value [START_REF] Papagiakoumou | Patterned two-photon illumination by spatiotemporal shaping of ultrashort pulses[END_REF], which could generate localized hot spots. However, we could show that this speckled distribution is preserved in the heating profile only for the first few microseconds, being quickly smoothed out by diffusion. Within this short time the temperature rise even at the hottest spots will not exceed a few millikelvin, thus ruling out the risk that holographic speckles can induce local hot spots.

The generation of trains of pulses had no effect on the total temperature rise, for a stimulation frequency of 10 Hz and 3 ms illumination time (Figure 2B). For higher stimulation frequency, when the delay between pulses becomes comparable to the heating decay time, repetitive pulse stimulation will induce heating accumulation, however even for the case of 100 Hz stimulation this will be less than 0.1 K (Figure 2C).

For prolonged (seconds to minutes) scanning illuminations of large area (mm 2 ) the highest temperature change is deeper in the brain than at the focal plane (Podgorski and Ranganathan, 2016) (see STAR Methods), while for the spatially localized and short (milliseconds) illumination conditions used in 2P optogenetics the highest temperature changes occurred within the spots (Figure 3B), suggesting that these are the positions where it is important to evaluate the maximum temperature rise. We have shown that the simultaneous illumination with 100 spots, placed in a 300 x 300 x 300 µm 3 volume, enables to keep the temperature rise at the targets comparable to the case of an isolated cell, providing that the spatial distance among the targets is kept larger than the 3D diffusion length (Figure S4 and Movie S2).

We have shown that our model can be applied to predict temperature rise both under parallel and spiral scanning optogenetic illuminations. In scanning approaches, the excitation light is focused on a small spot and photocurrent builds up thanks to the sequential opening of channels. This enables using lower illumination power than the one used in holographic photostimulation where, on the contrary, current integration is achieved by simultaneous activation of all channels. The smaller spot size used in spiral scanning also enables more efficient heat dissipation, so that overall spiral scanning leads to lower temperature rise. On the other hand, the concentration of light on a small spot leads to power densities 150 times higher than the one used in CGH and closer to nonlinear photodamage thresholds so that, especially for short illumination times, care needs to be taken in limiting the number of successive scans [START_REF] Hopt | Highly Nonlinear Photodamage in Two-Photon Fluorescence Microscopy[END_REF].

These results also indicate that the optimal laser repetition rate for 2P optogenetics depends on the adopted illumination methods: the extremely low excitation power density adopted for parallel illumination approaches (Figure 4B, peak fluence ≈ 10.7 mJ/cm 2 and 1.7 mJ/cm 2 , respectively for 3 ms and 40 ms illumination conditions; Figure 2, peak fluence ≈ 20 mJ/cm 2 ) enables to neglect nonlinear damage effect and privileges using low (500 kHz-2MHz) repetition rate lasers to minimize heating through linear absorption. Scanning approaches require higher excitation power density (Figure 4C, peak fluence ≈ 1.6 J/cm 2 and 0.25 J/cm 2 , respectively for 3 ms and 40 ms illumination conditions) but enable more efficient heat dissipation, therefore for short illumination times, higher repetition rate laser [START_REF] Ji | High-speed, low-photodamage nonlinear imaging using passive pulse splitters[END_REF] should be preferred in order to minimize peak-power -sensitive damages.

Here, we used for both approaches the opsin CoChR, which has intermediate rise (~ 6 ms) and decay time (~ 35 ms) [START_REF] Shemesh | Temporally precise single-cellresolution optogenetics[END_REF]. For parallel approaches, similar excitation power density and illumination times can be reached independently on the opsin kinetics [START_REF] Chaigneau | Two-Photon Holographic Stimulation of ReaChR[END_REF][START_REF] Chen | Parallel holographic illumination enables sub-millisecond two-photon optogenetic activation in mouse visual cortex in vivo[END_REF][START_REF] Ronzitti | Sub-millisecond optogenetic control of neuronal firing with two-photon holographic photoactivation of Chronos[END_REF] therefore we can expect similar values of temperature rises. On the contrary, illumination conditions for spiral scanning are more sensitive to the opsin kinetics: combination with slower opsin as C1V1 enables to lower the power [START_REF] Yang | Simultaneous two-photon imaging and two-photon optogenetics of cortical circuits in three dimensions[END_REF] and therefore reduce the temperature rise even further, while combined with faster opsins as Chronos would require to use higher powers to compensate for the fast channel off-time.

Our model is extendable to other brain regions or biological preparations differing in scattering properties, thus offering a unique and flexible tool for the design of complex optogenetics experiments with minimal sample heating. It will surely prove useful also to (250 µm deep) at a speed of 80-100 nL/min. For performing acute photostimulation in vivo, a circular craniotomy of 2 mm diameter was made over V1 and the dura mater was removed.

Agarose of 0.5-2% and a cover glass were applied on top of the craniotomy for stabilization/to dampen tissue movement.

Two-photon-guided electrophysiologyin-vivo

Cortical neurons were targeted with patch pipettes under a custom-built two-photon microscope equipped with a Ti:Sapphire laser (Chameleon Vision II, Coherent), and a 40x

water-immersion objective (Nikon, CFI APO 40XW NIR, NA0.80). For a detailed description of the two-photon scanning imaging system see [START_REF] Chaigneau | Two-Photon Holographic Stimulation of ReaChR[END_REF]. The GFP labelling in opsin-expressing cells were visualized by excitation at 920 nm and the emitted fluorescence was collected through red (617/70 nm) and green (510/80 nm) filters (Semrock).

Imaging data were acquired using ScanImage 3 software (http://scanimage.org).

Cell-attached recordings were obtained by using microelectrodes fabricated from borosilicate glass (5-8 M Ω resistance) and filled with solution containing the following (in

Holographic photostimulationin-vivo

Holographic photostimulation was implemented with the imaging system mentioned above. Computer-generated holography was utilized for patterning light beams from an amplified fiber laser (Satsuma HP, Amplitude Systemes) at 1030 nm via a spatial light modulator (LCOS-SLM; X10468-07, Hamamatsu Photonics). The photostimulation setup was similar to the one described in [START_REF] Ronzitti | Sub-millisecond optogenetic control of neuronal firing with two-photon holographic photoactivation of Chronos[END_REF] and [START_REF] Chaigneau | Two-Photon Holographic Stimulation of ReaChR[END_REF]. The SLM was controlled by a custom-designed software [START_REF] Lutz | Holographic photolysis of caged neurotransmitters[END_REF]. A cylindrical lens was introduced to suppress zero-order excitation [START_REF] Hernandez | Three-dimensional spatiotemporal focusing of holographic patterns[END_REF].

Two-photon photostimulation was performed using a circular holographic spot of 12-µm diameter covering the soma of a CoChR-positive neuron whose spiking activity was monitored through a patch pipette. A threshold power density between 0.05-0.5 mW/µm 2 of a 1-10 ms light pulse was determined for a target neuron to elicit an action potential (AP) in 3-6 repetitions. A train of APs were elicited upon photostimulation with 5-10 illumination pulses at 10, 20 and 40 Hz.

Brain slices

Brain slices of V1 cortex were prepared from mice 7-15 weeks after viral injection. Mice were deeply anesthetized with isoflurane (5% in air) and decapitated, and the brain was Voltage and current clamp recordings were filtered at 6-10 kHz and sampled at 20-50 kHz.

Borosilicate glass pipettes (outer diameter 1.5 mm and inner diameter 0.86 mm) were pulled with a micropipette puller (Sutter Instruments) and filled with a solution containing the following (in mM): 130 potassium gluconate, 7 KCl, 4 Mg-ATP, 0.3 mM Na-GTP, 10 sodium phosphocreatine and 10 mM HEPES (pH adjusted to 7.28 with KOH; osmolarity 280 mOsm).

Pipette resistance in the bath was 5-7 MΩ.

2P holographic and spiral scanning photostimulationin-vitro

The optical system used is analogous to the one described above for the measure of the laser induced heating. In this experiment, the excitation laser (GOJI, Amplitude Systemes, here operated at a repetition rate of 2 MHz and laser pulse width of ~300fs) could be alternatively directed onto two different optical paths, in order to generate either parallel holographic stimulation or spiral scanning stimulation. The former consisted in illuminating the whole cell body with a 15 µm diameter holographic spot (see description of the optical path in the Thermal measurement section). The latter consisted in the spiral scanning of the cell body with an almost diffraction limited spot (~ 0.8 µm lateral size). The spiral trajectory was obtained by controlling the movement of the two galvomirrors using a SlideBook 6 commercial software (3i-Intelligent Imaging Innovations) and its parameters (7 tours, pitch 1 µm) were chosen to cover approximately the same surface of the holographic illumination.

The two beams were focused on the sample by a 40x 0.8 NA water immersion Zeiss objective and the cell response to photostimulation was monitored by electrophysiological recording.

Modeling -Light source propagation and scattering

The spatial distribution of the source term, Γ(𝑟 ⃗), can be calculated for the propagation of either a Gaussian or holographic light beam. To model the three-dimensional light scattering within an opaque tissue, we used a diffraction approach such as the angular spectrum of planes. Given a desired intensity distribution at the target plane we first used the Gerchberg-Saxton algorithm [START_REF] Lutz | Holographic photolysis of caged neurotransmitters[END_REF] to calculate the electric field distribution 𝐸 𝑆𝐿𝑀 (𝑟, 𝑡) = 𝐴(𝑥, 𝑦)𝑒 𝑖𝜑(𝑥,𝑦) at the SLM plane, where 𝜑(𝑥, 𝑦) is the phase mask calculated by using the Gerchberg-Saxton based algorithm, and 𝐴(𝑥, 𝑦) is a Gaussian distribution reproducing the illumination beam at the SLM plane. The angular spectrum of plane waves [START_REF] Goodman | Introduction to Fourier Optics McGraw-Hill Series in Electrical and Computer Engineering[END_REF] is then used to propagate the 𝐸 𝑆𝐿𝑀 (𝑟, 𝑡) through the sample, step by step and adding a random phase to scramble the field after each step. The random phase mask is built up by using a set of scattering parameters, reproducing the scattering properties of brain tissue. These parameters have been calibrated and experimentally verified in [START_REF] Bègue | Two-photon excitation in scattering media by spatiotemporally shaped beams and their application in optogenetic stimulation[END_REF][START_REF] Papagiakoumou | Functional patterned multiphoton excitation deep inside scattering tissue[END_REF], where we measured and modeled the effect of scattering on amplitude attenuation, spatial scale of speckle, and quality of focus after propagation of light through up to 550 m of acute brain slices. These parameters reproduced the experimental scattering length at 800 nm for cortical brain (~135 µm). The same parameters at 1030 nm give an effective extinction coefficient (or characteristic length for the decrease of fluorescence as a function of depth) of 175 µm ± 13 µm (Figure S2 A).

This approach is only an approximation of actual light scattering, first because it accounts only for forward scattering (neglecting backscattering) and second because scattering occurs only at certain predetermined planes, after discrete steps, and not continuously while propagating in the tissue.

Despite these limitations the approach has been used successfully to model, for instance, the two-photon fluorescence decay as a function of depth [START_REF] Bègue | Two-photon excitation in scattering media by spatiotemporally shaped beams and their application in optogenetic stimulation[END_REF][START_REF] Papagiakoumou | Functional patterned multiphoton excitation deep inside scattering tissue[END_REF] or the angular memory effect [START_REF] Schott | Characterization of the angular memory effect of scattered light in biological tissues[END_REF] in biological tissue.

Modeling -Time dependence of source term

Considering a laser pulse of average power Pav and duration τ, which is obtained from a train of fs pulses of peak power Pp and duration τp at a repetition rate f, Pav = f τp Pp. The temporal dependence of the source term, Π(𝑡) , can be expressed either as a continuous illumination pulse of average intensity Pa or as a train of fs pulses. The two approaches can be considered equivalent if the heat diffusion out of the region of interest (ROI; area over which the temperature is averaged, e.g. the cell surface or the Er-Yb co-doped glass particle surface)

is negligible in the interval between two successive laser pulses ∆𝑡 = 1/𝑓. If this condition is verified, the temperature over the ROI remains quasi constant during ∆𝑡 so that the energy of each successive laser pulse, τp Pp simply adds to the one of the other pulses. As a result, the total energy during an illumination time, τ, will equalize that of a continuous pulse of energy τ

Pav, giving rise to the same temperature rise. If 𝑎 is the lateral dimension of the area of interest this condition can be expressed in terms of the thermal diffusion length:

𝑙 𝑡ℎ = √6𝐷∆𝑡 ≪ 𝑎 → 𝑓 ≫ 6𝐷 𝑎 2
Eq. 5

For a temperature averaged over a 12 µm diameter spot this corresponds to 𝑓 ≫ 23 kHz.

In the case of a low repetition rate fiber laser (500 kHz) the relative decay of temperature in a 6 µm or 1 µm radius circular area during the 2 µs between successive laser pulses is of the order of 0.01% and 0.3%, respectively. This relative decay is even more negligible in the case of a conventional mode-locked laser (80 MHz repetition rate, 12.5 ns between successive laser pulses). We therefore can consider that within this repetition rate range (500kHz -80MHz), the time dependence of the source term can be well approximated by a continuous illumination pulse of average intensity, the difference in the temperature at a given time step being simply the difference between continuous integration and a rectangle rule numerical integration of the heat source (Figure S2 B).

We can also compare the expressions of the convolution of Green's function with Π(𝑡) for both cases. This can be done in k-space (or Fourier domain where the convolution with the source term is carried out as a multiplication), for the 1D Green's function:

𝐺 ̃1(𝑘, 𝜏) = 1 𝜏 ∫ 𝑒𝑥𝑝(-𝐷(2𝜋𝑘) 2 𝑡) 𝜏 0 𝑑𝑡 𝐺 ̃2(𝑘, 𝜏) = 1 𝑁 ∑ 𝑒𝑥𝑝(-𝐷(2𝜋𝑘) 2 𝑖∆𝑡) 𝑁-1 0
Eq. 6 𝐺 ̃1(𝑘, 𝜏) and 𝐺 ̃2(𝑘, 𝜏) are the expressions for respectively the average power continuous illumination pulse and the discrete sum of N successive laser pulses, where k is the spatial frequency. Carrying out the integration and the summation:

𝐺 ̃1(𝑘, 𝜏) = 1-𝑒𝑥𝑝(-𝐷(2𝜋𝑘) 2 𝑡) 𝐷(2𝜋𝑘) 2 𝜏 𝐺 ̃2(𝑘, 𝜏) = 1 𝑁 1-𝑒𝑥𝑝(-𝐷(2𝜋𝑘) 2 𝑁∆𝑡) 1-𝑒𝑥𝑝(-𝐷(2𝜋𝑘) 2 ∆𝑡)
Eq. 7

For 𝐷(2𝜋𝑘) 2 ∆𝑡 ≪ 1 and noting that 𝑁∆𝑡 = 𝜏

𝐺 ̃2(𝑘, 𝜏) ≈ 1 𝑁 1 -𝑒𝑥𝑝(-𝐷(2𝜋𝑘) 2 𝑁∆𝑡) 1 -(1 -𝐷(2𝜋𝑘) 2 ∆𝑡) = 1 -𝑒𝑥𝑝(-𝐷(2𝜋𝑘) 2 𝑁∆𝑡) 𝐷(2𝜋𝑘) 2 𝑁∆𝑡 𝐺 ̃2(𝑘, 𝜏) = 𝐺 ̃1(𝑘, 𝜏)
Eq. 8

Modeling -Convolution with separable source term The term representing the scanning source was expressed as a succession of square pulses, centred on 𝑟 𝑖 ⃗ ⃗⃗ at time 𝑡 𝑖 and the total spatiotemporal heat distribution was obtained by summing the heat contribution of each individual spot. This approach is less computationally consuming than solving equation ( 1) using a continuous illumination. To ensure that the discretization of the light source does not affect the spatiotemporal distribution of temperature we chose a spatial separation between the steps to be shorter than the thermal diffusion length.

For example the illumination time, 𝑡 𝑖+1 -𝑡 𝑖 , of 50 µ𝑠 used for the spirals in Figure 4C corresponds to a diffusion length 𝑙 𝑡ℎ = √6𝐷𝑡 ≈ 6.6 µ𝑚, which is much larger than the corresponding spatial step 𝑟 𝑖+1 ⃗⃗⃗⃗⃗⃗⃗⃗ -𝑟 𝑖 = 0.3 µ𝑚.

Considering that the time to generate a temporally focused pattern (~ps) is much shorter than the heat diffusion time, the case of a temporally focused pattern (Figure 4B) has been treated as if the sample was continuously illuminated.

Modeling -The infinite media hypothesis

The infinite media hypothesis can be considered valid if the dimensions of the medium are large compared to the diffusion length. This condition is satisfied for the simulation of in vivo experiments at depth > 50μm. For experiments in vitro, this condition is in general valid for the transversal dimension (x,y) but not for the axial direction. Briefly, considering that the experiments are carried out using water immersion objective and the fact that the thermal properties of water are sufficiently close to those of biological tissue, we can neglect the thermal interface above the sample and consider the condition for an infinite medium verified in this direction. On the contrary, we must consider the thermal interface between the sample and the glass coverslip by introducing boundary conditions to equation (1) accounting for continuity of temperature and heat flux at this interface. Due to the mismatch in the properties between glass and tissue, the boundary conditions lead to a modified Green's function 𝐺 * (𝑟 ⃗, 𝑡) which can be calculated numerically. After convolution of 𝐺 * (𝑟 ⃗, 𝑡) and 𝑞(𝑟 ⃗, 𝑡) we found that the infinite medium hypothesis leads to an overestimation of the temperature rise of the order of 15% for a holographic spot of 10 µm diameter focussed 5 µm above the sample/glass interface.

For prolonged (seconds to minutes) scanning illumination, the boundary conditions start to play a key role giving rise to a maximum of the temperature rise at a plane different from the objective focal plane [START_REF] Podgorski | Brain heating induced by near infrared lasers during multi-photon microscopy[END_REF], therefore under these conditions the infinite medium approximation is not valid.

Thermal measurement

Our goal is to validate our model by measuring the spatiotemporal temperature distribution at the cellular scale within a 3D isotropic medium that mimics the thermal properties of biological tissue. To do so we used Er-Yb co-doped glass particles (50% GeO2 -40% PbO -10% PbF2 -1% ErF3 -1% YbF3) which acts as a temperature probe due to its temperature-dependent luminescence, thanks to the optic properties of doped PbF2 crystallite [START_REF] Aigouy | Scanning thermal imaging of microelectronic circuits with a fluorescent nanoprobe[END_REF][START_REF] Dantelle | Nucleation efficiency of erbium and ytterbium fluorides in transparent oxyfluoride glass-ceramics[END_REF][START_REF] Mortier | Structural characterisation of transparent oxyfluoride glass-ceramics[END_REF][START_REF] Saïdi | Scanning thermal imaging by near-field fluorescence spectroscopy[END_REF].

After excitation by up-conversion with an infrared (980 nm) laser illumination, the ratio between the integrated intensity of two fluorescence lines around 525 and 550 nm varies with temperature [START_REF] Aigouy | Scanning thermal imaging of microelectronic circuits with a fluorescent nanoprobe[END_REF][START_REF] Saïdi | Scanning thermal imaging by near-field fluorescence spectroscopy[END_REF], as shown in Figure S1B. This technique, which relies on an optical intensity ratio, provides a robust and absolute temperature measurement insensitive to optical excitation fluctuations.

This probe is inserted in the middle of a water/agar gel (mass fraction of agar: 0.005), at distances larger than the thermal diffusion length from the nearest interfaces and can therefore be considered embedded in a 3D isotropic measurement medium. The whole sample is surrounded laterally by two layers of silicone isolator (0.5 mm thick each, Invitrogen P24743) and sandwiched between two coverslips (No. 1, 140 µm thickness). Owing to the very low agar contents, the optical and thermal properties of this phantom are very close to those of water (and to the thermal properties of tissue). The small dimension of the thermal probe (much smaller and less thermally invasive than a conventional metal thermocouple) offers the possibility of measuring temperature at the cellular scale, which is compatible with the cellular spatial scale measurement we aim for. The detection scheme used to measure the fluorescence ratio has a sampling rate limited to 250 Hz and therefore we used illumination pulses longer than those used for the simulations (50 or 500 ms vs 3 ms) in order to have enough data points to fit the model function.

In order to obtain sufficient temperature sensitivity and a short (4ms) integration times, we used Er-Yb particles of roughly 10µm in diameter, therefore we could only measure the temperature rise averaged on a size comparable to the cell soma. Moreover, in order to avoid that the (unknown) absorption of the particle hampered the reliability of temperature measurement we placed the crystal at ~30 µm from the location of the illumination spot. In these conditions the temporal evolutions for scanning and holography will look almost the same, and therefore we only performed the measurement under holographic light illumination. The measurements were performed on a system built around a commercial upright microscope (Zeiss, Axio Examiner Z1) coupled with two-pulsed infrared excitation path. The heat-inducing holographic excitation uses an amplified fiber laser (GOJI, Amplitude Systemes, λ = 1030 nm, operated at a repetition rate of 10 MHZ and laser pulse width of ~250 fs). The laser beam is triggered by an acousto-optic modulator (MQ40-A2, AA Optoelectronic) and expanded to illuminate the screen of Spatial light modulator (LCOS-SLM X10468-07 Hamamatsu Photonics). The SLM plane was then projected by two telescopes (equivalent magnification of 0.5) on the back aperture of a 20x-1.0 NA water immersion Zeiss objective. To maximize output power, the back aperture was underfilled, resulting in the generation of a holographic beam of ~0.5 effective NA. The SLM was addressed with phase profile calculated via Gerchberg-Saxton based algorithm, in order to generate a 15 µm diameter holographic circular spot over different positions of the sample. The zero and higher diffraction orders (>1) were blocked before entering the microscope. The position dependent diffraction efficiency of the SLM [START_REF] Hernandez | Three-dimensional spatiotemporal focusing of holographic patterns[END_REF] were compensated by adjusting for each lateral displacement (Figure 1A) of the spot the total laser power.

A second femtosecond laser source (Ti:Sapphire oscillator, laser pulse width ~100 fs, repetition rate 80 MHz, tuned at 980 nm, Mai Tai DeepSee, Spectra-Physics) was used to excite the Er/Yb glass probe. The laser beam, modulated by a Pockel cells (350-80, Conoptics), entered a commercial 2P scanning head (VIVO 2-PHOTON, 3i-Intelligent Imaging Innovations), and was focused on the Er/Yb probe by adjusting the position of two galvanometric mirrors. The paths of the two infrared beams were coupled through a polarizer beam splitter. The position of the glass probe was identified through DIC imaging on a CMOS camera (Thorlabs DCC 1545M) and its fluorescence was collected by the confocal entrance of a fiber spectrometer (Avantes, ULS2048L-EVO).

Thermal measurement -Calibration of the probe

In Er/Yb codoped glasses, the 2 H11∕2 and 4 S3∕ 2 levels of Erbium are in thermal equilibrium, and their population, and thus the fluorescence ratio, are ruled by a Boltzmann law of the form:

3) Illumination conditions from the literature

The model presented in [START_REF] Picot | Temperature Rise under Two-Photon Optogenetic Brain Stimulation[END_REF]) also enables to compute the temperature rise for other illumination conditions than those considered in the paper. On the following we show few examples where the model has been applied to exemplary multi spot experiments taken from the literature.

a) Simultaneous spiral scanning of 10 neurons in vivo

In this work [START_REF] Packer | Simultaneous alloptical manipulation and recording of neural circuit activity with cellular resolution in vivo[END_REF], Adam M Packer et al. realized one of the first multi-spiral photoactivation experiments in vivo, where they stimulated 10 cells at the same time. To do so, they scanned in a spiral pattern the neurons during 11 or 16 ms with a 10 mW per target, 1064 nm laser source and a 0.8 NA objective. The spiral radius was 10 µm at maximum and included 3 revolutions. We assumed that the laser was moving from the edge to the center of the pattern, as in [START_REF] Rickgauer | Two-photon excitation of channelrhodopsin-2 at saturation[END_REF]. To compute the light propagation and heat diffusion of this experiment, we used the same thermal parameters that can be found in Ref [START_REF] Picot | Temperature Rise under Two-Photon Optogenetic Brain Stimulation[END_REF] and took an absorption coefficient of 0.055 mm -1 [START_REF] Yaroslavsky | Optical properties of selected native and coagulated human brain tissues in vitro in the visible and near infrared spectral range[END_REF]. If we follow the evolution of heating in time, in Figure 16, after 1 ms of illumination we can still observe 10 localized hot spots, at the position of the laser source. This after few milliseconds becomes a larger homogeneously heated area.

Figure 17 : Maximum (blue), 10 cells mean (red) and geometrical center temperature rise (black) in the conditions of [START_REF] Packer | Simultaneous alloptical manipulation and recording of neural circuit activity with cellular resolution in vivo[END_REF]. The horizontal red bar shows photostimulation duration.

As shown in Figure 17, for most of the target the temperature increase, exceed the 2K, with a mean temperature increase over the 10 cells of 1.4 K at the end of the photostimulation protocol and a temperature increase of 1.6 K at the center of the FOV on Figure 17.

Although we have seen that spiral scanning enable efficient heat dissipation, these elevated temperature here are reached because, the mean inter-distance between cells (~30 µm) was much shorter than the thermal diffusion length (which for 16 ms is ~115 µm) thus generating an extra heat accumulation.

b) Discrete raster scanning of one cell

On the same paper the authors presented a complementary approach where, as depicted in Figure 18, the laser source was moved in a raster scanning fashion, with a discrete approach.

On each site, stimulation was 0.1 ms long, and interval time was also 0.1 ms, which for 100 targets gave a global scanning time of 20 ms. Optical system and laser sources remained the same as for the 10 spirally scanned neurons. The only difference was in the total power used for the photostimulation, 100 mW. On Figure 19, we can observe through the thermal variations the temperature oscillations due to the 10 lines of the scanning pattern (FOV center temperature increase (black), mean over the scanned area (red), last line half distance point (blue)) and also the 100 oscillations due to the multiple spot positions. In these conditions, heat did not accumulate globally over the whole scanned area; we observe a 2.5 ratio between the scanned area peak (~1.7 K) and the maximum temperature increase (~4.3 K). Whereas 10 mW was previously addressed for each cell, here 100 mW is necessary for this single cell.

c) Simultaneous spiral scanning of 84 neurons in vivo at different depths

In the work of Weijan Yang et al. published in 2018, a multi-spiral scanning approach has been developed to photoactivate neurons simultaneously at different depths in a mice brain.

Using a 1040 nm laser source with a low repetition rate (200 kHz -1 MHz), the photostimulation laser beam was split into multiple foci and spirally scanned. Several variations of the spiral approach were used in this work. In the authors' so-called "normal conditions", the photostimulation duration was 100 ms, composed of sequenced spiral cycles, each lasting less than 20 ms. 8 to 50 revolutions were used to scan a 2-5 mW spot, starting on In Figure 21, top panel, selected cells for photoactivation are marked with a black contour among the population studied with calcium imaging. Most of the cells are in the center of the FOV. At t = 0.02 ms, the laser source had just started the first revolution and heat did not yet have the time to diffuse over a large volume. We can clearly distinguish the positions of the spots. On average, the distance between cells for each depth of focus was 80, 121, 96 and 84 µm respectively for z = 150, 200, 250 and 300 µm. Thermal diffusion length after 20 ms is ~130 µm. Therefore, the lateral and axial distance between neurons was not sufficient to prevent heat accumulation from the dissipation of the neighboring cells, and in few positions the temperature rise was up to 5 times (0.3 K to 1.6 K) higher than the case of an isolated target, Figure 21. With Figure 22, we can analyze more precisely the thermal distribution corresponding to the configuration used by the authors. First, the lowest maximum temperature increase is around 0.3 K, which is comparable to what was demonstrated before in the holographic illumination configuration. This, of course, depicts the temperature rise for cells, which were quite isolated. Secondly, most of the cells undergo a temperature rise of roughly 1.4 K, especially at 250 µm in depth, where a lot of targets were packed into a small area. As a reminder, here we simulated only the first cycle of photostimulation among the several which composed the 100 milliseconds protocol. We can then expect that even higher temperature were reached after repetitive cycles, as they were not separated by an OFF period.

4) Optimization perspective for increased amount of targets

In this last paragraph, I will show how generating sequential light patterns can also be used as a strategy to minimize local heating, although this has a cost in temporal resolution

We took the same target distribution and illumination condition as used in Supplementary from [START_REF] Picot | Temperature Rise under Two-Photon Optogenetic Brain Stimulation[END_REF], with a 3 ms delay between each cluster activation, as in Protocol 1. Red horizontal bars represent the photostimulation duration for each cluster.

As shown in Figure 24 the simulations predict a 0.7 K mean temperature increase for the last cluster (blue), and a smaller one for the others (0.4 (black); 0.52 (red) and 0.6 K (pink)). Thus,

showing that introducing a 3 ms off interval between two sequential stimulations, enable to decrease the temperature rise for 75 of the spots. As expected, we found the 0.7 K mean temperature increase for the last cluster as in the previous simulation, as the same amount of energy was transferred in the volume at this moment.

Interestingly, the mean temperature increase of the first cluster, in black in Figure 24 reaches its maximum at the end of the whole simulation and not at the end of the illumination of this group of spots. This shows the importance of the contribution from surrounding cells for repetitive light stimulation. Of course, this effect can be further decreased by increasing the time interval among sequential stimulation and shown in Figure 26 using the Protocol n°2. First, the mean temperature rise of each cluster at the end of the illumination, as visible in Figure 26, is roughly the same as for protocol n°1. Peak temperature rise for the first cluster is roughly 0.4 K in both cases and is ~0.7 K for the fourth cluster, too. What the protocol n°2 actually provides is the ability to keep the temperature increase in the clusters at reasonable levels after the end of their own photostimulation. As a result, even though it is the same amount of energy that was deposited in the same volume, it is not the same amount of heat that is accumulated in the volume at the end of the photostimulation protocol.

5) Conclusion

During this thesis, we have developed methods enabling to measure and predict the temperature changes induced by two-photon illumination with micrometer precision and millisecond temporal resolution, under the typical condition used for in vitro and in vivo 2P optogenetics stimulation. We have shown that our model can be applied to predict temperature rise both under parallel and spiral scanning optogenetic illuminations. Our model is extendable to other brain regions differing in scattering properties and offers a unique and flexible tool for the design of complex optogenetics experiments with minimal sample heating. It will surely prove useful also to simulate the temperature distribution under different excitation configurations (including single-and three-photon excitation) and illumination geometries (e. g. light sheet microscopy, stimulated emission depletion microscopy or Bessel beam illumination) or to optimize light distribution and illumination conditions for thermogenetics experiments [START_REF] Bernstein | Optogenetics and thermogenetics: Technologies for controlling the activity of targeted cells within intact neural circuits[END_REF][START_REF] Ermakova | Thermogenetic neurostimulation with single-cell resolution[END_REF][START_REF] Hamada | An internal thermal sensor controlling temperature preference in Drosophila[END_REF].

As for temporal resolution, here we developed a model for illumination durations going from tens of microseconds to few milliseconds. For fast scanning speed [START_REF] Yang | Simultaneous two-photon imaging and two-photon optogenetics of cortical circuits in three dimensions[END_REF] or discretized scanning trajectory [START_REF] Packer | Simultaneous alloptical manipulation and recording of neural circuit activity with cellular resolution in vivo[END_REF], few modifications should be made to the software to better integrate the thermal phenomena occurring on such temporal scales (i. e. less than µs). Indeed, this could require considering ultra-fast thermal events, in order to incorporate the delay between photons absorption and heat generation. Yet, this should not change significantly the thermal evaluation of 2P photostimulations techniques, as short illumination times translate into small temperature increase.

In the presented simulations, we used the infinite medium hypothesis because heat did not have the time to reach the boundaries of the sample. This is due both to the depth of the targets position (tens to hundreds of micrometers) and the pulse duration (few milliseconds) used. For longer protocols these effects should be taken into account, which will require to consider the thermal interfaces with surrounding medium (e. g. water, glass).

For simulations using longer stimulation protocol but targets distributed deeper, the infinite media hypothesis still hold but will require very large calculation volumes. This can be reduced by using other approaches such as a-dimensioned simulations where the calculation resolution is reduced during the stimulation time: indeed, if sub-micromillimeter resolution is required for the first few microseconds, in order e.g. to calculate the local hot points coming from speckles inside the spot. For longer exposure time one could use a larger (~ 15 µm) calculation pixel.

IV.

Opsins dynamics and illumination strategies 1) Opsins kinetics diversity for optogenetics experiments

In the last years a large variety of new opsins and mutants have been discovered or engineered [START_REF] Zhang | The microbial opsin family of optogenetic tools[END_REF]. This rapid development has been sparked by the need to adjust the biophysical properties: wavelength sensibility, reporter color, selective trafficking or kinetics parameters for different experimental configuration using optogenetics [START_REF] Gunaydin | Ultrafast optogenetic control[END_REF][START_REF] Klapoetke | Independent optical excitation of distinct neural populations[END_REF][START_REF] Kleinlogel | Ultra light-sensitive and fast neuronal activation with the Ca2+permeable channelrhodopsin CatCh[END_REF][START_REF] Mattis | Principles for applying optogenetic tools derived from direct comparative analysis of microbial opsins[END_REF][START_REF] Prakash | Two-photon optogenetic toolbox for fast inhibition, excitation and bistable modulation[END_REF][START_REF] Shemesh | Temporally precise single-cellresolution optogenetics[END_REF].

Here we will focus on the opsin kinetics and their importance in the optimization of the photostimulation protocol. In general, a prolonged illumination of cells expressing an opsin will produce the typical photocurrent trace shown in Figure 27. After the start of photostimulation, the opsin channels will start to open, inducing a rapidly increasing inward current. This phase is followed by a desensitization phase, where the photocurrent decreases to reach a steady-state level. At the end of photostimulation the current returns to its resting level. These three phases have typical durations for each opsin and they can be characterized by the three characteristic times, τON, τDES and τOFF, defined either as the time constant of a single exponential fit or simply as the total time from 0 to 90 or 100% of the peak. Based on these characteristic times, opsins can be classified as fast (e.g. Chronos), medium (e.g. CoChR), or slow (e.g. ReaChR) opsins, as seen in Table 1. A more precise modeling of the photocurrent traces and opsin kinetics requires describing the opsin photocycle. As the first and most widely used opsins, ChR2 was also the first whose kinetics were modeled. ChR2's photocycle has been studied extensively which led to a description in terms of Markov models (three-or four-state models, and recently six-state) as first suggested in REF [START_REF] Hegemann | Multiple photocycles of channelrhodopsin[END_REF][START_REF] Nikolic | Modeling and engineering aspects of ChannelRhodopsin2 system for neural photostimulation[END_REF]. Figure 28 shows a representation of two of these models. The three-state model (open, close, desensitized) was

shown to be insufficient [START_REF] Bamann | Spectral Characteristics of the Photocycle of Channelrhodopsin-2 and Its Implication for Channel Function[END_REF][START_REF] Hegemann | Multiple photocycles of channelrhodopsin[END_REF][START_REF] Nikolic | Photocycles of channelrhodopsin-2[END_REF][START_REF] Stehfest | Evolution of the channelrhodopsin photocycle model[END_REF][START_REF] Williams | Computational Optogenetics: Empirically-Derived Voltage-and Light-Sensitive Channelrhodopsin-2 Model[END_REF] as although it enabled a relative good modeling of the ChR2 photocurrent traces, it failed in the description of the observed bi-exponential decay. This lead to the proposition of four-state (two open and two closed) models and also more complex models (six-state, especially designed to finely tune the description of the latency in AP generation) although they inevitably add complexity to the numerical implementation [START_REF] Evans | PyRhO: A Multiscale Optogenetics Simulation Platform[END_REF][START_REF] Grossman | The spatial pattern of light determines the kinetics and modulates backpropagation of optogenetic action potentials[END_REF]. In this work we will limit ourselves to the study to three-and four-state models. The transition rate constants are described later in the manuscript. Adapted from [START_REF] Nikolic | Photocycles of channelrhodopsin-2[END_REF].

Four-and six-state Markov models have been successfully adapted to various studies of 1P illumination strategies (somatic, dendritic, axonal or whole cell) of ChR2 [START_REF] Grossman | The spatial pattern of light determines the kinetics and modulates backpropagation of optogenetic action potentials[END_REF]. Further, they have been used in order to question the spiking output of cells from different cell types and tissues, such as cortical later V pyramidal cell [START_REF] Grossman | The spatial pattern of light determines the kinetics and modulates backpropagation of optogenetic action potentials[END_REF], in cardiac myocytes (human ventricular, atrial and myocytes) or Purkinje cells [START_REF] Williams | Computational Optogenetics: Empirically-Derived Voltage-and Light-Sensitive Channelrhodopsin-2 Model[END_REF]. This has led to the development of an open source computational tool PyRhO [START_REF] Evans | PyRhO: A Multiscale Optogenetics Simulation Platform[END_REF] which can be interfaced with other computational neurosciences software such as NEURON, or Brian2.

In this chapter, we will use Markov models (a three-state model slightly different from the one shown in figure 28 and the four-state model) to describe the kinetics of three opsins (fast:

Chronos, medium: CoChR and slow: ReaChR) We will determine the transitions probabilities by fitting these models to experimentally recorded current traces from short and long photostimulations. Finally, we will include these kinectic parameters in a broader model of induced current during scanning photostimulation.

2) Experimental procedures

Photocurrent traces for the modeling were collected using three different opsins (experiments performed by Emiliani lab members: Dimitrii Tanese, Emiliano Ronzitti, Marta Gajowa, Florence Bui, Valeria Zampini, Imane Bentifalla)

Three opsins have been studied in this project.

1. Chronos, an opsin found in Stigeoclonium helveticum algae that possesses some of the fastest kinetics [START_REF] Klapoetke | Independent optical excitation of distinct neural populations[END_REF]. Along with these characteristics, it holds remarkable recovery properties, and allowed to reach up to 100 Hz trains of APs [START_REF] Ronzitti | Sub-millisecond optogenetic control of neuronal firing with two-photon holographic photoactivation of Chronos[END_REF]) under 2P excitation.

2. CoChR, that was found in Chloromonas oogama algae, is very close to ChR2 in term of kinetics and absorption spectrum, and allows to reach high photocurrents, up to 3.5 nA in cultured neurons [START_REF] Klapoetke | Independent optical excitation of distinct neural populations[END_REF]. Furthermore, recently a somatic version of this opsin has been designed that allowed to improve spatial resolution in the photactivation by confining the expression of the opsin on the cell soma and proximal dendrites. [START_REF] Shemesh | Temporally precise single-cellresolution optogenetics[END_REF].

3. ReaChR (Red-activable ChannelRhodopsin) is an opsin that has been designed for better membrane trafficking and expression level. 1-photon and 2-photon experiments confirmed its interesting properties, showing high photocurrents, generation of AP with low light intensities, and besides its lower kinetics, photogeneration of APs train up to a rate of 30 Hz [START_REF] Chaigneau | Two-Photon Holographic Stimulation of ReaChR[END_REF][START_REF] Lin | ReaChR: a redshifted variant of channelrhodopsin enables deep transcranial optogenetic excitation[END_REF]. CHO cells, with respect to other systems, such as neurons, present the advantage to be isolated and do not express any other channels than the optogenetic ones, and therefore they are ideal to a fine investigation of photocurrent dynamic. The thawed portions of the cell cultures were kept in an incubator at 37 °C and 5% CO2 in a D-MEM/F12 GlutaMAX medium (Life Technologies) with the addition of 1 mM glutamine, 1% streptomycin and 10% fetal bovine serum. Bi-weekly passages allowed to keep the culture in good health for multiple transfections, up to 24 passages. Cells were seeded on plastic coverslips (Thermanox, Thermo Scientific) in 24-well plate, 24 hours before transfection (50 000 -100 000 cells/well). Plated cells were then transfected with DNA using either Ex-Gen 500 Mai-Tai, Spectra Physics) with a tunable emission wavelength (from 700 to 1030 nm, used at 950 nm) and output power around 2W (at 900 nm). The patterned illumination was focused on the sample by a 40x objective (40x NA 0.8, LUM PLANFI/IR, Olympus) and the control of intensity and length of the photostimulation pulses was obtained by the use of a Pockel cell, allowing the generation of very short photostimulations pulses (< 1 ms).

Whole-cell electrophysiology in vitro.

Positive cells in the CHO culture preparations were identified with the help of a fluorescent lamp, and then patched under IR illumination. After establishing a stable wholecell patch configuration in voltage clamp mode, the access resistance and cell capacitance were measured and compensated. Cell parameters were monitored during the entire recording, and cells whose access resistance increased by more than 20% were excluded from analysis. Three different types of photostimulation were used for this study:

• long lasting (up to 4s) photostimulation with increasing intensity of laser pulse,

• pulse trains with increasing frequency (10-100 Hz),

• long lasting stimulation repeated while changing the interval between stimulations (from short -1 s interval up to few minutes to reach a state of full recovery of a channel). For the measurements of the kinetics parameters, the transfected CHO cells were stimulated with a top hat circular illumination spot (see above). The cell chosen based on their morphological expression level was placed in the spot illumination area which covered the entire cell surface. For the kinetic characterization of the two opsins, we adjusted the length of the photo-activation pulse in order to reach for all opsins the steady-state value for the photoevoked current. CoChR-and ReaChR-expressing CHO cells were photo-stimulated during 1 to 4 seconds. Power was varied over typically a dozen of different light power densities going from 0.05 to 0.68 mW/μm², which was the maximum power achievable. Each trial was repeated twice after one to two minutes in order to enable full recovery after desensitization.

3) Photoinduced current kinetics model a) Stochastic system model of the opsin

In a conductance-based model of the initiation of action potential (such as the Hodgkin-Huxley model) the current across the membrane is expressed as the sum of the current through the lipid bilayer:

𝐼 𝑐 = 𝐶 𝑚 𝑑𝑉 𝑚 𝑑𝑡 Eq. 8
and the current through ion channels:

𝐼 𝑖 = 𝑔 𝑖 (𝑉 𝑚 -𝑉 𝑖 ) Eq. 9

where 𝑔 𝑖 is the conductance of the i-th ion channel, 𝑉 𝑖 its reversal potential, 𝐶 𝑚 and 𝑉 𝑚 are the membrane conductance and potential.

The simplest model of an opsin as a light-gated channel would be to consider that its conductivity is either 0 (when in a nonconducting, closed or desensitized, state) or 𝑔 𝑜 (when in the conducting, or opened, state). The membrane conductance due to opsins will be:

𝑔 = 𝑔 𝑜 𝑁 𝑜 = 𝑔 𝑜 𝑁 𝑜 𝑂 Eq. 10
where 𝑁 𝑜 is the number of opsins in the opened state which can expressed as the total number 𝑁 of opsins in the membrane multiplied by the fraction 𝑂 (0 ≤ 𝑂 ≤ 1) of them which are in the open state. This fraction depends on various biophysical parameters such as temperature, pH, etc. and more importantly for us it is a function of absorbed photons.

The opsin is modeled as a randomly changing system, evolving from one state to another (opened, closed or desensistized), with the future state depending only on the currently occupied state and not on the events that occurred before (in other words, the system obeying the Markov property). Transistion from state i to to state j is caracterized by a probability (per The photon dependent transition can be written as:

𝐺 𝐶𝑂 (𝜑) = 𝑘 𝐶𝑂 𝜑 𝑝 Eq.

where p = 1 or 2 for respectively linear or 2P absorption.

b) Four-state model

In the four-state model the system (opsin) evolves through four different states, two of them being conducting (O1 and O2) with different conductivity and the other two (C1, C2) being non-conducting. Four of the transitions are light dependent transitions (green arrows in Figure 32): from each closed to the corresponding opened state as well as between both opened states. The rate equations are:

𝑑𝑂 1 𝑑𝑡 = 𝐺 𝐶 1 𝑂 1 (𝜑)𝐶 1 + 𝐺 𝑂 2 𝑂 1 (𝜑)𝑂 2 -𝐺 𝑂 1 𝐶 1 𝑂 1 -𝐺 𝑂 1 𝑂 2 (𝜑)𝑂 1 Eq. 16 𝑑𝑂 2 𝑑𝑡 = 𝐺 𝐶 2 𝑂 2 (𝜑)𝐶 2 + 𝐺 𝑂 1 𝑂 2 (𝜑)𝑂 1 -𝐺 𝑂 2 𝐶 2 𝑂 2 -𝐺 𝑂 2 𝑂 1 (𝜑)𝑂 2
Eq. 17 reproduces that of measured current traces, Figure 33:

𝑑𝐶 1 𝑑𝑡 = 𝐺 𝑂 1 𝐶 1 𝑂 1 + 𝐺 𝐶 2 𝐶 1 𝐶 2 -𝐺 𝐶 1 𝑂 1 (𝜑)

c) Extraction of the fitting parameters

The coupled differential rate equations (Eq.11-13 for three-state and Eq.16-19 for four-state models) are not solvable in an analytical form (except for cases which are detailed in Appendix) but are easily solved numerically using classic Runge-Kutta type algorithms [START_REF] Butcher | Runge-Kutta methods: some historical notes[END_REF]. To find the corresponding fitting parameters we have used two optimization algorithms: Levenberg-Marquardt (arguably the most widely used minimization/curve fitting algorithm) and Powell. Levenberg-Marquardt is robust but, like many other algorithms, only finds a local minimum which can be far from the true minimum.

Since it is a gradient based method its efficiency is hindered for not well-behaved (nonsmooth) functions. Powell's method on the other hand does not make any requirement on the derivability of the function (and no derivation is performed by the algorithm). Through trial and error, we found Powell's method more efficient for extracting the parameters of our threeand four-state models. Both algorithms are readily available in mathematical software packages such as MATLAB or Numerical python (NumPy / SciPy).

4) Three-state model results

In order to obtain the transition probabilities for the three-state model, we recorded the induced current from either long photostimulations (one to a few seconds) or trains of photostimulations (pulse duration 2 to 5 ms and repetition rate ranging from 20 to 100 Hz) as summarized in Table 2. that a three-state model would be sufficient for ReaChR. However, using the 4-state model still gives more flexibility in the fitting procedure and enable finding an improved agreement with the experimental data.

As stated above, one of the advantages of a four-state model is the possibility to account for bi-exponential decay:

𝐼 ∝ 𝐴 1 e -𝑡/𝜏 1 + 𝐴 2 𝑒 -𝑡//𝜏 2 Eq. 27

As detailed in the appendix, the two characteristic times 𝜏 1 and 𝜏 2 can be calculated from the fitting parameters. The results shown in Table 7 reveal an excellent agreement with those obtained with a simple bi exponential fit of the decay of the current after the end of the photostimulation (keeping in mind that for ReaChR, as we found that the conductivity of the second open channel is negligible compared to that of the first, the characteristic time 𝜏 2 associated with it is irrelevant). Further, we used the parameters of Table 6 to simulate the photocurrent traces under different experimental conditions (pulse durations and power densities, see Table 8) and compare the results with the experimental curves, few exemplary fits are shown in Figure 39. In conclusion, we have shown that both the three-state and four-state models can account for the kinetics of induced photocurrent with good accuracy with the four-state model offering more flexibility to fit experimental data (due to more transitions and their saturable dependence on photon flux) at the expense of a slightly more complex equations system, which however remains easily solvable numerically. Further work should be carried on to evaluate more precisely the advantages and inconveniences of both models, and also the confidence intervals of the extracted parameters.

6) Simulation of the photoinduced current for different illumination strategies a) Description of the program

As a next step, we used the parameters extracted with the four-state model as described in the previous paragraph to predict the temporal evolution of the photocurrent under parallel and scanning illumination. The case of parallel illumination is rather simple: in Eq 10 the number

of opsins in open state 𝑂 and the induced current 𝐼 are now expressed per unit of surface and the total induced current is then the integral (sum) over the illuminated surface of the cell. In the simplest case of uniform illumination and uniform distribution of opsins on the membrane surface the integration is reduced to a multiplication by the cell surface and the shape of the photocurrent current (as seen in Figure 39) and remains unchanged.

In the case of scanning illumination, we consider the motion (either raster or spiral scanning) of the focused beam as a "step like" motion similarly to what we did for thermal modeling.

For each time step of the motion, we calculate the locally induced photocurrent at the specific location of the focused beam. The total current is the sum of these time shifted locally induced photocurrents. In both cases, we considered the cell membrane as a flat disk. The two processes are shown schematically in Figure 40. declare the homogenous presence of opsins in each pixel of the 2D grid in which the cell is defined. [START_REF] Boyden | Millisecondtimescale, genetically targeted optical control of neural activity[END_REF] We declare what will be the light source and set the illumination pattern and characteristics. For the scanning approach, the laser power is first deposited in a single pixel, following time steps after time steps the pattern which has been defined before (raster or spiral scanning, how many revolutions, direction of movement, …). Then, a standard Gaussian filter is applied to approximate the light distribution of a diffraction limited spot. ( 4) Once we have a 3D map of photostimulation protocol (2D for XY and 1D

for time), we solve the n-state equations with the transition parameters obtained beforehand. ( 5) We integrate the current that has been generated in each pixel of the simulation, which will give the predicted whole intracellular current.

b) Preliminary tests of the scanning simulation with the fourstate model

We used the model with two sets of spiral scanning data, summarized in The exact amount optical power reaching the cell after propagation through a scattering medium remains an approximation, and this could explain the overestimation observed for illumination power less than 2.5 mW. Furthermore, the fact that the membrane surface is not flat and therefore that the scanned beam does not remain focused as it is scanned can also account for discrepancies in the peak current. However, we can conclude the four-state models correctly predicts the shape of the photocurrent in the scanning illumination strategy.

𝑑𝑂 Abstract: Over the past fifteen years, optogenetics has revolutionized neuroscience research by enabling control of neuronal circuits. The recent development of several illumination approaches, combined with new photosensitive proteins, opsins, have paved the way to neuronal control with the single-cell precision. The new ambition to use these approaches in order to activate tens, hundreds, thousands of cells in vivo has raised many questions, in particular concerning the possible photoinduced damages and the optimization of the choice of the illumination / opsin couple.

During my PhD, I developed an experimentally verified simulation that calculates, under all actual illumination protocols, what will be the temperature rise in the brain tissue due to the absorption of light. In parallel, I modeled, from electrophysiology recordings, the intracellular currents observed during these photostimulations, for three different opsins, allowing me to simulate them. These models will allow the researchers to optimize their illumination protocols to keep heating as low as possible in the sample, while helping to generate optimized photocurrent dynamics according to experimental requirements.

3 ) 3 )

 33 photonique, et appliqués à différentes opsines aux propriétés cinétiques différentes. Nous avons donc entrepris de mettre en oeuvre tout d'abord un modèle cinétique à trois états, puis à quatre états, à partir de données expérimentales d'électrophysiologie enregistrées au sein du laboratoire pour quatre opsines, Chronos, Chrimson, CoChR et ReaChR. Pour ce faire, nous avons travaillé avec des cellules chinoises d'ovaires de hamsters (cellules CHO) au sein desquelles nous avons induit l'expression des protéines d'intérêt. Nous les avons ensuite photostimulées durant plusieurs secondes, dans une grande gamme de puissance d'illumination, afin d'obtenir un échantillon représentatif de la dynamique complète d'ouverture et fermeture de ces canaux. Nous avons ensuite commencé par la mise en oeuvre du modèle à trois états (ouvertdésensibiliséfermé) en obtenant les paramètres de transition qui minimisent la différence entre le résultat du modèle et les données expérimentales. Pour ce faire, nous avons utilisé des algorithmes classiques d'ajustement de courbe (minimisation). Une fois ces paramètres obtenus, nous avons comparé le résultat du modèle et d'autres données expérimentales, dont le temps de photoactivation était plus faible (de l'ordre de la milliseconde). Ces travaux nous ont permis de vérifier l'efficacité du modèle à trois états pour un développement rapide, ainsi que sa capacité à prédire la dynamique de courants intracellulaire. Néanmoins, nous avons observé les limites de ce modèle à trois états, et notamment son incapacité à modéliser les transitions bi-(ou multi-) exponentielles constatées expérimentalement. Nous avons entreprise à la suite de mettre en oeuvre un modèle à quatre états, basée sur de nouvelles données expérimentales, qui se montrera plus robuste

Figure 1 :

 1 Figure 1: Representation of the nervous system in the cerebellum by S. R. y Cajal; from "Estructura de los centros nerviosos de las aves", Madrid, 1905.

Figure 2 :

 2 Figure 2: Structure of a neuron. Dendrites are small structures which receive contributions from neighboring neurons. Image: Alan Woodruff; De Roo et al., 2008.

Figure 3 :

 3 Figure 3: Schematic of the patch clamp technique. Leica Microsystems.

Figure 4 :

 4 Figure 4: Activity diagram of Channelrhodopsin-2.[START_REF] Tricoire | Principes et applications de l ' optogénétique en neuroscience[END_REF]. Channelrhodopsin-2, a transmembrane protein, is a ion channel that opens when illuminated. Its expression inside neurons allow to induce non-invasively trains of action potentials.

Figure 5 :

 5 Figure 5: Several approaches for photoactivation. With anatomic targeting, groups of neurons are illuminated with an optic fiber after injection of viral vectors in the area of interest. Under genetic targeting, only specific cell types will express the opsins thanks to regulating sequences. Adapted from[START_REF] Tricoire | Principes et applications de l ' optogénétique en neuroscience[END_REF].

Figure 6 :

 6 Figure 6: Localization of fluorescence signal with 1P (a panel) and 2P (b panel) excitation. On the left, fluorescein

Figure 7 :

 7 Figure7: Scanning illumination of one neuron. A raster scanning pattern is showed. Adapted from(Ronzitti et al., 2017a).

Figure 8 :

 8 Figure8: Scanning illumination of several neurons simultaneously. A spiral pattern is here applied, with pre-defined rotation speed, amount of revolutions and size of pattern. Adapted from(Ronzitti et al., 2017a).

Figure 9 :

 9 Figure 9: The iterative algorithm will process a theoretical light distribution image, often based on a fluorescence image.

Figure 10 :

 10 Figure 10: Parallel illumination of several neurons simultaneously. An illumination pattern is here applied, based on the shape of neurons of interest. The cells are photoactivated at the same time, recruiting as many opsins as possible. Adapted from (Ronzitti et al., 2017a).

Figure 11 :

 11 Figure 11: Absorbance of light at various wavelengths for water (solid line), oxygenated (thin dashed line) or deoxygenated hemoglobin (dots) and melanin (bold dashed line). Adapted from[START_REF] Hamblin | Mechanisms of low level light therapy[END_REF].

Figure 12 :

 12 Figure 12: Cascade of events after light absorption in the brain, with near infrared light sources, without energy considerations. Adapted from (Débarre et al., 2014).

Figure 13 :

 13 Figure 13: Linear and nonlinear photodamages in biological tissues depending of the irradiance and exposure time of the light source. Several regimes can be discerned based on a level slopes that correspond to J/cm 2 thresholds. Several regimes

  this paper, we present a theoretical model to describe light propagation and heat diffusion with millisecond precision and micrometer resolution under typical 2P excitation conditions that enable in vivo optogenetics control of neuronal firing. The model combines a random phase mask approach to account for 3D light scattering within tissue and Fourier's heat diffusion equation solved through Green's function formalism to evaluate the corresponding spatial and temporal heat diffusion during and after 2P-photostimulation. We validated the model by comparing simulated and measured laser-induced temperature changes in a water/agar gel using the temperature dependent fluorescence emission of Erbium-Ytterbium (Er/Yb) co-doped glass particles. We then use the model to predict the temporal and spatial heat distribution in scattering media under different illumination conditions including single-and multi-spot holographic illumination and spiral scanning. We analyze the 3D spatial and temporal evolution of temperature rise as a function of the stimulation frequency, laser repetition rate, and illumination duration.The model is extendable to other illumination configurations, brain structures and biological preparations with different scattering properties and is a unique and powerful tool to design the optimal illumination conditions for 2P optogenetics brain circuit control. The model has been implemented in a MATLAB (MathWorks) package for use by other users to predict heat diffusion under their own 2P optogenetics experimental conditions.

  measured temperature rise induced by a holographic spot focalized on a water/agar gel by embedding a micrometric Er/Yb co-doped glass particle in the gel (FigureS1 A-B) and recording the luminescence spectral changes on the particle by the laser-induced heating (see STAR Methods).

Figure S1 ,

 S1 Figure S1, related to STAR Methods. Temperature measurement with luminescence probe in agar gel.

Figure 1 :

 1 Figure 1: Validation of the thermal simulations through experimental luminescence recordings

BFigure S2 ,

 S2 Figure S2, related to STAR Methods. Propagation of a holographic beam through scattering media and effect of the laser repetition rate on the temperature evolution.

Figure 2 :

 2 Figure 2: Simulated temperature rise produced by a holographic spot using the photostimulation conditions necessary to evoke in vivo action potential.

Figure 3 :

 3 Figure 3: Simulated temperature rise produced by multiple holographic spots at the photostimulation conditions necessary to evoke in vivo action potential.

Figure 4 :

 4 Figure 4: Simulated temperature rise and experimental electrophysiological recordings with CGH and scanning illumination techniques.

  mM): 135 potassium gluconate, 10 HEPES, 10 sodium phosphocreatine, 4 KCl, 4 Mg-ATP, 0.3 Na3GTP, 25-50 Alexa Flour 594 for pipette visualization. The craniotomy was covered with the extracellular solution containing the following (in mM): 145 NaCl, 5.4 KCl, 10 HEPES, 1 MgCl2, 1.8 CaCl2. Voltage recordings in the current-clamp mode were acquired by using a MultiClamp 700B amplifier and a Digidata 1550A digitizer, which were controlled by a pCLAMP10 software (Molecular Devices). Electrophysiology data were filtered at 6 kHz and digitized at 20 kHz.

  rapidly removed. Sagittal slices 300 µm thick were obtained (VT1200S Leica Biosystems, Germany) in room temperature or ice-cold solution containing the following (in mM): 93 NMDG, 2.5 KCl, 1.25 NaH2PO4, 30 NAHCO3, 20 Hepes Acid, 25 Glucose, 2 thiourea, 5 Na-Ascorbate, 3 Na-Pyruvate, 0.5 CaCl2 and 10 MgCl2. Afterwards, slices were transferred to a recovery chamber held at 35° for 45 min, in a bath containing the following (in mM): 125 NaCl, 2.5 KCl, 26 NaHCO3, 1.25 NaH2PO4, 1 MgCl2, 1.5 CaCl2, 25 glucose, 0.5 ascorbic acid. All solutions were aerated with 95% O2 and 5% CO2 to a final pH of 7.4. Slices were placed in a recording chamber under the microscope objective and were patched while monitoring IR transmitted light images acquired at approximately video rate. Cells were patched at 40-70 µm depth and clamped at -70 mV in voltage-clamp configuration. Opsin expressing cells were identified via epifluorescence or 2P-scanning imaging. Whole-cell recordingsin-vitro Whole-cell patch clamp recordings were made using Multiclamp 700B amplifier and a Digidata 1440 digitizer and a PC running pClamp (Molecular Devices). Cell type was established based on morphology and AP firing properties. Membrane potential was kept at -70 mV with current injections ranging from -5 to -35 pA in current-clamp configuration.

For a continuous

  illumination pulse, Π(𝑡) can be written as Π(𝑡) = 𝑢(𝑡) -𝑢(𝑡 -𝜏) where 𝑢(𝑡) is Heaviside's function and the convolution over time can be carried out the obtain a new Green's function 𝐾(𝑟, 𝑡) = 𝐺(𝑟, 𝑡) * Π(𝑡) 𝑥) is the complementary error function. 𝐾(𝑟, 𝑡) must then be convoluted over space with Γ(𝑟 ⃗) to obtain the spatiotemporal distribution of temperature: 𝑇(𝑟, 𝑡) = (𝐾(𝑟, 𝑡) * Γ(𝑟 ⃗))𝜇 𝑎 Eq. 10 Modeling -Moving laser spot To model the case of a moving light source (e. g. for spiral or raster scanning illumination) we can take advantage of the linearity of the diffusion equation and of the convolution operator to write the source term as: 𝑞(𝑟 ⃗, 𝑡) = ∑ 𝑞 𝑖 (𝑟 ⃗ -𝑟 𝑖 ⃗ ⃗⃗, 𝑡 -𝑡 𝑖 ) 𝑖 Eq. 11

Figure 15 :

 15 Figure 15: Left panel. The 10 neurons in layer 2/3 of somatosensory cortex expressing C1V1 opsin that have been stimulated. Scale bar is 50 µm. Adapted from Figure 3 of (Packer et al., 2015). Right panel. Representation of the spiral scanning trajectories and direction.

Figure 15 ,

 15 Figure 15, right panel, shows the 10 spirals used to cover the cells, each one centered on a specific target. Some of them (red, green, blue, black, purple and brown), crossed neighboring photostimulated cells, thus causing additional heating.

Figure 16 :

 16 Figure 16: 2D heat map of the 10 spiral scanning laser beams in the conditions of (Packer et al., 2015). Left panel. After 1 ms of illumination. Middle panel. After 8 ms of illumination. Right panel. After 16 ms of illumination.

Figure 18 :

 18 Figure 18: Neuron, in layer 2/3 of barrel cortex expressing C1V1-2A-YFP, patched in cell attached condition. Red dots represent the laser illumination pattern. Scale bar is 10 µm. Adapted from[START_REF] Packer | Simultaneous alloptical manipulation and recording of neural circuit activity with cellular resolution in vivo[END_REF].

Figure 19 :

 19 Figure 19: 2D heat map of the raster scanning experiments in the conditions of (Packer et al., 2015). Left panel. After 0.1 ms of experiment. Middle panel. After 10.1 ms of experiment. Right panel. After 20 ms of experiment.

Figure 20 :

 20 Figure 20: Temperature rise simulated in the conditions of raster scanning adapted from (Packer et al., 2015). In black, temperature rise at the center of the pattern. In red, mean temperature increase when integrating temperature rise over the scanned area. In blue, temperature rise over the 95 th targeted position. Horizontal dashed red bars show photostimulation duration.

  the edge and ending at the center of the target. This protocol we used to activated in vivo 83 neurons simultaneously distributed on four planes, 17 cells at 150 µm, 15 at 200 µm, 26 at 250 µm and 25 at 300 µm. Here, (Figure 21) we simulated the temperature rise during the first cycle of spirals (20 ms, 50 revolutions).

Figure 21 :

 21 Figure 21: 2D Heatmap of the temperature rise in the conditions of[START_REF] Yang | Simultaneous two-photon imaging and two-photon optogenetics of cortical circuits in three dimensions[END_REF]. 2D heat maps for time frames at 0.02 ms, 5 ms and 20 ms are showed for each depth offocus, 150, 200, 250 and 300 µm.

Figure 22 :

 22 Figure 22: Maximum temperature rise for each cell in the conditions of (Yang et al., 2018). Top panel. Background color link Cell ID to right depth of focus in the bottom panel.

Figure 4

 4 Figure 4 of the paper, i. e. 100 targets distributed in a 300x300x300µm volume, with a power density for each cell of 0.1 mW/µm 2 and an illumination time of 3 ms. We randomly split the 100 targets into 4 clusters of 25 targets and tested two illumination strategies, described in Figure 23.

Figure 23 :

 23 Figure23: Illumination protocols for the 100 sequenced illuminations in the conditions of[START_REF] Picot | Temperature Rise under Two-Photon Optogenetic Brain Stimulation[END_REF].

Figure 24 :

 24 Figure 24: Mean temperature rise of clusters of 25 spots illuminated in the conditions of Figure S4, related to Figure 3B

Figure 25 :

 25 Figure 25: 3D heatmap of 100 holographic spots after 3, 6, 9 and 12 ms of illumination, with only 3 ms of illumination for each cluster of 25 spots. Volume of simulation is 300x300x300µm.

Figure 26 :

 26 Figure 26: Mean temperature rise of clusters of 25 spots illuminated in the conditions of Figure 24, with a 3 ms delay between each cluster activation, as in Protocol 1. Red horizontal bars represent the photostimulation duration for each cluster.

Figure 27 :

 27 Figure 27: Voltage clamp recording of a cell expressing ChR2, illuminated for 100 ms with a light source in the blue. τON describes the time between beginning of illumination and peak current. Desensitization describes photocurrent variations from peak to steady-state. τOFF represents the time required for photocurrent to go back to resting level after the end of photostimulation. Courtesy of E. Chaigneau.

Figure 28 :

 28 Figure 28: A Markov model describes a randomly changing system, evolving from one state to another (in the case of opsins: opened, closed or desensistized). Transition from state to another is caracterized by a probability (per unit of time) 𝐺𝑖. Here we show two widely adopted models of ChR2 photocycle. Left panel. Three-state model with C the closed state, O the open or conductive state and D the desensitized state. Right panel. Four-state model, with two closed C1 and C2 and two open states O1 and O2. The transition rate constants are described later in the manuscript. Adapted from[START_REF] Nikolic | Photocycles of channelrhodopsin-2[END_REF].

  photostimulations for three-state model

(

  Photoactivation part was conducted with a 2P photostimulation source consisting in a conventional pulsed Ti:Sapphire laser (pulse width: 100fs, repetition rate: 80MHz, model:

  Several cells for each opsin have been patched and photostimulated -ReaChR (n=13), CoChR (n=22) and Chronos (n=20). Recordings were performed at room temperature (18-22•C) in the dark to avoid any direct stimulation of cells by ambient light. We screened our data set to identify the cells providing similar current amplitudes in response to the same laser power density stimulation between sets of photo-stimulations. Additionally, an interval of at least 1-2 minute between stimulation was kept allowing for opsin recovery. The average access resistance and membrane capacitance values were: 12, 43 ± 3,11 MΩ and 16,91 ± 5 pF. Here are exemplary traces of long photostimulation protocols for the 3 opsins:

Figure 29 :

 29 Figure 29: Sample traces of electrophysiological recordings for the three opsins Chronos, CoChR and ReachR expressed in CHO cells. Pulse duration is indicated with red bars and gradation of colors is used to distinguish traces with various illumination powers.

Figure 30 :

 30 Figure 30: Scheme of the Optical set-up of a two-photon microscope capable of both scanning and holographic illumination. Courtesy of Florence Bui.

  unit of time) 𝐺 𝑖𝑗 which can be function of the absorbed photon flux φ (this is the case for 𝐺 𝐶𝑂 in figure below).

Figure 31 :

 31 Figure 31: Representation of a three-state model (Open, Close and Desensitized) with its transition parameters. Green transition GCO is the only light sensitive one. The Open state is conductive, and the Desensitized state holds the opsin in a non activable form, before it goes back into the Close state and can be photoactivated again.

Figure 32 :

 32 Figure 32: Representation of a four-state model with its transition parameters. The green transitions GCO and GOO are the only light sensitive ones. The Open states are conductive, with different conductivity. The GCO transitions, with red arrows, are the only transitions that can occur only if there is light (as opposed to GOO transitions)

Figure 33 :

 33 Figure 33: Left panels. Typical electrophysiological recordings of CHO cells expressing CoChR during a 2.5 s photostimulation in the conditions detailed in Experimental procedures b), either with a 0.02 mW/µm 2 illumination source (top), or 0.4 mW/µm 2 (bottom). Different power densities to some extent imply different temporal evolutions of the current, for instance reaching or not a clear steady-state. Right panels. Sum of the fraction of opsins in the two open states (𝑂 1 + 𝛾𝑂 2 ) of the four-state model calculated with the coupled differential equations 16-19, for each power density.

  Figures 34-35-36 show a few examples of fitted curves obtained using the three-state model.

Figure 34 :

 34 Figure 34: Experimental data (black) and model computation (red) for the opsin Chronos at various illumination powers, pulse durations and stimulation repetitions rates.

Figure 37 :

 37 Figure 37: Experimental data (black) and model computation (red) for the opsin CoChR at various illumination powers densities with the four-state model. Saturation is reached with power densities equal or above 0.3 mW/µm 2 .

Figure 39 :

 39 Figure 39: Experimental traces (black) and four-state model prediction (red) for CHO cells expressing ReaChR photostimulated during 2 to 50 ms, with power densities ranging from 0.05 to 0.2 mW/µm2. Results from several cells are displayed in colored boxes. The same transition parameters were used to solve the coupled differential equations for each cell, and each pulse duration/power density couple. Red bars illustrate pulse duration.

Figure 40 :

 40 Figure 40: Schema representing the sequential steps within the MATLAB opsin model package. (1)We first define the necessary constants and the field of view in which we will find the cell area, assumed to be a disk for simplification. (2) We

Figure 41 :

 41 Figure 41: Experimental traces (black) and spiral scanning four-state model prediction (red) for CHO cells expressing ReachR photostimulated during 50 ms, with power ranging from 2.5 to 6.5 mW. The same transition parameters were used to solve the coupled differential equations for each protocol. Red bars illustrate pulse duration.

Figure 42 :

 42 Figure 42: Experimental traces (black) and spiral scanning four-state model prediction (red) for CHO cells expressing ReachR photostimulated during 50 ms, with power ranging from 0.4 to 8.9 mW. The same transition parameters were used to solve the coupled differential equations for each protocol. Red bars illustrate pulse duration.

2P optogenetics :

 optogenetics Simulation and modeling for optimized thermal dissipation and current integration

Table 1 :

 1 ON and OFF kinetics of several opsins under 2P illumination protocols.

  An important difference with the previously described three-state model is that the total conductivity is now expressed as the sum of the conductivity for opsins in state O1 having a conductivity gO1 and those in state O2, having conductivity gO2: indicate that the induced current is directly proportional to O or 𝑂 1 + 𝛾𝑂 2 , the fraction of opsins in either the single open state, or the sum of the opsins in both open states. Numerically solving the coupled differential equations 16-19 for different values of the photon flux φ (different values of Gco) we find that the temporal evolution of 𝑂 1 + 𝛾𝑂 2

			𝑔 = 𝑁(𝑂 1 𝑔 𝑂1 + 𝑂 2 𝑔 𝑂2 )	Eq. 21
	or, introducing the ratio of the two conductivities:
	𝛾 =	𝑔 𝑂2 𝑔 𝑂1	→ 𝑔 = 𝑁𝑔 𝑂1 (𝑂 1 + 𝛾𝑂 2 )	Eq. 22
	Another important difference with the previous model is that the light dependent transitions
	are considered to be saturable, reaching a maximum value when the incident light flux
	(photon flux) exceeds a certain value: 𝜑 > 𝜑 𝑚 . The corresponding transition parameters are
	written as:
	𝐺 𝐶 1 𝑂 1 (𝜑) = 𝑘 𝐶 1 𝑂 1	𝜑 𝑝 𝜑 𝑝 + 𝜑 𝑚 𝑝	Eq. 23
	𝐺 𝐶 2 𝑂 2 (𝜑) = 𝑘 𝐶 2 𝑂 2	𝜑 𝑝 𝜑 𝑝 + 𝜑 𝑚 𝑝	Eq. 24
	𝐺 𝑂 1 𝑂 2 (𝜑) = 𝑘 𝑂 1 𝑂 2	𝜑 𝑞 𝜑 𝑞 + 𝜑 𝑚 𝑞 + 𝐺 𝑂 1 𝑂 2 0	Eq. 25
	𝐺 𝑂 2 𝑂 1 (𝜑) = 𝑘 𝑂 2 𝑂 1	𝜑 𝑝 𝜑 𝑞 + 𝜑 𝑚 𝑞 + 𝐺 𝑂 2 𝑂 1 0	Eq. 26
					𝐶 1	Eq. 18
	Equations 9 and 10
	𝑑𝐶 2 𝑑𝑡	= 𝐺 𝑂 2 𝐶 2 𝑂 2 -𝐺 𝐶 2 𝐶 1 𝐶 2 -𝐺 𝐶 2 𝑂 2 (𝜑)𝐶 2	Eq. 19
	and the continuity equation:
			𝑂 1 + 𝑂 2 + 𝐶 1 + 𝐶 2 = 1	Eq. 20

Table 2 :

 2

Illumination protocols of data used for the transition parameters obtention. Only a selection of data available was used for the model, as detailed in the Experimental procedures chapter.

Table 7 :

 7 Comparison of the two time constants 𝜏 1 and 𝜏 2 for the two opsins CoChR and ReaChR, either obtained from bi exponential decay fits of data displayed in Figures 37-38 or calculations.

Table 8 :

 8 Illumination protocols of ReaChR data used for four-state model testing.

Table 9 :

 9 Illumination protocols of scanning experimental data used for testing the illumination simulation.

Optimisation thermique et électrophysiologique par simulation et modélisation Résumé:

  1 𝑑𝑡= 𝐺 𝐶 1 𝑂 1 (𝜑)𝐶 1 + 𝐺 𝑂 2 𝑂 1 (𝜑)𝑂 2 -𝐺 𝑂 1 𝐶 1 𝑂 1 -𝐺 𝑂 1 𝑂 2 (𝜑)𝑂 1 Eq. 16𝑑𝑂 2 𝑑𝑡 = 𝐺 𝐶 2 𝑂 2 (𝜑)𝐶 2 + 𝐺 𝑂 1 𝑂 2 (𝜑)𝑂 1 -𝐺 𝑂 2 𝐶 2 𝑂 2 -𝐺 𝑂 2 𝑂 1 (𝜑)𝑂 2 Eq. 17𝑑𝐶 1 𝑑𝑡 = 𝐺 𝑂 1 𝐶 1 𝑂 1 + 𝐺 𝐶 2 𝐶 1 𝐶 2 -𝐺 𝐶 1 𝑂 1 (𝜑)𝐶 1 Eq. 18 𝑑𝐶 2 𝑑𝑡 = 𝐺 𝑂 2 𝐶 2 𝑂 2 -𝐺 𝐶 2 𝐶 1 𝐶 2 -𝐺 𝐶 2 𝑂 2 (𝜑)𝐶 2Eq. 19𝑂 1 + 𝑂 2 + 𝐶 1 + 𝐶 2 = 1Eq. 20 turning light off implies that 𝐺 𝐶1𝑂1 and 𝐺 𝐶2𝑂2 = 0. From there, we deduct the two double mono exponential equations:Therefore, we can isolate 𝐵 𝑚𝑜𝑑𝑒𝑙 and 𝐷 𝑚𝑜𝑑𝑒𝑙 that will define the current decrease dynamic and compare them to the previous 𝐵 𝑓𝑖𝑡 and 𝐷 𝑓𝑖𝑡 : Depuis maintenant quinze ans, l'optogénétique a bouleversé la recherche en neurosciences en permettant de contrôler les circuits neuronaux. Le développement récent de plusieurs approches d'illumination, combinées à de nouvelles protéines photosensibles, les opsines, ont permis d'ouvrir une voie vers le contrôle neuronale avec la précision de la cellule unique. L'ambition nouvelle d'utiliser ces approches afin d'activer des dizaines, centaines, milliers de cellules in vivo a soulevé de nombreuses questions, notamment concernant les possibles dégâts photoinduits et l'optimisation du choix du couple illumination/opsine. Lors de mon doctorat, j'ai conçu une simulation vérifiée expérimentalement qui permet de calculer, dans toutes les conditions actuelles d'illumination, quel sera l'échauffement au sein du tissus cérébral dû à l'absorption de la lumière par le cerveau. Parallèlement, j'ai paramétré à partir de données expérimentales des modèles de dynamique des populations, à partir d'enregistrements d'électrophysiologie, qui permettent de simuler les courants intracellulaires observés lors de ces photostimulations, pour trois protéines différentes. Ces modèles permettront les chercheurs d'optimiser leurs protocoles d'illumination afin de garantir l'échauffement le plus faible possible dans l'échantillon, tout en favorisant des dynamiques de photocourant adaptées aux besoins expérimentaux. Laboratoire de Neurophotonique, CNRS UMR 8250, 45 rue des Saints-Pères, 75006 Paris

	Optogénétique 2P :
	𝑂 1 = 𝐴 × 𝐺 𝑂 2 𝑂 1 0 𝑂 2 = 𝐴 × ( 𝛽 -𝜃 2 ) 𝑒 𝑒	(-(-𝛼+𝜃 2 𝛼+𝜃 2		0 𝑡) + 𝐶 × 𝐺 𝑂 2 𝑂 1 𝑡) + 𝐶 × ( 𝛽 + 𝜃 𝑒 (-2 ) 𝑒 𝛼-𝜃 2 (-𝛼-𝜃 𝑡) 2	𝑡)	Eq. 42
	with A and C scaling for each value of steady-state current and
	𝛼 = (𝐺 𝑂 1 𝐶 1 + 𝐺 𝑂 1 𝑂 2 0 𝛽 = (𝐺 𝑂 1 𝐶 1 + 𝐺 𝑂 1 𝑂 2 0	0 ) + (𝐺 𝑂 2 𝐶 2 + 𝐺 𝑂 2 𝑂 1 ) -(𝐺 𝑂 2 𝐶 2 + 𝐺 𝑂 2 𝑂 1 0	) )	Eq. 43
	𝜃 = √𝛽 2 + 4 × 𝐺 𝑂 2 𝑂 1 0	× 𝐺 𝑂 1 𝑂 2 0	Eq. 44
	𝐵 𝑚𝑜𝑑𝑒𝑙 =	𝛼 + 𝜃 2	; 𝐷 𝑚𝑜𝑑𝑒𝑙 =	2 𝛼 -𝜃	Eq. 45

Mots-clefs : optogénétique ; microscopie bi-photonique ; holographie générée par ordinateur ; photostimulation ; propagation de lumière ; diffusion thermique ; diffusion lumineuse ; cristaux Erbium-Ytterbium ; potentiel d'action ; intégration de courant ; électrophysiologie ; opsine.

Laboratoire :

Table 6: Table showing the transition parameters obtained for the 2 opsins based on the four-state model. They were obtained from the various fit observable on Figures37-38. In the fitting process, p and q were free to be adjusted between 1.8 and 2.2.

Remerciements Acknowledgments

We acknowledge the SCM (Service Commun de Microscopie -Faculté des Sciences Fondamentales et Biomédicales -Paris) for providing the software Imaris (Imaris v8.4, Bitplane, software available at www.bitplane.com) and 3i for the technical support in the implementation of spiral scanning. We thank the 'Agence Nationale de la Recherche' (grants ANR-14-CE13-0016, Holohub and ANR-15-CE19-0001-01, 3DHoloPAc) the Human Frontiers Science Program (Grant RGP0015/2016) the 'Région Ile de France' (Projet GeneTherm-C'Nano -DIM Nano-K 2016) and the Getty Lab for financial support. I-WC received funding from the European Union's Horizon 2020 research and innovation program under the Marie Skłodowska-Curie grant agreement no. 747598. We thank Patrick Gredin and Michel Mortier, from Chimie Paris, who developed and fabricated the Er-Yb glass particles, and Aurelien Clavé, who contributed to the early development of the temperature measurement technique. We thank Deniz Dalkara for providing the GFP viral construct and Valeria Zampini for performing injections. Icons made by Freepik from www.flaticon.com for graphical abstract, and mouse design from Gwilz.

m'honore et ce

Discussion

In this study, we provide a method able to measure and predict the temperature changes induced by two-photon illumination with micrometer precision and millisecond temporal resolution, under the typical condition used for in vitro and in vivo 2P optogenetics stimulation.

Combining a random phase mask approach with the Fourier's heat diffusion equation to account for 3D light scattering and heat diffusion within tissue, the model enables to follow the 3D spatiotemporal evolution of temperature rise both under single and multi-target activation.

Previous approaches such as Monte Carlo simulations with Finite Difference Time Domain (FDTD) methods [START_REF] Stujenske | Modeling the Spatiotemporal Dynamics of Light and Heat Propagation for InVivo Optogenetics[END_REF] or empirical fitting of experimental results [START_REF] Arias-Gil | Measurement, modeling, and prediction of temperature rise due to optogenetic brain stimulation[END_REF][START_REF] Podgorski | Brain heating induced by near infrared lasers during multi-photon microscopy[END_REF] did not reach micrometer and millisecond resolution. Indeed, to simulate the propagation of tightly focused beams would require introducing diffraction in the Monte Carlo code which is intrinsically difficult [START_REF] Brandes | Modeling the tight focusing of beams in absorbing media with Monte Carlo simulations[END_REF]. Furthermore, for holographic beams, a Monte Carlo approach would need to simulate the propagation of the electromagnetic field, which is much more complex than the traditional Monte Carlo schemes based on the propagation of the intensity. On the other hand, FDTD methods require extra care in setting the spatial and time discretization steps in order to assure stability and avoid spurious oscillations in the numerical solution. For a Crank-Nicolson scheme [START_REF] Crank | A practical method for numerical evaluation of solutions of partial differential equations of the heat-conduction type[END_REF] this required to satisfy the condition:

with D the thermal diffusivity, which bounds the spatial and the temporal resolution. For example, following the time interval of 3 ms with a micrometer resolution of Δ𝑥 = 0.5 µ𝑚 would imply setting Δ𝑡 ≈ 1 µ𝑠 and therefore using 3000 iterations. Other numerical schemes can be used to solve the heat diffusion equation, but in all cases, they are iterative processes and therefore are by themselves time consuming, particularly if high accuracy is needed. Empirical fitting of temperature measurements is intrinsically limited to the experimental spatial and temporal resolution, which so far were significantly above the micrometer and millisecond scale.

On the other hand, using the analytical expression of the Green's function gives us the possibility to simulate the spatial distribution of temperature with micrometer spatial precision and submilisecond temporal resolution and discuss the results from the simulation based on a physical parameter that is the thermal diffusion length, 𝑙 𝑡ℎ . (B) Examples of traces of the temporal evolution of the temperature rise, averaged on the spot surface, produced by 3 ms of illumination with the spots distribution described in A, and the illumination conditions described in Figure 2, for an isolated spot (black curve) and the spot with highest temperature rise (blue curve). The purple curve represents the mean temperature rise averaged over the 100 spots.

simulate the temperature distribution under different excitation configurations (including single-and three-photon excitation) and imaging geometries (e. g. light sheet microscopy, stimulated emission depletion microscopy or Bessel beam illumination) or to optimize light distribution and illumination conditions for thermogenetics experiments [START_REF] Bernstein | Optogenetics and thermogenetics: Technologies for controlling the activity of targeted cells within intact neural circuits[END_REF][START_REF] Ermakova | Thermogenetic neurostimulation with single-cell resolution[END_REF][START_REF] Hamada | An internal thermal sensor controlling temperature preference in Drosophila[END_REF].

Declaration of interests

The authors declare no competing interests.

STAR Methods

Contact for reagent and resource sharing

Further information and requests for resources and reagents should be directed to and will be fulfilled by the Lead Contact, Valentina Emiliani (valentina.emiliani@parisdescartes.fr). [START_REF] Shemesh | Temporally precise single-cellresolution optogenetics[END_REF] were performed in 4-week-old male Swiss mice (Janvier Labs).

Experimental model and subject details

Animals were housed from 3 to 5 per cage with a light dark cycle of 12 + 12 h. Mice were anesthetized with a ketamine (80 mg/kg)-xylazine (5 mg/kg) solution and a small craniotomy (0.7 mm) was made on the skull overlying V1 cortex. An injection of 1-1.5 µl solution containing the viral vector was made with a cannula at about 80-100 nl/min at 200-250 µm below the dural surface. The skin was sutured, and the mouse recovered from anesthesia.

Method details

Virus injection and surgical procedures -In-vivo

Through a craniotomy over the right primary visual cortex (V1; 3.5 mm caudal from the bregma, 2.5 mm lateral from the midline), 1.5 µL viral vectors AAV2/8-hSyn-CoChR-GFP [START_REF] Klapoetke | Independent optical excitation of distinct neural populations[END_REF][START_REF] Shemesh | Temporally precise single-cellresolution optogenetics[END_REF] of were delivered via a cannula in the layer 2/3

Eq. 12 where I525 and I550 are the integrated luminescence intensities at 525 nm and 550 nm, 𝛥𝐸 is the energy separation between the corresponding levels, k the Boltzmann constant, and T the temperature (in Kelvins). A and B are constant coefficients which need to be determined by calibration, since they strongly depend on the nature and environment of the glass. Once A and B are known, the absolute temperature can be deduced quantitatively from measurements of I525/I550 [START_REF] Aigouy | Scanning thermal imaging of microelectronic circuits with a fluorescent nanoprobe[END_REF][START_REF] Saïdi | Scanning thermal imaging by near-field fluorescence spectroscopy[END_REF].

To do the calibration, the sample was heated on a PID-controlled heating element (Thorlabs, HT10K). A thin thermocouple (Omega, HYP0-33-1-T-G-60-SMP-M) implemented in the sample measured the temperature of the medium. At the same time, the probe was illuminated, and its luminescence spectrum was measured to derive I525/I550, as a function of T. These measurements were achieved at thermal equilibrium, between 296.6 K and 309.8 K, and repeated to increase the reliability of the calibration. A linear fit on ln(I525/I550) as a function of 1/T, shown in Figure S1 B, yielded the values of A and B with a coefficient of determination R 2 = 0.9362 (Figure S1 B).

Quantification and statistical analysis

In each experiment of Figure 4, multiple mice (n=3 or n=4) were analyzed as biological replicates. When we refer to the mean temperature rise, we perform the sum of the temperature rise in each pixel inside the spot of interest, and then divide by the number of pixels considered.

Data and software availability

The model has been implemented in a MATLAB (MathWorks) package that can be found as a supplemental zip file (see Data S1). Two main folders are in the archive, the first one with a master script and a library of functions for Holography simulations, and the second one following the same organization, but for Scanning simulations. The three-state failed to converge to a single set of parameters for all the experimental curves.

In fact, finding a good agreement required using two distinct set of parameters, one to fit the traces corresponding to short illumination times (before reaching steady-state) and a second set to fit those obtained with long photostimulation times (Table 3). As detailed in the appendix, from the fitting parameters it is possible to extract from the model parameters the values for τON and τOFF for the three opsins. In Table 4 we report the values obtained for the two sets of parameters and compare them with those obtained using a mono exponential fit in previous publications [START_REF] Chaigneau | Two-Photon Holographic Stimulation of ReaChR[END_REF][START_REF] Papagiakoumou | Optogenetics: A Roadmap[END_REF][START_REF] Ronzitti | Sub-millisecond optogenetic control of neuronal firing with two-photon holographic photoactivation of Chronos[END_REF][START_REF] Shemesh | Temporally precise single-cellresolution optogenetics[END_REF]. From this comparison, we can see that the agreement with previously published values is better when fitting long stimulation curves.

However, the discrepancy between the sets of parameters has led to consider a four-state model.

5) Four-state model results

Following the same procedure as before, we extracted the model parameter from the data set described in Table 5 and exemplary fits are shown in Figures 3738. From these fits we could extract the parameters listed in Table 6 for both CoChR and ReaChR.

A first and striking conclusion that can be drawn from these results is that in the case of ReaChR, the fitted parameter 𝛾 tells us that the conductance from the second open state, 𝑔 𝑂2 , is negligible compared to that of the first, 𝑔 𝑂1 , i.e. 𝛾 = 𝑔 𝑂2 𝑔 𝑂1

= 1,3 10 -8 . This could indicate

V.

Conclusions and Perspectives

The work presented in this manuscript led to the development of two numerical approaches, which aimed at providing 2P optogenetics researchers with the tools to optimize their illumination protocols. Indeed, the ambition of increasing the amount of photostimulated cells in depth in the brain, while keeping a high spatial and temporal resolution, raises challenges which must be overcome. While each of our simulations can be used separately to provide valuable insights and recommendations for temperature control and photocurrent optimization, one may think to combine the two in order to define guidelines that would guarantee cell integrity and reliability of AP triggering.

The first necessary step is to include the model of opsin kinetics (or membrane conductance kinetics) as a computational model of a spiking neuron (Hodgkin-Huxley, Integrate and Fire, etc.). This would allow to relate choice of opsin and various illumination strategies to spiking probability. From this point, one could use as an input in our simulations the requirements of his research object, such as a range of temperature increase compatible with the sample, and an objective in terms of spiking rate and timing.

Further, our thermal model is already capable to account for different homogeneously considered cell types, by just adapting the absorption coefficient in the calculations. If more complex biological questions would require an inhomogeneous absorption of light in the sample (for instance, accounting for blood vessels through the brain), one can already use our approach with a 3D map of absorption.

In the longer term, we could also easily adapt our models for other illumination strategies -3P approaches, for instance. Indeed, since scattering is weaker for 3P than for 2P wavelengths, the former could bring to optogenetics a deeper working distance within the brain. However, as wavelength shifts more in the infra-red, water absorption starts to rise again, Figure 11. This would suggest that our model would be of primary need for evaluating the thermal elevations of 3P optogenetic microscopes. which leads that the fraction of opsins in the Open state can be approximated as: 𝑂 = 𝑘 × 𝑒 -(𝐺 𝑂𝐶 +𝐺 𝑂𝐷 )×𝑡 Eq.

with k a constant. From there, we can conclude that the theoretical 𝜏 𝑂𝐹𝐹 is equal to:

𝜏 𝑂𝐹𝐹 = 1 𝐺 𝑂𝐶 + 𝐺 𝑂𝐷 Eq.

Double exponential time constant calculation with the four-state model

Starting from the previously detailed equations: