Calcium imaging analysis – how far have we come?

Techniques for calcium imaging were first demonstrated in the mid-1970s, whilst tools to analyse these markers of cellular activity are still being developed and improved today. For image analysis, custom tools were developed within labs and until relatively recently, software packages were not widely available between researchers. We will discuss some of the most popular methods for calcium imaging analysis that are now widely available and describe why these protocols are so effective. We will also describe some of the newest innovations in the field that are likely to benefit researchers, particularly as calcium imaging is often an inherently low signal-to-noise method. Although calcium imaging analysis has seen recent advances, particularly following the rise of machine learning, we will end by highlighting the outstanding requirements and questions that hinder further progress and pose the question of how far we have come in the past sixty years and what can be expected for future development in the field.


Amendments from Version 1 Introduction
The ability to image calcium ion (Ca 2+ ) dynamics in cells has long been of interest, particularly in the neurosciences, where it can be used as a marker for neuronal excitability. The origins of calcium imaging began in the mid-1970s (Blinks et al., 1976;Moisescu et al., 1975), however the most Ca 2+ specific BAPTA (1,2-bis(o-aminophenoxy)ethane-N,N,N′,N′tetraacetic acid)-based dye was developed in 1980 by Roger Tsien, and its derivatives are still used today (Tsien, 1980). In the past forty years, the methods available for measuring Ca 2+ fluxes in cells have expanded to include ratiometric, fluorescence lifetime, or fluorescence intensity-based dyes, and genetically-encoded calcium indicators (GECIs) (Miyawaki et al., 1997;Ohkura et al., 2005). The use of microscopy modalities has also advanced to include light-sheet microscopy (LSM; Huisken et al., 2004) for long-term imaging, and 2-photon microscopy (2PM; Denk et al., 1990) for deep tissue and cell specific uncaging techniques. The combination of Ca 2+ indicator and imaging modality used will reflect the properties of the sample and the scientific question, as well as the methodologies available to the researcher. For example, in vitro imaging, or in vivo invertebrate imaging, may use exogenous or GECIs, imaged using LSM, epifluorescence, 2PM or other fluorescence microscopes depending on the temporal and spatial resolution, timescale of imaging, and thickness of the sample being taken into consideration. Other specialist options for in vivo imaging of GECIs are available for imaging in awake and behaving animals including miniaturized forms of 1-or 2-photon endoscopic fluorescence microscopes (miniscopes) for single-cell Calcium imaging is an inherently noisy method due to the high spatiotemporal information desired from a sample often showing low signal-to-noise alongside drift or cell movement, particularly for living organisms. In recent years, a number of software packages have been written for individual aspects of the commonly used pipeline in calcium imaging analysis ( Figure 1). This processing pipeline includes image denoising, motion correction, classification for cell identification, and quantification of calcium signals. As calcium imaging is used across a broad range of samples, from sub-cellular, cellular, Figure 1. The steps of a common pipeline for calcium imaging analysis can be subdivided into three areas before quantitative analysis is performed. Denoising is an optional step that can help to improve signal-to-noise and enhance features. Motion correction may be necessary in cases of drift or movement. Classification can select regions of interest for which quantitative analysis is performed. networks, bulk tissue dynamics to whole organisms and behaving animals, aspects of this pipeline can vary substantially with no 'one size fits all' approach.

