## A Versatile Program for Bolometer Array Data Reduction

SANEPIC is based on a maximum likelihood approach, with several approximations, and focuses specifically on the regime where there are a large number of detectors sampling the same map of the sky, and allowing the possibility for strong correlation between detectors time streams.

### Model of the data

The data for detector i observing at a given wavelength and at a time sample t can be written as

$$d_{it} = {[A_i]}_{tp} s_{p} + n_{it}$$

where $p$ labels the pixel in the final map, $A_i$ is the pointing matrix for bolometer $i$, $s_p$ is the amplitude at pixel $p$, and $n$ is the noise amplitude at time $t$ for bolometer $i$. Assuming a symetric beam, SANEPIC use a maximum likelihood technique to derive the sky map $s_p$ convolved by the instrument beam. The noise term $n_{it}$ represent the sum of all the contributions to the timestream which do not reproject on the sky and can be decomposed as

$$n_{it} = \tilde{n}_{it} + \alpha_i c_t$$

where the first term is the noise which is uncorrelated between detectors and the second term represents the common-mode component of the noise, rescaled by an amplitude parameter i which depends on the detector but not on time. The noise is assumed to be Gaussian and stationary

### Maximum Likelihood map-making

Assuming the simple linear model above, the maximum likelihood solution is estimated by the so called map making equation :

$\hat{s} = {(A^tN^{-1}A)}^{-1} A^t N^{-1} d$

where $N_{{ii}^\prime {tt}^\prime} = \langle{n_{it} . n_{i^\prime t^\prime}^t }\rangle$ is the noise covariance matrix. Computation of this equation is far from trivial for most astronomical application, due to the large amount of data. Using methods similar to the one developed for MADCAP, SANEPIC is able to resolve this equation by performing a transposition into Fourier space, under the assumption that each timestream is circulant.