Previous page XQML

1.  Introduction

2.  XQML code :

2.1  cross :

  • Matrices {$S$} and {$ \displaystyle \frac{d S}{d C_b} $} are computed at the same time.
  • Define matrix {$ \displaystyle P_b = \frac{d S}{d C_b}$}
  • Diagonal pixel covariance matrix, with {$ V_A = $} pixel noise variance for map A. Same for map B :
    • {$ C^{AB} = S $},
    • {$ C^{AA} = S + \mathbb 1 \cdot V_A $},
    • {$ C^{BB} = S + \mathbb 1 \cdot V_B $}.
  • Compute {$ {C^{AA}}^{-1} $} and {$ {C^{BB}}^{-1} $}
  • Compute {$ E_b^{AB} = {C^{AA}}^{-1} P_b {{C^{BB}}}^{-1} $}
  • Compute {$ \displaystyle F_{bb'}^{AB} = Tr_{pix}[ {C^{AA}}^{-1} P_b {{C^{BB}}}^{-1} P_{b'} ] = \sum_{allpix~ij} (E_b^{ij} P_{b'}^{ij} ) $} (term-by-term matrix product from trace property).
  • Compute {$ {F_{bb'}^{AB}}^{-1} $}
  • Compute {$ C^{AB}\cdot E_b $} then {$ G_{bb'}^{AB} = \sum_{allpix~ij} (C^{AB}\cdot E_b)^{ij} ( C^{AB} E_{b'})^{ij} $}

2.2  auto :

  • Matrices {$S$} and {$ \displaystyle \frac{d S}{d C_b} $} are computed at the same time.
    • {$S$} is now computed from {$\ell = 2$} to {$ ell=lmax$}, whatever the binning.
  • Define matrix {$ \displaystyle P_b = \frac{d S}{d C_b}$}
  • Diagonal pixel covariance matrix, with {$ V_A = $} pixel noise variance for map A. Same for map B :
    • {$ C^{auto} = S + \mathbb 1 \cdot V_A $},
  • Compute {$ {C^{auto}}^{-1} $}
  • Compute {$ E_b^{auto} = {C^{auto}}^{-1} P_b {{C^{auto}}}^{-1} $}
  • Compute {$ \displaystyle F_{bb'}^{auto} = Tr_{pix}[ {C^{auto}}^{-1} P_b {{C^{auto}}}^{-1} P_{b'} ] = \sum_{allpix~ij} (E_b^{ij} P_{b'}^{ij} ) $} (term-by-term matrix product from trace property).
  • Compute {$ {F_{bb'}^{auto}}^{-1} $}

3.  Simulation pipeline :

  1. Get pre-saved {$S$} and {$ \displaystyle \frac{d S}{d C_b} $} matrices computed for defined set of parameters :
    1. patch (bicep or litebird like),
    2. fwhm (beam),
    3. nside,
    4. mask (fksy),
    5. Clth (fiducial spectrum model),
    6. first {$\ell$},
    7. bin size {$\Delta \ell $},
    8. pixwin (yes/no)
  2. Compute useful matrices for xqml (description above).
  3. Compute 1000 simulations as follow :
    1. Noise maps :
      1. Map noise auto : {$ N = \mathcal N (0, \sqrt {V_A}) $}
      2. Map noise A : {$ N_A = \mathcal N (0, \sqrt {2V_A}) $}
      3. Map noise B : {$ N_B = \mathcal N (0, \sqrt {2V_B}) $}
    2. Map CMB : synfast(Clth, fwhm=fwhmrad, pixwin=True)
    3. Maps :
      1. Map d : {$d = CMB + N$},
      2. Map A : {$d_A = CMB + N_A$},
      3. Map B : {$d_B = CMB + N_B $}
    4. cross xqml :
      1. cross pre-estimator {$ \hat y_b = d_A E_b d_B $}
      2. cross estimator {$ \hat C_b = {F_{bb'}^{AB}}^{-1} \cdot \hat y_{b'} $}
    5. auto xqml :
      1. auto pre-estimator {$ \hat y_b = d E_b d $}
      2. spectrum bias term : {$ \hat B_{b} = Tr_{pix} [N \cdot E_b ] = \sum_{allpix~ij} (N^{ij} E_{b}^{ij}) $}
      3. auto estimator {$ \hat C_b = {F_{bb'}^{AB}}^{-1} \cdot (\hat y_{b'} - \hat B_{b} ) $}
    6. Evaluates analytic error : {$ Cov(C_b, C_{b'}) = {F_{bb_1}^{AB}}^{-1} G_{b_1b_2}^{AB} {F_{b_2b'}^{AB}}^{-1} + {F_{bb'}^{AB}}^{-1}$}
  4. Compute MC spectra means and variances, then compare to the model and the analytic variance.

3.1  Bicep patch Inverse noise variance :

My version (wrong)

Let {$w$} be the apodization weighing mask map of bicep ( {$ [0,..,1] \in w $} ). We want to build a noise map with variance inversely proportional to the weighing map. If we choose the weighed mean variance per pixel of the map to be {$\sigma^2 [\mu K\cdot arcmin]$} , and {$V_i$} the variance of pixel {$i$}, then we have {$ \displaystyle \sigma = \frac{\sum_i V_i w_i}{\sum_i w_i} $}. Since we want to weight the variance for each pixel, we take {$V_i = \alpha \sigma^2 w_i^{-1}$} with {$\alpha$} the normalisation factor that assures the mean variance of the map {$V$} to be {$\sigma^2$}. Thus, {$ \displaystyle \sigma^2 = \frac{\sum_i \sigma \alpha}{\sum w_i} = \frac{n_{pix} \sigma^2 \alpha}{\sum w_i} $}, which gives {$ \displaystyle \alpha = \frac{\sum_i w_i}{n_{pix}} $}, and the final variance per pixel read : {$\displaystyle V_i = \frac{\sigma^2}{ w_i} \frac{\sum_j w_j}{n_{pix}} $}

Matt's version :

We demand the total variance of the map to be {$ \displaystyle \frac{\sigma^2}{n_{pix}} [\mu K\cdot arcmin] = \frac 1 {\sum_i 1/ V_i} $} which is equal to {$\displaystyle \frac{\sigma^2}{n_{pix}}$} if {$ V_i = \sigma^2 $} (white noise case). Now we demand a weighting of the variance such that {$ V_i = \beta w_i^{-1} $} with {$ \beta $} the normalisation factor. Injecting {$ V_i$} gives {$ \beta = \displaystyle \frac{\sigma^2}{n_{pix}} \sum_i w_i $} ad finally {$\displaystyle V_i = \frac{\sigma^2}{ w_i} \frac{\sum_j w_j}{n_{pix}} $}.

4.  Simulations variance en fits results :

  • Compute std for two patches : Full and small (litebird and bicep like).
  • Xqml spectra estimators are computed for 1000 simulation. Theoretical std is compared to MC std.
  • Upper plot corresponds to the mean of the 1000 xqml simulations spectrum estimation (blue dot) compared to {$C_\ell$} model (dashed black).
  • Down plot are standard deviations (error bars) compared to Fisher error (dasher red) and {$C_\ell$} model (dashed black).
  • The cross Fisher variance estimate follows :

{$ \displaystyle Cov( C^{AB}_\ell, C^{AB}_{\ell} ) = \frac{1}{ f_{sky} (2 \ell+1) \Delta \ell} \left[ C_\ell^{AA} C_\ell^{BB} + C_\ell^{AB}C_\ell^{BA} \right] $}

{$ \displaystyle Cov( C^{AB}_\ell, C^{AB}_{\ell} ) = \frac{1}{ f_{sky} (2 \ell+1) \Delta \ell} \left[ 2 C_\ell^2 + C_\ell ( N_\ell^A + N_\ell^B )b_\ell^{-2} + N_\ell^A N_\ell^B b_\ell^{-4} \right] $}

where {$ \displaystyle f_{sky} = \frac 1{n_{pix}} \frac{(\sum_i W_i^2)^2}{\sum_i W_i^4} $} (from MASTER paper)

  • While the auto- Fisher variance estimate follows :

{$ \displaystyle Cov( C^{A=B}_\ell, C^{A=B}_{\ell} ) = \frac{1}{ f_{sky} (2 \ell+1) \Delta \ell} \left[ C_\ell^{AA} C_\ell^{BB} + C_\ell^{AB}C_\ell^{BA} \right] $}

{$ \displaystyle Cov( C^{A=B}_\ell, C^{A=B}_{\ell} ) = \frac{1}{ f_{sky} (2 \ell+1) \Delta \ell} \times 2 \times \left[ C_\ell + N_\ell^A b_\ell^{-2} \right]^2 $}

  • Right tab describes simulation inputs :
    • Patch and nside. (BICEPivw means that I used inverse variance weighting (ivw) for noise maps. Otherwise, "BICEP" alone means that I used white noise.).
    • 1bins40 means that the minimum {$\ell$} taken in the binning starts at {$ \ell = 40 $}
    • pixwin (1 = True, always the case in simulations so far)
    • fwhmdeg (beam in degrees, always used 0.5 deg in simulations so far)
    • wiEE corresponds to {$ C_\ell^{EE} \neq 0$}. While noEE is the opposite ({$ C_\ell^{EE} = 0$}).
    • r0.1 corresponds to r=0.1 (always used r=0.1 case in simulation so far).
    • fsky
    • noise {$\sigma = 0.1 $} {$ [\mu K\cdot arcmin ] $}, gives the following variance noise per pixel : {$ \displaystyle \sigma_{pix}^2 = \frac{\sigma^2 \cdot 10^{-12} }{60^2 \cdot PixelArea [deg]} $}
    • mean value of {$N_\ell $} is boxed in magenta, and {$ \ell (\ell+1)/2/\pi N_\ell $} is plotted in magenta.
    • yellow triangles are Xpol fits and variance.

4.1  Bicep patch, Nside 128 :

no ponderation (white noise)

4.2  Bicep patch, Nside 128 :

  • Avec ponderation du bruit par pixel !
fwhm=0.5deg{$ C_\ell^{EE} \neq 0$}{$ C_\ell^{EE} = 0$}
fwhm=0.5deg, {$\sigma=0.1 \mu Karcm$}
fwhm=0.5deg, {$\sigma=1.0 \mu Karcm$}
fwhm=0.5deg, {$\sigma=5.0 \mu Karcm$}

4.3  Litebird patch, Nside 16 :

fwhm=1.0deg{$ C_\ell^{EE} \neq 0$}{$ C_\ell^{EE} = 0$}
fwhm=1.0deg, {$\sigma=0.1 \mu Karcm$}
fwhm=1.0deg, {$\sigma=1.0 \mu Karcm$}
fwhm=1.0deg, {$\sigma=5.0 \mu Karcm$}

5.  Error in pixel covariance matrix :

5.1  Estimation and variance :

We change {$C = S + N$} by {$C = S + p \cdot N$} with {$p = [0.5, 1.0, 2.0.]$}

  • Note : Le biais en auto sur Bicep pondéré est dû à une erreur dans mes jobs : Je lui donne une matrice de bruit diagonale constante pour débiaiser l'estimateur, alors que dans ce cas la diagonale n'est justement pas constante. C'est en cours de correction.

Bicep (ponderé)

cross :

fwhm=0.5deg{$ C_\ell^{EE} \neq 0$}{$ C_\ell^{EE} = 0$}
{$\sigma=1.0 \mu Karcm$}
{$\sigma=5.0 \mu Karcm$}

auto :

fwhm=0.5deg{$ C_\ell^{EE} \neq 0$}{$ C_\ell^{EE} = 0$}
{$\sigma=1.0 \mu Karcm$}
{$\sigma=5.0 \mu Karcm$}

Litebird :

Cross :

fwhm=0.5deg{$ C_\ell^{EE} \neq 0$}{$ C_\ell^{EE} = 0$}
{$\sigma=1.0 \mu Karcm$}
{$\sigma=5.0 \mu Karcm$}

Auto :

fwhm=0.5deg{$ C_\ell^{EE} \neq 0$}{$ C_\ell^{EE} = 0$}
{$\sigma=1.0 \mu Karcm$}
{$\sigma=5.0 \mu Karcm$}

5.2  Ratio of variance

Again, we change {$C = S + N$} by {$C = S + p \cdot N$} with {$p = [0.5, 1.0, 2.0.]$}, and plot the ratio {$\displaystyle R(p) = \sqrt{ \frac{VarCl (C = S + p \cdot N)}{VarCl (C = S + N)} } $} of the MC standard deviations. Note that for each value of {$p$}, the 1000 cmb + noise simulations are the same.

Bicep (ponderé)

Cross and auto :

fwhm=0.5deg{$ C_\ell^{EE} \neq 0$}{$ C_\ell^{EE} = 0$}
{$\sigma=1.0 \mu Karcm$}
{$\sigma=5.0 \mu Karcm$}

Litebird :

Cross and auto :

fwhm=0.5deg{$ C_\ell^{EE} \neq 0$}{$ C_\ell^{EE} = 0$}
{$\sigma=1.0 \mu Karcm$}
{$\sigma=5.0 \mu Karcm$}

6.  Other :

  • My to do list :
    • Test and compare Pure B-mode