Denoising
Live-cell imaging generally requires short exposure times and low excitation power to limit the effects of photo-toxicity and photo-bleaching. This leads to image degradation in the form of noise. In fluorescence microscopy the two prevalent noise sources are Poisson noise and Gaussian noise. Poisson noise is caused by the stochastic and discrete nature of photon emission and tends to be dominant at low light levels, whereas Gaussian noise describes the intrinsic thermal and electronic fluctuation in the image sensor (Luisier et al., 2011) Although denoising is not a required step in the pipeline, effective denoising can improve the subsequent steps by artificially enhancing signal-to-noise. Traditionally, image denoising has been based on local averaging approaches, such as the application of a Gaussian smoothing filter ( Non-local filters solve some of the problems by using self-similarity of natural images beyond neighbouring pixels, thus exploiting global information (Shao et al., 2014). The first method to propose this is the non-local means method (Buades et al., 2005), in which subregions of an image referred to as patches are restored by weighted averaging of all other patches in an image. Since then, there have been a number of improvements such as invariance to patches that are rotated or mirrored with respect to each other (Grewenig et al., 2011), improved computational efficiency, and automated parameter tuning and extension to 3D image stacks (Coupé et al., 2008). Although non-local filters are better at high noise levels, they will typically lead to artefacts like over-smoothing (Shao et al., 2014). A modern, well-balanced and state-of-the-art non-local method is ND-SAFIR, which is specifically geared towards application in fluorescence microscopy imaging (Boulanger et al., 2010). ND-SAFIR is a powerful method for removing Poisson-Gaussian noise. It is based on non-local means denoising using a variance stabilisation step, followed by calculating the spatial and temporal patch-based weighted averages for intensity values. The method is widely applicable between experimental samples and can be used directly for 2D+t and 3D+t datasets (Buades et al., 2011).  (Lehtinen et al., 2018), where instead of learning the mapping from noisy images to clean targets, the model is trained with other noisy images as targets. The images must be corresponding pairs displaying the same objects but with independent noise. Assuming the noise sources underlying the images have zero-mean distributions, the weights of the network will then converge during training to the same values as a network trained with clean targets because the noise that manifests in the weights cancels out. A more recent method, noise2void (Krull et al., 2019), aims to resolve this issue of needing ground truths, by using self-supervised learning. Here, the network is optimised to predict the value of each pixel from the values of neighbouring pixels in an image, thus requiring no separate ground truths. In another recent method, DeepInterpolation (Lecoq et al., 2020), the need for ground truth training data is avoided by treating the denoising task as a nonlinear interpolation problem. This assumes that the data have a sequential component, such that spatiotemporally overlapping features can be exploited. DeepCAD is a new deep self-supervised denoising method that reduces detection noise and thereby improve the signal-to-noise more than tenfold, which it claims can improve the accuracy of neuron extraction and spike inference (Li et al., 2021).

Motion correction
Motion correction is often required to ensure consistent image processing across a time stack. We distinguish between two types of motion: (a) drift occurring in the imaging system itself caused by thermal gradients in the microscope, vibrations and mechanical instability (Kreft et al., 2005); (b) subject motion such as fluctuations in the immersion media or the movement of organisms (Jenkinson et al., 2002). Drift will typically play a significant role when imaging the same field of view over multiple days, which can be rectified by using standard registration methods (Dubbs et al., 2016)(Thévenaz et al., 1998).
More complex motion such as organism movement can be harder to correct as it is often non-uniform, over a large area, and causes movement in-and-out of the focal plane. These require non-rigid registration methods or motion tracking. A commonly used example available in Python and MATLAB is Non-Rigid Motion Correction, NoRMcorre (Pnevmatikakis & Giovannucci, 2017), which uses patch-based field of view registration whereby separate images are then merged by smooth interpolation. The popularity of NoRMcorre may in part be due to its general applicability.
Two correction methods have been produced for in vivo imaging in awake rodents, one based on the rigid-transformbased Lucas-Kanade (gradient descent) (Lucas & Kanade, 1981) image registration algorithm using MathWorks® MATLAB platform (Greenberg & Kerr, 2009), the other using a Hidden Markov Model (Dombeck et al., 2007). Although effective, these methods have not been packaged for easy implementation and are reliant on cells remaining in the x-and y-dimensions as it cannot track following movement between z-axes. In cases with z-axis movement, tracking-based methods may be more reliable, and specialist options exist using control theory and machine learning approaches for post-processing (

Classification
Classification is required to ensure that the quantification can be performed over specific regions of interest, such as for subcellular area, specific cells, or tissue regions. Classification can be achieved through pixel-or object-based segmentation. Pixel-based methods map each pixel to a class according to the spectral similarities. Object-based segmentation is a two-step process using both spectral and spatial/contextual information to group pixels into objects which are then classified. CaImAn is an open-source package with modules for classification, motion correction, source extraction, and spike deconvolution. The classification method is based on convolutional neural networks (Giovannucci et al., 2019). It was packaged into EZcalcium in an effort to improve usability by providing a GUI in MathWorks® MAT-LAB (Cantu et al., 2020). However, using limited CaImAn function in EZcalcium does not easily allow for segmentation of more complex structures or large organelles or clusters of cells and is better for somas or smaller, less complex areas. Cellpose is another generalist, deep learning-based segmentation method that uses entirely open source packages in Python with a GUI to aid implementation. There is also a web-based option for testing Cellpose, which makes it very easy to use (Stringer et al., 2020), though it too can be limited at detecting more complex cell shapes such as dendrites and axons.
DenoiSeg is an extension of Noise2Void that offers an end-to-end neural network, which is jointly optimised to denoise and segment images. The denoising capability is learnt by the self-supervised learning principle that noise2void introduced (Krull et al., 2019). By combining this with a supervised learning approach using a few annotated ground truths of segmentation maps, the final segmentation performance ends up performing better than without co-learning, i.e. having two separate networks perform the respective tasks (Buchholz et al., 2020).
Cell classification methods have been discussed with the conclusion that 'learning-based methods score among the best-performing methods, but well-optimized traditional methods can even surpass these approaches in a fraction of the time' (Vicar et al., 2019).

Quantification
The aim of each step is for signal extraction to allow a quantitative output from the images of calcium signals. The most commonly used measure is the relative fluorescence variation (ΔF/F0) for classified cells. Packages will therefore either provide this data of the baseline fluorescence (F0) and deviations from baseline (ΔF), for further analysis, or provide a direct plot. Background subtraction may need to be considered as not all packages will take this into account. Multiple methods can be used, including subtracting the intensity values from a region of the image that does not contain Ca 2+ indicator from the intensity values in regions of interest. However care should be taken using background subtraction with ratiometric indicators (Shkryl, 2020). . The ability to accurately detect spikes requires knowledge of ground truth, usually from electrophysiological recordings. Calcium imaging can be susceptible to variation between neuron type, calcium indicator and its concentration used, the optical resolution, the sampling rate and the noise level. Therefore, it is fundamental to understand how specific indicators react under the given imaging conditions, which cannot be readily generalized across protocols. To try and improve the accuracy of spike detection, a toolkit using a supervised algorithm of spike inference has been developed using a 'ground truth database' from a large number of sets of calcium imaging with corresponding electrophysiological measurements (Rupprecht et al., 2021).

Conclusion
A great number of analysis advancements have been made since calcium imaging was first developed. Popular packages for various steps of the pipeline ( Figure 1 . Although these packages are great starting tools for the community, many require programming knowledge in Python or commercial packages such as MathWorks® MATLAB. Many of the available options are only semi-automated and the limited automated options available are often designed for a very limited experimental context and are not actively supported when problems are experienced, e.g. other than for cells of a specific size and shape imaged in vitro. EZcalcium is one of the most intuitive options, which has improved the usability of CaImAn, NoRMCorre, but again seems best suited to analyse cell bodies. Suite2P and EZcalcium both attempt to offer an automated pipeline from raw images to spike extraction with no prior programming knowledge required by the user (Cantu et al., 2020; Pachitariu et al., 2017). As both packages are suited to similar experimental data, the choice may be based upon personal preference.
It therefore seems that perhaps some of the biggest advances could be made by designing packages for detecting neuritic structures or organelles and improving the spatial resolution of the analysis to be intracellular, such as has been used for calcium sparks (Berens et al., 2018). Longitudinal tracking of specific cells across imaging sessions also remains a challenge so that individual cells can be identified between multiple imaging sessions. A MathWorks® MATLAB toolkit has been made with reported error rates of < 5 % (Sheintuch et al., 2017); an alternative approach is also available using CaImAn (Giovannucci et al., 2019) though direct comparisons between these methods is difficult without knowing ground truths. Calcium imaging for population activity has also been highlighted as an area that requires further research, particularly when imaging over larger fields of view. Using models specific for neuron types imaged may improve detection of APs, which are commonly under-represented in population activity measurements (Huang et al., 2021). Recent toolboxes with large datasets containing ground-truths may reduce false negatives during analysis (Rupprecht et al., 2021). On the other end of the scale, pipelines for functional imaging in organisms such as zebrafish, C. elegans and Drosophila, where motion correction is often required and improved analysis for connectomics purposes are much needed.
As the application of machine learning in calcium imaging analysis matures, a higher level of automation and throughput for analysis tasks can be expected to follow. This will be enabled by more generalised and robust machine learning models. The barrier to training and deploying these methods will also reduce as more research is made into few-shot learning (using small training datasets) in addition to training approaches such as self-supervised and unsupervised learning.

Data availability
No data are associated with this article.

Open Peer Review
Overall, this review provides important information for researchers using calcium imaging, and can be used as a resource for finding analysis tools that fit their needs. The new definitions provided give further clarity to the concepts and tools discussed in the paper, and the up to date citations will direct the reader to papers that have applied these tools to their research. After all these changes and additions to the manuscript, we have no further corrections and feel that the paper is ready for indexing.

Competing Interests:
No competing interests were disclosed.
Reviewer Expertise: Microscopy, instrument development, automation and data analysis, neurophotonics, biophotonics We confirm that we have read this submission and believe that we have an appropriate level of expertise to confirm that it is of an acceptable scientific standard.

Anubhuti Goel
Department of Psychology, University of California, Riverside (UCR), Riverside, CA, USA The review by Miranda et al provides an overview of the calcium imaging pipeline and the open source resources available to the scientific community. Overall the review is a helpful resource to anyone aiming to analyze their calcium imaging data. However a clearer understanding of which resource is better suited to which model system or type of analysis will be a helpful addition (maybe some examples will be particularly insightful). The authors mention Suite2P and EZCalcium as the top analysis tools available however it is not clear which one the reader should pick. Furthermore both Suite2P and EZCalcium come with a user interface which means other than downloading either python or MATLAB no programming knowledge is needed. This fact is not clear in the review.
One reference is mentioned as "Balaji, UCLA". The authors should specify if indeed that is a personal communication or perhaps an unpublished tool.

Is the review written in accessible language? Yes
Are the conclusions drawn appropriate in the context of the current research literature? Yes Competing Interests: No competing interests were disclosed.
I confirm that I have read this submission and believe that I have an appropriate level of expertise to confirm that it is of an acceptable scientific standard, however I have significant reservations, as outlined above. We thank the reviewer for their helpful suggestions for our article.
However a clearer understanding of which resource is better suited to which model system or type of analysis will be a helpful addition (maybe some examples will be particularly insightful). The authors mention Suite2P and EZCalcium as the top analysis tools available however it is not clear which one the reader should pick. Furthermore both Suite2P and EZCalcium come with a user interface which means other than downloading either python or MATLAB no programming knowledge is needed. This fact is not clear in the review.

We have included in the introduction information about the methods that may better suit in vitro
We have added the following in the conclusion: "Suite2P and EZcalcium both attempt to offer an automated pipeline from raw images to spike extraction with no prior programming knowledge required by the user (  Cantu et al., 2020; Pachitariu et al., 2016). As both packages are suited to similar experimental data, the choice may be based upon personal preference." One reference is mentioned as "Balaji, UCLA". The authors should specify if indeed that is a personal communication or perhaps an unpublished tool. We understand that this may cause confusion; as this plug-in is not published and we have now added the ImageJ webpage as a reference.

William Zeiger
Department of Neurology, University of California, Los Angeles (UCLA), Los Angeles, CA, USA In their review "Calcium imaging analysis -how far have we come?", Robbins et al. present a concise overview of the basic steps involved in transforming raw microscopy images from calcium imaging experiments to quantifiable data. This is an extremely important topic with broad relevance to many fields. As such, the review should draw considerable interest. The review is well written. It is logically organized, with the analysis pipeline broken down into 4 distinct steps, each of which is discussed separately. The language is easy to follow for a broad audience of varying degrees of expertise. Many of the most popular software implementations are covered at least to some degree. Overall, I think this will be a useful and important review with significant impact.
However, I do have some suggestions that I believe could strengthen the manuscript. My main concern is that the target audience for the review is not clear. Calcium imaging is broadly used in many areas of the life sciences, including both in vitro and in vivo preparations, across multiple species, multiple tissues, and widely varying spatial scales (sub-cellular, cellular, bulk tissue signals). Given that much of the review is devoted to denoising and motion correction (problems which are relatively minor in in vitro preparations with no organismal movement and relatively high signal-to-noise), and that quantification focuses on spike detection, the review feels most well suited to in vivo two-photon imaging applications in the brain. If this was the intention, it would benefit the review to make this more explicit and provide more discussion tailored to this technique, particularly in the quantification section. If this assumption is not correct and the review is meant to be targeted at a more general audience, I would suggest the introduction be expanded to include at least a brief discussion of the types of calcium indicators available (ratiometric, FRET, fluo, GCaMP, etc) and imaging techniques in use (widefield fluorescence, confocal, 2P, miniscopes, etc). This is important for a beginner/generalist audience as the indicator and imaging technique used will strongly influence the subsequent processing pipeline needs.
In addition to this primary concern I have a few other suggestions that would improve the scope of the review: The quantification section should be significantly expanded. This step is the shortest in description, yet arguably can be fraught with the most pitfalls to which investigators fall prey.
○ CaImAn is included under the "classification" section, but includes modules to do more than just classify, including motion correction and registration across imaging sessions  In their review "Calcium imaging analysis -how far have we come?", Robbins et al. present a concise overview of the basic steps involved in transforming raw microscopy images from calcium imaging experiments to quantifiable data. This is an extremely important topic with broad relevance to many fields. As such, the review should draw considerable interest. The review is well written. It is logically organized, with the analysis pipeline broken down into 4 distinct steps, each of which is discussed separately. The language is easy to follow for a broad audience of varying degrees of expertise. Many of the most popular software implementations are covered at least to some degree. Overall, I think this will be a useful and important review with significant impact.

We thank Dr. Zeiger for his positive comments about our review and interesting literature references that he has provided.
However, I do have some suggestions that I believe could strengthen the manuscript. My main concern is that the target audience for the review is not clear. Calcium imaging is broadly used in many areas of the life sciences, including both in vitro and in vivo preparations, across multiple species, multiple tissues, and widely varying spatial scales (sub-cellular, cellular, bulk tissue signals). Given that much of the review is devoted to denoising and motion correction (problems which are relatively minor in in vitro preparations with no organismal movement and relatively high signal-to-noise), and that quantification focuses on spike detection, the review feels most well suited to in vivo two-photon imaging applications in the brain. If this was the intention, it would benefit the review to make this more explicit and provide more discussion tailored to this technique, particularly in the quantification section. If this assumption is not correct and the review is meant to be targeted at a more general audience, I would suggest the introduction be expanded to include at least a brief discussion of the types of calcium indicators available (ratiometric, FRET, fluo, GCaMP, etc) and imaging techniques in use (widefield fluorescence, confocal, 2P, miniscopes, etc). This is important for a beginner/generalist audience as the indicator and imaging technique used will strongly influence the subsequent processing pipeline needs.

We were indeed targeting the review at a more general reader. We have therefore expanded the regions of the introduction where we mention calcium indicators and imaging techniques as well as including a sentence to discuss differences between in vivo and in vitro samples as follows:
"

As calcium imaging is used across a broad range of samples, from sub-cellular, cellular, networks, bulk tissue dynamics to whole organisms and behaving animals, aspects of this pipeline can vary substantially with no 'one size fits all' approach."
In addition to this primary concern I have a few other suggestions that would improve the scope of the review: The quantification section should be significantly expanded. This step is the shortest in description, yet arguably can be fraught with the most pitfalls to which investigators fall prey. CaImAn is included under the "classification" section, but includes modules to do more than just classify, including motion correction and registration across imaging sessions  "The ability to accurately detect spikes requires knowledge of ground truth, usually from electrophysiological recordings. Calcium imaging can be susceptible to variation between neuron type, calcium indicator and its concentration used, the optical resolution, the sampling rate and the noise level. Therefore, it is fundamental to understand how specific indicators react under the given imaging conditions, which cannot be readily generalized across protocols. To try and improve the accuracy of spike detection, a toolkit using a supervised algorithm of spike inference has been developed using a 'ground truth database' from a large number of sets of calcium imaging with corresponding electrophysiological measurements (Rupprecht et al.,

2021)."
On a related point about spike detection, the authors may want to include information about the relative sensitivity (or in some cases lack thereof) of calcium indicators for spike detection (see Hunag et. al https://elifesciences.org/articles/51675 2 ). ○ This is an interesting preprint that does indeed seem promising. It can be seen as an extension of the Noise2void method, which we already touch on. We have added the following sentence to the manuscript: "In another recent method, DeepInterpolation (Lecoq et al., 2020), the need for ground truth training data is avoided by treating the denoising task as a nonlinear interpolation problem. This assumes the data have a sequential component, such that spatiotemporally overlapping features can be exploited." The authors present a brief review of processing and analysis methods for calcium imaging data in neuroscience. The article breaks down the processing steps typically required to view calcium signals from neurons, including denoising, motion correction, and classification, and then the quantification of the data. It appears that the primary contribution of the article is to summarize the most recent and up-and-coming methods for the processing of calcium activity in neurons. The abstract describes the intentions of the paper well, bringing the reader up to date on the last 60 years of calcium analysis tools, however several claims are made which are not followed up in the manuscript. For example, the authors do not highlight their preferred methods as they state they will in the abstract, much less provide justification for these choices. The abstract concludes by stating the authors will describe the future needs in the field, and this is successfully done in the conclusion, albeit briefly and without much justification -we would have liked to see some examples of the kinds of groups who might be making progress in these fields, or papers in different fields which might be applicable to calcium activity monitoring.
Overall we find the contents of this review to be beneficial to users applying calcium imaging to their research, however some additional information or clarification needs to be included or clarified. The following corrections should be made to the review before formal 'publication': The description of the purpose and benefits of denoising is well explained at the start of the section. In the following sections of motion correction and classification however, the authors proceed directly to the methods used to perform the task, and while this is comprehensive, they fail to justify why these steps are needed in the calcium processing and analysis pipeline. An 'introduction' sentence or paragraph for each section is needed.
The acronym BAPTA should be defined before it is used.
In the motion-correction section, more distinction should be made between 'camera-based' motion correction, where the whole image is captured simultaneously, and 'scanning-based' motion correction. There are distinct differences in capabilities and limitations for each approach (for example, scanning-based imaging can suffer from 'warping' which affects camera-based imaging much less, but can also sample regions of interest as opposed to the whole image, speeding up imaging to overcome motion artifacts). The authors successfully reference the original papers for the different approaches to denoising, motion correction, and classification, but they should also include the references for when the techniques were first applied and used in calcium image analysis, as this is the focus of the review.
The standard of presentation is OK, but should really be improved before 'publication'. The first sentence of the abstract is difficult to parse and is not a complete statement. Furthermore, throughout the manuscript there are several difficult-to-parse sentences and some that are ungrammatical (e.g. "to include ratiometric, fluorescence lifetime, or fluorescence intensity, based reporters, and genetically-encoded options […] alongside dyes", "rendering features to be less defined.", "ND-SAFIR is a powerful method for removing Poisson-Gaussian noise, which is based on non-local means denoising […] to first use a variance stabilisation step, followed by spatial and temporal patch-based weighted averages of intensity values", "over multiple days. which can be well rectified using standard registration methods" and so on). Finally, the structure could be improved ("Motion correction can be split into two main categories" really should be followed by an explanation of what those two categories are, and background subtraction is alluded to in the "Quantification" section but not elaborated upon). Other more minor adjustments that are recommended (but not required) include: It would be nice to see a definition of Poisson-Gaussian noise since this is unlikely to be understood by many readers. Similarly clear definition of a 'patch' would be helpful, as would explanation of the difference between local and non-local methods.
As stated previously, further expansion of the methods used for the analysis of calcium signals, such as calculation of dF/F and spike sorting, that are touched on in the quantification section, would be helpful. This section is very brief but would seem to be the section of most interest to the general reader.
The authors state the paper will describe the methods used for calcium imaging analysis however the focus of the paper is more on the pre-processing methods rather than the analysis. It would be nice to elaborate further on what kinds of analyses are performed on the data after preprocessing -how these calcium traces can be used to infer useful neurobiological information.
In summary, this is a brief but well-focussed review on a topic that is of interest to several researchers and thus should be formally published after the necessary revisions have been made.

Is the review written in accessible language? Partly
Are the conclusions drawn appropriate in the context of the current research literature? Yes

Miranda Robbins, MRC Laboratory of Molecular Biology, Cambridge, UK
The authors present a brief review of processing and analysis methods for calcium imaging data in neuroscience. The article breaks down the processing steps typically required to view calcium signals from neurons, including denoising, motion correction, and classification, and then the quantification of the data. It appears that the primary contribution of the article is to summarize the most recent and up-and-coming methods for the processing of calcium activity in neurons.
We thank the reviewers for highlighting areas of improvement in our review article.
The abstract describes the intentions of the paper well, bringing the reader up to date on the last 60 years of calcium analysis tools, however several claims are made which are not followed up in the manuscript. For example, the authors do not highlight their preferred methods as they state they will in the abstract, much less provide justification for these choices.
We acknowledge this inconsistency between the abstract and the content of the manuscript. On closer inspection, we have decided that we do not want to explicitly emphasise our personal preferences and justify them, but rather objectively discuss the strengths of the respective methods and leave it to the reader -particularly as the "best" methods will often be dependent upon the experimental methods used by individual researchers. We have therefore removed the mentioning of "our preferred [methods]" in the relevant sentence in the abstract from: "We will discuss some of the most popular, alongside our preferred, methods for calcium imaging" The abstract concludes by stating the authors will describe the future needs in the field, and this is successfully done in the conclusion, albeit briefly and without much justification -we would have liked to see some examples of the kinds of groups who might be making progress in these fields, or papers in different fields which might be applicable to calcium activity monitoring.
We have extended the discussion on future challenges to include: Overall we find the contents of this review to be beneficial to users applying calcium imaging to their research, however some additional information or clarification needs to be included or clarified. The following corrections should be made to the review before formal 'publication': The description of the purpose and benefits of denoising is well explained at the start of the section. In the following sections of motion correction and classification however, the authors proceed directly to the methods used to perform the task, and while this is comprehensive, they fail to justify why these steps are needed in the calcium processing and analysis pipeline. An 'introduction' sentence or paragraph for each section is needed.
We have added introductory sentences as follows: "Motion correction is often required for samples due to drift during imaging, or organism movement." "Classification is required to ensure that the quantification can be performed over specific regions of interest, such as for subcellular area, specific cells, or tissue regions." The acronym BAPTA should be defined before it is used.
We have now included this.
In the motion-correction section, more distinction should be made between 'camera-based' motion correction, where the whole image is captured simultaneously, and 'scanning-based' motion correction. There are distinct differences in capabilities and limitations for each approach (for example, scanning-based imaging can suffer from 'warping' which affects camera-based imaging much less, but can also sample regions of interest as opposed to the whole image, speeding up imaging to overcome motion artifacts). The standard of presentation is OK, but should really be improved before 'publication'. The first sentence of the abstract is difficult to parse and is not a complete statement. Furthermore, throughout the manuscript there are several difficult-to-parse sentences and some that are ungrammatical (e.g. "to include ratiometric, fluorescence lifetime, or fluorescence intensity, based reporters, and genetically-encoded options […] alongside dyes", "rendering features to be less defined.", "ND-SAFIR is a powerful method for removing Poisson-Gaussian noise, which is based on non-local means denoising […] to first use a variance stabilisation step, followed by spatial and temporal patch-based weighted averages of intensity values", "over multiple days. which can be well rectified using standard registration methods" and so on). Finally, the structure could be improved ("Motion correction can be split into two main categories" really should be followed by an explanation of what those two categories are, and background subtraction is alluded to in the "Quantification" section but not elaborated upon).
Thank you for highlighting these errors. We have edited the sentences as follows: "Techniques for calcium imaging were first demonstrated in the mid-1970s, whilst tools to analyse these markers of cellular activity are still being developed and improved today" "In the past forty years, the methods available for measuring Ca 2+ fluxes in cells have expanded to include ratiometric, fluorescence lifetime, or fluorescence intensitybased dyes, and genetically-encoded calcium indicators (GECIs) ( Miyawaki et al., 1997; Ohkura et al., 2005)." "… causing features to appear less well defined." "ND-SAFIR is a powerful method for removing Poisson-Gaussian noise. It is based on non-local means denoising using a variance stabilisation step, followed by calculating the spatial and temporal patch-based weighted averages for intensity values." "…view over multiple days, which can be rectified by using standard registration methods." We have deleted the sentence "Motion correction can be split into two main categories" which has been replaced with the introductory sentence on motion correction.
We " Figure 1. The steps of a common pipeline for calcium imaging analysis can be subdivided into three areas before quantitative analysis is performed. Denoising is an optional step that can help to improve signal-to-noise and enhance features. Motion correction may be necessary in cases of drift or movement. Classification can select regions of interest for which quantitative analysis is performed. " Other more minor adjustments that are recommended (but not required) include: It would be nice to see a definition of Poisson-Gaussian noise since this is unlikely to be understood by many readers. Similarly clear definition of a 'patch' would be helpful, as would explanation of the difference between local and non-local methods.
Thank you for these suggestions. We agree that these things were not necessarily clear to the general reader, so we have incorporated various changes to address these points. First of all, definitions of the noise sources in fluorescence microscopy and a reference that deals more thoroughly with the subject: "Live-cell imaging generally requires short exposure times and low excitation power to limit the effects of photo-toxicity and photo-bleaching. This leads to image degradation in the form of noise. In fluorescence microscopy the two prevalent noise sources are Poisson noise and Gaussian noise. Poisson noise is caused by the stochastic and discrete nature of photon emission and tends to be dominant at low light levels, whereas Gaussian noise describes the intrinsic thermal and electronic fluctuation in the image sensor (Luisier et al., 2011). " Secondly, non-local methods are now described as using global information, a distinction to local methods that we believe should now make the difference clear. Lastly, we have included a definition of patch as a block of pixels representing a subregion of an image.
As stated previously, further expansion of the methods used for the analysis of calcium signals, such as calculation of dF/F and spike sorting, that are touched on in the quantification section, would be helpful. This section is very brief but would seem to be the section of most interest to the general reader. The authors state the paper will describe the methods used for calcium imaging analysis however the focus of the paper is more on the pre-processing methods rather than the analysis. It would be nice to elaborate further on what kinds of analyses are performed on the data after pre-processing -how these calcium traces can be used to infer useful neurobiological information.
We have included the following in the 'quantification' section: "Packages will therefore either provide this data of the baseline fluorescence (F0) and deviations from baseline (ΔF), for further analysis, or provide a direct plot." "The ability to accurately detect spikes requires knowledge of ground truth, usually from electrophysiological recordings. Calcium imaging can be susceptible to variation between neuron type, calcium indicator and its concentration used, the optical resolution, the sampling rate and the noise level. Therefore, it is fundamental to understand how specific indicators react under the given imaging conditions, which cannot be readily generalized across protocols. To try and improve the accuracy of spike detection, a toolkit using a supervised algorithm of spike inference has been developed using a 'ground truth database' from a large number of sets of calcium imaging with corresponding electrophysiological measurements (Rupprecht et al.,

2021)."
In summary, this is a brief but well-focussed review on a topic that is of interest to several researchers and thus should be formally published after the necessary revisions have been made.