Abstract:
The present invention relates to systems and methods for reducing noise in image data. Preferred embodiments relate to methods for analyzing two-photon in vivo imaging of biological systems. With neuronal population imaging with subcellular resolution, this modality offers an approach for gaining a fundamental understanding of brain anatomy and physiology. Analysis of calcium imaging data requires denoising, that is separating the signal from complex physiological noise. To analyze two-photon brain imaging data, for example, harmonic regression plus colored noise model and an efficient cyclic descent algorithm for parameter estimation. This approach reliably separates stimulus-evoked fluorescence response from background activity and noise, assesses goodness of fit, and estimates confidence intervals and signal-to-noise ratio.

Description:
STATEMENT REGARDING FEDERALLY SPONSORED RESEARCH OR DEVELOPMENT 
     BACKGROUND OF THE INVENTION 
       [0001]    Various imaging modalities have been developed to measure biological systems. Two-photon microscopy, for example, is now recognized as a valuable tool for real-time in vivo imaging of biological systems. A two-photon microscope excites fluorophores in a volume of biological sample using pulsed lasers to induce the emission of a fluorescence signal. Typically, a focused laser beam scans the tissue in a two-dimensional raster pattern, producing a fluorescence image that typically spans hundreds of cells. The images facilitate highly informative and quantitative analyses with a range of biological applications. 
         [0002]    Properly separating signal from noise, often termed denoising, is a crucial signal processing procedure in the analysis of imaging data. While there has been considerable success in the development of imaging systems, such as two-photon microscopy, the corresponding signal processing methodology has received less attention. The observed fluorescence response depends upon several factors: 1) the nature of the stimulus and the modulation of neural activity due to the stimulus; 2) movements due to highly structured physiological processes; 3) spontaneous neural activity; and 4) optical and electrical noise. Existing methods for processing two-photon data consist of averaging the measured fluorescence levels over multiple trials followed by kernel-based smoothing or fitting an appropriate curve to these time-series data. Averaging, while highly intuitive and easy to perform, requires a large number of trials which is often not possible in two-photon imaging measurements. 
         [0003]    Thus, there is a continuing need for improvements in the processing of image data to improve the speed and usefulness of such systems and methods. 
       SUMMARY OF THE INVENTION 
       [0004]    The present invention relates to systems and methods for the processing of collected data of dynamic processes. Preferred embodiments record the response to a stimulus, and process the measured response to remove noise from the measured data. The dynamic process and the noise embedded in the collected data are represented by analytic expressions that are selected to reduce computational complexity using an iterative process that converges to a solution for each expression. Thus, for embodiments using a selected form of stimulus and a system used for measuring the physiologic response to the stimulus, statistical methods are employed to separate signal and noise, assess goodness of fit and determine characteristics of physiological features in the image. A preferred embodiment uses a statistical signal plus correlated noise (SCN) model for the analysis of imaging data. 
         [0005]    In a preferred embodiment, a periodic stimulus induced structure is represented as a harmonic regression and the temporally correlated noise is represented as an autoregressive process. Preferred embodiments utilize a computationally efficient cyclic descent algorithm for maximum likelihood estimation of the model parameters. The low computational cost requirements of the algorithm makes it amenable to automated analysis of large imaging data sets. By analyzing two-photon calcium imaging data, for example, that has been recorded from the ferret primary visual cortex, this method has demonstrated the accurate modeling of the recorded data and provides substantial reduction of the noise present in the images. 
         [0006]    Two-photon calcium imaging is an important tool for visualizing function in biological systems in real time and near real-time measurements. In the brain, two-photon calcium imaging makes it possible to view population neuronal activity and to resolve features at the subcellular level. While much progress is rapidly being made on devising faster and higher resolution imaging instruments, the development of statistical analysis methods to accurately and efficiently extract the desired two-photon signal from the complex highly structured noise processes has received less attention. The present invention can utilize methods such as a Volterra series representation to formulate a solution in which a nonlinear process is separated into a plurality of linear representations. This can include a first linear representation of a dynamic process such as the physiologic response to the stimulus and a second linear representation of the noise contained in the measured data. 
         [0007]    Preferred embodiments of the present invention use statistical methods that are based on a harmonic regression plus correlated noise model for rapidly and efficiently analyzing two-photon imaging data. The orders of the harmonic and autoregressive components can be determined by an automated procedure and used to reduce computational complexity. This flexible model provides a parsimonious representation in which the signal, stimulus evoked fluorescence response, is separated from the background activity and noise. Assessments of model confidence intervals and signal-to-noise ratios are provided. A preferred embodiment includes an analysis of calcium fluorescence imaging data recorded in vivo from the ferret visual cortex at cellular resolution. The method is computationally efficient and can be used with other models for imaging data and to implementations for real-time measurement and high-throughput imaging analyses. 
         [0008]    Two-photon imaging of calcium-sensitive fluorescent indicators to investigate neural physiology is particularly appealing because the measured fluorescence is closely related to neural activity. This imaging modality enables analysis of a broad spatial scale, ranging from the structure of dendritic spines (microns) to the architecture of neuronal networks (millimetres), as well as analysis of a broad temporal scale from fast action potentials (milliseconds) to slow calcium waves (seconds). 
         [0009]    Preferred embodiments of the invention utilize a computer implemented analysis to solve this signal plus colored noise problem. Colored noise appears in many contexts in computational biology, including functional magnetic resonance imaging, neural voltage-sensitive dye imaging, circadian rhythms, synaptic background activity in cortical neurons, gene regulatory networks, speech signals, cell locomotion patterns, and many others. Colored noise is also encountered in astronomy, analog electronics, wideband communications, and many other areas. The procedures usually applied to these problems, based on expectation maximization or exact maximum-likelihood procedures, are often computationally intensive. The present invention utilizes an alternate approximate maximum likelihood procedure that can be applied to a range of such problems, thereby providing advantages for real-time computation and high-throughput processing. 
         [0010]    Additional embodiments can employ additional forms of stimulus, such as auditory or electrical signals or mechanical or electromechanical devices to contact an organism or mammalian body. The response to the sensory stimulus can also be measured by other imaging systems, such as magnetic resonance imaging (fMRI) or diffuse optical tomography (DOT). Besides the measurement of response to a stimulus, other possible embodiments can involve analyzing system dynamics without the application of a stimulus. 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         [0011]      FIG. 1A  shows two-photon fluorescence imaging system used in a preferred embodiment of the invention; 
           [0012]    FIGS.  1 Ba- 1 Bb show an example of two-photon fluorescence image and individual cell dynamics; FIG.  1 Ba shows an anatomical image of cell population at 150 μm depth obtained by plotting the pixel-wise maximum fluorescence across the movie frames obtained under a rotating orientation stimulus; The ROIs indicate two neighbouring neurons identified manually, Cell  11  (blue) and Cell  12  (red); Brighter shades represent higher fluorescence intensity; FIG.  1 Bb show relative fluorescence time-traces for each of the two neurons highlighted in FIG.  1 Ba under three trials of stimulus application with orientation indicated by arrows; The solid line and background region show the mean±std computed across all of the pixels comprising the given cell; Vertical dashed lines mark trial boundaries, at which the stimulus is oriented at 0° with respect to the positive x-axis (horizontal); The structure rotates counter-clockwise from there; The response of Cell  12 , unlike Cell  11 , is specific to the direction of orthogonal drift; It exhibits an excitatory response at horizontal orientation for one drift direction (180° orientation) but not the other (0° orientation). 
           [0013]    FIG.  1 Ca- 1 Cb show two-photon fluorescence images of a cell population; FIG.  1 Ca is an anatomical image of a population of 15 cells; Brighter gray shades represent higher fluorescence intensity, and ROIs and cell indices indicate all of the cells identified manually; FIG.  1 Cb shows the orientation tuning curve of each cell obtained by averaging the measured relative fluorescence across three trials; 
           [0014]    FIGS.  2 Aa- 2 Ab show the convergence of the parameter estimates obtained with cyclic descent; FIG.  2 Aa shows iterative estimates of the model parameters, namely the residual variance (σ 2 ), intercept (μ), harmonic coefficients (a i  and b 2 ; i=1, . . . , h) and autoregressive coefficients (a j ; j=1, . . . , p), for the fluorescence time series in FIG.  3 Ba; FIG.  2 Ab shows the percentage difference between the successive estimates of the model parameters in FIG.  2 Aa. For the i th  iteration, the quantity shown is calculated as Δu (l) =|(u (l) −u (l−1) )/u (l) −×100, where u (l)  is the estimate of parameter u at the i th  iteration and u (0) =0. The y-axis has a logarithmic scale. 
           [0015]    FIGS.  2 Ba- 2 Be show model order selection and goodness of fit for fluorescence time series data from Cell  11 ; In FIG.  2 Ba shows corrected Akaike information criterion (AICc) as a function of the harmonic (h) and autoregressive model orders (p); The minimum of this surface is achieved with h=2 and p=2; The quantity shown is the AICc normalized to that obtained with h=p=0; In the pseudo-color heat map, red and blue represent large and small AICc values, respectively; In FIG.  2 Bb Left: AICc as a function of the harmonic order when a signal-only model is assumed and the AR component is not included; The optimal harmonic order, as indicated by the minimum AICc, is h=4; Right: AICc as a function of the AR order when a signal-plus-colored-noise model is assumed with h=4; The optimal AR order, as indicated by the minimum AICc, is p=2; FIG.  2 Bc shows the percentage of image pixels of the cell whose time series data estimate with the model yields substantially white residuals as determined by the Ljung-Box test. Various combinations of the harmonic and AR model orders are shown; Noticeably, the model order determined to be optimal by AICc is not sufficient for achieving whiteness, and a higher-order AR fit is needed; For h=4, the whiteness criterion is satisfied for all of the pixels by an AR order of at least 8; In the pseudo-color heat map, blue and red represent 0 and 100%, respectively; In FIG.  2 Bb the spectra obtained using the FFT, illustrating the decomposition of the fluorescence time series data f k  (black) into ŝ k , the estimated stimulus-evoked signal component and baseline fluorescence (blue), {circumflex over (v)} k , stimulus-free background activity (red), {circumflex over (ε)} k , and the residual white noise (green); The dominant lower-frequency components visible in the data correspond to the response to the stimulus and are captured by ŝ k  which has a line spectrum at 4 harmonics of the stimulus frequency; The rest of the measured activity, with a non-uniform spectrum, is captured by the AR component; The spectrum of the AR residual is substantially uniform, confirming whiteness; In FIG.  2 Be the normalized cumulative periodograms (NCPs) of the four components in FIG.  2 Bd, along with the 95% bounds for whiteness (dashed lines) and the NCP of ideal white noise (dotted line); The presence of temporal correlation in the background activity, {circumflex over (v)} k , is evident from this plot (red line), while the residuals lie well within the bounds for independence; 
           [0016]    FIGS.  3 Aa- 3 Ad show model order selection; In FIG.  3 Aa the AICc surface for each of the cells in the data-set averaged across the pixels for that cell (blue: low; red: high); FIG.  3 Ab shows AICc as a function of the harmonic order when an AR component is not fit to the residual of the harmonic regression; FIG.  3 Ac shows AICc as a function of the AR order when the optimal harmonic order from b is used; FIG.  3 Ad shows percentage of pixels of each cell that pass the Ljung-Box whiteness test (blue: 0%; red: 100%); 
           [0017]    FIGS.  3 Ba- 3 Be show decomposition of fluorescence time traces into signal and noise components for Cell  11 , Pixel  45 ; FIG.  3 Ba shows relative fluorescence data f k  (blue) measured in three consecutive trials (boundaries marked by dashed lines) and the estimate {circumflex over (f)} k  obtained by the signal plus colored noise model (red); FIG.  3 Bb shows relative fluorescence data f k  (blue) and the estimate of its signal component ŝ k  showing the denoised stimulus-evoked activity (red); FIG.  3 Bc shows the autocorrelation function (red) of the model residuals, ŝ k , lies within the 95% bounds for whiteness (blue); The autocorrelation values are used to compute the Ljung-Box (LB) test statistic, from which goodness-of-fit determined is as shown in FIG.  2 Bc; FIG.  3 Bd shows the quantile-quantile plot of the residuals confirms Gaussianity; The results in FIG.  3 Bc and FIG.  3 Bd prove that the residuals are independently and identically distributed Gaussian, and all of the systematic variance in the data has been explained by the harmonic regression and autoregressive terms; FIG.  3 Be shows the orientation tuning curve obtained from the denoised signal estimate in FIG.  3 Bb; The model provides a smooth fit to the across-trials mean of the data; The point-wise approximate 95% confidence intervals are also shown. This model preserves the complex shape of the response tuning curve, which would be lost in conventional schemes that fit a symmetric cosine or Gaussian curve to neuronal response data. 
           [0018]      FIGS. 4A-4C  show image denoising and visualization of calcium activity; In FIG.  4 Aa Fluorescence (Δf k ) response images from the area around a representative cell (Cell  14 , soma marked by blue arrow) to orientation stimulus processed with conventional across-trial averaging and with this SCN model; Successive frames show the response at orientations, indicated by pink arrows, in 30° steps; The stimulus-free activity is removed by the SCN model; In FIG.  4 Ba Fluorescence response of Cell  1  along four orientations, with the soma indicated by blue arrow; and in  FIG. 4C  shows the fluorescence response of Cell  12  obtained from the SCN model in 10° steps of orientations with successive frames acquired at 1 Hz; Slow calcium waves flowing across the cell processes (green arrow) and soma (blue arrow) can be observed due to the enhanced clarity and contrast of the denoised image. 
           [0019]      FIG. 5A-5E  illustrate the spatial distribution of preferred orientation and orientation selectivity after denoising with the signal plus colored noise (SCN) model;  FIG. 5A  shows a spatial map of visual response characteristics for pixels that lie within cell boundaries identified manually from FIG.  1 Ba; a pixel-wise preferred orientation is indicated by the colormap, and the mean preferred orientation of the cell is indicated by the black arrow originating from the centre of each cell. Colorbar and colored arrows represent the orientation scale in degrees;  FIG. 5B  shows orientation selectivity, a measure of tuning sharpness evaluated as the half-width range at half-height response, is indicated by the colormap; The colorbar represents the orientation selectivity in degrees;  FIG. 5C  shows cell-wise preferred orientation according to cell indices defined in FIG.  1 Aa, evaluated as the mean of the preferred orientation across all of the pixels in a cell (errorbars indicate 95% confidence intervals on the mean);  FIG. 5D  shows circular dispersion of the cellular orientation response; and  FIG. 5E  shows orientation selectivity of the cell (mean±sem across pixels). 
           [0020]      FIGS. 6A-6B  show the neuronal signal-to-noise ratio (SNR) estimated using the SCN model; The SNR is the ratio of the power of stimulus-evoked signal to that of stimulus-free background activity;  FIG. 6A  shows the signal power (P s ), noise power (P v ), and SNR of all 15 neurons (mean±sem computed across pixels); and  FIG. 6B  shows a spatial map of SNR at each pixel in dB which agrees closely with the anatomical map in FIG.  1 Ba. 
           [0021]      FIG. 7  illustrates a process sequence for acquisition of image data in accordance with preferred embodiments of the invention. 
           [0022]      FIG. 8  illustrates a process sequence for analyzing data to reduce noise image data in accordance with preferred embodiments of the invention. 
       
    
    
     DETAILED DESCRIPTION OF THE INVENTION 
       [0023]    The present invention relates to systems and methods for processing data measuring the dynamics of systems. Preferred embodiments include systems and methods for measuring the response of biological systems to a stimulus. The measurement of such stimulus typically contains the physiologic response and physiological noise as well as noise from the measurement system. 
         [0024]    Preferred embodiments of the present invention relate to a flexible local likelihood framework for analyzing imaging data. Preferred systems and methods appreciably enhance image contrast on a pixel-by-pixel basis by using an a signal plus colored noise (SCN) model to separate the salient stimulus-evoked neural responses in two-photon imaging data from the complex forms of physiological and recording noise common to such two-photon imaging measurements. A cyclic descent algorithm provides a computationally efficient approach for fitting the SCN model to the time-series of fluorescence responses. This process provides significantly denoised images (i.e. at each pixel, or selected groups of pixels, of the image) of neuronal populations, for example ( FIGS. 5A-5E ), and for tracking with improved subcellular resolution the temporal dynamics of individual neurons ( FIGS. 4A-4C ). 
         [0025]    First, this analysis framework has been applied, for example, to analyze neuronal response to a continuous and periodic stimulus, such as to visual cortex cells. However, it can be extended to other two-photon imaging protocols using other stimuli. For example, in two-photon imaging measurements the stimulus is applied either in a random noise-like manner to avoid anticipatory responses, or by interspersing blank frames with no relevant excitatory or inhibitory stimulus present. With some types of stimuli, the neural response can undergo a sharp transition at a specific stimulus threshold. Repeated trials with such a stimulus yield responses that resemble more a series of square waves than a sinusoid. Such a square wave pattern can be represented more efficiently by using Walsh functions as a basis set in lieu of sines and cosines. To apply this approach to data recorded from any of these measurements, simply replace the stimulus represented as a harmonic regression in the current SCN model with an appropriate formulation of the stimulus model for the given protocol. The remainder of the analysis paradigm, including model fitting, model selection, goodness-of-fit assessment and inference, then proceeds as described herein. 
         [0026]    Second, a signal plus Gaussian noise model is used in the analysis. However, in two-photon microscopy and other optical imaging modalities, the measured fluorescence intensity is a function of the discrete number of incident photons, and is therefore fundamentally a counting process and not necessarily Gaussian. The counting process nature of the two-photon measurements becomes more apparent as the acquisition rate increases. Furthermore, the measured fluorescence in some two-photon imaging measurements may also exhibit non-Gaussian behaviour due to distortions introduced during acquisition or post-processing. If the Gaussian model is not effective for a particular application, an alternative likelihood approach based on appropriately chosen non-Gaussian models can be used. For example, the neuronal spike trains can be extracted from two-photon data using template deconvolution. In this case, non-Gaussian likelihoods based on the theory of point processes and implemented using the generalized linear model can be adapted to analyze these two-photon imaging data. 
         [0027]    Third, the time-series of neural responses in each pixel can be modelled separately, and does not consider inter-pixel dependencies. Dependencies among the pixels are present because: the activity of a single cell is captured across multiple pixels; retinotopy and network dependencies may lead to similar behaviour in contiguous regions of the image; and data pre-processing procedures, such as spatial smoothing, introduce correlations. This problem currently confronts all biological imaging modalities and can be addressed by formulating appropriate biologically-based spatio-temporal models. However, due to its low computational complexity, the present analysis can be readily adapted to conduct large-volume, high-throughput imaging data analyses in real-time, even including adjusting for interpixel coupling. 
         [0028]    Imaging was performed with a two-photon laser scanning microscope  10  shown in  FIG. 1A  which uses a broadband laser light source  14  which can generate approximately 100 fsec pulses at 80 MHz. Using a shutter  15  and mirrors  16 ,  18  to direct illuminating light  12  from laser  14  through a Pockels cell or acoustic optic deflector  28 . Beam path optics  40 , including an alignment cage, focusing optics and a pinhole, directs the illuminating light to mirrors  44 ,  50  and onto first and second scanners  42 ,  46 . The scanners deflect an beam using a pair of moving mirrors (galvanometers or AODs) that optically couple the illuminating beam  12  into the microscope assembly with a beam expanding lens  52  and a collimating lens  54 . The beam incident on the tissue to be scanned is directed through a objective lens  67 . The response beam  60  from the sample  70 , such as brain tissue, is deflected by beamsplitter  62  through short pass filter  61  and measured by photomultiplier tubes  64 ,  65  with the returning light  60  separated into first and second components by a beamsplitter  66 . The detected data is delivered to image processor  80  for processing, storage in electronic or optical memory  82  and display  84 . Fluorescence was detected using photomultiplier tubes in whole-field detection mode and a 20×, 0.95 NA lens. The layer  2 / 3  area used for imaging was readily distinguished from layer  1  on the basis of the relative density of astrocytes and neurons. Visual stimuli were delivered via a 17″ LCD display  90  placed 0.15 m away from the eyes an the animal  70 . Thus, the system measures a response using the visual cortex of a mammalian subject, for example. The stimuli were generated with Matlab using the PsychoPhysics Toolbox. Neurons with relative fluorescence clearly distinguishable from the neuropil were chosen for subsequent cellular analysis. The output of the detector system is transmitted to a data processing system or computer  80 . The image data can be stored in the storage device  82  and displayed on display  84 . The data processor  85  or filter can be implemented using an application specific integrated circuit (ASIC). The image data can be accessed externally using a dedicated communication network or a public access network. The system  80  can also be programmed using software to perform the computer implemented operations described herein and/or to control a stimulation source  90 , such as a display of other source as described herein. 
         [0029]    Two-photon imaging of the fluorescent calcium indicator Oregon Green Bapta (OGB) was performed in the visual cortex of anesthetized ferrets. Neurons were bulk-loaded with OGB by intracortical injection of the AM-ester conjugated form of OGB using standard techniques. Time series traces of two-dimensional images (XYT) with a field-of-view of approximately 250×250 μm were collected at 1 Hz. The images were taken from cortical layers  2 / 3 . The stimulation method used square-wave gratings with 100% contrast which drifted at 3 Hz orthogonally to the orientation and rotated by 10° every second (each data frame). That is, the stimulus rotated 360° in 36 sec. The time series of the response of a neuron to this stimulus approximated a full orientation tuning curve. This stimulus was repeated three times in this particular embodiment. Prior to recording the stimulus responses, 10 image frames were acquired in the absence of any visual stimulus and their pixel-wise temporal means provided the estimate of the baseline level, f o . Manually determined boundaries delineate the set of pixels that define each cell, and each of the 15 cells thus identified consists of 79±25 pixels (FIG.  1 Ba). The data includes the time series of fluorescence on each pixel of each cell. The relative fluorescence on a given pixel is Δf k /f=(f k −f o )/f o , where f k  is the k th  time-sample of the measured fluorescence intensity, k=1, . . . , K. The number of samples is K=108 in the image time-series, as each application of the periodic stimulus lasts for a selected period, in one example, 36 sec, and was repeated three times. Using the above orientation stimulus, initial anatomical images of the neuronal population can be obtained by plotting the pixel-wise maximum fluorescence across the time-series, max k (Δf k ) (FIG.  1 Ba). The relative fluorescence traces from the imaged cells (FIG.  1 Bb and FIG.  1 Cb) show the diversity of orientation responses in these data. 
         [0030]    The measured fluorescence in an imaging measurement is a function of a stimulus, g(t), and noise in the system, v(t). The response, s(t) of the biological system depends on a nonlinear transformation of the stimulus input to the biological system. The effect of the input stimulus and noise on the measured fluorescence at a pixel as 
         [0000]        f ( t )= H ( s ( g ( t )), v ( t )).   (1)
 
         [0000]    Expanding the right side of Eq. 1 in a Volterra series yields 
         [0000]    
       
         
           
             
               
                 
                   
                     f 
                      
                     
                       ( 
                       t 
                       ) 
                     
                   
                   = 
                   
                     
                       
                         ∫ 
                         0 
                         t 
                       
                        
                       
                         
                           s 
                            
                           
                             ( 
                             
                               g 
                                
                               
                                 ( 
                                 t 
                                 ) 
                               
                             
                             ) 
                           
                         
                          
                         
                           
                             K 
                             g 
                           
                            
                           
                             ( 
                             
                               t 
                               - 
                               u 
                             
                             ) 
                           
                         
                          
                         
                             
                         
                          
                         
                            
                           u 
                         
                       
                     
                     + 
                     
                       
                         ∫ 
                         0 
                         t 
                       
                        
                       
                         
                           v 
                            
                           
                             ( 
                             
                               t 
                               - 
                               u 
                             
                             ) 
                           
                         
                          
                         
                           
                             K 
                             v 
                           
                            
                           
                             ( 
                             u 
                             ) 
                           
                         
                          
                         
                             
                         
                          
                         
                            
                           u 
                         
                       
                     
                     + 
                     
                       
                         ∫ 
                         0 
                         t 
                       
                        
                       
                         
                           ∫ 
                           0 
                           t 
                         
                          
                         
                           
                             s 
                              
                             
                               ( 
                               
                                 g 
                                  
                                 
                                   ( 
                                   t 
                                   ) 
                                 
                               
                               ) 
                             
                           
                            
                           
                             
                               K 
                               gg 
                             
                              
                             
                               ( 
                               
                                 
                                   t 
                                   - 
                                   u 
                                 
                                 , 
                                 
                                   t 
                                   - 
                                   w 
                                 
                               
                               ) 
                             
                           
                            
                           
                               
                           
                            
                           
                              
                             u 
                           
                            
                           
                               
                           
                            
                           
                              
                             w 
                           
                         
                       
                     
                     + 
                     
                       
                         ∫ 
                         0 
                         t 
                       
                        
                       
                         
                           ∫ 
                           0 
                           t 
                         
                          
                         
                           
                             v 
                              
                             
                               ( 
                               
                                 t 
                                 - 
                                 u 
                               
                               ) 
                             
                           
                            
                           
                             v 
                              
                             
                               ( 
                               
                                 t 
                                 - 
                                 w 
                               
                               ) 
                             
                           
                            
                           
                             
                               K 
                               vv 
                             
                              
                             
                               ( 
                               
                                 u 
                                 , 
                                 w 
                               
                               ) 
                             
                           
                            
                           
                               
                           
                            
                           
                              
                             u 
                           
                            
                           
                               
                           
                            
                           
                              
                             w 
                           
                         
                       
                     
                     + 
                     
                       
                         ∫ 
                         0 
                         t 
                       
                        
                       
                         
                           ∫ 
                           0 
                           t 
                         
                          
                         
                           
                             s 
                              
                             
                               ( 
                               
                                 g 
                                  
                                 
                                   ( 
                                   t 
                                   ) 
                                 
                               
                               ) 
                             
                           
                            
                           
                             v 
                              
                             
                               ( 
                               t 
                               ) 
                             
                           
                            
                           
                             
                               K 
                               gv 
                             
                              
                             
                               ( 
                               
                                 
                                   t 
                                   - 
                                   u 
                                 
                                 , 
                                 
                                   t 
                                   - 
                                   w 
                                 
                               
                               ) 
                             
                           
                            
                           
                               
                           
                            
                           
                              
                             u 
                           
                            
                           
                               
                           
                            
                           
                              
                             w 
                           
                         
                       
                     
                     + 
                     … 
                   
                 
               
               
                 
                   ( 
                   2 
                   ) 
                 
               
             
           
         
       
     
         [0000]    Take a discrete approximation to the first two terms on the right of the above expression and assume that the second-order terms are sufficiently small so that they can be approximated as ε k , independent Gaussian noise with mean zero and variance σ 2 . We then have 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       f 
                       k 
                     
                      
                     
                       
                         ∑ 
                         
                           i 
                           = 
                           1 
                         
                         L 
                       
                        
                       
                         
                           s 
                            
                           
                             ( 
                             
                               g 
                               k 
                             
                             ) 
                           
                         
                          
                         
                           K 
                           
                             g 
                             , 
                             
                               k 
                               - 
                               l 
                             
                           
                         
                       
                     
                   
                   + 
                   
                     
                       ∑ 
                       
                         j 
                         = 
                         1 
                       
                       p 
                     
                      
                     
                       
                         v 
                         
                           k 
                           - 
                           j 
                         
                       
                        
                       
                         α 
                         j 
                       
                     
                   
                   + 
                   
                     ɛ 
                     k 
                   
                 
               
               
                 
                   ( 
                   3 
                   ) 
                 
               
             
           
         
       
     
         [0000]    Taking the first h terms of the Fourier series expansion of g(s), 
         [0000]    
       
         
           
             
               
                 
                   
                     f 
                     k 
                   
                   = 
                   
                     
                       
                         ∑ 
                         
                           i 
                           = 
                           1 
                         
                         L 
                       
                        
                       
                         
                           [ 
                           
                             μ 
                             + 
                             
                               
                                 ∑ 
                                 
                                   i 
                                   = 
                                   1 
                                 
                                 h 
                               
                                
                               
                                 
                                   a 
                                   i 
                                 
                                  
                                 
                                   cos 
                                   ( 
                                   
                                     
                                       
                                         2 
                                          
                                         π 
                                          
                                         
                                             
                                         
                                          
                                         i 
                                       
                                       τ 
                                     
                                      
                                     k 
                                   
                                   ) 
                                 
                               
                             
                             + 
                             
                               
                                 b 
                                 i 
                               
                                
                               
                                 sin 
                                 ( 
                                 
                                   
                                     
                                       2 
                                        
                                       π 
                                        
                                       
                                           
                                       
                                        
                                       i 
                                     
                                     τ 
                                   
                                    
                                   k 
                                 
                                 ) 
                               
                             
                           
                           ] 
                         
                          
                         
                           K 
                           
                             g 
                             , 
                             
                               k 
                               - 
                               l 
                             
                           
                         
                       
                     
                     + 
                     
                       
                         ∑ 
                         
                           j 
                           = 
                           1 
                         
                         p 
                       
                        
                       
                         
                           α 
                           j 
                         
                          
                         
                           v 
                           
                             k 
                             - 
                             j 
                           
                         
                       
                     
                     + 
                     
                       ɛ 
                       k 
                     
                   
                 
               
               
                 
                   ( 
                   4 
                   ) 
                 
               
             
           
         
       
     
         [0000]    where τ is the period of the input stimulus. In the two-photon imaging measurement. Assuming that the effect of the stimulus on the system is instantaneous, the discrete kernel can be written in terms of a delta function as 
         [0000]    
       
         
           
             
               
                 
                   
                     K 
                     
                       x 
                       , 
                       y 
                     
                   
                   = 
                   
                     
                       δ 
                       
                         x 
                         , 
                         y 
                       
                     
                     = 
                     
                       { 
                       
                         
                           
                             1 
                           
                           
                             
                               
                                 if 
                                  
                                 
                                     
                                 
                                  
                                 x 
                               
                               = 
                               y 
                             
                           
                         
                         
                           
                             0 
                           
                           
                             otherwise 
                           
                         
                       
                     
                   
                 
               
               
                 
                   ( 
                   5 
                   ) 
                 
               
             
           
         
       
     
         [0000]    Substituting Eq. 5 into Eq. 4 yields 
         [0000]    
       
         
           
             
               
                 
                   
                     f 
                     k 
                   
                   = 
                   
                     μ 
                     + 
                     
                       
                         ∑ 
                         
                           i 
                           = 
                           1 
                         
                         h 
                       
                        
                       
                         { 
                         
                           
                             
                               a 
                               i 
                             
                              
                             
                               cos 
                               ( 
                               
                                 
                                   
                                     2 
                                      
                                     π 
                                      
                                     
                                         
                                     
                                      
                                     i 
                                   
                                   τ 
                                 
                                  
                                 k 
                               
                               ) 
                             
                           
                           + 
                           
                             
                               b 
                               i 
                             
                              
                             
                               sin 
                               ( 
                               
                                 
                                   
                                     2 
                                      
                                     π 
                                      
                                     
                                         
                                     
                                      
                                     i 
                                   
                                   τ 
                                 
                                  
                                 k 
                               
                               ) 
                             
                           
                         
                         } 
                       
                     
                     + 
                     
                       
                         ∑ 
                         
                           j 
                           = 
                           1 
                         
                         p 
                       
                        
                       
                         
                           α 
                           j 
                         
                          
                         
                           v 
                           
                             k 
                             - 
                             j 
                           
                         
                       
                     
                     + 
                     
                       ɛ 
                       k 
                     
                   
                 
               
               
                 
                   ( 
                   6 
                   ) 
                 
               
             
           
         
       
     
         [0000]    which represents the effect of the stimulus on the measured signal and the noise in the image data. 
         [0031]    Eqs. 1 and 2 are general so that many statistical models for imaging can be easily derived from them. For example, the model for fMRI data analysis takes the form 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       
                         
                           
                             f 
                              
                             
                               ( 
                               t 
                               ) 
                             
                           
                           = 
                             
                            
                           
                             
                               
                                 ∫ 
                                 0 
                                 t 
                               
                                
                               
                                 
                                   s 
                                    
                                   
                                     ( 
                                     t 
                                     ) 
                                   
                                 
                                  
                                 
                                   
                                     K 
                                     s 
                                   
                                    
                                   
                                     ( 
                                     
                                       t 
                                       - 
                                       u 
                                     
                                     ) 
                                   
                                 
                                  
                                 
                                     
                                 
                                  
                                 
                                    
                                   u 
                                 
                               
                             
                             + 
                             
                               
                                 ∫ 
                                 0 
                                 t 
                               
                                
                               
                                 
                                   v 
                                    
                                   
                                     ( 
                                     
                                       t 
                                       - 
                                       u 
                                     
                                     ) 
                                   
                                 
                                  
                                 
                                   
                                     K 
                                     v 
                                   
                                    
                                   
                                     ( 
                                     u 
                                     ) 
                                   
                                 
                                  
                                 
                                     
                                 
                                  
                                 
                                    
                                   u 
                                 
                               
                             
                             + 
                             
                               ɛ 
                                
                               
                                 ( 
                                 t 
                                 ) 
                               
                             
                           
                         
                       
                     
                     
                       
                         
                           ≈ 
                             
                            
                           
                             
                               
                                 ∫ 
                                 0 
                                 t 
                               
                                
                               
                                 
                                   s 
                                    
                                   
                                     ( 
                                     t 
                                     ) 
                                   
                                 
                                  
                                 
                                   
                                     K 
                                     s 
                                   
                                    
                                   
                                     ( 
                                     
                                       t 
                                       - 
                                       u 
                                     
                                     ) 
                                   
                                 
                                  
                                 
                                     
                                 
                                  
                                 
                                    
                                   u 
                                 
                               
                             
                             + 
                             
                               
                                 ∑ 
                                 
                                   j 
                                   = 
                                   1 
                                 
                                 q 
                               
                                
                               
                                 
                                   α 
                                   j 
                                 
                                  
                                 
                                   v 
                                   
                                     i 
                                     - 
                                     j 
                                   
                                 
                               
                             
                             + 
                             
                               ɛ 
                                
                               
                                 ( 
                                 t 
                                 ) 
                               
                             
                           
                         
                       
                     
                   
                    
                   
                     
 
                   
                    
                   where 
                    
                   
                     
 
                   
                    
                   
                     
                       
                         K 
                         s 
                       
                        
                       
                         ( 
                         t 
                         ) 
                       
                     
                     = 
                     
                       
                         t 
                         α 
                       
                        
                       
                          
                         
                           β 
                            
                           
                               
                           
                            
                           t 
                         
                       
                     
                   
                 
               
               
                 
                   ( 
                   7 
                   ) 
                 
               
             
           
         
       
     
         [0000]    is a gamma function used to model the hemodynamic response of the body, and the last term on the right is physiologic noise. 
         [0032]    Note that equation (6) can be represented as 
         [0000]        f   k   =s   k   +v   k    (8)
 
         [0000]    where, for each k=1, . . . , K, the signal is defined as the order h harmonic regression 
         [0000]    
       
         
           
             
               
                 
                   
                     s 
                     k 
                   
                   = 
                   
                     μ 
                     + 
                     
                       
                         ∑ 
                         
                           i 
                           = 
                           1 
                         
                         h 
                       
                        
                       
                         { 
                         
                           
                             
                               a 
                               i 
                             
                              
                             
                               cos 
                               ( 
                               
                                 
                                   2 
                                    
                                   π 
                                    
                                   
                                       
                                   
                                    
                                   i 
                                    
                                   
                                       
                                   
                                    
                                   k 
                                 
                                 τ 
                               
                               ) 
                             
                           
                           + 
                           
                             
                               b 
                               i 
                             
                              
                             
                               sin 
                               ( 
                               
                                 
                                   2 
                                    
                                   π 
                                    
                                   
                                       
                                   
                                    
                                   i 
                                    
                                   
                                       
                                   
                                    
                                   k 
                                 
                                 τ 
                               
                               ) 
                             
                           
                         
                         } 
                       
                     
                   
                 
               
               
                 
                   ( 
                   9 
                   ) 
                 
               
             
           
         
       
     
         [0000]    where τ is the period of the stimulus. Assuming that the correlated noise obeys the p th  order autoregressive model (AR(p)) given by 
         [0000]    
       
         
           
             
               
                 
                   
                     v 
                     k 
                   
                   = 
                   
                     
                       
                         ∑ 
                         
                           j 
                           = 
                           1 
                         
                         p 
                       
                        
                       
                         
                           α 
                           j 
                         
                          
                         
                           v 
                           
                             k 
                             - 
                             j 
                           
                         
                       
                     
                     + 
                     
                       ɛ 
                       k 
                     
                   
                 
               
               
                 
                   ( 
                   10 
                   ) 
                 
               
             
           
         
       
     
         [0000]    where the ε k  are assumed to be independent, identically distributed Gaussian random variables with zero mean and unknown variance σ 2 . Assume that the zeros of the characteristic polynomial, 
         [0000]    
       
         
           
             
               1 
               - 
               
                 
                   ∑ 
                   
                     j 
                     = 
                     1 
                   
                   p 
                 
                  
                 
                   
                     a 
                     j 
                   
                    
                   
                     z 
                     
                       - 
                       j 
                     
                   
                 
               
             
             , 
           
         
       
     
         [0000]    are outside the unit circle to insure stationarity of the AR(p) representation. The signal is modelled as a harmonic regression because the measured fluorescence shows a strong sinusoidal response at the period of the stimulus. This smooth, periodic structure can be well described by the low-order terms of a Fourier series expansion defined by the harmonic regression model. The AR(p) model represents the highly structured physiological noise components of the fluorescence measurements. 
         [0033]    To use the signal plus colored noise (SCN) model in Eqs. 1-3 to reduce noise in calcium imaging data, estimate its parameters β=(μ,a 1 ,b 1 , . . . , a h ,b h ), α=(α 1 , . . . , α p ) and σ 2  by maximum likelihood using a cyclic descent algorithm. The cyclic descent algorithm provides an efficient approach for solving this nonlinear estimation problem by iterating between computing the solutions to two highly tractable linear estimation problems. That is, at iteration l, given Ŵ −1(l−1)  the estimate of the inverse of the covariance matrix of v k  from iteration l−1, the algorithm computes {circumflex over (β)} (l) , the weighted least-squares estimate of β. The cyclic descent algorithm for joint estimation of harmonic and autoregressive coefficient vectors, {circumflex over (β)} and {circumflex over (α)}, from data vector f, is as follows.
       1) Initialize W (0) =1.   2) Let l=1.   3) {circumflex over (β)} (l) =(X T W −1(l)−1) X −1 X T W −1(l−1) f.   4) ĉ (l) =f−X{circumflex over (β)}(l).   5) Compute {circumflex over (α)} (l)  and {circumflex over (σ)} 2(l)  from {circumflex over (v)} (l)  by Burg algorithm.   6) If |{circumflex over (σ)} 2(l) −{circumflex over (σ)} 2(l−1) |/{circumflex over (σ)} 2(l−1) η, exit and return estimates   7) Compute W −1(l)  from its Cholesky factors using Levinson-Durbin recursion.   8) Increment and go to step 3.       
 
         [0042]    Given {circumflex over (β)} (l) , the algorithm computes {circumflex over (α)} (l)  and {circumflex over (σ)} 2(l)  using the Burg algorithm and Ŵ −1(l)  using the Levinson-Durbin recursion. The Burg algorithm for autoregressive (AR) coefficient estimation uses least squares forward-backward prediction error minimization and is constrained to satisfy Levinson-Durbin recursions (LDR)[34,35]. For the AR(p)model, 
         [0000]    
       
         
           
             
               v 
               k 
             
             = 
             
               
                 
                   ∑ 
                   
                     j 
                     = 
                     1 
                   
                   p 
                 
                  
                 
                   
                     a 
                     j 
                   
                    
                   
                     v 
                     
                       k 
                       - 
                       j 
                     
                   
                 
               
               + 
               
                 
                   ɛ 
                   k 
                 
                 . 
               
             
           
         
       
     
         [0000]    the Burg algorithm estimates the coefficients {α 1 , . . . , α p } and innovations variance σ 2  given the time series v k , where k=1, . . . , K, as follows:
       1) Let e k   (0) =v k  for k=2, . . . , K, and u k   (0) =v k  for k=1, . . . , K−1.   2) Compute       
 
         [0000]    
       
         
           
             
               ∂ 
               
                 2 
                  
                 
                   ( 
                   0 
                   ) 
                 
               
             
              
             
               = 
               
                 
                   1 
                   K 
                 
                  
                 
                   
                     ∑ 
                     
                       k 
                       = 
                       1 
                     
                     K 
                   
                    
                   
                     
                       
                          
                         
                           v 
                           k 
                         
                          
                       
                       2 
                     
                     . 
                   
                 
               
             
           
         
       
       
         
           
             3) Let l=1. 
           
         
       
     
         [0000]    
       
         
           
             
               
                 
                   
                     
                       α 
                       ^ 
                     
                     1 
                     
                       ( 
                       l 
                       ) 
                     
                   
                   = 
                   
                     2 
                      
                     
                       
                         
                           
                             ∑ 
                             
                               k 
                               = 
                               
                                 l 
                                 + 
                                 1 
                               
                             
                             K 
                           
                            
                           
                             ( 
                             
                               
                                 e 
                                 k 
                                 
                                   ( 
                                   
                                     l 
                                     - 
                                     1 
                                   
                                   ) 
                                 
                               
                                
                               
                                 u 
                                 
                                   k 
                                   - 
                                   1 
                                 
                                 
                                   ( 
                                   
                                     l 
                                     - 
                                     1 
                                   
                                   ) 
                                 
                               
                             
                             ) 
                           
                         
                         
                           
                             ∑ 
                             
                               k 
                               = 
                               
                                 l 
                                 + 
                                 1 
                               
                             
                             K 
                           
                            
                           
                             ( 
                             
                               
                                 
                                    
                                   
                                     e 
                                     k 
                                     
                                       ( 
                                       
                                         l 
                                         - 
                                         1 
                                       
                                       ) 
                                     
                                   
                                    
                                 
                                 2 
                               
                               + 
                               
                                 
                                    
                                   
                                     u 
                                     
                                       k 
                                       - 
                                       1 
                                     
                                     
                                       ( 
                                       
                                         l 
                                         - 
                                         1 
                                       
                                       ) 
                                     
                                   
                                    
                                 
                                 2 
                               
                             
                             ) 
                           
                         
                       
                       . 
                     
                   
                 
               
               
                 
                   4 
                   ) 
                 
               
             
           
         
       
       
         
           
             5) {circumflex over (σ)} 2(l) =(1−|{circumflex over (α)} l   (l) | 2 ){circumflex over (σ)} 2(l−1) . 
             6) If l&gt;1, {circumflex over (α)} j   (l) ={circumflex over (α)} j   (l−1) −{circumflex over (α)} l   (l) {circumflex over (α)} m−1   (m−1)  for j=1, . . . , l−1. 
             7) e k   (l) =e k   (l−1) −{circumflex over (α)} l   (l) e k−1   (l−1)  for k=l+1, . . . , K. 
             8) u k   (l) =u k−1   (l−1) −{circumflex over (α)} l   (l) u k   (l−1)  for k=l, . . . , K−1. 
             9) If l=p, exit and return estimated AR model parameters {{circumflex over (α)} 1   (l) , . . . , {circumflex over (α)} p   (l) ,{circumflex over (α)} 2(l) }. 
             10) Increment l and go to Step 4. 
           
         
       
     
         [0052]    For certain application the Cholesky factorization is used. The (K+1)×(K+1) covariance matrix of the AR process can be written in its Cholesky form as W=LDL T . The inverse matrix W −1 =L −T D −1 L −1  is used in the cyclic descent algorithm and can be calculated efficiently using Levinson-Durbin recursions, where 
         [0000]    
       
         
           
             
               D 
               
                 - 
                 1 
               
             
             = 
             
               diag 
                
               
                 ( 
                 
                   
                     1 
                     
                       ∂ 
                       
                         2 
                          
                         
                           ( 
                           0 
                           ) 
                         
                       
                     
                   
                   , 
                   … 
                    
                   
                       
                   
                   , 
                   
                     1 
                     
                       ∂ 
                       
                         2 
                          
                         
                           ( 
                           p 
                           ) 
                         
                       
                     
                   
                   , 
                   … 
                    
                   
                       
                   
                   , 
                   
                     1 
                     
                       ∂ 
                       
                         2 
                          
                         
                           ( 
                           p 
                           ) 
                         
                       
                     
                   
                 
                 ) 
               
             
           
         
       
       
         
           and 
         
       
       
         
           
             
               L 
               
                 - 
                 1 
               
             
             = 
             
               
                 [ 
                 
                   
                     
                       1 
                     
                     
                       
                           
                       
                     
                     
                       
                           
                       
                     
                     
                       
                           
                       
                     
                     
                       
                           
                       
                     
                     
                       
                           
                       
                     
                     
                       
                           
                       
                     
                   
                   
                     
                       
                         - 
                         
                           
                             α 
                             ^ 
                           
                           1 
                           
                             ( 
                             1 
                             ) 
                           
                         
                       
                     
                     
                       1 
                     
                     
                       
                           
                       
                     
                     
                       
                           
                       
                     
                     
                       
                           
                       
                     
                     
                       
                           
                       
                     
                     
                       
                           
                       
                     
                   
                   
                     
                       
                         - 
                         
                           
                             α 
                             ^ 
                           
                           2 
                           
                             ( 
                             2 
                             ) 
                           
                         
                       
                     
                     
                       
                         - 
                         
                           
                             α 
                             ^ 
                           
                           1 
                           
                             ( 
                             2 
                             ) 
                           
                         
                       
                     
                     
                       1 
                     
                     
                       
                           
                       
                     
                     
                       
                           
                       
                     
                     
                       
                           
                       
                     
                     
                       
                           
                       
                     
                   
                   
                     
                       ⋮ 
                     
                     
                       ⋮ 
                     
                     
                       ⋮ 
                     
                     
                       
                           
                       
                     
                     
                       
                           
                       
                     
                     
                       
                           
                       
                     
                     
                       
                           
                       
                     
                   
                   
                     
                       
                         - 
                         
                           
                             α 
                             ^ 
                           
                           p 
                           
                             ( 
                             p 
                             ) 
                           
                         
                       
                     
                     
                       
                         - 
                         
                           
                             α 
                             ^ 
                           
                           
                             p 
                             - 
                             1 
                           
                           
                             ( 
                             p 
                             ) 
                           
                         
                       
                     
                     
                       
                         - 
                         
                           
                             α 
                             ^ 
                           
                           
                             p 
                             - 
                             2 
                           
                           
                             ( 
                             p 
                             ) 
                           
                         
                       
                     
                     
                       … 
                     
                     
                       
                           
                       
                     
                     
                       
                           
                       
                     
                     
                       
                           
                       
                     
                   
                   
                     
                       
                           
                       
                     
                     
                       
                         - 
                         
                           
                             α 
                             ^ 
                           
                           p 
                           
                             ( 
                             p 
                             ) 
                           
                         
                       
                     
                     
                       
                         - 
                         
                           
                             α 
                             ^ 
                           
                           
                             p 
                             - 
                             1 
                           
                           
                             ( 
                             p 
                             ) 
                           
                         
                       
                     
                     
                       … 
                     
                     
                       
                           
                       
                     
                     
                       
                           
                       
                     
                     
                       
                           
                       
                     
                   
                   
                     
                       ⋮ 
                     
                     
                       ⋮ 
                     
                     
                       ⋮ 
                     
                     
                       ⋱ 
                     
                     
                       
                           
                       
                     
                     
                       
                           
                       
                     
                     
                       
                           
                       
                     
                   
                   
                     
                       
                           
                       
                     
                     
                       
                           
                       
                     
                     
                       
                           
                       
                     
                     
                       … 
                     
                     
                       
                         - 
                         
                           
                             α 
                             ^ 
                           
                           1 
                           
                             ( 
                             p 
                             ) 
                           
                         
                       
                     
                     
                       1 
                     
                     
                       
                           
                       
                     
                   
                   
                     
                       
                           
                       
                     
                     
                       
                           
                       
                     
                     
                       
                           
                       
                     
                     
                       … 
                     
                     
                       
                         - 
                         
                           
                             α 
                             ^ 
                           
                           2 
                           
                             ( 
                             p 
                             ) 
                           
                         
                       
                     
                     
                       
                         - 
                         
                           
                             α 
                             ^ 
                           
                           1 
                           
                             ( 
                             p 
                             ) 
                           
                         
                       
                     
                     
                       1 
                     
                   
                 
                 ] 
               
               . 
             
           
         
       
     
         [0053]    The coefficient and variance estimates of AR models up to order p are computed by the Burg algorithm during AR(p) model parameter estimation and are therefore already available to populate D −1  and L −1 . Hence this is a highly efficient procedure for computing W −1  that obviates explicit matrix inversion. 
         [0054]    The Levinson-Durbin algorithm provides an efficient method of computing Ŵ −1(l)  from {circumflex over (α)} (l)  and {circumflex over (σ)} 2(l) . This efficiency is significant for large K since W is a K×K matrix. The stopping criterion uses the condition that the relative change in the estimate of {circumflex over (σ)} 2  between iterations is smaller than the threshold |{circumflex over (σ)} 2(l) −{circumflex over (σ)} 2(l−1) |/{circumflex over (σ)} 2(l−1) &lt;. If this stopping criterion is satisfied, the algorithm stops. Otherwise, given Ŵ −1(l) , the algorithm proceeds to iteration l+1. With this stopping criterion based on the residual variance, the cyclic descent algorithm applied to the calcium imaging data consistently converges in 3 to 5 iterations. This class of iterative algorithms are known to converge at least linearly, and these results show that the cyclic descent algorithm achieves exponential convergence ( FIG. 2A ). This cyclic descent algorithm avoids computing the gradients and Hessians required for Newton&#39;s procedure and the multiple iterations characteristic of the expectation maximization algorithm. A theorem due to Corradi indicates that the cyclic descent algorithm finds the global maximum of the likelihood. 
         [0055]    Separation of the fluorescence data into signal and correlated noise relies on choosing appropriate values of h and p. To make these selections, use model selection and goodness-of-fit criteria. For preferred embodiments, these are, respectively, the corrected Akaike information criterion (AICc) and analyses of the correlation structure and spectra of the residuals from the model fits. 
         [0056]    For the order h harmonic regression and AR(p) model, the Akaike information criterion (AIC) is defined as 
         [0000]      AIC= K  log σ 2 +2(2 h+p+ 1)
 
         [0000]    and the corrected AIC (AICc) is given by 
         [0000]    
       
         
           
             AICc 
             = 
             
               
                 A 
                  
                 
                     
                 
                  
                 I 
                  
                 
                     
                 
                  
                 C 
               
               + 
               
                 
                   2 
                    
                   
                     ( 
                     
                       
                         2 
                          
                         h 
                       
                       + 
                       p 
                       + 
                       1 
                     
                     ) 
                   
                    
                   
                     ( 
                     
                       
                         2 
                          
                         h 
                       
                       + 
                       p 
                       + 
                       2 
                     
                     ) 
                   
                 
                 
                   K 
                   - 
                   
                     ( 
                     
                       
                         2 
                          
                         h 
                       
                       + 
                       p 
                       + 
                       1 
                     
                     ) 
                   
                   - 
                   1 
                 
               
             
           
         
       
     
         [0057]    These criteria help determine the optimal tradeoff between model parsimony and estimation accuracy. In this SCN model, the pseudo-periodic AR component alone is capable of capturing some of the structure in the time series, reflecting the competing nature of the two model components. As an example from a representative cell, consider the AICc surface for various harmonic and AR model orders, averaged across the cell&#39;s pixels (FIG.  2 Ba). When the harmonic component is absent (h=0), the AR model can capture much of the periodicity in the data, including that due to the stimulus response. The minimum of the two-dimensional AICc surface for this cell occurs at h=2 and p=2. Unlike the SCN model, the AR model alone does not decompose the data into stimulus-driven and background components. Therefore this approach fits the SCN model first with only the harmonic component (i.e. p=0 and {circumflex over (f)} k =ŝ k +{circumflex over (ε)} k ) and uses AICc to determine the optimal harmonic order, h. In so doing, the  4  harmonics yield the minimum AICc for this cell (FIG.  2 Bb). Then, fit the complete model ({circumflex over (f)} k =ŝ k +{circumflex over (v)} k ) to the data using the chosen h and determine the optimal AR order, p. When h=4, the optimal AR order for this cell according to AICc is 3 (FIG.  2 Bb). The goodness-of-fit analysis is another important consideration whose purpose is to insure that the residuals, {circumflex over (ε)} k , are white to confirm that all of the systematic variance in the data has been explained by the model&#39;s harmonic and AR components. To determine the whiteness metric, the Ljung-Box portmanteau test can be used with 95% confidence applied to the first 20 lags of the residual autocorrelation function. 
         [0058]    The AR residuals, ε k , have the normalized autocorrelation function (ACF) at lag τ given by r τ (ε)=d τ /d 0 , where 
         [0000]    
       
         
           
             
               d 
               r 
             
             = 
             
               
                 1 
                 K 
               
                
               
                 
                   ∑ 
                   
                     m 
                     = 
                     1 
                   
                   
                     K 
                     - 
                     τ 
                   
                 
                  
                 
                   
                     ( 
                     
                       
                         ɛ 
                         m 
                       
                       - 
                       
                         ɛ 
                         _ 
                       
                     
                     ) 
                   
                    
                   
                     
                       ( 
                       
                         
                           ɛ 
                           
                             m 
                             + 
                             τ 
                           
                         
                         - 
                         
                           ɛ 
                           _ 
                         
                       
                       ) 
                     
                     . 
                   
                 
               
             
           
         
       
     
         [0000]    The approximate 95% bounds of whiteness for the residual ACF are given by ±1/√{square root over (K)}. The corresponding Ljung-Box portmanteau test statistic is 
         [0000]    
       
         
           
             Q 
             = 
             
               
                 K 
                  
                 
                   ( 
                   
                     K 
                     + 
                     2 
                   
                   ) 
                 
               
                
               
                 
                   ∑ 
                   
                     τ 
                     = 
                     1 
                   
                   T 
                 
                  
                 
                   
                     
                       r 
                       τ 
                       2 
                     
                      
                     
                       ( 
                       ɛ 
                       ) 
                     
                   
                   
                     ( 
                     
                       K 
                       - 
                       τ 
                     
                     ) 
                   
                 
               
             
           
         
       
     
         [0000]    where conventionally T=20 ACF taps are considered. The null hypothesis for the whiteness test is H 0 =Q˜X α,T−p   2 , where α denotes the alpha level, usually taken as 5% in the analysis. 
         [0059]    Applying this metric makes it evident that inclusion of an AR component (i.e. p&gt;0) is necessary to obtain white residuals even when h is considerably large (FIG.  2 Bc). Examination of the results obtained with inclusion of the AR component, it is apparent that the AR(3) model determined by AICc is insufficient. Instead, an AR(10) model is required to generate white residuals for this cell&#39;s data. Modelling the data with 4 harmonics and AR(10), and analyzing the spectra of the model components obtained using the fast Fourier transform, certain dominant periodicities are observed in the fluorescence data, some of which closely correspond to the stimulus frequency and its low harmonics ( FIG. 2   d ). The harmonic component in this model, ŝ k , captures those dominant modes in the form of a line spectrum. The nonuniform spectrum of background activity, including the significant activity observed at low frequencies, is captured by the AR component, {circumflex over (v)} k . The spectrum of the residuals, {circumflex over (ε)} k , is approximately white. The normalized cumulative periodogram (NCP) of averaged across the pixels, falls well outside the 95% whiteness bounds (FIG.  2 Be). In contrast the &amp; NCP nearly coincides with white noise NCP as desired. This analysis can be used to determine the required harmonic and AR model orders, which may vary from cell to cell. Note that h=4 and p=10 satisfy the above requirements for most of the cells in this data-set ( FIG. 3A  and Table 1). 
         [0000]                                                              TABLE 1                           Optimal   Optimal AR   Optimal AR               harmonic order   order from   order from LB           Cell index   from AICc   AICc   criterion                                        1   5   3   10           2   4   2   9           3   2   2   7           4   3   3   9           5   3   3   11           6   3   2   11           7   4   3   9           8   3   3   6           9   4   3   10           10   4   3   8           11   4   3   8           12   6   3   6           13   4   3   7           14   6   3   8           15   4   3   4                        
