# Observation matrix

*November 30, 2020*

# Introduction

To this date, CMB-S4 time-domain simulations have been based on the TOAST framework for time-ordered data simulation and analysis. This avails to the pipelines to all simulation and data reduction modules available in the TOAST framework. A shortcoming of these simulations has been the absence of a BICEP/Keck-style observation matrix that transforms input signal maps into output maps with the appropriate mode loss from time domain filtering.

We have developed a new TOAST operator, OpFilterBin, that applies a stack of filters to the TOD and bins a map. OpFilterBin can also calculate and output an observation matrix consistent with the filter stack. In this post we test OpFilterBin on a 10-day reference design tool simulation to establish accuracy and performance of the new operator.

# Mathematical

The TOAST filter-and-bin map is computed as

where is the pointing matrix, is the diagonal white noise matrix, is the filtering matrix:

and is the template matrix. Each column of is a template that gets projected out from the TOD. For the time being it consists of Legendre polynomials representing the ground and atmosphere. BICEP/Keck-style deprojection templates will be added in the future.

Introduction of noise weighting () in the filtering matrix allows us to mask or down-weight certain samples in filtering while still retaining them in the filtered signal. This is particularly useful for bright point sources.

Note that in this formalism all of the filtering is applied in a single step, rather than in sequence. This avoids introducing previously-filtered modes back into the TOD in subsequent filtering steps when the templates are not orthogonal. It does impose a requirement on the template covariance matrix, : it has to be invertible. This means, for example, that the same polynomial orders should not be present in both the ground and half-scan templates.