Table 1. Optimal harmonic and AR orders predicted by AICc and Ljung-Box test for each cell. Based on these results, for this data set, a good fit to the data is obtained with 4 harmonics and about 10 AR coefficients.
 
         [0060]    Therefore these values are used for further analysis. Once the optimal order for the SCN model has been determined and the goodness-of-fit assessment completed, the model is used to make biological determinations. 
         [0061]    The SCN model can be used to characterize the relative fluorescence response to the stimulus at a single pixel. The close fit between the data and the signal estimate establishes the validity of this model (FIG.  3 Ba). The signal component, ŝ k , provides a denoised estimate of the response for three trials of stimulus presentation (FIG.  3 Bb). The autocorrelation function and quantiles of the residual, ŝ k , confirm that it is consistent with an independent Gaussian process (FIG.  3 Bc and Bd). Then, construct the denoised response tuning curve, û(φ), where φ is the orientation, along with the approximate 95% confidence intervals and analyze the response characteristics. 
         [0062]    For the i th  harmonic regression coefficient, β i , estimated by the weighted least squares procedure, the approximate 95% confidence intervals are given by 
         [0000]      {circumflex over (β)} i   −se   i   tα/   2   , K− 2 b− 1≦β i ≦{circumflex over (β)} i   +se   i   tα/   2   , K− 2 k− 1
 
         [0000]    where {circumflex over (β)} i  is the coefficient estimate, α=0.05 and se i =√{square root over ((X TŴ   −1 X))} u   −1 . Similarly, for the j th  AR coefficient, ψ j , the confidence intervals 
         [0000]    
       
         
           
             
               
                 ψ 
                 ⋒ 
               
               - 
               
                 
                   se 
                   j 
                 
                  
                 t 
                  
                 
                     
                 
                  
                 
                   α 
                   
                     / 
                     2 
                   
                 
               
             
             , 
             
               
                 K 
                 - 
                 p 
               
               ≤ 
               
                 ψ 
                 j 
               
               ≤ 
               
                 
                   
                     ψ 
                     ⋒ 
                   
                   j 
                 
                 + 
                 
                   
                     se 
                     j 
                   
                    
                   t 
                    
                   
                       
                   
                    
                   
                     α 
                     
                       / 
                       2 
                     
                   
                 
               
             
             , 
             
               K 
               - 
               p 
             
           
         
       
       
         
           
             
               where 
                
               
                   
               
                
               
                 se 
                 j 
               
             
             = 
             
               
                 
                   
                     
                       σ 
                       2 
                     
                     
                       K 
                       - 
                       p 
                     
                   
                    
                   
                     
                       ( 
                       
                         
                           
                             V 
                             ⋒ 
                           
                           T 
                         
                          
                         
                           V 
                           ⋒ 
                         
                       
                       ) 
                     
                     jj 
                     
                       - 
                       1 
                     
                   
                 
               
                
               
                   
               
                
               and 
             
           
         
       
       
         
           
             
               V 
               ⋒ 
             
             = 
             
               [ 
               
                 
                   
                     
                       
                         v 
                         ⋒ 
                       
                       
                         - 
                         1 
                       
                     
                   
                   
                     … 
                   
                   
                     
                       
                         v 
                         ⋒ 
                       
                       
                         - 
                         j 
                       
                     
                   
                 
                 
                   
                     ⋮ 
                   
                   
                     ⋱ 
                   
                   
                     ⋮ 
                   
                 
                 
                   
                     
                       
                         v 
                         ⋒ 
                       
                       
                         K 
                         - 
                         1 
                       
                     
                   
                   
                     … 
                   
                   
                     
                       
                         v 
                         ⋒ 
                       
                       
                         K 
                         - 
                         j 
                       
                     
                   
                 
               
               ] 
             
           
         
       
     
         [0000]    is a K×p matrix containing the time-lagged samples of the AR process. Based on these, use a t-test of significance for the coefficients. The alternate hypothesis for the harmonic model is 
         [0000]    
       
         
           
             
               
                 
                   H 
                   1 
                 
                  
                 
                   : 
                 
                  
                 
                     
                 
                  
                 
                    
                   
                     
                       
                         β 
                         ⋒ 
                       
                       i 
                     
                     
                       se 
                       i 
                     
                   
                    
                 
               
               &gt; 
               
                 t 
                  
                 
                     
                 
                  
                 
                   α 
                   
                     / 
                     2 
                   
                 
               
             
             , 
             
               K 
               - 
               
                 2 
                  
                 h 
               
               - 
               1 
             
           
         
       
     
         [0000]    and similarly, for the AR model: 
         [0000]    
       
         
           
             
               
                 
                   H 
                   1 
                 
                  
                 
                   : 
                 
                  
                 
                     
                 
                  
                 
                    
                   
                     
                       
                         ψ 
                         ⋒ 
                       
                       i 
                     
                     
                       se 
                       i 
                     
                   
                    
                 
               
               &gt; 
               
                 t 
                  
                 
                     
                 
                  
                 
                   α 
                   
                     / 
                     2 
                   
                 
               
             
             , 
             
               K 
               - 
               
                 p 
                 . 
               
             
           
         
       
     
         [0000]    The corresponding parameter is significant if the hypothesis is rejected. 
         [0063]    This signal estimate (FIG.  3 Be) captures the key features of the neuronal response, such as the location and width of tuning to the stimulus effect. The use of a Gaussian or cosine curve to fit the data can constrain the response estimate to have a simple, symmetric shape. The present model allows the tuning curve estimate to reflect faithfully the complex shape of the cell response observed in the data with minimal computational complexity. 
         [0064]    Denoised images can be constructed using the signal component estimate, ŝ k , at each pixel. A comparison of the fluorescence response estimates of pixels around a cell obtained with conventional across-trial averaging and with the SCN model ( FIG. 4   a ) demonstrates the enhanced image contrast and clarity provided by the model. This denoising method delineates the stimulus response within the cell soma and allows improved observation of calcium dynamics around the cell associated with excitation. In a second cell ( FIG. 4   b ), the background activity at the bottom of the frame is substantially reduced in intensity by this method. The increased contrast of the denoised images reveals additional subcellular processes not discernible in the conventional images obtained by averaging ( FIG. 4   c ). This enables characterization of the source of these signals and their behaviour. 
         [0065]    By denoising two-photon imaging data with the SCN model, reliable estimates of several quantities are provided that can be used to describe neuronal behaviour. For example, the orientation preferences of the primary visual cortex neurons in the sample can be measured. At each pixel, the preferred orientation,  φ , is obtained as the orientation at which the denoised tuning curve peak occurs, i.e.,  φ =arg max φ {û(φ)}. Note that the neighbouring cells show a preference for similar orientations with a smooth spatial variation ( FIGS. 5   a  and  c ). Among the cells, there are different degrees of deviation from the mean preferred orientation ( FIG. 5   d ). This deviation is particularly high for two of the cells possibly due to somatic and dendritic dynamics. Calculate the orientation selectivity from the tuning curve û(φ) as the half-width at half-height. Analysis of orientation selectivity at each pixel reveals both spatial trends and intra-cellular variations ( FIG. 5   b ). A wide-ranging level of orientation selectivity is apparent ( FIG. 5   e ). These examples demonstrate that the SCN model can facilitate a variety of functional analyses with high reliability. 
         [0066]    For a circular random variable, φ, the circular mean is calculated as 
         [0000]    
       
         
           
             
               ϕ 
               _ 
             
             = 
             
               
                 tan 
                 
                   - 
                   1 
                 
               
                
               
                 
                   
                     ∑ 
                     
                       i 
                       = 
                       1 
                     
                     n 
                   
                    
                   
                     sin 
                      
                     
                         
                     
                      
                     
                       ϕ 
                       i 
                     
                   
                 
                 
                   
                     ∑ 
                     
                       i 
                       = 
                       1 
                     
                     n 
                   
                    
                   
                     cos 
                      
                     
                         
                     
                      
                     
                       ϕ 
                       i 
                     
                   
                 
               
             
           
         
       
     
         [0000]    with its 95% confidence interval given by 
         [0000]        φ ±sin −1 ( z   a/2 σ φ )
 
         [0000]    Take, for example, α=0.05, σ φ =√{square root over (δ φ /N)} is the circular standard error, and δ φ =|1−N −1 Σ i=1   N  cos 2(φ i −  φ )|/2N −1 Σ i=1   N  cos (φ 1 −  φ ) is the circular dispersion. 
         [0067]    The ratio of stimulus-evoked response (signal) to background activity (colored noise) provides a natural definition of the neuronal signal-to-noise ratio (SNR) and a way to compare the relative responsiveness of the cells to the stimulus. Calculate the signal power from the harmonic model as 
         [0000]    
       
         
           
             
               
                 
                   
                     P 
                     2 
                   
                   = 
                   
                     
                       
                         1 
                         2 
                       
                        
                       
                         
                           ∑ 
                           
                             i 
                             = 
                             1 
                           
                           n 
                         
                          
                         
                           
                              
                             
                               a 
                               i 
                             
                              
                           
                           2 
                         
                       
                     
                     + 
                     
                       
                         
                            
                           
                             b 
                             2 
                           
                            
                         
                         2 
                       
                       . 
                     
                   
                 
               
               
                 
                   ( 
                   11 
                   ) 
                 
               
             
           
         
       
     
         [0000]    The total power of the autoregressive model is 
         [0000]    
       
         
           
             
               
                 
                   
                     P 
                     v 
                   
                   = 
                   
                     ∫ 
                     
                       
                         σ 
                         2 
                       
                        
                       
                         
                            
                           
                             1 
                             - 
                             
                               
                                 ∑ 
                                 
                                   j 
                                   = 
                                   1 
                                 
                                 p 
                               
                                
                               
                                 
                                   α 
                                   j 
                                 
                                  
                                 
                                    
                                   
                                     
                                       - 
                                       2 
                                     
                                      
                                     π 
                                      
                                     
                                         
                                     
                                      
                                     ijf 
                                   
                                 
                               
                             
                           
                            
                         
                         
                           - 
                           2 
                         
                       
                        
                       
                         
                            
                           f 
                         
                         . 
                       
                     
                   
                 
               
               
                 
                   ( 
                   12 
                   ) 
                 
               
             
           
         
       
     
         [0000]    It follows that the SNR can be computed as the ratio of the signal power to the colored noise power as 
         [0000]    
       
         
           
             
               
                 
                   
                     S 
                      
                     
                         
                     
                      
                     N 
                      
                     
                         
                     
                      
                     R 
                   
                   = 
                   
                     
                       
                         P 
                         s 
                       
                       
                         P 
                         v 
                       
                     
                     . 
                   
                 
               
               
                 
                   ( 
                   13 
                   ) 
                 
               
             
           
         
       
     
         [0068]    The cells in the data set exhibit a wide range of SNRs ( FIG. 6   a ). The locations of the cells with high SNR ( FIG. 6   b ) agree closely with the anatomical map (FIG.  1 Ba), and therefore the pixel-wise SNR maps can be used to identify robustly the locations of cells that respond to the given stimulation. 
         [0069]    A process sequence illustrating a method  100  of acquiring image data in accordance with preferred embodiments of the invention is illustrated in  FIG. 7 . A fluorescent indicator, or other agent, is inserted  102  into the region of interest. Scan parameters are selected  104  to define an illumination pattern, or to select parameters for the data collection process, such as the pulse sequence for fMRI imaging procedure. A background image can be recorded  106 . The region of interest can then be illuminated  108  using, for example, two photon excitation for a selected period of time during a stimulus period. First image data is recorded  109  and optionally processed in real time. A second illumination period  110  (or additional data collection periods) can be performed to record second image data with the same or different scan parameters. The image data is then processed  112  to reduce noise and thereby generate processed image data. 
         [0070]    Illustrated in  FIG. 8  is a process sequence  200  for the processing of image data in accordance with preferred embodiments of the invention. As described herein in greater detail, the parameters for the harmonic (first) and autoregressive (second) vectors are estimated  206 . Using a converging iterative (cyclic descent) process  206 . The preferred harmonic order and the preferred autoregressive order are then determined  210 ,  214 . The processor then formulates  218  the selected parameters (filter) to be applied to the noise. The processor then applies  220  this to the data to remove the noise from the image data which can then be displayed  222 . From this denoised image additional details can be generated a metric  224  characterizing the quality of the adjusted data and/or a map of the signal-to-noise ratio  228 . 
         [0071]    While this invention has been particularly shown and described with reference to preferred embodiments and equivalents thereof, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the scope of the invention encompassed by the appended claims.