https://wiki.cosmos.esa.int/planckpla2015/api.php?action=feedcontributions&user=Sgalli&feedformat=atomPlanck PLA 2015 Wiki - User contributions [en-gb]2022-01-22T01:58:21ZUser contributionsMediaWiki 1.31.6https://wiki.cosmos.esa.int/planckpla2015/index.php?title=CMB_spectrum_%26_Likelihood_Code&diff=11312CMB spectrum & Likelihood Code2015-02-04T20:15:49Z<p>Sgalli: </p>
<hr />
<div>{{DISPLAYTITLE:CMB spectrum and likelihood code}}<br />
<br />
==CMB spectra==<br />
<br />
<br />
===General description===<br />
====TT====<br />
The Planck best-fit CMB temperature power spectrum, shown in figure below, covers the wide range of multipoles <math> \ell </math> = 2-2508. Over the multipole range <math> \ell </math> = 2–29, the power spectrum is derived from the ''Commander'': component separation algorithm applied to the combination of Planck 2015 temperature data between 30 and 857 GHz, the 9-year WMAP sky maps, and the 408 MHz Haslam et al. (1982) survey, including 93% of the sky {{PlanckPapers|planck2014-a12}} . The asymmetric error bars associated to this spectrum are the 68% confidence limits and include the uncertainties due to foreground subtraction.<br />
<br />
For multipoles equal or greater than <math>\ell=30</math>, instead, the spectrum is derived from the ''Plik'' likelihood {{PlanckPapers|planck2014-a13}} by optimally combining the spectra in the frequency range 100-217 GHz, and correcting them for unresolved foregrounds using the best-fit foreground solution from a Planck TT+lowP <math>\Lambda</math>CDM run. Associated 1-sigma errors include beam uncertainties. Both ''Commander'' and ''Plik'' are described in more details in the sections below.<br />
<br />
[[File: Planck2014 TT Dl NORES bin30 w180mm.jpeg|thumb|center|700px|'''CMB TT spectrum. Logarithmic x-scale up to <math>\ell=30</math>, linear at higher <math>\ell</math>; all points with error bars. The red line is the Planck best-fit primordial power spectrum (cf Planck TT+lowP in Table 3 of {{PlanckPapers|planck2014-a15}}). The blue shaded area shows the uncertainties due to cosmic variance alone.''']]<br />
<br />
====TE and EE====<br />
The Planck best-fit CMB polarization and temperature-polarization cross-correlation power spectra, shown in the figure below, cover the multipole range <math> \ell </math> = 30-1996. The data points relative to the multipole range <math> \ell </math> = 2-29 will be released in a second moment.<br />
Analogously to the TT case, the <math> \ell\ge 30 </math> spectrum is derived from the ''Plik'' likelihood {{PlanckPapers|planck2014-a13}} by optimally combining the spectra in the frequency range 100-217 GHz, and correcting them for unresolved foregrounds using the best-fit foreground solution from a Planck TT,TE,EE+lowP <math>\Lambda</math>CDM run. <br />
<br />
{|style="margin: 0 auto;"<br />
|[[File: Planck2014 EE Dl NORES bin30 w180mm.jpeg|thumb|center|500px|'''CMB EE spectrum. The red line is the Planck best-fit primordial power spectrum (cf Planck TT+lowP in Table 3 of {{PlanckPapers|planck2014-a15}}). The blue shaded area shows the uncertainties due to cosmic variance alone.''']]<br />
|[[File: Planck2014 TE Dl NORES bin30 w180mm.jpeg|thumb|center|500px|'''CMB TE spectrum. The red line is the Planck best-fit primordial power spectrum (cf Planck TT+lowP in Table 3 of {{PlanckPapers|planck2014-a15}}). The blue shaded area shows the uncertainties due to cosmic variance alone.''']]<br />
|}<br />
<br />
===Production process===<br />
The <math>\ell</math> < 30 part of the Planck TT power spectrum is derived from the Commander approach, which implements Bayesian component separation in pixel space, fitting a parametric model to the data by sampling the posterior distribution for the model parameters {{PlanckPapers|planck2014-a12}}. The power spectrum at any multipole <math>\ell</math> is given as the maximum probability point for the posterior <math>C_\ell</math> distribution, marginalized over the other multipoles, and the error bars are 68% confidence level {{PlanckPapers|planck2014-a12}}. <br />
<br />
The <math>\ell \ge 30</math> part of the TT, TE and EE power spectra have been derived by the Plik likelihood, a code that implements a pseudo-Cl based technique, extensively described in Sec. 2 and the Appendix of {{PlanckPapers|planck2013-p08}} and {{PlanckPapers|planck2014-a13}}. Frequency spectra are computed as cross-spectra between half-mission maps. Mask and multipole range choices for each frequency spectrum are summarized in Section 3.3 of {{PlanckPapers|planck2014-a15}} and in {{PlanckPapers|planck2014-a13}}. The final power spectrum is an optimal combination of the 100, 143, 143x217 and 217 GHz spectra, corrected for the best-fit unresolved foregrounds and inter-frequency calibration factors, as derived from the full likelihood analysis (for TT we use the best-fit solutions for the nuisance parameters from the Planck+TT+lowP data combination, while for TE and EE we use the best fit from Planck+TT+lowP, cf Table 3 of {{PlanckPapers|planck2014-a15}}). A thorough description of the models of unresolved foregrounds is given in {{PlanckPapers|planck2014-a13}}. The spectrum covariance matrix accounts for cosmic variance and noise contributions, together with beam uncertainties. The <math>\ell \ge 30</math> CMB TT spectrum and associated covariance matrix are available in two formats:<br />
#Unbinned. TT: 2479 bandpowers (<math>\ell=30-2508</math>); TE or EE: 1697 bandpowers (<math>\ell=30-1996</math>).<br />
#Binned, in bins of <math> \Delta\ell=30 </math>. TT: 83 bandpowers. TE or EE: 66 bandpowers. We bin the <math> C_\ell </math> power spectrum with a weight proportional to <math> \ell (\ell+1) </math>, so that the <math> C_{\ell_b} </math> binned bandpower centered in <math> \ell_b </math> is: <math> \\ C_{\ell_b}=\Sigma_{\ell \in b} w_{\ell_b\ell} C_\ell \quad \text{with} \quad w_{\ell_b\ell}=\frac{\ell (\ell+1)}{\Sigma_{\ell \in b} \ell (\ell+1)}. \\</math> Equivalently, using the matrix formalism, we can construct the binning matrix B as: <math>\\ B_{\ell_b \ell}=w_{\ell_b\ell} \\ </math> where B is a <math> n_b\times n_\ell</math> matrix, with <math>n_b=83</math> the number of bins and <math>n_\ell=2479</math> the number of unbinned multipoles. Thus: <math> \\ \vec{C}_\mathrm{binned}=B \, \vec{C} \\ \mathrm{cov_\mathrm{binned}}= B\, \mathrm{cov}\, B^T \\ \ell_b=B\, \ell \\ </math> Here, <math> \vec{C}_{binned}\, (\vec{C}) </math> is the vector containing all the binned (unbinned) <math>C_\ell</math> bandpowers, <math>\mathrm{cov} </math> is the covariance matrix and <math>\ell_b</math> is the weighted average multipole in each bin. Note that following this definition, <math>\ell_b</math> can be a non-integer. The binned <math>D_{\ell_B}</math> power spectrum is then calculated as: <math> \\ D_{\ell_b}=\frac{\ell_b (\ell_b+1)}{2\pi} C_{\ell_b} </math>.<br />
<br />
===Inputs===<br />
<br />
; Low-l spectrum (<math>\ell < 30</math>):<br />
* Planck 30 and 44 GHz frequency maps<br />
* Planck 70 to 857 GHz detector and detector set maps<br />
* 9-year WMAP temperature sky maps between 23 and 94 GHz<br />
* 408 MHz survey by Haslam et al. (1982) <br />
* Commander <math>\chi^2</math> based LM93 confidence mask {{PlanckPapers|planck2014-a12}}<br />
<br />
; High-l spectrum (<math>30 \le \ell \le 2508</math>): <br />
<br />
* 100, 143, 143x217 and 217 GHz spectra and their covariance matrix (Sec. 3.3 {{PlanckPapers|planck2014-a15}})<br />
* best-fit foreground templates and inter-frequency calibration factors (Table 3 of {{PlanckPapers|planck2014-a15}})<br />
* Beam transfer function uncertainties {{PlanckPapers|planck2014-a08}}<br />
=== File names and Meta data ===<br />
<br />
The CMB spectrum and its covariance matrix are distributed in a single FITS file named <br />
<!--- * ''{{PLASingleFile | fileType=cosmo | name=COM_PowerSpect_CMB_R2.00.fits | link=COM_PowerSpect_CMB_R1.10.fits}}'' ---><br />
* ''COM_PowerSpect_CMB_R2.nn.fits''<br />
which contains 7 ''BINTABLE'' extensions<br />
<br />
; 1. TT low-ell, unbinned (TTLOLUNB)<br />
: with the low ell part of the spectrum, not binned, and for l=2-29. The table columns are<br />
# ''ELL'' (integer): multipole number<br />
# ''D_ELL'' (float): <math>D_ell</math> as described above<br />
# ''ERRUP'' (float): the upward uncertainty<br />
# ''ERRDOWN'' (float): the downward uncertainty<br />
<br />
; 2. TT high-ell, binned (TTHILBIN)<br />
: with the high-ell part of the spectrum, binned into 83 bins covering <math>\langle l \rangle = 47-2499\ </math> in bins of width <math>l=30</math> (with the exception of the last bin that is smaller). The table columns are as follows:<br />
# ''ELL'' (integer): mean multipole number of bin<br />
# ''L_MIN'' (integer): lowest multipole of bin<br />
# ''L_MAX'' (integer): highest multipole of bin<br />
# ''D_ELL'' (float): <math>D_\ell</math> as described above<br />
# ''ERR'' (float): the uncertainty<br />
<br />
; 3. TT high-ell unbinned (TTHILUNB) <br />
: with the high-ell part of the spectrum, unbinned, in 2979 bins covering <math>\langle l \rangle = 30-2508\ </math>. The table columns are as follows:<br />
# ''ELL'' (integer): multipole <br />
# ''D_ELL'' (float): <math>D_\ell</math> as described above<br />
# ''ERR'' (float): the uncertainty<br />
<br />
; 4. TE high-ell, binned (TEHILBIN) <br />
: with the high-ell part of the spectrum, binned into 83 bins covering <math>\langle l \rangle = 47-1988\ </math> in bins of width <math>l=30</math> (with the exception of the last bin that is smaller). The table columns are as follows:<br />
# ''ELL'' (integer): mean multipole number of bin<br />
# ''L_MIN'' (integer): lowest multipole of bin<br />
# ''L_MAX'' (integer): highest multipole of bin<br />
# ''D_ELL'' (float): <math>D_\ell</math> as described above<br />
# ''ERR'' (float): the uncertainty<br />
<br />
; 5. TE high-ell, unbinned (TEHILUNB) <br />
: with the high-ell part of the spectrum, unbinned, in 2979 bins covering <math>\langle l \rangle = 30-1996\ </math>. The table columns are as follows:<br />
# ''ELL'' (integer): multipole <br />
# ''D_ELL'' (float): <math>D_\ell</math> as described above<br />
# ''ERR'' (float): the uncertainty<br />
<br />
; 6. EE high-ell, binned (EELOLBIN) <br />
: with the high-ell part of the spectrum, binned into 83 bins covering <math>\langle l \rangle = 47-1988\ </math> in bins of width <math>l=30</math> (with the exception of the last bin that is smaller). The table columns are as follows:<br />
# ''ELL'' (integer): mean multipole number of bin<br />
# ''L_MIN'' (integer): lowest multipole of bin<br />
# ''L_MAX'' (integer): highest multipole of bin<br />
# ''D_ELL'' (float): <math>D_\ell</math> as described above<br />
# ''ERR'' (float): the uncertainty<br />
<br />
; 7. EE high-ell, unbinned (EEHILUNB) <br />
: with the high-ell part of the spectrum, unbinned, in 2979 bins covering <math>\langle l \rangle = 30-1996\ </math>. The table columns are as follows:<br />
# ''ELL'' (integer): multipole <br />
# ''D_ELL'' (float): <math>D_\ell</math> as described above<br />
# ''ERR'' (float): the uncertainty<br />
<br />
<br />
The spectra give <math>D_\ell = \ell(\ell+1)C_\ell / 2\pi </math> in units of <math>\mu\, K^2</math>. The covariance matrices of the spectra will be released in a second moment.<br />
<!-- <br />
<br />
The CMB spectrum is also given in a simple text comma-separated file:<br />
* ''{{PLASingleFile | fileType=cosmo | name=COM_PowerSpect_CMB_R1.10.txt |link=COM_PowerSpect_CMB_R1.10.txt}}''<br />
<br />
--><br />
<br />
==Likelihood==<br />
The likelihood will soon be released with an accompanying paper and an Explanatory Supplement update. <br />
<!-- <br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
The likelihood code (and the data that comes with it) used to compute the likelihood of a model that predicts the CMB power spectra, lensing power spectrum, together with some foreground and some instrumental parameters. The data files are built primarily from the Planck mission results, but include also some results from the WMAP-9 data release. The data files are written in a specific format that can only be read by the code. The code consists in a c/f90 library, along with some optional tools in python. The code is used to read the data files, and given model power spectra and nuisance parameters it computes the log likelihood of that model. <br />
<br />
Detailed description of the installation and usage of the likelihood code and data is provided in the package. The package includes five data files: four for the CMB likelihoods and one for the lensing likelihood. All of the likelihoods delivered are described in detail in the {{PlanckPapers|planck2013-p08|1|Power spectrum & Likelihood Paper}} (for the CMB based likelihood) and in the {{PlanckPapers|planck2013-p12|1|Lensing Paper}} (for the lensing likelihood) .<br />
<br />
The CMB full likelihood has been divided into four parts to allow using selectively different ranges of multipoles. It also reflects the fact that the mathematical approximations used for those different parts are very different, as is the underlying data. In detail, we distribute<br />
* one low-<math>\ell</math> temperature only likelihood (commander), <br />
* one low-<math>\ell</math> temperature and polarisation likelihood (lowlike), and <br />
* one higl-<math>\ell</math> likelihood CAMspec. <br />
<br />
The ''Commander'' likelihood covers the multipoles 2 to 49. It uses a semi-analytic method to sample the low-<math>\ell</math> temperature likelihood on an intermediate product of one of the component separated maps. The samples are used along with an analytical approximation of the likelihood posterior to perform the likelihood computation in the code. See {{PlanckPapers|planck2013-p08}} section 8.1 for more details.<br />
<br />
The ''lowlike'' likelihood covers the multipoles 2 to 32 for temperature and polarization data. Since Planck is not releasing polarisation data at this time, the polarization map from WMAP9 is used instead. A temperature map is needed to perform the computation nevertheless, and we use here the same commander map. The likelihood is computed using a map-based approximation at low resolution and a master one at intermediate resolution, as in WMAP. The likelihood code actually calls a very slightly modified version of the WMAP9 code. This piece of the likelihood essentially provides a prior on the optical depth and has almost no other impact on cosmological parameter estimation. As such it could be replaced by a simple prior, and a user can decide to do so, which is one of the motivation to leave the three pieces of the CMB likelihood as different data packages; see {{PlanckPapers|planck2013-p08}} section 8.3 for more details. Note that the version of the WMAP code used here (code version v1.0) does not perform any test on the positive definiteness of the TT, TE, EE covariance matrices, and will return a null log likelihood in the unphysical cases where the absolute value of TE is too large. This will be corrected in a later version.<br />
<br />
The ''CAMspec'' likelihood covers the multipoles 50 to 2500 for temperature only. The likelihood is computed using a quadratic approximation, including mode to mode correlations that have been precomputed on a fiducial model. The likelihood uses data from the 100, 143 and 217 GHz channels. To do so it models the foreground at each frequency using the model described in the likelihood paper. Uncertainties on the relative calibration and on the beam transfer functions are included either as parametric models, or marginalized and integrated in the covariance matrix. Detailed description of the different nuisance parameters is given below. Priors are included in the likelihood on the CIB spectral index, relative calibration factors and beam error eigenmodes. See {{PlanckPapers|planck2013-p08}} section 2.1 for more details.<br />
<br />
The ''act/spt'' likelihood covers the multipoles 1500 to 10000 for temperature. It is described in{{BibCite|dun2013}}{{BibCite|Keis2011}}{{BibCite|Reic2012}}. It uses the code and data that can be retrieved from the [http://lambda.gsfc.nasa.gov/ Lambda archive] for [http://lambda.gsfc.nasa.gov/product/act/act_prod_table.cfm ACT] and [http://lambda.gsfc.nasa.gov/product/spt/spt_prod_table.cfm SPT]. It has been slightly modified to use a thermal and kinetic SZ model that matches the one used in CAMspec. As stated in{{BibCite|dun2013}}, the dust parameters a_ge and a_gs must be explored with the following priors: a_ge = 0.8 ± 0.2 and a_gs = 0.4 ± 0.2. Those priors are not included in the log likelihood computed by the code.<br />
<br />
The ''lensing'' likelihood covers the multipoles 40 to 400 using the result of the [[Specially_processed_maps | lensing reconstruction]]. It uses a quadratic approximation for the likelihood, with a covariance matrix including the marginalized contribution of the beam transfer function uncertainties, the diffuse point source correction uncertainties and the cosmological model uncertainty affecting the first order non-gaussian bias (N1). The correlation between temperature and lensing is not taken into account. Cosmological uncertainty effects on the normalization are dealt with using a first order renormalization procedure. This means that the code will need both the TT and $\phi\phi$ power spectrum up to <math>\ell</math> = 2048 to correctly perform the integrals needed for the renormalization. Nevertheless, the code will only produce an estimate based on the data between <math>\ell</math> = 40 to 400. See {{PlanckPapers|planck2013-p12}} section 6.1 for more details.<br />
</span><br />
<span style="color:red">OUTSTANDING: description of likelihood masks </span><br />
==Production process==<br />
<br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
The code is based on some basic routines from the libpmc library in the [http://arxiv.org/abs/1101.0950 cosmoPMC] code. It also uses some code from the [http://lambda.gsfc.nasa.gov/product/map/dr5/likelihood_get.cfm WMAP9 likelihood] for the lowlike likelihood and{{BibCite|dun2013}}{{BibCite|Keis2011}}{{BibCite|Reic2012}} for the act/spt one. The rest of the code has been specifically written for the Planck data. Each likelihood file has been processed using a different and dedicated pipeline as described in the likelihood paper {{PlanckPapers|planck2013-p08}} (section 2 and 8) and in the lensing paper {{PlanckPapers|planck2013-p12}} (section 6.1). We refer the reader to those papers for full details. The data are then encapsulated into the specific file format.<br />
<br />
Each dataset comes with its own self check. Whenever the code is used to read a data file, a computation will be done against an included test spectrum/nuisance parameter, and the log-likelihood will be displayed along with the expected result. Difference of the order of 10<math>^{-6}</math> or less are expected depending of the architecture.<br />
<br />
==Inputs==<br />
<br />
===Likelihood===<br />
<br />
; ''commander'' :<br />
* all Planck channels maps<br />
* compact source catalogs<br />
* common masks<br />
* beam transfer functions for all channels<br />
<br />
; ''lowlike'' :<br />
* WMAP9 likelihood data<br />
* Low-<math>\ell</math> Commander map<br />
<br />
; ''CAMspec'' :<br />
* 100, 143 and 217 GHz detector and detsets maps<br />
* 857GHz channel map<br />
* compact source catalog<br />
* common masks (0,1 & 3)<br />
* beam transfer function and error eigenmodes and covariance for 100, 143 and 217 GHz detectors & detsets<br />
* theoretical templates for the tSZ and kSZ contributions<br />
* color corrections for the CIB emission for the 143 and 217GHz detectors and detsets<br />
* fiducial CMB model (bootstrapped from WMAP7 best fit spectrum) estimated noise contribution from the half-ring maps for 100, 143 and 217 GHz<br />
<br />
; ''lensing'' :<br />
* the lensing map<br />
* beam error eigenmodes and covariance for the 143 and 217GHz channel maps<br />
* fiducial CMB model (from Planck cosmological parameter best fit)<br />
<br />
; ''act/spt'' :<br />
* data and code from [http://lambda.gsfc.nasa.gov/product/act/act_fulllikelihood_get.cfm here]<br />
* the tSZ andkSZ template are changed to match those of CAMspec<br />
<br />
== File names and Meta data ==<br />
<br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
<br />
'''Likelihood source code'''<br />
<br />
The source code is in the file<br />
: {{PLASingleFile |fileType=cosmo|name=COM_Code_Likelihood-v1.0_R1.10.tar.gz|link=COM_Code_Likelihood-v1.0_R1.10.tar.gz}} (C, f90 and python likelihood library and tools)<br />
<br />
'''Likelihood data packages'''<br />
<br />
The {{PLALikelihood|type=Data|link=data packages}} are<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-commander_R1.10.tar.gz | link=COM_Data_Likelihood-commander_R1.10.tar.gz}}'' (low-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-lowlike_R1.10.tar.gz | link=COM_Data_Likelihood-lowlike_R1.10.tar.gz}}'' (low-ell TE,EE,BB likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-CAMspec_R1.10.tar.gz | link=COM_Data_Likelihood-CAMspec_R1.10.tar.gz}}'' (high-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-actspt_R1.10.tar | link=COM_Data_Likelihood-actspt_R1.10.tar.gz}}'' (high-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-lensing_R1.10.tar.gz | link=COM_Data_Likelihood-lensing_R1.10.tar.gz}}'' (lensing likelihood)<br />
<br />
Untar and unzip all files to recover the code and likelihood data. Each package comes with a README file; follow the instructions inclosed to<br />
build the code and use it. To compute the CMB likelihood one has to sum the log likelihood of each of the commander_v4.1_lm49.clik, lowlike_v222.clik and CAMspec_v6.2TN_2013_02_26.clik, actspt_2013_01.clik. To compute the CMB+lensing likelihood, one has to sum the log likelihood of all 5 files.<br />
<br />
The CMB and lensing likelihood format are different. The CMB files have the termination .clik, the lensing one .clik_lensing. The lensing data being simpler (due to the less detailled modeling permitted by the lower signal-noise), the file is a simple ascii file containing all the data along with comments describing it, and linking the different quantities to the lensing paper. The CMB file format is more complex and must accommodate different forms of data (maps, power spectrum, distribution samples, covariance matrices...). It consists of a tree structure containing the data. At each level of the tree structure a given directory can contain array data (in the form of FITS files or ascii files for strings) and scalar data (joined in a single ascii file "_mdb"). Those files are not user modifiable and do not contain interesting meta data for the user. Tools to manipulate those files are included in the code package as optional python tools. They are documented in the code package.<br />
<br />
'''Likelihood masks'''<br />
<br />
The masks used in the Likelihood paper {{PlanckPapers|planck2013-p08}} are found in<br />
{{PLASingleFile|fileType=map|name=COM_Mask_Likelihood_2048_R1.10.fits|link=COM_Mask_Likelihood_2048_R1.10.fits}}<br />
<br />
which contains ten masks which are written into a single ''BINTABLE'' extension of 10 columns by 50331648 rows (the number of Healpix pixels in an Nside = 2048 map). The structure is as follows, where the column names are the names of the masks: <br />
<br />
{| border="1" cellpadding="3" cellspacing="0" align="center" style="text-align:left" width=800px<br />
|+ '''Likelihodd masks file data structure'''<br />
|- bgcolor="ffdead" <br />
!colspan="4" | 1. EXTNAME = 'MSK-LIKE' : Data columns<br />
|- bgcolor="ffdead" <br />
! Column Name || Data Type || Units || Description<br />
|-<br />
|CL31 || Real*4 || none || mask<br />
|-<br />
|CL39 || Real*4 || none || mask<br />
|-<br />
|CL49 || Real*4 || none || mask<br />
|-<br />
|G22 || Real*4 || none || mask <br />
|-<br />
|G35 || Real*4 || none || mask<br />
|-<br />
|G45 || Real*4 || none || mask<br />
|-<br />
|G56 || Real*4 || none || mask<br />
|-<br />
|G65 || Real*4 || none || mask<br />
|-<br />
|PS96 || Real*4 || none || mask<br />
|-<br />
|PSA82 || Real*4 || none || mask<br />
|-<br />
|- bgcolor="ffdead" <br />
! Keyword || Data Type || Value || Description<br />
|-<br />
|PIXTYPE || string || HEALPIX ||<br />
|-<br />
|COORDSYS || string || GALACTIC ||Coordinate system <br />
|-<br />
|ORDERING || string || NESTED || Healpix ordering<br />
|-<br />
|NSIDE || Int || 2048 || Healpix Nside <br />
|-<br />
|FIRSTPIX || Int*4 || 0 || First pixel number<br />
|-<br />
|LASTPIX || Int*4 || 50331647 || Last pixel number, for LFI and HFI, respectively<br />
<br />
|}<br />
--><br />
== References ==<br />
<References /><br />
<br />
<br />
<br />
[[Category:Mission products|008]]</div>Sgallihttps://wiki.cosmos.esa.int/planckpla2015/index.php?title=CMB_spectrum_%26_Likelihood_Code&diff=11311CMB spectrum & Likelihood Code2015-02-04T20:14:46Z<p>Sgalli: </p>
<hr />
<div>{{DISPLAYTITLE:CMB spectrum and likelihood code}}<br />
<br />
==CMB spectra==<br />
<br />
<br />
===General description===<br />
====TT====<br />
The Planck best-fit CMB temperature power spectrum, shown in figure below, covers the wide range of multipoles <math> \ell </math> = 2-2508. Over the multipole range <math> \ell </math> = 2–29, the power spectrum is derived from the ''Commander'': component separation algorithm applied to the combination of Planck 2015 temperature data between 30 and 857 GHz, the 9-year WMAP sky maps, and the 408 MHz Haslam et al. (1982) survey, including 93% of the sky {{PlanckPapers|planck2014-a12}} . The asymmetric error bars associated to this spectrum are the 68% confidence limits and include the uncertainties due to foreground subtraction.<br />
<br />
For multipoles equal or greater than <math>\ell=30</math>, instead, the spectrum is derived from the ''Plik'' likelihood {{PlanckPapers|planck2014-a13}} by optimally combining the spectra in the frequency range 100-217 GHz, and correcting them for unresolved foregrounds using the best-fit foreground solution from a Planck TT+lowP <math>\Lambda</math>CDM run. Associated 1-sigma errors include beam uncertainties. Both ''Commander'' and ''Plik'' are described in more details in the sections below.<br />
<br />
[[File: Planck2014 TT Dl NORES bin30 w180mm.jpeg|thumb|center|700px|'''CMB TT spectrum. Logarithmic x-scale up to <math>\ell=30</math>, linear at higher <math>\ell</math>; all points with error bars. The red line is the Planck best-fit primordial power spectrum (cf Planck TT+lowP in Table 3 of {{PlanckPapers|planck2014-a15}}). The blue shaded area shows the uncertainties due to cosmic variance alone.''']]<br />
<br />
====TE and EE====<br />
The Planck best-fit CMB polarization and temperature-polarization cross-correlation power spectra, shown in the figure below, cover the multipole range <math> \ell </math> = 30-1996. The data points relative to the multipole range <math> \ell </math> = 2-29 will be released in a second moment.<br />
Analogously to the TT case, the <math> \ell\ge 30 </math> spectrum is derived from the ''Plik'' likelihood {{PlanckPapers|planck2014-a13}} by optimally combining the spectra in the frequency range 100-217 GHz, and correcting them for unresolved foregrounds using the best-fit foreground solution from a Planck TT,TE,EE+lowP <math>\Lambda</math>CDM run. <br />
<br />
{|style="margin: 0 auto;"<br />
|[[File: Planck2014 EE Dl NORES bin30 w180mm.jpeg|thumb|center|500px|'''CMB EE spectrum. The red line is the Planck best-fit primordial power spectrum (cf Planck TT+lowP in Table 3 of {{PlanckPapers|planck2014-a15}}). The blue shaded area shows the uncertainties due to cosmic variance alone.''']]<br />
|[[File: Planck2014 TE Dl NORES bin30 w180mm.jpeg|thumb|center|500px|'''CMB TE spectrum. The red line is the Planck best-fit primordial power spectrum (cf Planck TT+lowP in Table 3 of {{PlanckPapers|planck2014-a15}}). The blue shaded area shows the uncertainties due to cosmic variance alone.''']]<br />
|}<br />
<br />
===Production process===<br />
The <math>\ell</math> < 30 part of the Planck TT power spectrum is derived from the Commander approach, which implements Bayesian component separation in pixel space, fitting a parametric model to the data by sampling the posterior distribution for the model parameters {{PlanckPapers|planck2014-a12}}. The power spectrum at any multipole <math>\ell</math> is given as the maximum probability point for the posterior <math>C_\ell</math> distribution, marginalized over the other multipoles, and the error bars are 68% confidence level {{PlanckPapers|planck2014-a12}}. <br />
<br />
The <math>\ell \ge 30</math> part of the TT, TE and EE power spectra have been derived by the Plik likelihood, a code that implements a pseudo-Cl based technique, extensively described in Sec. 2 and the Appendix of {{PlanckPapers|planck2013-p08}} and {{PlanckPapers|planck2014-a13}}. Frequency spectra are computed as cross-spectra between half-mission maps. Mask and multipole range choices for each frequency spectrum are summarized in Section 3.3 of {{PlanckPapers|planck2014-a15}} and in {{PlanckPapers|planck2014-a13}}. The final power spectrum is an optimal combination of the 100, 143, 143x217 and 217 GHz spectra, corrected for the best-fit unresolved foregrounds and inter-frequency calibration factors, as derived from the full likelihood analysis (for TT we use the best-fit solutions for the nuisance parameters from the Planck+TT+lowP data combination, while for TE and EE we use the best fit from Planck+TT+lowP, cf Table 3 of {{PlanckPapers|planck2014-a15}}). A thorough description of the models of unresolved foregrounds is given in {{PlanckPapers|planck2014-a13}}. The spectrum covariance matrix accounts for cosmic variance and noise contributions, together with beam uncertainties. The <math>\ell \ge 30</math> CMB TT spectrum and associated covariance matrix are available in two formats:<br />
#Unbinned. TT: 2479 bandpowers (<math>\ell=30-2508</math>); TE or EE: 1697 bandpowers (<math>\ell=30-1996</math>).<br />
#Binned, in bins of <math> \Delta\ell=30 </math>. TT: 83 bandpowers. TE or EE: 66 bandpowers. We bin the <math> C_\ell </math> power spectrum with a weight proportional to <math> \ell (\ell+1) </math>, so that the <math> C_{\ell_b} </math> binned bandpower centered in <math> \ell_b </math> is: <math> \\ C_{\ell_b}=\Sigma_{\ell \in b} w_{\ell_b\ell} C_\ell \quad \text{with} \quad w_{\ell_b\ell}=\frac{\ell (\ell+1)}{\Sigma_{\ell \in b} \ell (\ell+1)}. \\</math> Equivalently, using the matrix formalism, we can construct the binning matrix B as: <math>\\ B_{\ell_b \ell}=w_{\ell_b\ell} \\ </math> where B is a <math> n_b\times n_\ell</math> matrix, with <math>n_b=83</math> the number of bins and <math>n_\ell=2479</math> the number of unbinned multipoles. Thus: <math> \\ \vec{C}_\mathrm{binned}=B \, \vec{C} \\ \mathrm{cov_\mathrm{binned}}= B\, \mathrm{cov}\, B^T \\ \ell_b=B\, \ell \\ </math> Here, <math> \vec{C}_{binned}\, (\vec{C}) </math> is the vector containing all the binned (unbinned) <math>C_\ell</math> bandpowers, <math>\mathrm{cov} </math> is the covariance matrix and <math>\ell_b</math> is the weighted average multipole in each bin. Note that following this definition, <math>\ell_b</math> can be a non-integer. The binned <math>D_{\ell_B}</math> power spectrum is then calculated as: <math> \\ D_{\ell_b}=\frac{\ell_b (\ell_b+1)}{2\pi} C_{\ell_b} </math>.<br />
<br />
===Inputs===<br />
<br />
; Low-l spectrum (<math>\ell < 30</math>):<br />
* Planck 30 and 44 GHz frequency maps<br />
* Planck 70 to 857 GHz detector and detector set maps<br />
* 9-year WMAP temperature sky maps between 23 and 94 GHz<br />
* 408 MHz survey by Haslam et al. (1982) <br />
* Commander <math>\chi^2</math> based LM93 confidence mask {{PlanckPapers|planck2014-a12}}<br />
<br />
; High-l spectrum (<math>30 \le \ell \ge 2500</math>): <br />
<br />
* 100, 143, 143x217 and 217 GHz spectra and their covariance matrix (Sec. 3.3 {{PlanckPapers|planck2014-a15}})<br />
* best-fit foreground templates and inter-frequency calibration factors (Table 3 of {{PlanckPapers|planck2014-a15}})<br />
* Beam transfer function uncertainties {{PlanckPapers|planck2014-a08}}<br />
=== File names and Meta data ===<br />
<br />
The CMB spectrum and its covariance matrix are distributed in a single FITS file named <br />
<!--- * ''{{PLASingleFile | fileType=cosmo | name=COM_PowerSpect_CMB_R2.00.fits | link=COM_PowerSpect_CMB_R1.10.fits}}'' ---><br />
* ''COM_PowerSpect_CMB_R2.nn.fits''<br />
which contains 7 ''BINTABLE'' extensions<br />
<br />
; 1. TT low-ell, unbinned (TTLOLUNB)<br />
: with the low ell part of the spectrum, not binned, and for l=2-29. The table columns are<br />
# ''ELL'' (integer): multipole number<br />
# ''D_ELL'' (float): <math>D_ell</math> as described above<br />
# ''ERRUP'' (float): the upward uncertainty<br />
# ''ERRDOWN'' (float): the downward uncertainty<br />
<br />
; 2. TT high-ell, binned (TTHILBIN)<br />
: with the high-ell part of the spectrum, binned into 83 bins covering <math>\langle l \rangle = 47-2499\ </math> in bins of width <math>l=30</math> (with the exception of the last bin that is smaller). The table columns are as follows:<br />
# ''ELL'' (integer): mean multipole number of bin<br />
# ''L_MIN'' (integer): lowest multipole of bin<br />
# ''L_MAX'' (integer): highest multipole of bin<br />
# ''D_ELL'' (float): <math>D_\ell</math> as described above<br />
# ''ERR'' (float): the uncertainty<br />
<br />
; 3. TT high-ell unbinned (TTHILUNB) <br />
: with the high-ell part of the spectrum, unbinned, in 2979 bins covering <math>\langle l \rangle = 30-2508\ </math>. The table columns are as follows:<br />
# ''ELL'' (integer): multipole <br />
# ''D_ELL'' (float): <math>D_\ell</math> as described above<br />
# ''ERR'' (float): the uncertainty<br />
<br />
; 4. TE high-ell, binned (TEHILBIN) <br />
: with the high-ell part of the spectrum, binned into 83 bins covering <math>\langle l \rangle = 47-1988\ </math> in bins of width <math>l=30</math> (with the exception of the last bin that is smaller). The table columns are as follows:<br />
# ''ELL'' (integer): mean multipole number of bin<br />
# ''L_MIN'' (integer): lowest multipole of bin<br />
# ''L_MAX'' (integer): highest multipole of bin<br />
# ''D_ELL'' (float): <math>D_\ell</math> as described above<br />
# ''ERR'' (float): the uncertainty<br />
<br />
; 5. TE high-ell, unbinned (TEHILUNB) <br />
: with the high-ell part of the spectrum, unbinned, in 2979 bins covering <math>\langle l \rangle = 30-1996\ </math>. The table columns are as follows:<br />
# ''ELL'' (integer): multipole <br />
# ''D_ELL'' (float): <math>D_\ell</math> as described above<br />
# ''ERR'' (float): the uncertainty<br />
<br />
; 6. EE high-ell, binned (EELOLBIN) <br />
: with the high-ell part of the spectrum, binned into 83 bins covering <math>\langle l \rangle = 47-1988\ </math> in bins of width <math>l=30</math> (with the exception of the last bin that is smaller). The table columns are as follows:<br />
# ''ELL'' (integer): mean multipole number of bin<br />
# ''L_MIN'' (integer): lowest multipole of bin<br />
# ''L_MAX'' (integer): highest multipole of bin<br />
# ''D_ELL'' (float): <math>D_\ell</math> as described above<br />
# ''ERR'' (float): the uncertainty<br />
<br />
; 7. EE high-ell, unbinned (EEHILUNB) <br />
: with the high-ell part of the spectrum, unbinned, in 2979 bins covering <math>\langle l \rangle = 30-1996\ </math>. The table columns are as follows:<br />
# ''ELL'' (integer): multipole <br />
# ''D_ELL'' (float): <math>D_\ell</math> as described above<br />
# ''ERR'' (float): the uncertainty<br />
<br />
<br />
The spectra give <math>D_\ell = \ell(\ell+1)C_\ell / 2\pi </math> in units of <math>\mu\, K^2</math>. The covariance matrices of the spectra will be released in a second moment.<br />
<!-- <br />
<br />
The CMB spectrum is also given in a simple text comma-separated file:<br />
* ''{{PLASingleFile | fileType=cosmo | name=COM_PowerSpect_CMB_R1.10.txt |link=COM_PowerSpect_CMB_R1.10.txt}}''<br />
<br />
--><br />
<br />
==Likelihood==<br />
The likelihood will soon be released with an accompanying paper and an Explanatory Supplement update. <br />
<!-- <br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
The likelihood code (and the data that comes with it) used to compute the likelihood of a model that predicts the CMB power spectra, lensing power spectrum, together with some foreground and some instrumental parameters. The data files are built primarily from the Planck mission results, but include also some results from the WMAP-9 data release. The data files are written in a specific format that can only be read by the code. The code consists in a c/f90 library, along with some optional tools in python. The code is used to read the data files, and given model power spectra and nuisance parameters it computes the log likelihood of that model. <br />
<br />
Detailed description of the installation and usage of the likelihood code and data is provided in the package. The package includes five data files: four for the CMB likelihoods and one for the lensing likelihood. All of the likelihoods delivered are described in detail in the {{PlanckPapers|planck2013-p08|1|Power spectrum & Likelihood Paper}} (for the CMB based likelihood) and in the {{PlanckPapers|planck2013-p12|1|Lensing Paper}} (for the lensing likelihood) .<br />
<br />
The CMB full likelihood has been divided into four parts to allow using selectively different ranges of multipoles. It also reflects the fact that the mathematical approximations used for those different parts are very different, as is the underlying data. In detail, we distribute<br />
* one low-<math>\ell</math> temperature only likelihood (commander), <br />
* one low-<math>\ell</math> temperature and polarisation likelihood (lowlike), and <br />
* one higl-<math>\ell</math> likelihood CAMspec. <br />
<br />
The ''Commander'' likelihood covers the multipoles 2 to 49. It uses a semi-analytic method to sample the low-<math>\ell</math> temperature likelihood on an intermediate product of one of the component separated maps. The samples are used along with an analytical approximation of the likelihood posterior to perform the likelihood computation in the code. See {{PlanckPapers|planck2013-p08}} section 8.1 for more details.<br />
<br />
The ''lowlike'' likelihood covers the multipoles 2 to 32 for temperature and polarization data. Since Planck is not releasing polarisation data at this time, the polarization map from WMAP9 is used instead. A temperature map is needed to perform the computation nevertheless, and we use here the same commander map. The likelihood is computed using a map-based approximation at low resolution and a master one at intermediate resolution, as in WMAP. The likelihood code actually calls a very slightly modified version of the WMAP9 code. This piece of the likelihood essentially provides a prior on the optical depth and has almost no other impact on cosmological parameter estimation. As such it could be replaced by a simple prior, and a user can decide to do so, which is one of the motivation to leave the three pieces of the CMB likelihood as different data packages; see {{PlanckPapers|planck2013-p08}} section 8.3 for more details. Note that the version of the WMAP code used here (code version v1.0) does not perform any test on the positive definiteness of the TT, TE, EE covariance matrices, and will return a null log likelihood in the unphysical cases where the absolute value of TE is too large. This will be corrected in a later version.<br />
<br />
The ''CAMspec'' likelihood covers the multipoles 50 to 2500 for temperature only. The likelihood is computed using a quadratic approximation, including mode to mode correlations that have been precomputed on a fiducial model. The likelihood uses data from the 100, 143 and 217 GHz channels. To do so it models the foreground at each frequency using the model described in the likelihood paper. Uncertainties on the relative calibration and on the beam transfer functions are included either as parametric models, or marginalized and integrated in the covariance matrix. Detailed description of the different nuisance parameters is given below. Priors are included in the likelihood on the CIB spectral index, relative calibration factors and beam error eigenmodes. See {{PlanckPapers|planck2013-p08}} section 2.1 for more details.<br />
<br />
The ''act/spt'' likelihood covers the multipoles 1500 to 10000 for temperature. It is described in{{BibCite|dun2013}}{{BibCite|Keis2011}}{{BibCite|Reic2012}}. It uses the code and data that can be retrieved from the [http://lambda.gsfc.nasa.gov/ Lambda archive] for [http://lambda.gsfc.nasa.gov/product/act/act_prod_table.cfm ACT] and [http://lambda.gsfc.nasa.gov/product/spt/spt_prod_table.cfm SPT]. It has been slightly modified to use a thermal and kinetic SZ model that matches the one used in CAMspec. As stated in{{BibCite|dun2013}}, the dust parameters a_ge and a_gs must be explored with the following priors: a_ge = 0.8 ± 0.2 and a_gs = 0.4 ± 0.2. Those priors are not included in the log likelihood computed by the code.<br />
<br />
The ''lensing'' likelihood covers the multipoles 40 to 400 using the result of the [[Specially_processed_maps | lensing reconstruction]]. It uses a quadratic approximation for the likelihood, with a covariance matrix including the marginalized contribution of the beam transfer function uncertainties, the diffuse point source correction uncertainties and the cosmological model uncertainty affecting the first order non-gaussian bias (N1). The correlation between temperature and lensing is not taken into account. Cosmological uncertainty effects on the normalization are dealt with using a first order renormalization procedure. This means that the code will need both the TT and $\phi\phi$ power spectrum up to <math>\ell</math> = 2048 to correctly perform the integrals needed for the renormalization. Nevertheless, the code will only produce an estimate based on the data between <math>\ell</math> = 40 to 400. See {{PlanckPapers|planck2013-p12}} section 6.1 for more details.<br />
</span><br />
<span style="color:red">OUTSTANDING: description of likelihood masks </span><br />
==Production process==<br />
<br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
The code is based on some basic routines from the libpmc library in the [http://arxiv.org/abs/1101.0950 cosmoPMC] code. It also uses some code from the [http://lambda.gsfc.nasa.gov/product/map/dr5/likelihood_get.cfm WMAP9 likelihood] for the lowlike likelihood and{{BibCite|dun2013}}{{BibCite|Keis2011}}{{BibCite|Reic2012}} for the act/spt one. The rest of the code has been specifically written for the Planck data. Each likelihood file has been processed using a different and dedicated pipeline as described in the likelihood paper {{PlanckPapers|planck2013-p08}} (section 2 and 8) and in the lensing paper {{PlanckPapers|planck2013-p12}} (section 6.1). We refer the reader to those papers for full details. The data are then encapsulated into the specific file format.<br />
<br />
Each dataset comes with its own self check. Whenever the code is used to read a data file, a computation will be done against an included test spectrum/nuisance parameter, and the log-likelihood will be displayed along with the expected result. Difference of the order of 10<math>^{-6}</math> or less are expected depending of the architecture.<br />
<br />
==Inputs==<br />
<br />
===Likelihood===<br />
<br />
; ''commander'' :<br />
* all Planck channels maps<br />
* compact source catalogs<br />
* common masks<br />
* beam transfer functions for all channels<br />
<br />
; ''lowlike'' :<br />
* WMAP9 likelihood data<br />
* Low-<math>\ell</math> Commander map<br />
<br />
; ''CAMspec'' :<br />
* 100, 143 and 217 GHz detector and detsets maps<br />
* 857GHz channel map<br />
* compact source catalog<br />
* common masks (0,1 & 3)<br />
* beam transfer function and error eigenmodes and covariance for 100, 143 and 217 GHz detectors & detsets<br />
* theoretical templates for the tSZ and kSZ contributions<br />
* color corrections for the CIB emission for the 143 and 217GHz detectors and detsets<br />
* fiducial CMB model (bootstrapped from WMAP7 best fit spectrum) estimated noise contribution from the half-ring maps for 100, 143 and 217 GHz<br />
<br />
; ''lensing'' :<br />
* the lensing map<br />
* beam error eigenmodes and covariance for the 143 and 217GHz channel maps<br />
* fiducial CMB model (from Planck cosmological parameter best fit)<br />
<br />
; ''act/spt'' :<br />
* data and code from [http://lambda.gsfc.nasa.gov/product/act/act_fulllikelihood_get.cfm here]<br />
* the tSZ andkSZ template are changed to match those of CAMspec<br />
<br />
== File names and Meta data ==<br />
<br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
<br />
'''Likelihood source code'''<br />
<br />
The source code is in the file<br />
: {{PLASingleFile |fileType=cosmo|name=COM_Code_Likelihood-v1.0_R1.10.tar.gz|link=COM_Code_Likelihood-v1.0_R1.10.tar.gz}} (C, f90 and python likelihood library and tools)<br />
<br />
'''Likelihood data packages'''<br />
<br />
The {{PLALikelihood|type=Data|link=data packages}} are<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-commander_R1.10.tar.gz | link=COM_Data_Likelihood-commander_R1.10.tar.gz}}'' (low-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-lowlike_R1.10.tar.gz | link=COM_Data_Likelihood-lowlike_R1.10.tar.gz}}'' (low-ell TE,EE,BB likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-CAMspec_R1.10.tar.gz | link=COM_Data_Likelihood-CAMspec_R1.10.tar.gz}}'' (high-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-actspt_R1.10.tar | link=COM_Data_Likelihood-actspt_R1.10.tar.gz}}'' (high-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-lensing_R1.10.tar.gz | link=COM_Data_Likelihood-lensing_R1.10.tar.gz}}'' (lensing likelihood)<br />
<br />
Untar and unzip all files to recover the code and likelihood data. Each package comes with a README file; follow the instructions inclosed to<br />
build the code and use it. To compute the CMB likelihood one has to sum the log likelihood of each of the commander_v4.1_lm49.clik, lowlike_v222.clik and CAMspec_v6.2TN_2013_02_26.clik, actspt_2013_01.clik. To compute the CMB+lensing likelihood, one has to sum the log likelihood of all 5 files.<br />
<br />
The CMB and lensing likelihood format are different. The CMB files have the termination .clik, the lensing one .clik_lensing. The lensing data being simpler (due to the less detailled modeling permitted by the lower signal-noise), the file is a simple ascii file containing all the data along with comments describing it, and linking the different quantities to the lensing paper. The CMB file format is more complex and must accommodate different forms of data (maps, power spectrum, distribution samples, covariance matrices...). It consists of a tree structure containing the data. At each level of the tree structure a given directory can contain array data (in the form of FITS files or ascii files for strings) and scalar data (joined in a single ascii file "_mdb"). Those files are not user modifiable and do not contain interesting meta data for the user. Tools to manipulate those files are included in the code package as optional python tools. They are documented in the code package.<br />
<br />
'''Likelihood masks'''<br />
<br />
The masks used in the Likelihood paper {{PlanckPapers|planck2013-p08}} are found in<br />
{{PLASingleFile|fileType=map|name=COM_Mask_Likelihood_2048_R1.10.fits|link=COM_Mask_Likelihood_2048_R1.10.fits}}<br />
<br />
which contains ten masks which are written into a single ''BINTABLE'' extension of 10 columns by 50331648 rows (the number of Healpix pixels in an Nside = 2048 map). The structure is as follows, where the column names are the names of the masks: <br />
<br />
{| border="1" cellpadding="3" cellspacing="0" align="center" style="text-align:left" width=800px<br />
|+ '''Likelihodd masks file data structure'''<br />
|- bgcolor="ffdead" <br />
!colspan="4" | 1. EXTNAME = 'MSK-LIKE' : Data columns<br />
|- bgcolor="ffdead" <br />
! Column Name || Data Type || Units || Description<br />
|-<br />
|CL31 || Real*4 || none || mask<br />
|-<br />
|CL39 || Real*4 || none || mask<br />
|-<br />
|CL49 || Real*4 || none || mask<br />
|-<br />
|G22 || Real*4 || none || mask <br />
|-<br />
|G35 || Real*4 || none || mask<br />
|-<br />
|G45 || Real*4 || none || mask<br />
|-<br />
|G56 || Real*4 || none || mask<br />
|-<br />
|G65 || Real*4 || none || mask<br />
|-<br />
|PS96 || Real*4 || none || mask<br />
|-<br />
|PSA82 || Real*4 || none || mask<br />
|-<br />
|- bgcolor="ffdead" <br />
! Keyword || Data Type || Value || Description<br />
|-<br />
|PIXTYPE || string || HEALPIX ||<br />
|-<br />
|COORDSYS || string || GALACTIC ||Coordinate system <br />
|-<br />
|ORDERING || string || NESTED || Healpix ordering<br />
|-<br />
|NSIDE || Int || 2048 || Healpix Nside <br />
|-<br />
|FIRSTPIX || Int*4 || 0 || First pixel number<br />
|-<br />
|LASTPIX || Int*4 || 50331647 || Last pixel number, for LFI and HFI, respectively<br />
<br />
|}<br />
--><br />
== References ==<br />
<References /><br />
<br />
<br />
<br />
[[Category:Mission products|008]]</div>Sgallihttps://wiki.cosmos.esa.int/planckpla2015/index.php?title=CMB_spectrum_%26_Likelihood_Code&diff=11291CMB spectrum & Likelihood Code2015-02-04T18:52:46Z<p>Sgalli: </p>
<hr />
<div>{{DISPLAYTITLE:CMB spectrum and likelihood code}}<br />
<br />
==CMB spectra==<br />
<br />
<br />
===General description===<br />
====TT====<br />
The Planck best-fit CMB temperature power spectrum, shown in figure below, covers the wide range of multipoles <math> \ell </math> = 2-2508. Over the multipole range <math> \ell </math> = 2–29, the power spectrum is derived from the ''Commander'': component separation algorithm applied to the combination of Planck 2015 temperature data between 30 and 857 GHz, the 9-year WMAP sky maps, and the 408 MHz Haslam et al. (1982) survey, including 93% of the sky {{PlanckPapers|planck2014-a12}} . The asymmetric error bars associated to this spectrum are the 68% confidence limits and include the uncertainties due to foreground subtraction.<br />
<br />
For multipoles equal or greater than <math>\ell=30</math>, instead, the spectrum is derived from the ''Plik'' likelihood {{PlanckPapers|planck2014-a13}} by optimally combining the spectra in the frequency range 100-217 GHz, and correcting them for unresolved foregrounds using the best-fit foreground solution from a Planck TT+lowP <math>\Lambda</math>CDM run. Associated 1-sigma errors include beam uncertainties. Both ''Commander'' and ''Plik'' are described in more details in the sections below.<br />
<br />
[[File: Planck2014 TT Dl NORES bin30 w180mm.jpeg|thumb|center|700px|'''CMB TT spectrum. Logarithmic x-scale up to <math>\ell=30</math>, linear at higher <math>\ell</math>; all points with error bars. The red line is the Planck best-fit primordial power spectrum (cf Planck TT+lowP in Table 3 of {{PlanckPapers|planck2014-a15}}). The blue shaded area shows the uncertainties due to cosmic variance alone.''']]<br />
<br />
====TE and EE====<br />
The Planck best-fit CMB polarization and temperature-polarization cross-correlation power spectra, shown in the figure below, cover the multipole range <math> \ell </math> = 30-1996. The data points relative to the multipole range <math> \ell </math> = 2-29 will be released in a second moment.<br />
Analogously to the TT case, the <math> \ell\ge 30 </math> spectrum is derived from the ''Plik'' likelihood {{PlanckPapers|planck2014-a13}} by optimally combining the spectra in the frequency range 100-217 GHz, and correcting them for unresolved foregrounds using the best-fit foreground solution from a Planck TT,TE,EE+lowP <math>\Lambda</math>CDM run. <br />
<br />
{|style="margin: 0 auto;"<br />
|[[File: Planck2014 EE Dl NORES bin30 w180mm.jpeg|thumb|center|500px|'''CMB EE spectrum. The red line is the Planck best-fit primordial power spectrum (cf Planck TT+lowP in Table 3 of {{PlanckPapers|planck2014-a15}}). The blue shaded area shows the uncertainties due to cosmic variance alone.''']]<br />
|[[File: Planck2014 TE Dl NORES bin30 w180mm.jpeg|thumb|center|500px|'''CMB TE spectrum. The red line is the Planck best-fit primordial power spectrum (cf Planck TT+lowP in Table 3 of {{PlanckPapers|planck2014-a15}}). The blue shaded area shows the uncertainties due to cosmic variance alone.''']]<br />
|}<br />
<br />
===Production process===<br />
The <math>\ell</math> < 30 part of the Planck TT power spectrum is derived from the Commander approach, which implements Bayesian component separation in pixel space, fitting a parametric model to the data by sampling the posterior distribution for the model parameters {{PlanckPapers|planck2014-a12}}. The power spectrum at any multipole <math>\ell</math> is given as the maximum probability point for the posterior <math>C_\ell</math> distribution, marginalized over the other multipoles, and the error bars are 68% confidence level {{PlanckPapers|planck2014-a12}}. <br />
<br />
The <math>\ell \ge 30</math> part of the TT, TE and EE power spectra have been derived by the Plik likelihood, a code that implements a pseudo-Cl based technique, extensively described in Sec. 2 and the Appendix of {{PlanckPapers|planck2013-p08}} and {{PlanckPapers|planck2014-a13}}. Frequency spectra are computed as cross-spectra between half-mission maps. Mask and multipole range choices for each frequency spectrum are summarized in Section 3.3 of {{PlanckPapers|planck2014-a15}} and in {{PlanckPapers|planck2014-a13}}. The final power spectrum is an optimal combination of the 100, 143, 143x217 and 217 GHz spectra, corrected for the best-fit unresolved foregrounds and inter-frequency calibration factors, as derived from the full likelihood analysis (for TT we use the best-fit solutions for the nuisance parameters from the Planck+TT+lowP data combination, while for TE and EE we use the best fit from Planck+TT+lowP, cf Table 3 of {{PlanckPapers|planck2014-a15}}). A thorough description of the models of unresolved foregrounds is given in {{PlanckPapers|planck2014-a13}}. The spectrum covariance matrix accounts for cosmic variance and noise contributions, together with beam uncertainties. The <math>\ell \ge 30</math> CMB TT spectrum and associated covariance matrix are available in two formats:<br />
#Unbinned. TT: 2479 bandpowers (<math>\ell=30-2508</math>); TE or EE: 1697 bandpowers (<math>\ell=30-1996</math>).<br />
#Binned, in bins of <math> \Delta\ell=30 </math>. TT: 83 bandpowers. TE or EE: 66 bandpowers. We bin the <math> C_\ell </math> power spectrum with a weight proportional to <math> \ell (\ell+1) </math>, so that the <math> C_{\ell_b} </math> binned bandpower centered in <math> \ell_b </math> is: <math> \\ C_{\ell_b}=\Sigma_{\ell \in b} w_{\ell_b\ell} C_\ell \quad \text{with} \quad w_{\ell_b\ell}=\frac{\ell (\ell+1)}{\Sigma_{\ell \in b} \ell (\ell+1)}. \\</math> Equivalently, using the matrix formalism, we can construct the binning matrix B as: <math>\\ B_{\ell_b \ell}=w_{\ell_b\ell} \\ </math> where B is a <math> n_b\times n_\ell</math> matrix, with <math>n_b=83</math> the number of bins and <math>n_\ell=2479</math> the number of unbinned multipoles. Thus: <math> \\ \vec{C}_\mathrm{binned}=B \, \vec{C} \\ \mathrm{cov_\mathrm{binned}}= B\, \mathrm{cov}\, B^T \\ \ell_b=B\, \ell \\ </math> Here, <math> \vec{C}_{binned}\, (\vec{C}) </math> is the vector containing all the binned (unbinned) <math>C_\ell</math> bandpowers, <math>\mathrm{cov} </math> is the covariance matrix and <math>\ell_b</math> is the weighted average multipole in each bin. Note that following this definition, <math>\ell_b</math> can be a non-integer. The binned <math>D_{\ell_B}</math> power spectrum is then calculated as: <math> \\ D_{\ell_b}=\frac{\ell_b (\ell_b+1)}{2\pi} C_{\ell_b} </math>.<br />
<br />
===Inputs===<br />
<br />
; Low-l spectrum (<math>\ell < 30</math>):<br />
* Planck 30 and 44 GHz frequency maps<br />
* Planck 70 to 857 GHz detector and detector set maps<br />
* 9-year WMAP temperature sky maps between 23 and 94 GHz<br />
* 408 MHz survey by Haslam et al. (1982) <br />
* Commander <math>\chi^2</math> based LM93 confidence mask {{PlanckPapers|planck2014-a12}}<br />
<br />
; High-l spectrum (<math>30 \ge \ell \le 2500</math>): <br />
<br />
* 100, 143, 143x217 and 217 GHz spectra and their covariance matrix (Sec. 3.3 {{PlanckPapers|planck2014-a15}})<br />
* best-fit foreground templates and inter-frequency calibration factors (Table 3 of {{PlanckPapers|planck2014-a15}})<br />
* Beam transfer function uncertainties {{PlanckPapers|planck2014-a08}}<br />
=== File names and Meta data ===<br />
<br />
The CMB spectrum and its covariance matrix are distributed in a single FITS file named <br />
<!--- * ''{{PLASingleFile | fileType=cosmo | name=COM_PowerSpect_CMB_R2.00.fits | link=COM_PowerSpect_CMB_R1.10.fits}}'' ---><br />
* ''COM_PowerSpect_CMB_R2.nn.fits''<br />
which contains 7 ''BINTABLE'' extensions<br />
<br />
; 1. TT low-ell, unbinned (TTLOLUNB)<br />
: with the low ell part of the spectrum, not binned, and for l=2-29. The table columns are<br />
# ''ELL'' (integer): multipole number<br />
# ''D_ELL'' (float): <math>D_ell</math> as described above<br />
# ''ERRUP'' (float): the upward uncertainty<br />
# ''ERRDOWN'' (float): the downward uncertainty<br />
<br />
; 2. TT high-ell, binned (TTHILBIN)<br />
: with the high-ell part of the spectrum, binned into 83 bins covering <math>\langle l \rangle = 47-2499\ </math> in bins of width <math>l=30</math> (with the exception of the last bin that is smaller). The table columns are as follows:<br />
# ''ELL'' (integer): mean multipole number of bin<br />
# ''L_MIN'' (integer): lowest multipole of bin<br />
# ''L_MAX'' (integer): highest multipole of bin<br />
# ''D_ELL'' (float): <math>D_\ell</math> as described above<br />
# ''ERR'' (float): the uncertainty<br />
<br />
; 3. TT high-ell unbinned (TTHILUNB) <br />
: with the high-ell part of the spectrum, unbinned, in 2979 bins covering <math>\langle l \rangle = 30-2508\ </math>. The table columns are as follows:<br />
# ''ELL'' (integer): multipole <br />
# ''D_ELL'' (float): <math>D_\ell</math> as described above<br />
# ''ERR'' (float): the uncertainty<br />
<br />
; 4. TE high-ell, binned (TEHILBIN) <br />
: with the high-ell part of the spectrum, binned into 83 bins covering <math>\langle l \rangle = 47-1988\ </math> in bins of width <math>l=30</math> (with the exception of the last bin that is smaller). The table columns are as follows:<br />
# ''ELL'' (integer): mean multipole number of bin<br />
# ''L_MIN'' (integer): lowest multipole of bin<br />
# ''L_MAX'' (integer): highest multipole of bin<br />
# ''D_ELL'' (float): <math>D_\ell</math> as described above<br />
# ''ERR'' (float): the uncertainty<br />
<br />
; 5. TE high-ell, unbinned (TEHILUNB) <br />
: with the high-ell part of the spectrum, unbinned, in 2979 bins covering <math>\langle l \rangle = 30-1996\ </math>. The table columns are as follows:<br />
# ''ELL'' (integer): multipole <br />
# ''D_ELL'' (float): <math>D_\ell</math> as described above<br />
# ''ERR'' (float): the uncertainty<br />
<br />
; 6. EE high-ell, binned (EELOLBIN) <br />
: with the high-ell part of the spectrum, binned into 83 bins covering <math>\langle l \rangle = 47-1988\ </math> in bins of width <math>l=30</math> (with the exception of the last bin that is smaller). The table columns are as follows:<br />
# ''ELL'' (integer): mean multipole number of bin<br />
# ''L_MIN'' (integer): lowest multipole of bin<br />
# ''L_MAX'' (integer): highest multipole of bin<br />
# ''D_ELL'' (float): <math>D_\ell</math> as described above<br />
# ''ERR'' (float): the uncertainty<br />
<br />
; 7. EE high-ell, unbinned (EEHILUNB) <br />
: with the high-ell part of the spectrum, unbinned, in 2979 bins covering <math>\langle l \rangle = 30-1996\ </math>. The table columns are as follows:<br />
# ''ELL'' (integer): multipole <br />
# ''D_ELL'' (float): <math>D_\ell</math> as described above<br />
# ''ERR'' (float): the uncertainty<br />
<br />
<br />
The spectra give <math>D_\ell = \ell(\ell+1)C_\ell / 2\pi </math> in units of <math>\mu\, K^2</math>. The covariance matrices of the spectra will be released in a second moment.<br />
<!-- <br />
<br />
The CMB spectrum is also given in a simple text comma-separated file:<br />
* ''{{PLASingleFile | fileType=cosmo | name=COM_PowerSpect_CMB_R1.10.txt |link=COM_PowerSpect_CMB_R1.10.txt}}''<br />
<br />
--><br />
<br />
==Likelihood==<br />
The likelihood will soon be released with an accompanying paper and an Explanatory Supplement update. <br />
<!-- <br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
The likelihood code (and the data that comes with it) used to compute the likelihood of a model that predicts the CMB power spectra, lensing power spectrum, together with some foreground and some instrumental parameters. The data files are built primarily from the Planck mission results, but include also some results from the WMAP-9 data release. The data files are written in a specific format that can only be read by the code. The code consists in a c/f90 library, along with some optional tools in python. The code is used to read the data files, and given model power spectra and nuisance parameters it computes the log likelihood of that model. <br />
<br />
Detailed description of the installation and usage of the likelihood code and data is provided in the package. The package includes five data files: four for the CMB likelihoods and one for the lensing likelihood. All of the likelihoods delivered are described in detail in the {{PlanckPapers|planck2013-p08|1|Power spectrum & Likelihood Paper}} (for the CMB based likelihood) and in the {{PlanckPapers|planck2013-p12|1|Lensing Paper}} (for the lensing likelihood) .<br />
<br />
The CMB full likelihood has been divided into four parts to allow using selectively different ranges of multipoles. It also reflects the fact that the mathematical approximations used for those different parts are very different, as is the underlying data. In detail, we distribute<br />
* one low-<math>\ell</math> temperature only likelihood (commander), <br />
* one low-<math>\ell</math> temperature and polarisation likelihood (lowlike), and <br />
* one higl-<math>\ell</math> likelihood CAMspec. <br />
<br />
The ''Commander'' likelihood covers the multipoles 2 to 49. It uses a semi-analytic method to sample the low-<math>\ell</math> temperature likelihood on an intermediate product of one of the component separated maps. The samples are used along with an analytical approximation of the likelihood posterior to perform the likelihood computation in the code. See {{PlanckPapers|planck2013-p08}} section 8.1 for more details.<br />
<br />
The ''lowlike'' likelihood covers the multipoles 2 to 32 for temperature and polarization data. Since Planck is not releasing polarisation data at this time, the polarization map from WMAP9 is used instead. A temperature map is needed to perform the computation nevertheless, and we use here the same commander map. The likelihood is computed using a map-based approximation at low resolution and a master one at intermediate resolution, as in WMAP. The likelihood code actually calls a very slightly modified version of the WMAP9 code. This piece of the likelihood essentially provides a prior on the optical depth and has almost no other impact on cosmological parameter estimation. As such it could be replaced by a simple prior, and a user can decide to do so, which is one of the motivation to leave the three pieces of the CMB likelihood as different data packages; see {{PlanckPapers|planck2013-p08}} section 8.3 for more details. Note that the version of the WMAP code used here (code version v1.0) does not perform any test on the positive definiteness of the TT, TE, EE covariance matrices, and will return a null log likelihood in the unphysical cases where the absolute value of TE is too large. This will be corrected in a later version.<br />
<br />
The ''CAMspec'' likelihood covers the multipoles 50 to 2500 for temperature only. The likelihood is computed using a quadratic approximation, including mode to mode correlations that have been precomputed on a fiducial model. The likelihood uses data from the 100, 143 and 217 GHz channels. To do so it models the foreground at each frequency using the model described in the likelihood paper. Uncertainties on the relative calibration and on the beam transfer functions are included either as parametric models, or marginalized and integrated in the covariance matrix. Detailed description of the different nuisance parameters is given below. Priors are included in the likelihood on the CIB spectral index, relative calibration factors and beam error eigenmodes. See {{PlanckPapers|planck2013-p08}} section 2.1 for more details.<br />
<br />
The ''act/spt'' likelihood covers the multipoles 1500 to 10000 for temperature. It is described in{{BibCite|dun2013}}{{BibCite|Keis2011}}{{BibCite|Reic2012}}. It uses the code and data that can be retrieved from the [http://lambda.gsfc.nasa.gov/ Lambda archive] for [http://lambda.gsfc.nasa.gov/product/act/act_prod_table.cfm ACT] and [http://lambda.gsfc.nasa.gov/product/spt/spt_prod_table.cfm SPT]. It has been slightly modified to use a thermal and kinetic SZ model that matches the one used in CAMspec. As stated in{{BibCite|dun2013}}, the dust parameters a_ge and a_gs must be explored with the following priors: a_ge = 0.8 ± 0.2 and a_gs = 0.4 ± 0.2. Those priors are not included in the log likelihood computed by the code.<br />
<br />
The ''lensing'' likelihood covers the multipoles 40 to 400 using the result of the [[Specially_processed_maps | lensing reconstruction]]. It uses a quadratic approximation for the likelihood, with a covariance matrix including the marginalized contribution of the beam transfer function uncertainties, the diffuse point source correction uncertainties and the cosmological model uncertainty affecting the first order non-gaussian bias (N1). The correlation between temperature and lensing is not taken into account. Cosmological uncertainty effects on the normalization are dealt with using a first order renormalization procedure. This means that the code will need both the TT and $\phi\phi$ power spectrum up to <math>\ell</math> = 2048 to correctly perform the integrals needed for the renormalization. Nevertheless, the code will only produce an estimate based on the data between <math>\ell</math> = 40 to 400. See {{PlanckPapers|planck2013-p12}} section 6.1 for more details.<br />
</span><br />
<span style="color:red">OUTSTANDING: description of likelihood masks </span><br />
==Production process==<br />
<br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
The code is based on some basic routines from the libpmc library in the [http://arxiv.org/abs/1101.0950 cosmoPMC] code. It also uses some code from the [http://lambda.gsfc.nasa.gov/product/map/dr5/likelihood_get.cfm WMAP9 likelihood] for the lowlike likelihood and{{BibCite|dun2013}}{{BibCite|Keis2011}}{{BibCite|Reic2012}} for the act/spt one. The rest of the code has been specifically written for the Planck data. Each likelihood file has been processed using a different and dedicated pipeline as described in the likelihood paper {{PlanckPapers|planck2013-p08}} (section 2 and 8) and in the lensing paper {{PlanckPapers|planck2013-p12}} (section 6.1). We refer the reader to those papers for full details. The data are then encapsulated into the specific file format.<br />
<br />
Each dataset comes with its own self check. Whenever the code is used to read a data file, a computation will be done against an included test spectrum/nuisance parameter, and the log-likelihood will be displayed along with the expected result. Difference of the order of 10<math>^{-6}</math> or less are expected depending of the architecture.<br />
<br />
==Inputs==<br />
<br />
===Likelihood===<br />
<br />
; ''commander'' :<br />
* all Planck channels maps<br />
* compact source catalogs<br />
* common masks<br />
* beam transfer functions for all channels<br />
<br />
; ''lowlike'' :<br />
* WMAP9 likelihood data<br />
* Low-<math>\ell</math> Commander map<br />
<br />
; ''CAMspec'' :<br />
* 100, 143 and 217 GHz detector and detsets maps<br />
* 857GHz channel map<br />
* compact source catalog<br />
* common masks (0,1 & 3)<br />
* beam transfer function and error eigenmodes and covariance for 100, 143 and 217 GHz detectors & detsets<br />
* theoretical templates for the tSZ and kSZ contributions<br />
* color corrections for the CIB emission for the 143 and 217GHz detectors and detsets<br />
* fiducial CMB model (bootstrapped from WMAP7 best fit spectrum) estimated noise contribution from the half-ring maps for 100, 143 and 217 GHz<br />
<br />
; ''lensing'' :<br />
* the lensing map<br />
* beam error eigenmodes and covariance for the 143 and 217GHz channel maps<br />
* fiducial CMB model (from Planck cosmological parameter best fit)<br />
<br />
; ''act/spt'' :<br />
* data and code from [http://lambda.gsfc.nasa.gov/product/act/act_fulllikelihood_get.cfm here]<br />
* the tSZ andkSZ template are changed to match those of CAMspec<br />
<br />
== File names and Meta data ==<br />
<br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
<br />
'''Likelihood source code'''<br />
<br />
The source code is in the file<br />
: {{PLASingleFile |fileType=cosmo|name=COM_Code_Likelihood-v1.0_R1.10.tar.gz|link=COM_Code_Likelihood-v1.0_R1.10.tar.gz}} (C, f90 and python likelihood library and tools)<br />
<br />
'''Likelihood data packages'''<br />
<br />
The {{PLALikelihood|type=Data|link=data packages}} are<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-commander_R1.10.tar.gz | link=COM_Data_Likelihood-commander_R1.10.tar.gz}}'' (low-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-lowlike_R1.10.tar.gz | link=COM_Data_Likelihood-lowlike_R1.10.tar.gz}}'' (low-ell TE,EE,BB likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-CAMspec_R1.10.tar.gz | link=COM_Data_Likelihood-CAMspec_R1.10.tar.gz}}'' (high-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-actspt_R1.10.tar | link=COM_Data_Likelihood-actspt_R1.10.tar.gz}}'' (high-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-lensing_R1.10.tar.gz | link=COM_Data_Likelihood-lensing_R1.10.tar.gz}}'' (lensing likelihood)<br />
<br />
Untar and unzip all files to recover the code and likelihood data. Each package comes with a README file; follow the instructions inclosed to<br />
build the code and use it. To compute the CMB likelihood one has to sum the log likelihood of each of the commander_v4.1_lm49.clik, lowlike_v222.clik and CAMspec_v6.2TN_2013_02_26.clik, actspt_2013_01.clik. To compute the CMB+lensing likelihood, one has to sum the log likelihood of all 5 files.<br />
<br />
The CMB and lensing likelihood format are different. The CMB files have the termination .clik, the lensing one .clik_lensing. The lensing data being simpler (due to the less detailled modeling permitted by the lower signal-noise), the file is a simple ascii file containing all the data along with comments describing it, and linking the different quantities to the lensing paper. The CMB file format is more complex and must accommodate different forms of data (maps, power spectrum, distribution samples, covariance matrices...). It consists of a tree structure containing the data. At each level of the tree structure a given directory can contain array data (in the form of FITS files or ascii files for strings) and scalar data (joined in a single ascii file "_mdb"). Those files are not user modifiable and do not contain interesting meta data for the user. Tools to manipulate those files are included in the code package as optional python tools. They are documented in the code package.<br />
<br />
'''Likelihood masks'''<br />
<br />
The masks used in the Likelihood paper {{PlanckPapers|planck2013-p08}} are found in<br />
{{PLASingleFile|fileType=map|name=COM_Mask_Likelihood_2048_R1.10.fits|link=COM_Mask_Likelihood_2048_R1.10.fits}}<br />
<br />
which contains ten masks which are written into a single ''BINTABLE'' extension of 10 columns by 50331648 rows (the number of Healpix pixels in an Nside = 2048 map). The structure is as follows, where the column names are the names of the masks: <br />
<br />
{| border="1" cellpadding="3" cellspacing="0" align="center" style="text-align:left" width=800px<br />
|+ '''Likelihodd masks file data structure'''<br />
|- bgcolor="ffdead" <br />
!colspan="4" | 1. EXTNAME = 'MSK-LIKE' : Data columns<br />
|- bgcolor="ffdead" <br />
! Column Name || Data Type || Units || Description<br />
|-<br />
|CL31 || Real*4 || none || mask<br />
|-<br />
|CL39 || Real*4 || none || mask<br />
|-<br />
|CL49 || Real*4 || none || mask<br />
|-<br />
|G22 || Real*4 || none || mask <br />
|-<br />
|G35 || Real*4 || none || mask<br />
|-<br />
|G45 || Real*4 || none || mask<br />
|-<br />
|G56 || Real*4 || none || mask<br />
|-<br />
|G65 || Real*4 || none || mask<br />
|-<br />
|PS96 || Real*4 || none || mask<br />
|-<br />
|PSA82 || Real*4 || none || mask<br />
|-<br />
|- bgcolor="ffdead" <br />
! Keyword || Data Type || Value || Description<br />
|-<br />
|PIXTYPE || string || HEALPIX ||<br />
|-<br />
|COORDSYS || string || GALACTIC ||Coordinate system <br />
|-<br />
|ORDERING || string || NESTED || Healpix ordering<br />
|-<br />
|NSIDE || Int || 2048 || Healpix Nside <br />
|-<br />
|FIRSTPIX || Int*4 || 0 || First pixel number<br />
|-<br />
|LASTPIX || Int*4 || 50331647 || Last pixel number, for LFI and HFI, respectively<br />
<br />
|}<br />
--><br />
== References ==<br />
<References /><br />
<br />
<br />
<br />
[[Category:Mission products|008]]</div>Sgallihttps://wiki.cosmos.esa.int/planckpla2015/index.php?title=CMB_spectrum_%26_Likelihood_Code&diff=11252CMB spectrum & Likelihood Code2015-02-04T17:22:57Z<p>Sgalli: </p>
<hr />
<div>{{DISPLAYTITLE:CMB spectrum and likelihood code}}<br />
<br />
==CMB spectra==<br />
<br />
<br />
===General description===<br />
====TT====<br />
The Planck best-fit CMB temperature power spectrum, shown in figure below, covers the wide range of multipoles <math> \ell </math> = 2-2508. <br />
<span style="color:red"> UPDATE COMMANDER: Over the multipole range <math> \ell </math> = 2–29, the power spectrum is derived from a component-separation algorithm, ''Commander'': applied to maps in the frequency range 30–353 GHz over 91% of the sky {{PlanckPapers|planck2013-p06}} . The asymmetric error bars associated to this spectrum are the 68% confidence limits and include the uncertainties due to foreground subtraction. </span><br />
<br />
For multipoles equal or greater than <math>\ell=30</math>, instead, the spectrum is derived from the ''Plik'' likelihood {{PlanckPapers|planck2014-a13}} by optimally combining the spectra in the frequency range 100-217 GHz, and correcting them for unresolved foregrounds using the best-fit foreground solution from a Planck TT+lowP <math>\Lambda</math>CDM run. Associated 1-sigma errors include beam uncertainties. Both ''Commander'' and ''Plik'' are described in more details in the sections below.<br />
<br />
[[File: Planck2014 TT Dl NORES bin30 w180mm.jpeg|thumb|center|700px|'''CMB TT spectrum. Logarithmic x-scale up to <math>\ell=30</math>, linear at higher <math>\ell</math>; all points with error bars. The red line is the Planck best-fit primordial power spectrum (cf Planck TT+lowP in Table 3 of {{PlanckPapers|planck2014-a15}}). The blue shaded area shows the uncertainties due to cosmic variance alone.''']]<br />
<br />
====TE and EE====<br />
The Planck best-fit CMB polarization and temperature-polarization cross-correlation power spectra, shown in the figure below, cover the multipole range <math> \ell </math> = 30-1996. The data points relative to the multipole range <math> \ell </math> = 2-29 will be released in a second moment.<br />
Analogously to the TT case, the <math> \ell\ge 30 </math> spectrum is derived from the ''Plik'' likelihood {{PlanckPapers|planck2014-a13}} by optimally combining the spectra in the frequency range 100-217 GHz, and correcting them for unresolved foregrounds using the best-fit foreground solution from a Planck TT,TE,EE+lowP <math>\Lambda</math>CDM run. <br />
<br />
{|style="margin: 0 auto;"<br />
|[[File: Planck2014 EE Dl NORES bin30 w180mm.jpeg|thumb|center|500px|'''CMB EE spectrum. The red line is the Planck best-fit primordial power spectrum (cf Planck TT+lowP in Table 3 of {{PlanckPapers|planck2014-a15}}). The blue shaded area shows the uncertainties due to cosmic variance alone.''']]<br />
|[[File: Planck2014 TE Dl NORES bin30 w180mm.jpeg|thumb|center|500px|'''CMB TE spectrum. The red line is the Planck best-fit primordial power spectrum (cf Planck TT+lowP in Table 3 of {{PlanckPapers|planck2014-a15}}). The blue shaded area shows the uncertainties due to cosmic variance alone.''']]<br />
|}<br />
<br />
===Production process===<br />
<span style="color:red"> UPDATE COMMANDER<br />
The <math>\ell</math> < 50 part of the Planck TT power spectrum is derived from the Commander approach, which implements Bayesian component separation in pixel space, fitting a parametric model to the data by sampling the posterior distribution for the model parameters {{PlanckPapers|planck2013-p06}}. The power spectrum at any multipole <math>\ell</math> is given as the maximum probability point for the posterior <math>C_\ell</math> distribution, marginalized over the other multipoles, and the error bars are 68% confidence level {{PlanckPapers|planck2013-p08}}. </span><br />
<br />
The <math>\ell \ge 30</math> part of the TT, TE and EE power spectra have been derived by the Plik likelihood, a code that implements a pseudo-Cl based technique, extensively described in Sec. 2 and the Appendix of {{PlanckPapers|planck2013-p08}} and {{PlanckPapers|planck2014-a13}}. Frequency spectra are computed as cross-spectra between half-mission maps. Mask and multipole range choices for each frequency spectrum are summarized in Section 3.3 of {{PlanckPapers|planck2014-a15}} and in {{PlanckPapers|planck2014-a13}}. The final power spectrum is an optimal combination of the 100, 143, 143x217 and 217 GHz spectra, corrected for the best-fit unresolved foregrounds and inter-frequency calibration factors, as derived from the full likelihood analysis (for TT we use the best-fit solutions for the nuisance parameters from the Planck+TT+lowP data combination, while for TE and EE we use the best fit from Planck+TT+lowP, cf Table 3 of {{PlanckPapers|planck2014-a15}}). A thorough description of the models of unresolved foregrounds is given in {{PlanckPapers|planck2014-a13}}. The spectrum covariance matrix accounts for cosmic variance and noise contributions, together with beam uncertainties. The <math>\ell \ge 30</math> CMB TT spectrum and associated covariance matrix are available in two formats:<br />
#Unbinned. TT: 2479 bandpowers (<math>\ell=30-2508</math>); TE or EE: 1697 bandpowers (<math>\ell=30-1996</math>).<br />
#Binned, in bins of <math> \Delta\ell=30 </math>. TT: 83 bandpowers. TE or EE: 66 bandpowers. We bin the <math> C_\ell </math> power spectrum with a weight proportional to <math> \ell (\ell+1) </math>, so that the <math> C_{\ell_b} </math> binned bandpower centered in <math> \ell_b </math> is: <math> \\ C_{\ell_b}=\Sigma_{\ell \in b} w_{\ell_b\ell} C_\ell \quad \text{with} \quad w_{\ell_b\ell}=\frac{\ell (\ell+1)}{\Sigma_{\ell \in b} \ell (\ell+1)}. \\</math> Equivalently, using the matrix formalism, we can construct the binning matrix B as: <math>\\ B_{\ell_b \ell}=w_{\ell_b\ell} \\ </math> where B is a <math> n_b\times n_\ell</math> matrix, with <math>n_b=83</math> the number of bins and <math>n_\ell=2479</math> the number of unbinned multipoles. Thus: <math> \\ \vec{C}_\mathrm{binned}=B \, \vec{C} \\ \mathrm{cov_\mathrm{binned}}= B\, \mathrm{cov}\, B^T \\ \ell_b=B\, \ell \\ </math> Here, <math> \vec{C}_{binned}\, (\vec{C}) </math> is the vector containing all the binned (unbinned) <math>C_\ell</math> bandpowers, <math>\mathrm{cov} </math> is the covariance matrix and <math>\ell_b</math> is the weighted average multipole in each bin. Note that following this definition, <math>\ell_b</math> can be a non-integer. The binned <math>D_{\ell_B}</math> power spectrum is then calculated as: <math> \\ D_{\ell_b}=\frac{\ell_b (\ell_b+1)}{2\pi} C_{\ell_b} </math>.<br />
<br />
===Inputs===<br />
<span style="color:red"> UPDATE COMMANDER</span><br />
<br />
; Low-l spectrum (<math>\ell < 30</math>):<br />
* frequency maps from 30–353 GHz<br />
* common mask {{PlanckPapers|planck2013-p06}}<br />
* compact sources catalog<br />
<br />
; High-l spectrum (<math>30 \ge \ell \le 2500</math>): <br />
<br />
* 100, 143, 143x217 and 217 GHz spectra and their covariance matrix (Sec. 3.3 {{PlanckPapers|planck2014-a15}})<br />
* best-fit foreground templates and inter-frequency calibration factors (Table 3 of {{PlanckPapers|planck2014-a15}})<br />
* Beam transfer function uncertainties {{PlanckPapers|planck2014-a08}}<br />
=== File names and Meta data ===<br />
<br />
<span style="color:red"> CHECK EXTENSION NAMES </span><br />
<br />
The CMB spectrum and its covariance matrix are distributed in a single FITS file named <br />
<!--- * ''{{PLASingleFile | fileType=cosmo | name=COM_PowerSpect_CMB_R2.00.fits | link=COM_PowerSpect_CMB_R1.10.fits}}'' ---><br />
* ''COM_PowerSpect_CMB_R2.nn.fits''<br />
which contains 7 extensions<br />
<br />
; LOW-ELL (BINTABLE)<br />
: with the low ell part of the spectrum, not binned, and for l=2-49. The table columns are<br />
# ''ELL'' (integer): multipole number<br />
# ''D_ELL'' (float): <math>D_ell</math> as described above<br />
# ''ERRUP'' (float): the upward uncertainty<br />
# ''ERRDOWN'' (float): the downward uncertainty<br />
<br />
; TT BINNED HIGH-ELL (BINTABLE) <br />
: with the high-ell part of the spectrum, binned into 83 bins covering <math>\langle l \rangle = 47-2499\ </math> in bins of width <math>l=30</math> (with the exception of the last bin that is smaller). The table columns are as follows:<br />
# ''ELL'' (integer): mean multipole number of bin<br />
# ''L_MIN'' (integer): lowest multipole of bin<br />
# ''L_MAX'' (integer): highest multipole of bin<br />
# ''D_ELL'' (float): <math>D_\ell</math> as described above<br />
# ''ERR'' (float): the uncertainty<br />
<br />
; TT UNBINNED HIGH-ELL (BINTABLE) <br />
: with the high-ell part of the spectrum, unbinned, in 2979 bins covering <math>\langle l \rangle = 30-2508\ </math>. The table columns are as follows:<br />
# ''ELL'' (integer): multipole <br />
# ''D_ELL'' (float): <math>D_\ell</math> as described above<br />
# ''ERR'' (float): the uncertainty<br />
<br />
; TE BINNED HIGH-ELL (BINTABLE) <br />
: with the high-ell part of the spectrum, binned into 83 bins covering <math>\langle l \rangle = 47-1988\ </math> in bins of width <math>l=30</math> (with the exception of the last bin that is smaller). The table columns are as follows:<br />
# ''ELL'' (integer): mean multipole number of bin<br />
# ''L_MIN'' (integer): lowest multipole of bin<br />
# ''L_MAX'' (integer): highest multipole of bin<br />
# ''D_ELL'' (float): <math>D_\ell</math> as described above<br />
# ''ERR'' (float): the uncertainty<br />
<br />
; TE UNBINNED HIGH-ELL (BINTABLE) <br />
: with the high-ell part of the spectrum, unbinned, in 2979 bins covering <math>\langle l \rangle = 30-1996\ </math>. The table columns are as follows:<br />
# ''ELL'' (integer): multipole <br />
# ''D_ELL'' (float): <math>D_\ell</math> as described above<br />
# ''ERR'' (float): the uncertainty<br />
<br />
; EE BINNED HIGH-ELL (BINTABLE) <br />
: with the high-ell part of the spectrum, binned into 83 bins covering <math>\langle l \rangle = 47-1988\ </math> in bins of width <math>l=30</math> (with the exception of the last bin that is smaller). The table columns are as follows:<br />
# ''ELL'' (integer): mean multipole number of bin<br />
# ''L_MIN'' (integer): lowest multipole of bin<br />
# ''L_MAX'' (integer): highest multipole of bin<br />
# ''D_ELL'' (float): <math>D_\ell</math> as described above<br />
# ''ERR'' (float): the uncertainty<br />
<br />
; EE UNBINNED HIGH-ELL (BINTABLE) <br />
: with the high-ell part of the spectrum, unbinned, in 2979 bins covering <math>\langle l \rangle = 30-1996\ </math>. The table columns are as follows:<br />
# ''ELL'' (integer): multipole <br />
# ''D_ELL'' (float): <math>D_\ell</math> as described above<br />
# ''ERR'' (float): the uncertainty<br />
<br />
<br />
The spectra give <math>D_\ell = \ell(\ell+1)C_\ell / 2\pi </math> in units of <math>\mu\, K^2</math>. The covariance matrices of the spectra will be released in a second moment.<br />
<!-- <br />
<br />
The CMB spectrum is also given in a simple text comma-separated file:<br />
* ''{{PLASingleFile | fileType=cosmo | name=COM_PowerSpect_CMB_R1.10.txt |link=COM_PowerSpect_CMB_R1.10.txt}}''<br />
<br />
--><br />
==Likelihood==<br />
The likelihood will soon be released with an accompanying paper and an Explanatory Supplement update. <br />
<!-- <br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
The likelihood code (and the data that comes with it) used to compute the likelihood of a model that predicts the CMB power spectra, lensing power spectrum, together with some foreground and some instrumental parameters. The data files are built primarily from the Planck mission results, but include also some results from the WMAP-9 data release. The data files are written in a specific format that can only be read by the code. The code consists in a c/f90 library, along with some optional tools in python. The code is used to read the data files, and given model power spectra and nuisance parameters it computes the log likelihood of that model. <br />
<br />
Detailed description of the installation and usage of the likelihood code and data is provided in the package. The package includes five data files: four for the CMB likelihoods and one for the lensing likelihood. All of the likelihoods delivered are described in detail in the {{PlanckPapers|planck2013-p08|1|Power spectrum & Likelihood Paper}} (for the CMB based likelihood) and in the {{PlanckPapers|planck2013-p12|1|Lensing Paper}} (for the lensing likelihood) .<br />
<br />
The CMB full likelihood has been divided into four parts to allow using selectively different ranges of multipoles. It also reflects the fact that the mathematical approximations used for those different parts are very different, as is the underlying data. In detail, we distribute<br />
* one low-<math>\ell</math> temperature only likelihood (commander), <br />
* one low-<math>\ell</math> temperature and polarisation likelihood (lowlike), and <br />
* one higl-<math>\ell</math> likelihood CAMspec. <br />
<br />
The ''Commander'' likelihood covers the multipoles 2 to 49. It uses a semi-analytic method to sample the low-<math>\ell</math> temperature likelihood on an intermediate product of one of the component separated maps. The samples are used along with an analytical approximation of the likelihood posterior to perform the likelihood computation in the code. See {{PlanckPapers|planck2013-p08}} section 8.1 for more details.<br />
<br />
The ''lowlike'' likelihood covers the multipoles 2 to 32 for temperature and polarization data. Since Planck is not releasing polarisation data at this time, the polarization map from WMAP9 is used instead. A temperature map is needed to perform the computation nevertheless, and we use here the same commander map. The likelihood is computed using a map-based approximation at low resolution and a master one at intermediate resolution, as in WMAP. The likelihood code actually calls a very slightly modified version of the WMAP9 code. This piece of the likelihood essentially provides a prior on the optical depth and has almost no other impact on cosmological parameter estimation. As such it could be replaced by a simple prior, and a user can decide to do so, which is one of the motivation to leave the three pieces of the CMB likelihood as different data packages; see {{PlanckPapers|planck2013-p08}} section 8.3 for more details. Note that the version of the WMAP code used here (code version v1.0) does not perform any test on the positive definiteness of the TT, TE, EE covariance matrices, and will return a null log likelihood in the unphysical cases where the absolute value of TE is too large. This will be corrected in a later version.<br />
<br />
The ''CAMspec'' likelihood covers the multipoles 50 to 2500 for temperature only. The likelihood is computed using a quadratic approximation, including mode to mode correlations that have been precomputed on a fiducial model. The likelihood uses data from the 100, 143 and 217 GHz channels. To do so it models the foreground at each frequency using the model described in the likelihood paper. Uncertainties on the relative calibration and on the beam transfer functions are included either as parametric models, or marginalized and integrated in the covariance matrix. Detailed description of the different nuisance parameters is given below. Priors are included in the likelihood on the CIB spectral index, relative calibration factors and beam error eigenmodes. See {{PlanckPapers|planck2013-p08}} section 2.1 for more details.<br />
<br />
The ''act/spt'' likelihood covers the multipoles 1500 to 10000 for temperature. It is described in{{BibCite|dun2013}}{{BibCite|Keis2011}}{{BibCite|Reic2012}}. It uses the code and data that can be retrieved from the [http://lambda.gsfc.nasa.gov/ Lambda archive] for [http://lambda.gsfc.nasa.gov/product/act/act_prod_table.cfm ACT] and [http://lambda.gsfc.nasa.gov/product/spt/spt_prod_table.cfm SPT]. It has been slightly modified to use a thermal and kinetic SZ model that matches the one used in CAMspec. As stated in{{BibCite|dun2013}}, the dust parameters a_ge and a_gs must be explored with the following priors: a_ge = 0.8 ± 0.2 and a_gs = 0.4 ± 0.2. Those priors are not included in the log likelihood computed by the code.<br />
<br />
The ''lensing'' likelihood covers the multipoles 40 to 400 using the result of the [[Specially_processed_maps | lensing reconstruction]]. It uses a quadratic approximation for the likelihood, with a covariance matrix including the marginalized contribution of the beam transfer function uncertainties, the diffuse point source correction uncertainties and the cosmological model uncertainty affecting the first order non-gaussian bias (N1). The correlation between temperature and lensing is not taken into account. Cosmological uncertainty effects on the normalization are dealt with using a first order renormalization procedure. This means that the code will need both the TT and $\phi\phi$ power spectrum up to <math>\ell</math> = 2048 to correctly perform the integrals needed for the renormalization. Nevertheless, the code will only produce an estimate based on the data between <math>\ell</math> = 40 to 400. See {{PlanckPapers|planck2013-p12}} section 6.1 for more details.<br />
</span><br />
<span style="color:red">OUTSTANDING: description of likelihood masks </span><br />
==Production process==<br />
<br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
The code is based on some basic routines from the libpmc library in the [http://arxiv.org/abs/1101.0950 cosmoPMC] code. It also uses some code from the [http://lambda.gsfc.nasa.gov/product/map/dr5/likelihood_get.cfm WMAP9 likelihood] for the lowlike likelihood and{{BibCite|dun2013}}{{BibCite|Keis2011}}{{BibCite|Reic2012}} for the act/spt one. The rest of the code has been specifically written for the Planck data. Each likelihood file has been processed using a different and dedicated pipeline as described in the likelihood paper {{PlanckPapers|planck2013-p08}} (section 2 and 8) and in the lensing paper {{PlanckPapers|planck2013-p12}} (section 6.1). We refer the reader to those papers for full details. The data are then encapsulated into the specific file format.<br />
<br />
Each dataset comes with its own self check. Whenever the code is used to read a data file, a computation will be done against an included test spectrum/nuisance parameter, and the log-likelihood will be displayed along with the expected result. Difference of the order of 10<math>^{-6}</math> or less are expected depending of the architecture.<br />
<br />
==Inputs==<br />
<br />
===Likelihood===<br />
<br />
; ''commander'' :<br />
* all Planck channels maps<br />
* compact source catalogs<br />
* common masks<br />
* beam transfer functions for all channels<br />
<br />
; ''lowlike'' :<br />
* WMAP9 likelihood data<br />
* Low-<math>\ell</math> Commander map<br />
<br />
; ''CAMspec'' :<br />
* 100, 143 and 217 GHz detector and detsets maps<br />
* 857GHz channel map<br />
* compact source catalog<br />
* common masks (0,1 & 3)<br />
* beam transfer function and error eigenmodes and covariance for 100, 143 and 217 GHz detectors & detsets<br />
* theoretical templates for the tSZ and kSZ contributions<br />
* color corrections for the CIB emission for the 143 and 217GHz detectors and detsets<br />
* fiducial CMB model (bootstrapped from WMAP7 best fit spectrum) estimated noise contribution from the half-ring maps for 100, 143 and 217 GHz<br />
<br />
; ''lensing'' :<br />
* the lensing map<br />
* beam error eigenmodes and covariance for the 143 and 217GHz channel maps<br />
* fiducial CMB model (from Planck cosmological parameter best fit)<br />
<br />
; ''act/spt'' :<br />
* data and code from [http://lambda.gsfc.nasa.gov/product/act/act_fulllikelihood_get.cfm here]<br />
* the tSZ andkSZ template are changed to match those of CAMspec<br />
<br />
== File names and Meta data ==<br />
<br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
<br />
'''Likelihood source code'''<br />
<br />
The source code is in the file<br />
: {{PLASingleFile |fileType=cosmo|name=COM_Code_Likelihood-v1.0_R1.10.tar.gz|link=COM_Code_Likelihood-v1.0_R1.10.tar.gz}} (C, f90 and python likelihood library and tools)<br />
<br />
'''Likelihood data packages'''<br />
<br />
The {{PLALikelihood|type=Data|link=data packages}} are<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-commander_R1.10.tar.gz | link=COM_Data_Likelihood-commander_R1.10.tar.gz}}'' (low-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-lowlike_R1.10.tar.gz | link=COM_Data_Likelihood-lowlike_R1.10.tar.gz}}'' (low-ell TE,EE,BB likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-CAMspec_R1.10.tar.gz | link=COM_Data_Likelihood-CAMspec_R1.10.tar.gz}}'' (high-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-actspt_R1.10.tar | link=COM_Data_Likelihood-actspt_R1.10.tar.gz}}'' (high-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-lensing_R1.10.tar.gz | link=COM_Data_Likelihood-lensing_R1.10.tar.gz}}'' (lensing likelihood)<br />
<br />
Untar and unzip all files to recover the code and likelihood data. Each package comes with a README file; follow the instructions inclosed to<br />
build the code and use it. To compute the CMB likelihood one has to sum the log likelihood of each of the commander_v4.1_lm49.clik, lowlike_v222.clik and CAMspec_v6.2TN_2013_02_26.clik, actspt_2013_01.clik. To compute the CMB+lensing likelihood, one has to sum the log likelihood of all 5 files.<br />
<br />
The CMB and lensing likelihood format are different. The CMB files have the termination .clik, the lensing one .clik_lensing. The lensing data being simpler (due to the less detailled modeling permitted by the lower signal-noise), the file is a simple ascii file containing all the data along with comments describing it, and linking the different quantities to the lensing paper. The CMB file format is more complex and must accommodate different forms of data (maps, power spectrum, distribution samples, covariance matrices...). It consists of a tree structure containing the data. At each level of the tree structure a given directory can contain array data (in the form of FITS files or ascii files for strings) and scalar data (joined in a single ascii file "_mdb"). Those files are not user modifiable and do not contain interesting meta data for the user. Tools to manipulate those files are included in the code package as optional python tools. They are documented in the code package.<br />
<br />
'''Likelihood masks'''<br />
<br />
The masks used in the Likelihood paper {{PlanckPapers|planck2013-p08}} are found in<br />
{{PLASingleFile|fileType=map|name=COM_Mask_Likelihood_2048_R1.10.fits|link=COM_Mask_Likelihood_2048_R1.10.fits}}<br />
<br />
which contains ten masks which are written into a single ''BINTABLE'' extension of 10 columns by 50331648 rows (the number of Healpix pixels in an Nside = 2048 map). The structure is as follows, where the column names are the names of the masks: <br />
<br />
{| border="1" cellpadding="3" cellspacing="0" align="center" style="text-align:left" width=800px<br />
|+ '''Likelihodd masks file data structure'''<br />
|- bgcolor="ffdead" <br />
!colspan="4" | 1. EXTNAME = 'MSK-LIKE' : Data columns<br />
|- bgcolor="ffdead" <br />
! Column Name || Data Type || Units || Description<br />
|-<br />
|CL31 || Real*4 || none || mask<br />
|-<br />
|CL39 || Real*4 || none || mask<br />
|-<br />
|CL49 || Real*4 || none || mask<br />
|-<br />
|G22 || Real*4 || none || mask <br />
|-<br />
|G35 || Real*4 || none || mask<br />
|-<br />
|G45 || Real*4 || none || mask<br />
|-<br />
|G56 || Real*4 || none || mask<br />
|-<br />
|G65 || Real*4 || none || mask<br />
|-<br />
|PS96 || Real*4 || none || mask<br />
|-<br />
|PSA82 || Real*4 || none || mask<br />
|-<br />
|- bgcolor="ffdead" <br />
! Keyword || Data Type || Value || Description<br />
|-<br />
|PIXTYPE || string || HEALPIX ||<br />
|-<br />
|COORDSYS || string || GALACTIC ||Coordinate system <br />
|-<br />
|ORDERING || string || NESTED || Healpix ordering<br />
|-<br />
|NSIDE || Int || 2048 || Healpix Nside <br />
|-<br />
|FIRSTPIX || Int*4 || 0 || First pixel number<br />
|-<br />
|LASTPIX || Int*4 || 50331647 || Last pixel number, for LFI and HFI, respectively<br />
<br />
|}<br />
--><br />
== References ==<br />
<References /><br />
<br />
<br />
<br />
[[Category:Mission products|008]]</div>Sgallihttps://wiki.cosmos.esa.int/planckpla2015/index.php?title=CMB_spectrum_%26_Likelihood_Code&diff=11250CMB spectrum & Likelihood Code2015-02-04T17:22:15Z<p>Sgalli: </p>
<hr />
<div>{{DISPLAYTITLE:CMB spectrum and likelihood code}}<br />
<br />
==CMB spectra==<br />
<br />
<br />
===General description===<br />
====TT====<br />
The Planck best-fit CMB temperature power spectrum, shown in figure below, covers the wide range of multipoles <math> \ell </math> = 2-2508. <br />
<span style="color:red"> UPDATE COMMANDER: Over the multipole range <math> \ell </math> = 2–29, the power spectrum is derived from a component-separation algorithm, ''Commander'': applied to maps in the frequency range 30–353 GHz over 91% of the sky {{PlanckPapers|planck2013-p06}} . The asymmetric error bars associated to this spectrum are the 68% confidence limits and include the uncertainties due to foreground subtraction. </span><br />
<br />
For multipoles equal or greater than <math>\ell=30</math>, instead, the spectrum is derived from the ''Plik'' likelihood {{PlanckPapers|planck2014-a13}} by optimally combining the spectra in the frequency range 100-217 GHz, and correcting them for unresolved foregrounds using the best-fit foreground solution from a Planck TT+lowP <math>\Lambda</math>CDM run. Associated 1-sigma errors include beam uncertainties. Both ''Commander'' and ''Plik'' are described in more details in the sections below.<br />
<br />
[[File: Planck2014 TT Dl NORES bin30 w180mm.jpeg|thumb|center|700px|'''CMB TT spectrum. Logarithmic x-scale up to <math>\ell=30</math>, linear at higher <math>\ell</math>; all points with error bars. The red line is the Planck best-fit primordial power spectrum (cf Planck TT+lowP in Table 3 of {{PlanckPapers|planck2014-a15}}). The blue shaded area shows the uncertainties due to cosmic variance alone.''']]<br />
<br />
====TE and EE====<br />
The Planck best-fit CMB polarization and temperature-polarization cross-correlation power spectra, shown in the figure below, cover the multipole range <math> \ell </math> = 30-1996. The data points relative to the multipole range <math> \ell </math> = 2-29 will be released in a second moment.<br />
Analogously to the TT case, the <math> \ell\ge 30 </math> spectrum is derived from the ''Plik'' likelihood {{PlanckPapers|planck2014-a13}} by optimally combining the spectra in the frequency range 100-217 GHz, and correcting them for unresolved foregrounds using the best-fit foreground solution from a Planck TT,TE,EE+lowP <math>\Lambda</math>CDM run. <br />
<br />
{|style="margin: 0 auto;"<br />
|[[File: Planck2014 EE Dl NORES bin30 w180mm.jpeg|thumb|center|500px|'''CMB EE spectrum. The red line is the Planck best-fit primordial power spectrum (cf Planck TT+lowP in Table 3 of {{PlanckPapers|planck2014-a15}}). The blue shaded area shows the uncertainties due to cosmic variance alone.''']]<br />
|[[File: Planck2014 TE Dl NORES bin30 w180mm.jpeg|thumb|center|500px|'''CMB TE spectrum. The red line is the Planck best-fit primordial power spectrum (cf Planck TT+lowP in Table 3 of {{PlanckPapers|planck2014-a15}}). The blue shaded area shows the uncertainties due to cosmic variance alone.''']]<br />
|}<br />
<br />
===Production process===<br />
<span style="color:red"> UPDATE COMMANDER<br />
The <math>\ell</math> < 50 part of the Planck TT power spectrum is derived from the Commander approach, which implements Bayesian component separation in pixel space, fitting a parametric model to the data by sampling the posterior distribution for the model parameters {{PlanckPapers|planck2013-p06}}. The power spectrum at any multipole <math>\ell</math> is given as the maximum probability point for the posterior <math>C_\ell</math> distribution, marginalized over the other multipoles, and the error bars are 68% confidence level {{PlanckPapers|planck2013-p08}}. </span><br />
<br />
The <math>\ell \ge 30</math> part of the TT, TE and EE power spectra have been derived by the Plik likelihood, a code that implements a pseudo-Cl based technique, extensively described in Sec. 2 and the Appendix of {{PlanckPapers|planck2013-p08}} and {{PlanckPapers|planck2014-a13}}. Frequency spectra are computed as cross-spectra between half-mission maps. Mask and multipole range choices for each frequency spectrum are summarized in Section 3.3 of {{PlanckPapers|planck2014-a15}} and in {{PlanckPapers|planck2014-a13}}. The final power spectrum is an optimal combination of the 100, 143, 143x217 and 217 GHz spectra, corrected for the best-fit unresolved foregrounds and inter-frequency calibration factors, as derived from the full likelihood analysis (for TT we use the best-fit solutions for the nuisance parameters from the Planck+TT+lowP data combination, while for TE and EE we use the best fit from Planck+TT+lowP, cf Table 3 of {{PlanckPapers|planck2014-a15}}). A thorough description of the models of unresolved foregrounds is given in {{PlanckPapers|planck2014-a13}}. The spectrum covariance matrix accounts for cosmic variance and noise contributions, together with beam uncertainties. The <math>\ell \ge 30</math> CMB TT spectrum and associated covariance matrix are available in two formats:<br />
#Unbinned. TT: 2479 bandpowers (<math>\ell=30-2508</math>); TE or EE: 1697 bandpowers (<math>\ell=30-1996</math>).<br />
#Binned, in bins of <math> \Delta\ell=30 </math>. TT: 83 bandpowers. TE or EE: 66 bandpowers. We bin the <math> C_\ell </math> power spectrum with a weight proportional to <math> \ell (\ell+1) </math>, so that the <math> C_{\ell_b} </math> binned bandpower centered in <math> \ell_b </math> is: <math> \\ C_{\ell_b}=\Sigma_{\ell \in b} w_{\ell_b\ell} C_\ell \quad \text{with} \quad w_{\ell_b\ell}=\frac{\ell (\ell+1)}{\Sigma_{\ell \in b} \ell (\ell+1)}. \\</math> Equivalently, using the matrix formalism, we can construct the binning matrix B as: <math>\\ B_{\ell_b \ell}=w_{\ell_b\ell} \\ </math> where B is a <math> n_b\times n_\ell</math> matrix, with <math>n_b=83</math> the number of bins and <math>n_\ell=2479</math> the number of unbinned multipoles. Thus: <math> \\ \vec{C}_\mathrm{binned}=B \, \vec{C} \\ \mathrm{cov_\mathrm{binned}}= B\, \mathrm{cov}\, B^T \\ \ell_b=B\, \ell \\ </math> Here, <math> \vec{C}_{binned}\, (\vec{C}) </math> is the vector containing all the binned (unbinned) <math>C_\ell</math> bandpowers, <math>\mathrm{cov} </math> is the covariance matrix and <math>\ell_b</math> is the weighted average multipole in each bin. Note that following this definition, <math>\ell_b</math> can be a non-integer. The binned <math>D_{\ell_B}</math> power spectrum is then calculated as: <math> \\ D_{\ell_b}=\frac{\ell_b (\ell_b+1)}{2\pi} C_{\ell_b} </math>.<br />
<br />
===Inputs===<br />
<span style="color:red"> UPDATE COMMANDER</span><br />
<br />
; Low-l spectrum (<math>\ell < 30</math>):<br />
* frequency maps from 30–353 GHz<br />
* common mask {{PlanckPapers|planck2013-p06}}<br />
* compact sources catalog<br />
<br />
; High-l spectrum (<math>30 \ge \ell \le 2500</math>): <br />
<br />
* 100, 143, 143x217 and 217 GHz spectra and their covariance matrix (Sec. 3.3 {{PlanckPapers|planck2014-a15}})<br />
* best-fit foreground templates and inter-frequency calibration factors (Table 3 of {{PlanckPapers|planck2014-a15}})<br />
* Beam transfer function uncertainties {{PlanckPapers|planck2014-a08}}<br />
=== File names and Meta data ===<br />
<br />
<span style="color:red"> CHECK EXTENSION NAMES </span><br />
<br />
The CMB spectrum and its covariance matrix are distributed in a single FITS file named <br />
<!--- * ''{{PLASingleFile | fileType=cosmo | name=COM_PowerSpect_CMB_R2.00.fits | link=COM_PowerSpect_CMB_R1.10.fits}}'' ---><br />
* ''COM_PowerSpect_CMB_R2.nn.fits''<br />
which contains 5 extensions<br />
<br />
; LOW-ELL (BINTABLE)<br />
: with the low ell part of the spectrum, not binned, and for l=2-49. The table columns are<br />
# ''ELL'' (integer): multipole number<br />
# ''D_ELL'' (float): <math>D_ell</math> as described above<br />
# ''ERRUP'' (float): the upward uncertainty<br />
# ''ERRDOWN'' (float): the downward uncertainty<br />
<br />
; TT BINNED HIGH-ELL (BINTABLE) <br />
: with the high-ell part of the spectrum, binned into 83 bins covering <math>\langle l \rangle = 47-2499\ </math> in bins of width <math>l=30</math> (with the exception of the last bin that is smaller). The table columns are as follows:<br />
# ''ELL'' (integer): mean multipole number of bin<br />
# ''L_MIN'' (integer): lowest multipole of bin<br />
# ''L_MAX'' (integer): highest multipole of bin<br />
# ''D_ELL'' (float): <math>D_\ell</math> as described above<br />
# ''ERR'' (float): the uncertainty<br />
<br />
; TT UNBINNED HIGH-ELL (BINTABLE) <br />
: with the high-ell part of the spectrum, unbinned, in 2979 bins covering <math>\langle l \rangle = 30-2508\ </math>. The table columns are as follows:<br />
# ''ELL'' (integer): multipole <br />
# ''D_ELL'' (float): <math>D_\ell</math> as described above<br />
# ''ERR'' (float): the uncertainty<br />
<br />
; TE BINNED HIGH-ELL (BINTABLE) <br />
: with the high-ell part of the spectrum, binned into 83 bins covering <math>\langle l \rangle = 47-1988\ </math> in bins of width <math>l=30</math> (with the exception of the last bin that is smaller). The table columns are as follows:<br />
# ''ELL'' (integer): mean multipole number of bin<br />
# ''L_MIN'' (integer): lowest multipole of bin<br />
# ''L_MAX'' (integer): highest multipole of bin<br />
# ''D_ELL'' (float): <math>D_\ell</math> as described above<br />
# ''ERR'' (float): the uncertainty<br />
<br />
; TE UNBINNED HIGH-ELL (BINTABLE) <br />
: with the high-ell part of the spectrum, unbinned, in 2979 bins covering <math>\langle l \rangle = 30-1996\ </math>. The table columns are as follows:<br />
# ''ELL'' (integer): multipole <br />
# ''D_ELL'' (float): <math>D_\ell</math> as described above<br />
# ''ERR'' (float): the uncertainty<br />
<br />
; EE BINNED HIGH-ELL (BINTABLE) <br />
: with the high-ell part of the spectrum, binned into 83 bins covering <math>\langle l \rangle = 47-1988\ </math> in bins of width <math>l=30</math> (with the exception of the last bin that is smaller). The table columns are as follows:<br />
# ''ELL'' (integer): mean multipole number of bin<br />
# ''L_MIN'' (integer): lowest multipole of bin<br />
# ''L_MAX'' (integer): highest multipole of bin<br />
# ''D_ELL'' (float): <math>D_\ell</math> as described above<br />
# ''ERR'' (float): the uncertainty<br />
<br />
; EE UNBINNED HIGH-ELL (BINTABLE) <br />
: with the high-ell part of the spectrum, unbinned, in 2979 bins covering <math>\langle l \rangle = 30-1996\ </math>. The table columns are as follows:<br />
# ''ELL'' (integer): multipole <br />
# ''D_ELL'' (float): <math>D_\ell</math> as described above<br />
# ''ERR'' (float): the uncertainty<br />
<br />
<br />
The spectra give <math>D_\ell = \ell(\ell+1)C_\ell / 2\pi </math> in units of <math>\mu\, K^2</math>. The covariance matrices of the spectra will be released in a second moment.<br />
<!-- <br />
<br />
The CMB spectrum is also given in a simple text comma-separated file:<br />
* ''{{PLASingleFile | fileType=cosmo | name=COM_PowerSpect_CMB_R1.10.txt |link=COM_PowerSpect_CMB_R1.10.txt}}''<br />
<br />
--><br />
==Likelihood==<br />
The likelihood will soon be released with an accompanying paper and an Explanatory Supplement update. <br />
<!-- <br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
The likelihood code (and the data that comes with it) used to compute the likelihood of a model that predicts the CMB power spectra, lensing power spectrum, together with some foreground and some instrumental parameters. The data files are built primarily from the Planck mission results, but include also some results from the WMAP-9 data release. The data files are written in a specific format that can only be read by the code. The code consists in a c/f90 library, along with some optional tools in python. The code is used to read the data files, and given model power spectra and nuisance parameters it computes the log likelihood of that model. <br />
<br />
Detailed description of the installation and usage of the likelihood code and data is provided in the package. The package includes five data files: four for the CMB likelihoods and one for the lensing likelihood. All of the likelihoods delivered are described in detail in the {{PlanckPapers|planck2013-p08|1|Power spectrum & Likelihood Paper}} (for the CMB based likelihood) and in the {{PlanckPapers|planck2013-p12|1|Lensing Paper}} (for the lensing likelihood) .<br />
<br />
The CMB full likelihood has been divided into four parts to allow using selectively different ranges of multipoles. It also reflects the fact that the mathematical approximations used for those different parts are very different, as is the underlying data. In detail, we distribute<br />
* one low-<math>\ell</math> temperature only likelihood (commander), <br />
* one low-<math>\ell</math> temperature and polarisation likelihood (lowlike), and <br />
* one higl-<math>\ell</math> likelihood CAMspec. <br />
<br />
The ''Commander'' likelihood covers the multipoles 2 to 49. It uses a semi-analytic method to sample the low-<math>\ell</math> temperature likelihood on an intermediate product of one of the component separated maps. The samples are used along with an analytical approximation of the likelihood posterior to perform the likelihood computation in the code. See {{PlanckPapers|planck2013-p08}} section 8.1 for more details.<br />
<br />
The ''lowlike'' likelihood covers the multipoles 2 to 32 for temperature and polarization data. Since Planck is not releasing polarisation data at this time, the polarization map from WMAP9 is used instead. A temperature map is needed to perform the computation nevertheless, and we use here the same commander map. The likelihood is computed using a map-based approximation at low resolution and a master one at intermediate resolution, as in WMAP. The likelihood code actually calls a very slightly modified version of the WMAP9 code. This piece of the likelihood essentially provides a prior on the optical depth and has almost no other impact on cosmological parameter estimation. As such it could be replaced by a simple prior, and a user can decide to do so, which is one of the motivation to leave the three pieces of the CMB likelihood as different data packages; see {{PlanckPapers|planck2013-p08}} section 8.3 for more details. Note that the version of the WMAP code used here (code version v1.0) does not perform any test on the positive definiteness of the TT, TE, EE covariance matrices, and will return a null log likelihood in the unphysical cases where the absolute value of TE is too large. This will be corrected in a later version.<br />
<br />
The ''CAMspec'' likelihood covers the multipoles 50 to 2500 for temperature only. The likelihood is computed using a quadratic approximation, including mode to mode correlations that have been precomputed on a fiducial model. The likelihood uses data from the 100, 143 and 217 GHz channels. To do so it models the foreground at each frequency using the model described in the likelihood paper. Uncertainties on the relative calibration and on the beam transfer functions are included either as parametric models, or marginalized and integrated in the covariance matrix. Detailed description of the different nuisance parameters is given below. Priors are included in the likelihood on the CIB spectral index, relative calibration factors and beam error eigenmodes. See {{PlanckPapers|planck2013-p08}} section 2.1 for more details.<br />
<br />
The ''act/spt'' likelihood covers the multipoles 1500 to 10000 for temperature. It is described in{{BibCite|dun2013}}{{BibCite|Keis2011}}{{BibCite|Reic2012}}. It uses the code and data that can be retrieved from the [http://lambda.gsfc.nasa.gov/ Lambda archive] for [http://lambda.gsfc.nasa.gov/product/act/act_prod_table.cfm ACT] and [http://lambda.gsfc.nasa.gov/product/spt/spt_prod_table.cfm SPT]. It has been slightly modified to use a thermal and kinetic SZ model that matches the one used in CAMspec. As stated in{{BibCite|dun2013}}, the dust parameters a_ge and a_gs must be explored with the following priors: a_ge = 0.8 ± 0.2 and a_gs = 0.4 ± 0.2. Those priors are not included in the log likelihood computed by the code.<br />
<br />
The ''lensing'' likelihood covers the multipoles 40 to 400 using the result of the [[Specially_processed_maps | lensing reconstruction]]. It uses a quadratic approximation for the likelihood, with a covariance matrix including the marginalized contribution of the beam transfer function uncertainties, the diffuse point source correction uncertainties and the cosmological model uncertainty affecting the first order non-gaussian bias (N1). The correlation between temperature and lensing is not taken into account. Cosmological uncertainty effects on the normalization are dealt with using a first order renormalization procedure. This means that the code will need both the TT and $\phi\phi$ power spectrum up to <math>\ell</math> = 2048 to correctly perform the integrals needed for the renormalization. Nevertheless, the code will only produce an estimate based on the data between <math>\ell</math> = 40 to 400. See {{PlanckPapers|planck2013-p12}} section 6.1 for more details.<br />
</span><br />
<span style="color:red">OUTSTANDING: description of likelihood masks </span><br />
==Production process==<br />
<br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
The code is based on some basic routines from the libpmc library in the [http://arxiv.org/abs/1101.0950 cosmoPMC] code. It also uses some code from the [http://lambda.gsfc.nasa.gov/product/map/dr5/likelihood_get.cfm WMAP9 likelihood] for the lowlike likelihood and{{BibCite|dun2013}}{{BibCite|Keis2011}}{{BibCite|Reic2012}} for the act/spt one. The rest of the code has been specifically written for the Planck data. Each likelihood file has been processed using a different and dedicated pipeline as described in the likelihood paper {{PlanckPapers|planck2013-p08}} (section 2 and 8) and in the lensing paper {{PlanckPapers|planck2013-p12}} (section 6.1). We refer the reader to those papers for full details. The data are then encapsulated into the specific file format.<br />
<br />
Each dataset comes with its own self check. Whenever the code is used to read a data file, a computation will be done against an included test spectrum/nuisance parameter, and the log-likelihood will be displayed along with the expected result. Difference of the order of 10<math>^{-6}</math> or less are expected depending of the architecture.<br />
<br />
==Inputs==<br />
<br />
===Likelihood===<br />
<br />
; ''commander'' :<br />
* all Planck channels maps<br />
* compact source catalogs<br />
* common masks<br />
* beam transfer functions for all channels<br />
<br />
; ''lowlike'' :<br />
* WMAP9 likelihood data<br />
* Low-<math>\ell</math> Commander map<br />
<br />
; ''CAMspec'' :<br />
* 100, 143 and 217 GHz detector and detsets maps<br />
* 857GHz channel map<br />
* compact source catalog<br />
* common masks (0,1 & 3)<br />
* beam transfer function and error eigenmodes and covariance for 100, 143 and 217 GHz detectors & detsets<br />
* theoretical templates for the tSZ and kSZ contributions<br />
* color corrections for the CIB emission for the 143 and 217GHz detectors and detsets<br />
* fiducial CMB model (bootstrapped from WMAP7 best fit spectrum) estimated noise contribution from the half-ring maps for 100, 143 and 217 GHz<br />
<br />
; ''lensing'' :<br />
* the lensing map<br />
* beam error eigenmodes and covariance for the 143 and 217GHz channel maps<br />
* fiducial CMB model (from Planck cosmological parameter best fit)<br />
<br />
; ''act/spt'' :<br />
* data and code from [http://lambda.gsfc.nasa.gov/product/act/act_fulllikelihood_get.cfm here]<br />
* the tSZ andkSZ template are changed to match those of CAMspec<br />
<br />
== File names and Meta data ==<br />
<br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
<br />
'''Likelihood source code'''<br />
<br />
The source code is in the file<br />
: {{PLASingleFile |fileType=cosmo|name=COM_Code_Likelihood-v1.0_R1.10.tar.gz|link=COM_Code_Likelihood-v1.0_R1.10.tar.gz}} (C, f90 and python likelihood library and tools)<br />
<br />
'''Likelihood data packages'''<br />
<br />
The {{PLALikelihood|type=Data|link=data packages}} are<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-commander_R1.10.tar.gz | link=COM_Data_Likelihood-commander_R1.10.tar.gz}}'' (low-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-lowlike_R1.10.tar.gz | link=COM_Data_Likelihood-lowlike_R1.10.tar.gz}}'' (low-ell TE,EE,BB likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-CAMspec_R1.10.tar.gz | link=COM_Data_Likelihood-CAMspec_R1.10.tar.gz}}'' (high-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-actspt_R1.10.tar | link=COM_Data_Likelihood-actspt_R1.10.tar.gz}}'' (high-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-lensing_R1.10.tar.gz | link=COM_Data_Likelihood-lensing_R1.10.tar.gz}}'' (lensing likelihood)<br />
<br />
Untar and unzip all files to recover the code and likelihood data. Each package comes with a README file; follow the instructions inclosed to<br />
build the code and use it. To compute the CMB likelihood one has to sum the log likelihood of each of the commander_v4.1_lm49.clik, lowlike_v222.clik and CAMspec_v6.2TN_2013_02_26.clik, actspt_2013_01.clik. To compute the CMB+lensing likelihood, one has to sum the log likelihood of all 5 files.<br />
<br />
The CMB and lensing likelihood format are different. The CMB files have the termination .clik, the lensing one .clik_lensing. The lensing data being simpler (due to the less detailled modeling permitted by the lower signal-noise), the file is a simple ascii file containing all the data along with comments describing it, and linking the different quantities to the lensing paper. The CMB file format is more complex and must accommodate different forms of data (maps, power spectrum, distribution samples, covariance matrices...). It consists of a tree structure containing the data. At each level of the tree structure a given directory can contain array data (in the form of FITS files or ascii files for strings) and scalar data (joined in a single ascii file "_mdb"). Those files are not user modifiable and do not contain interesting meta data for the user. Tools to manipulate those files are included in the code package as optional python tools. They are documented in the code package.<br />
<br />
'''Likelihood masks'''<br />
<br />
The masks used in the Likelihood paper {{PlanckPapers|planck2013-p08}} are found in<br />
{{PLASingleFile|fileType=map|name=COM_Mask_Likelihood_2048_R1.10.fits|link=COM_Mask_Likelihood_2048_R1.10.fits}}<br />
<br />
which contains ten masks which are written into a single ''BINTABLE'' extension of 10 columns by 50331648 rows (the number of Healpix pixels in an Nside = 2048 map). The structure is as follows, where the column names are the names of the masks: <br />
<br />
{| border="1" cellpadding="3" cellspacing="0" align="center" style="text-align:left" width=800px<br />
|+ '''Likelihodd masks file data structure'''<br />
|- bgcolor="ffdead" <br />
!colspan="4" | 1. EXTNAME = 'MSK-LIKE' : Data columns<br />
|- bgcolor="ffdead" <br />
! Column Name || Data Type || Units || Description<br />
|-<br />
|CL31 || Real*4 || none || mask<br />
|-<br />
|CL39 || Real*4 || none || mask<br />
|-<br />
|CL49 || Real*4 || none || mask<br />
|-<br />
|G22 || Real*4 || none || mask <br />
|-<br />
|G35 || Real*4 || none || mask<br />
|-<br />
|G45 || Real*4 || none || mask<br />
|-<br />
|G56 || Real*4 || none || mask<br />
|-<br />
|G65 || Real*4 || none || mask<br />
|-<br />
|PS96 || Real*4 || none || mask<br />
|-<br />
|PSA82 || Real*4 || none || mask<br />
|-<br />
|- bgcolor="ffdead" <br />
! Keyword || Data Type || Value || Description<br />
|-<br />
|PIXTYPE || string || HEALPIX ||<br />
|-<br />
|COORDSYS || string || GALACTIC ||Coordinate system <br />
|-<br />
|ORDERING || string || NESTED || Healpix ordering<br />
|-<br />
|NSIDE || Int || 2048 || Healpix Nside <br />
|-<br />
|FIRSTPIX || Int*4 || 0 || First pixel number<br />
|-<br />
|LASTPIX || Int*4 || 50331647 || Last pixel number, for LFI and HFI, respectively<br />
<br />
|}<br />
--><br />
== References ==<br />
<References /><br />
<br />
<br />
<br />
[[Category:Mission products|008]]</div>Sgallihttps://wiki.cosmos.esa.int/planckpla2015/index.php?title=CMB_spectrum_%26_Likelihood_Code&diff=11245CMB spectrum & Likelihood Code2015-02-04T17:14:48Z<p>Sgalli: </p>
<hr />
<div>{{DISPLAYTITLE:CMB spectrum and likelihood code}}<br />
<br />
==CMB spectra==<br />
<br />
<br />
===General description===<br />
====TT====<br />
The Planck best-fit CMB temperature power spectrum, shown in figure below, covers the wide range of multipoles <math> \ell </math> = 2-2508. <br />
<span style="color:red"> UPDATE COMMANDER: Over the multipole range <math> \ell </math> = 2–29, the power spectrum is derived from a component-separation algorithm, ''Commander'': applied to maps in the frequency range 30–353 GHz over 91% of the sky {{PlanckPapers|planck2013-p06}} . The asymmetric error bars associated to this spectrum are the 68% confidence limits and include the uncertainties due to foreground subtraction. </span><br />
<br />
For multipoles equal or greater than <math>\ell=30</math>, instead, the spectrum is derived from the ''Plik'' likelihood {{PlanckPapers|planck2014-a13}} by optimally combining the spectra in the frequency range 100-217 GHz, and correcting them for unresolved foregrounds using the best-fit foreground solution from a Planck TT+lowP <math>\Lambda</math>CDM run. Associated 1-sigma errors include beam uncertainties. Both ''Commander'' and ''Plik'' are described in more details in the sections below.<br />
<br />
[[File: Planck2014 TT Dl NORES bin30 w180mm.jpeg|thumb|center|700px|'''CMB TT spectrum. Logarithmic x-scale up to <math>\ell=30</math>, linear at higher <math>\ell</math>; all points with error bars. The red line is the Planck best-fit primordial power spectrum (cf Planck TT+lowP in Table 3 of {{PlanckPapers|planck2014-a15}}). The blue shaded area shows the uncertainties due to cosmic variance alone.''']]<br />
<br />
====TE and EE====<br />
The Planck best-fit CMB polarization and temperature-polarization cross-correlation power spectra, shown in the figure below, cover the multipole range <math> \ell </math> = 30-1996. The data points relative to the multipole range <math> \ell </math> = 2-29 will be released in a second moment.<br />
Analogously to the TT case, the <math> \ell\ge 30 </math> spectrum is derived from the ''Plik'' likelihood {{PlanckPapers|planck2014-a13}} by optimally combining the spectra in the frequency range 100-217 GHz, and correcting them for unresolved foregrounds using the best-fit foreground solution from a Planck TT,TE,EE+lowP <math>\Lambda</math>CDM run. <br />
<br />
{|style="margin: 0 auto;"<br />
|[[File: Planck2014 EE Dl NORES bin30 w180mm.jpeg|thumb|center|500px|'''CMB EE spectrum. The red line is the Planck best-fit primordial power spectrum (cf Planck TT+lowP in Table 3 of {{PlanckPapers|planck2014-a15}}). The blue shaded area shows the uncertainties due to cosmic variance alone.''']]<br />
|[[File: Planck2014 TE Dl NORES bin30 w180mm.jpeg|thumb|center|500px|'''CMB TE spectrum. The red line is the Planck best-fit primordial power spectrum (cf Planck TT+lowP in Table 3 of {{PlanckPapers|planck2014-a15}}). The blue shaded area shows the uncertainties due to cosmic variance alone.''']]<br />
|}<br />
<br />
===Production process===<br />
<span style="color:red"> UPDATE COMMANDER<br />
The <math>\ell</math> < 50 part of the Planck TT power spectrum is derived from the Commander approach, which implements Bayesian component separation in pixel space, fitting a parametric model to the data by sampling the posterior distribution for the model parameters {{PlanckPapers|planck2013-p06}}. The power spectrum at any multipole <math>\ell</math> is given as the maximum probability point for the posterior <math>C_\ell</math> distribution, marginalized over the other multipoles, and the error bars are 68% confidence level {{PlanckPapers|planck2013-p08}}. </span><br />
<br />
The <math>\ell \ge 30</math> part of the TT, TE and EE power spectra have been derived by the Plik likelihood, a code that implements a pseudo-Cl based technique, extensively described in Sec. 2 and the Appendix of {{PlanckPapers|planck2013-p08}} and {{PlanckPapers|planck2014-a13}}. Frequency spectra are computed as cross-spectra between half-mission maps. Mask and multipole range choices for each frequency spectrum are summarized in Section 3.3 of {{PlanckPapers|planck2014-a15}} and in {{PlanckPapers|planck2014-a13}}. The final power spectrum is an optimal combination of the 100, 143, 143x217 and 217 GHz spectra, corrected for the best-fit unresolved foregrounds and inter-frequency calibration factors, as derived from the full likelihood analysis (for TT we use the best-fit solutions for the nuisance parameters from the Planck+TT+lowP data combination, while for TE and EE we use the best fit from Planck+TT+lowP, cf Table 3 of {{PlanckPapers|planck2014-a15}}). A thorough description of the models of unresolved foregrounds is given in {{PlanckPapers|planck2014-a13}}. The spectrum covariance matrix accounts for cosmic variance and noise contributions, together with beam uncertainties. The <math>\ell \ge 30</math> CMB TT spectrum and associated covariance matrix are available in two formats:<br />
#Unbinned. TT: 2479 bandpowers (<math>\ell=30-2508</math>); TE or EE: 1697 bandpowers (<math>\ell=30-1996</math>).<br />
#Binned, in bins of <math> \Delta\ell=30 </math>. TT: 83 bandpowers. TE or EE: 66 bandpowers. We bin the <math> C_\ell </math> power spectrum with a weight proportional to <math> \ell (\ell+1) </math>, so that the <math> C_{\ell_b} </math> binned bandpower centered in <math> \ell_b </math> is: <math> \\ C_{\ell_b}=\Sigma_{\ell \in b} w_{\ell_b\ell} C_\ell \quad \text{with} \quad w_{\ell_b\ell}=\frac{\ell (\ell+1)}{\Sigma_{\ell \in b} \ell (\ell+1)}. \\</math> Equivalently, using the matrix formalism, we can construct the binning matrix B as: <math>\\ B_{\ell_b \ell}=w_{\ell_b\ell} \\ </math> where B is a <math> n_b\times n_\ell</math> matrix, with <math>n_b=83</math> the number of bins and <math>n_\ell=2479</math> the number of unbinned multipoles. Thus: <math> \\ \vec{C}_\mathrm{binned}=B \, \vec{C} \\ \mathrm{cov_\mathrm{binned}}= B\, \mathrm{cov}\, B^T \\ \ell_b=B\, \ell \\ </math> Here, <math> \vec{C}_{binned}\, (\vec{C}) </math> is the vector containing all the binned (unbinned) <math>C_\ell</math> bandpowers, <math>\mathrm{cov} </math> is the covariance matrix and <math>\ell_b</math> is the weighted average multipole in each bin. The binned <math>D_{\ell_B}</math> power spectrum is then calculated as: <math> \\ D_{\ell_b}=\frac{\ell_b (\ell_b+1)}{2\pi} C_{\ell_b} </math>.<br />
<br />
===Inputs===<br />
<span style="color:red"> UPDATE COMMANDER</span><br />
<br />
; Low-l spectrum (<math>\ell < 30</math>):<br />
* frequency maps from 30–353 GHz<br />
* common mask {{PlanckPapers|planck2013-p06}}<br />
* compact sources catalog<br />
<br />
; High-l spectrum (<math>30 \le \ell \ge 2500</math>): <br />
<br />
* 100, 143, 143x217 and 217 GHz spectra and their covariance matrix (Sec. 3.3 {{PlanckPapers|planck2014-a15}})<br />
* best-fit foreground templates and inter-frequency calibration factors (Table 3 of {{PlanckPapers|planck2014-a15}})<br />
* Beam transfer function uncertainties {{PlanckPapers|planck2014-a08}}<br />
=== File names and Meta data ===<br />
<br />
<span style="color:red"> CHECK EXTENSION NAMES </span><br />
<br />
The CMB spectrum and its covariance matrix are distributed in a single FITS file named <br />
<!--- * ''{{PLASingleFile | fileType=cosmo | name=COM_PowerSpect_CMB_R2.00.fits | link=COM_PowerSpect_CMB_R1.10.fits}}'' ---><br />
* ''COM_PowerSpect_CMB_R2.nn.fits''<br />
which contains 5 extensions<br />
<br />
; LOW-ELL (BINTABLE)<br />
: with the low ell part of the spectrum, not binned, and for l=2-49. The table columns are<br />
# ''ELL'' (integer): multipole number<br />
# ''D_ELL'' (float): <math>D_ell</math> as described above<br />
# ''ERRUP'' (float): the upward uncertainty<br />
# ''ERRDOWN'' (float): the downward uncertainty<br />
<br />
; BINNED HIGH-ELL (BINTABLE) <br />
: with the high-ell part of the spectrum, binned into 83 bins covering <math>\langle l \rangle = 47-2499\ </math> in bins of width <math>l=30</math> (with the exception of the last bin that is smaller). The table columns are as follows:<br />
# ''ELL'' (integer): mean multipole number of bin<br />
# ''L_MIN'' (integer): lowest multipole of bin<br />
# ''L_MAX'' (integer): highest multipole of bin<br />
# ''D_ELL'' (float): <math>D_\ell</math> as described above<br />
# ''ERR'' (float): the uncertainty<br />
<br />
; UNBINNED HIGH-ELL (BINTABLE) <br />
: with the high-ell part of the spectrum, unbinned, in 2979 bins covering <math>\langle l \rangle = 30-2508\ </math>. The table columns are as follows:<br />
# ''ELL'' (integer): multipole <br />
# ''D_ELL'' (float): <math>D_\ell</math> as described above<br />
# ''ERR'' (float): the uncertainty<br />
<br />
<br />
<br />
The spectra give <math>D_\ell = \ell(\ell+1)C_\ell / 2\pi </math> in units of <math>\mu\, K^2</math>.<br />
<!-- <br />
<br />
The CMB spectrum is also given in a simple text comma-separated file:<br />
* ''{{PLASingleFile | fileType=cosmo | name=COM_PowerSpect_CMB_R1.10.txt |link=COM_PowerSpect_CMB_R1.10.txt}}''<br />
<br />
--><br />
==Likelihood==<br />
The likelihood will soon be released with an accompanying paper and an Explanatory Supplement update. <br />
<!-- <br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
The likelihood code (and the data that comes with it) used to compute the likelihood of a model that predicts the CMB power spectra, lensing power spectrum, together with some foreground and some instrumental parameters. The data files are built primarily from the Planck mission results, but include also some results from the WMAP-9 data release. The data files are written in a specific format that can only be read by the code. The code consists in a c/f90 library, along with some optional tools in python. The code is used to read the data files, and given model power spectra and nuisance parameters it computes the log likelihood of that model. <br />
<br />
Detailed description of the installation and usage of the likelihood code and data is provided in the package. The package includes five data files: four for the CMB likelihoods and one for the lensing likelihood. All of the likelihoods delivered are described in detail in the {{PlanckPapers|planck2013-p08|1|Power spectrum & Likelihood Paper}} (for the CMB based likelihood) and in the {{PlanckPapers|planck2013-p12|1|Lensing Paper}} (for the lensing likelihood) .<br />
<br />
The CMB full likelihood has been divided into four parts to allow using selectively different ranges of multipoles. It also reflects the fact that the mathematical approximations used for those different parts are very different, as is the underlying data. In detail, we distribute<br />
* one low-<math>\ell</math> temperature only likelihood (commander), <br />
* one low-<math>\ell</math> temperature and polarisation likelihood (lowlike), and <br />
* one higl-<math>\ell</math> likelihood CAMspec. <br />
<br />
The ''Commander'' likelihood covers the multipoles 2 to 49. It uses a semi-analytic method to sample the low-<math>\ell</math> temperature likelihood on an intermediate product of one of the component separated maps. The samples are used along with an analytical approximation of the likelihood posterior to perform the likelihood computation in the code. See {{PlanckPapers|planck2013-p08}} section 8.1 for more details.<br />
<br />
The ''lowlike'' likelihood covers the multipoles 2 to 32 for temperature and polarization data. Since Planck is not releasing polarisation data at this time, the polarization map from WMAP9 is used instead. A temperature map is needed to perform the computation nevertheless, and we use here the same commander map. The likelihood is computed using a map-based approximation at low resolution and a master one at intermediate resolution, as in WMAP. The likelihood code actually calls a very slightly modified version of the WMAP9 code. This piece of the likelihood essentially provides a prior on the optical depth and has almost no other impact on cosmological parameter estimation. As such it could be replaced by a simple prior, and a user can decide to do so, which is one of the motivation to leave the three pieces of the CMB likelihood as different data packages; see {{PlanckPapers|planck2013-p08}} section 8.3 for more details. Note that the version of the WMAP code used here (code version v1.0) does not perform any test on the positive definiteness of the TT, TE, EE covariance matrices, and will return a null log likelihood in the unphysical cases where the absolute value of TE is too large. This will be corrected in a later version.<br />
<br />
The ''CAMspec'' likelihood covers the multipoles 50 to 2500 for temperature only. The likelihood is computed using a quadratic approximation, including mode to mode correlations that have been precomputed on a fiducial model. The likelihood uses data from the 100, 143 and 217 GHz channels. To do so it models the foreground at each frequency using the model described in the likelihood paper. Uncertainties on the relative calibration and on the beam transfer functions are included either as parametric models, or marginalized and integrated in the covariance matrix. Detailed description of the different nuisance parameters is given below. Priors are included in the likelihood on the CIB spectral index, relative calibration factors and beam error eigenmodes. See {{PlanckPapers|planck2013-p08}} section 2.1 for more details.<br />
<br />
The ''act/spt'' likelihood covers the multipoles 1500 to 10000 for temperature. It is described in{{BibCite|dun2013}}{{BibCite|Keis2011}}{{BibCite|Reic2012}}. It uses the code and data that can be retrieved from the [http://lambda.gsfc.nasa.gov/ Lambda archive] for [http://lambda.gsfc.nasa.gov/product/act/act_prod_table.cfm ACT] and [http://lambda.gsfc.nasa.gov/product/spt/spt_prod_table.cfm SPT]. It has been slightly modified to use a thermal and kinetic SZ model that matches the one used in CAMspec. As stated in{{BibCite|dun2013}}, the dust parameters a_ge and a_gs must be explored with the following priors: a_ge = 0.8 ± 0.2 and a_gs = 0.4 ± 0.2. Those priors are not included in the log likelihood computed by the code.<br />
<br />
The ''lensing'' likelihood covers the multipoles 40 to 400 using the result of the [[Specially_processed_maps | lensing reconstruction]]. It uses a quadratic approximation for the likelihood, with a covariance matrix including the marginalized contribution of the beam transfer function uncertainties, the diffuse point source correction uncertainties and the cosmological model uncertainty affecting the first order non-gaussian bias (N1). The correlation between temperature and lensing is not taken into account. Cosmological uncertainty effects on the normalization are dealt with using a first order renormalization procedure. This means that the code will need both the TT and $\phi\phi$ power spectrum up to <math>\ell</math> = 2048 to correctly perform the integrals needed for the renormalization. Nevertheless, the code will only produce an estimate based on the data between <math>\ell</math> = 40 to 400. See {{PlanckPapers|planck2013-p12}} section 6.1 for more details.<br />
</span><br />
<span style="color:red">OUTSTANDING: description of likelihood masks </span><br />
==Production process==<br />
<br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
The code is based on some basic routines from the libpmc library in the [http://arxiv.org/abs/1101.0950 cosmoPMC] code. It also uses some code from the [http://lambda.gsfc.nasa.gov/product/map/dr5/likelihood_get.cfm WMAP9 likelihood] for the lowlike likelihood and{{BibCite|dun2013}}{{BibCite|Keis2011}}{{BibCite|Reic2012}} for the act/spt one. The rest of the code has been specifically written for the Planck data. Each likelihood file has been processed using a different and dedicated pipeline as described in the likelihood paper {{PlanckPapers|planck2013-p08}} (section 2 and 8) and in the lensing paper {{PlanckPapers|planck2013-p12}} (section 6.1). We refer the reader to those papers for full details. The data are then encapsulated into the specific file format.<br />
<br />
Each dataset comes with its own self check. Whenever the code is used to read a data file, a computation will be done against an included test spectrum/nuisance parameter, and the log-likelihood will be displayed along with the expected result. Difference of the order of 10<math>^{-6}</math> or less are expected depending of the architecture.<br />
<br />
==Inputs==<br />
<br />
===Likelihood===<br />
<br />
; ''commander'' :<br />
* all Planck channels maps<br />
* compact source catalogs<br />
* common masks<br />
* beam transfer functions for all channels<br />
<br />
; ''lowlike'' :<br />
* WMAP9 likelihood data<br />
* Low-<math>\ell</math> Commander map<br />
<br />
; ''CAMspec'' :<br />
* 100, 143 and 217 GHz detector and detsets maps<br />
* 857GHz channel map<br />
* compact source catalog<br />
* common masks (0,1 & 3)<br />
* beam transfer function and error eigenmodes and covariance for 100, 143 and 217 GHz detectors & detsets<br />
* theoretical templates for the tSZ and kSZ contributions<br />
* color corrections for the CIB emission for the 143 and 217GHz detectors and detsets<br />
* fiducial CMB model (bootstrapped from WMAP7 best fit spectrum) estimated noise contribution from the half-ring maps for 100, 143 and 217 GHz<br />
<br />
; ''lensing'' :<br />
* the lensing map<br />
* beam error eigenmodes and covariance for the 143 and 217GHz channel maps<br />
* fiducial CMB model (from Planck cosmological parameter best fit)<br />
<br />
; ''act/spt'' :<br />
* data and code from [http://lambda.gsfc.nasa.gov/product/act/act_fulllikelihood_get.cfm here]<br />
* the tSZ andkSZ template are changed to match those of CAMspec<br />
<br />
== File names and Meta data ==<br />
<br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
<br />
'''Likelihood source code'''<br />
<br />
The source code is in the file<br />
: {{PLASingleFile |fileType=cosmo|name=COM_Code_Likelihood-v1.0_R1.10.tar.gz|link=COM_Code_Likelihood-v1.0_R1.10.tar.gz}} (C, f90 and python likelihood library and tools)<br />
<br />
'''Likelihood data packages'''<br />
<br />
The {{PLALikelihood|type=Data|link=data packages}} are<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-commander_R1.10.tar.gz | link=COM_Data_Likelihood-commander_R1.10.tar.gz}}'' (low-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-lowlike_R1.10.tar.gz | link=COM_Data_Likelihood-lowlike_R1.10.tar.gz}}'' (low-ell TE,EE,BB likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-CAMspec_R1.10.tar.gz | link=COM_Data_Likelihood-CAMspec_R1.10.tar.gz}}'' (high-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-actspt_R1.10.tar | link=COM_Data_Likelihood-actspt_R1.10.tar.gz}}'' (high-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-lensing_R1.10.tar.gz | link=COM_Data_Likelihood-lensing_R1.10.tar.gz}}'' (lensing likelihood)<br />
<br />
Untar and unzip all files to recover the code and likelihood data. Each package comes with a README file; follow the instructions inclosed to<br />
build the code and use it. To compute the CMB likelihood one has to sum the log likelihood of each of the commander_v4.1_lm49.clik, lowlike_v222.clik and CAMspec_v6.2TN_2013_02_26.clik, actspt_2013_01.clik. To compute the CMB+lensing likelihood, one has to sum the log likelihood of all 5 files.<br />
<br />
The CMB and lensing likelihood format are different. The CMB files have the termination .clik, the lensing one .clik_lensing. The lensing data being simpler (due to the less detailled modeling permitted by the lower signal-noise), the file is a simple ascii file containing all the data along with comments describing it, and linking the different quantities to the lensing paper. The CMB file format is more complex and must accommodate different forms of data (maps, power spectrum, distribution samples, covariance matrices...). It consists of a tree structure containing the data. At each level of the tree structure a given directory can contain array data (in the form of FITS files or ascii files for strings) and scalar data (joined in a single ascii file "_mdb"). Those files are not user modifiable and do not contain interesting meta data for the user. Tools to manipulate those files are included in the code package as optional python tools. They are documented in the code package.<br />
<br />
'''Likelihood masks'''<br />
<br />
The masks used in the Likelihood paper {{PlanckPapers|planck2013-p08}} are found in<br />
{{PLASingleFile|fileType=map|name=COM_Mask_Likelihood_2048_R1.10.fits|link=COM_Mask_Likelihood_2048_R1.10.fits}}<br />
<br />
which contains ten masks which are written into a single ''BINTABLE'' extension of 10 columns by 50331648 rows (the number of Healpix pixels in an Nside = 2048 map). The structure is as follows, where the column names are the names of the masks: <br />
<br />
{| border="1" cellpadding="3" cellspacing="0" align="center" style="text-align:left" width=800px<br />
|+ '''Likelihodd masks file data structure'''<br />
|- bgcolor="ffdead" <br />
!colspan="4" | 1. EXTNAME = 'MSK-LIKE' : Data columns<br />
|- bgcolor="ffdead" <br />
! Column Name || Data Type || Units || Description<br />
|-<br />
|CL31 || Real*4 || none || mask<br />
|-<br />
|CL39 || Real*4 || none || mask<br />
|-<br />
|CL49 || Real*4 || none || mask<br />
|-<br />
|G22 || Real*4 || none || mask <br />
|-<br />
|G35 || Real*4 || none || mask<br />
|-<br />
|G45 || Real*4 || none || mask<br />
|-<br />
|G56 || Real*4 || none || mask<br />
|-<br />
|G65 || Real*4 || none || mask<br />
|-<br />
|PS96 || Real*4 || none || mask<br />
|-<br />
|PSA82 || Real*4 || none || mask<br />
|-<br />
|- bgcolor="ffdead" <br />
! Keyword || Data Type || Value || Description<br />
|-<br />
|PIXTYPE || string || HEALPIX ||<br />
|-<br />
|COORDSYS || string || GALACTIC ||Coordinate system <br />
|-<br />
|ORDERING || string || NESTED || Healpix ordering<br />
|-<br />
|NSIDE || Int || 2048 || Healpix Nside <br />
|-<br />
|FIRSTPIX || Int*4 || 0 || First pixel number<br />
|-<br />
|LASTPIX || Int*4 || 50331647 || Last pixel number, for LFI and HFI, respectively<br />
<br />
|}<br />
--><br />
== References ==<br />
<References /><br />
<br />
<br />
<br />
[[Category:Mission products|008]]</div>Sgallihttps://wiki.cosmos.esa.int/planckpla2015/index.php?title=CMB_spectrum_%26_Likelihood_Code&diff=11239CMB spectrum & Likelihood Code2015-02-04T17:09:12Z<p>Sgalli: </p>
<hr />
<div>{{DISPLAYTITLE:CMB spectrum and likelihood code}}<br />
<br />
==CMB spectra==<br />
<br />
<br />
===General description===<br />
====TT====<br />
The Planck best-fit CMB temperature power spectrum, shown in figure below, covers the wide range of multipoles <math> \ell </math> = 2-2508. <br />
<span style="color:red"> UPDATE COMMANDER: Over the multipole range <math> \ell </math> = 2–29, the power spectrum is derived from a component-separation algorithm, ''Commander'': applied to maps in the frequency range 30–353 GHz over 91% of the sky {{PlanckPapers|planck2013-p06}} . The asymmetric error bars associated to this spectrum are the 68% confidence limits and include the uncertainties due to foreground subtraction. </span><br />
<br />
For multipoles equal or greater than <math>\ell=30</math>, instead, the spectrum is derived from the ''Plik'' likelihood {{PlanckPapers|planck2014-a13}} by optimally combining the spectra in the frequency range 100-217 GHz, and correcting them for unresolved foregrounds using the best-fit foreground solution from Planck TT+lowP LCDM run. Associated 1-sigma errors include beam uncertainties. Both ''Commander'' and ''Plik'' are described in more details in the sections below.<br />
<br />
[[File: Planck2014 TT Dl NORES bin30 w180mm.jpeg|thumb|center|700px|'''CMB TT spectrum. Logarithmic x-scale up to <math>\ell=30</math>, linear at higher <math>\ell</math>; all points with error bars. The red line is the Planck best-fit primordial power spectrum (cf Planck TT+lowP in Table 3 of {{PlanckPapers|planck2014-a15}}). The blue shaded area shows the uncertainties due to cosmic variance alone.''']]<br />
<br />
====TE and EE====<br />
The Planck best-fit CMB polarization and temperature-polarization cross-correlation power spectra, shown in the figure below, cover the multipole range <math> \ell </math> = 30-1996. The data points relative to the multipole range <math> \ell </math> = 2-29 will be released in a second moment.<br />
Analogously to the TT case, the <math> \ell\ge 30 </math> spectrum is derived from the ''Plik'' likelihood {{PlanckPapers|planck2014-a13}} by optimally combining the spectra in the frequency range 100-217 GHz, and correcting them for unresolved foregrounds using the best-fit foreground solution from a Planck TT,TE,EE+lowP LCDM run. <br />
<br />
{|style="margin: 0 auto;"<br />
|[[File: Planck2014 EE Dl NORES bin30 w180mm.jpeg|thumb|center|500px|'''CMB EE spectrum. The red line is the Planck best-fit primordial power spectrum (cf Planck TT+lowP in Table 3 of {{PlanckPapers|planck2014-a15}}). The blue shaded area shows the uncertainties due to cosmic variance alone.''']]<br />
|[[File: Planck2014 TE Dl NORES bin30 w180mm.jpeg|thumb|center|500px|'''CMB TE spectrum. The red line is the Planck best-fit primordial power spectrum (cf Planck TT+lowP in Table 3 of {{PlanckPapers|planck2014-a15}}). The blue shaded area shows the uncertainties due to cosmic variance alone.''']]<br />
|}<br />
<br />
===Production process===<br />
<span style="color:red"> UPDATE COMMANDER<br />
The <math>\ell</math> < 50 part of the Planck TT power spectrum is derived from the Commander approach, which implements Bayesian component separation in pixel space, fitting a parametric model to the data by sampling the posterior distribution for the model parameters {{PlanckPapers|planck2013-p06}}. The power spectrum at any multipole <math>\ell</math> is given as the maximum probability point for the posterior <math>C_\ell</math> distribution, marginalized over the other multipoles, and the error bars are 68% confidence level {{PlanckPapers|planck2013-p08}}. </span><br />
<br />
The <math>\ell \ge 30</math> part of the TT, TE and EE power spectra have been derived by the Plik likelihood, a code that implements a pseudo-Cl based technique, extensively described in Sec. 2 and the Appendix of {{PlanckPapers|planck2013-p08}} and {{PlanckPapers|planck2014-a13}}. Frequency spectra are computed as cross-spectra between half-mission maps. Mask and multipole range choices for each frequency spectrum are summarized in Section 3.3 of {{PlanckPapers|planck2014-a15}} and in {{PlanckPapers|planck2014-a13}}. The final power spectrum is an optimal combination of the 100, 143, 143x217 and 217 GHz spectra, corrected for the best-fit unresolved foregrounds and inter-frequency calibration factors, as derived from the full likelihood analysis (for TT we use the best-fit solutions for the nuisance parameters from the Planck+TT+lowP data combination, while for TE and EE we use the best fit from Planck+TT+lowP, cf Table 3 of {{PlanckPapers|planck2014-a15}}). A thorough description of the models of unresolved foregrounds is given in {{PlanckPapers|planck2014-a13}}. The spectrum covariance matrix accounts for cosmic variance and noise contributions, together with beam uncertainties. The <math>\ell \ge 30</math> CMB TT spectrum and associated covariance matrix are available in two formats:<br />
#Unbinned. TT: 2479 bandpowers (<math>\ell=30-2508</math>); TE or EE: 1697 bandpowers (<math>\ell=30-1996</math>).<br />
#Binned, in bins of <math> \Delta\ell=30 </math>. TT: 83 bandpowers. TE or EE: 66 bandpowers. We bin the <math> C_\ell </math> power spectrum with a weight proportional to <math> \ell (\ell+1) </math>, so that the <math> C_{\ell_b} </math> binned bandpower centered in <math> \ell_b </math> is: <math> \\ C_{\ell_b}=\Sigma_{\ell \in b} w_{\ell_b\ell} C_\ell \quad \text{with} \quad w_{\ell_b\ell}=\frac{\ell (\ell+1)}{\Sigma_{\ell \in b} \ell (\ell+1)}. \\</math> Equivalently, using the matrix formalism, we can construct the binning matrix B as: <math>\\ B_{\ell_b \ell}=w_{\ell_b\ell} \\ </math> where B is a <math> n_b\times n_\ell</math> matrix, with <math>n_b=83</math> the number of bins and <math>n_\ell=2479</math> the number of unbinned multipoles. Thus: <math> \\ \vec{C}_\mathrm{binned}=B \, \vec{C} \\ \mathrm{cov_\mathrm{binned}}= B\, \mathrm{cov}\, B^T \\ \ell_b=B\, \ell \\ </math> Here, <math> \vec{C}_{binned}\, (\vec{C}) </math> is the vector containing all the binned (unbinned) <math>C_\ell</math> bandpowers, <math>\mathrm{cov} </math> is the covariance matrix and <math>\ell_b</math> is the weighted average multipole in each bin. The binned <math>D_{\ell_B}</math> power spectrum is then calculated as: <math> \\ D_{\ell_b}=\frac{\ell_b (\ell_b+1)}{2\pi} C_{\ell_b} </math>.<br />
<br />
===Inputs===<br />
<span style="color:red"> UPDATE COMMANDER</span><br />
<br />
; Low-l spectrum (<math>\ell < 30</math>):<br />
* frequency maps from 30–353 GHz<br />
* common mask {{PlanckPapers|planck2013-p06}}<br />
* compact sources catalog<br />
<br />
; High-l spectrum (<math>30 \ge \ell \lesssim 2500</math>): <br />
<br />
* 100, 143, 143x217 and 217 GHz spectra and their covariance matrix (Sec. 3.3 {{PlanckPapers|planck2014-a15}})<br />
* best-fit foreground templates and inter-frequency calibration factors (Table 3 of {{PlanckPapers|planck2014-a15}})<br />
* Beam transfer function uncertainties {{PlanckPapers|planck2014-a08}}<br />
=== File names and Meta data ===<br />
<br />
<span style="color:red"> CHECK EXTENSION NAMES </span><br />
<br />
The CMB spectrum and its covariance matrix are distributed in a single FITS file named <br />
<!--- * ''{{PLASingleFile | fileType=cosmo | name=COM_PowerSpect_CMB_R2.00.fits | link=COM_PowerSpect_CMB_R1.10.fits}}'' ---><br />
* ''COM_PowerSpect_CMB_R2.nn.fits''<br />
which contains 5 extensions<br />
<br />
; LOW-ELL (BINTABLE)<br />
: with the low ell part of the spectrum, not binned, and for l=2-49. The table columns are<br />
# ''ELL'' (integer): multipole number<br />
# ''D_ELL'' (float): <math>D_ell</math> as described above<br />
# ''ERRUP'' (float): the upward uncertainty<br />
# ''ERRDOWN'' (float): the downward uncertainty<br />
<br />
; BINNED HIGH-ELL (BINTABLE) <br />
: with the high-ell part of the spectrum, binned into 83 bins covering <math>\langle l \rangle = 47-2499\ </math> in bins of width <math>l=30</math> (with the exception of the last bin that is smaller). The table columns are as follows:<br />
# ''ELL'' (integer): mean multipole number of bin<br />
# ''L_MIN'' (integer): lowest multipole of bin<br />
# ''L_MAX'' (integer): highest multipole of bin<br />
# ''D_ELL'' (float): <math>D_\ell</math> as described above<br />
# ''ERR'' (float): the uncertainty<br />
<br />
; UNBINNED HIGH-ELL (BINTABLE) <br />
: with the high-ell part of the spectrum, unbinned, in 2979 bins covering <math>\langle l \rangle = 30-2508\ </math>. The table columns are as follows:<br />
# ''ELL'' (integer): multipole <br />
# ''D_ELL'' (float): <math>D_\ell</math> as described above<br />
# ''ERR'' (float): the uncertainty<br />
<br />
<br />
<br />
The spectra give <math>D_\ell = \ell(\ell+1)C_\ell / 2\pi </math> in units of <math>\mu\, K^2</math>.<br />
<!-- <br />
<br />
The CMB spectrum is also given in a simple text comma-separated file:<br />
* ''{{PLASingleFile | fileType=cosmo | name=COM_PowerSpect_CMB_R1.10.txt |link=COM_PowerSpect_CMB_R1.10.txt}}''<br />
<br />
--><br />
==Likelihood==<br />
The likelihood will soon be released with an accompanying paper and an Explanatory Supplement update. <br />
<!-- <br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
The likelihood code (and the data that comes with it) used to compute the likelihood of a model that predicts the CMB power spectra, lensing power spectrum, together with some foreground and some instrumental parameters. The data files are built primarily from the Planck mission results, but include also some results from the WMAP-9 data release. The data files are written in a specific format that can only be read by the code. The code consists in a c/f90 library, along with some optional tools in python. The code is used to read the data files, and given model power spectra and nuisance parameters it computes the log likelihood of that model. <br />
<br />
Detailed description of the installation and usage of the likelihood code and data is provided in the package. The package includes five data files: four for the CMB likelihoods and one for the lensing likelihood. All of the likelihoods delivered are described in detail in the {{PlanckPapers|planck2013-p08|1|Power spectrum & Likelihood Paper}} (for the CMB based likelihood) and in the {{PlanckPapers|planck2013-p12|1|Lensing Paper}} (for the lensing likelihood) .<br />
<br />
The CMB full likelihood has been divided into four parts to allow using selectively different ranges of multipoles. It also reflects the fact that the mathematical approximations used for those different parts are very different, as is the underlying data. In detail, we distribute<br />
* one low-<math>\ell</math> temperature only likelihood (commander), <br />
* one low-<math>\ell</math> temperature and polarisation likelihood (lowlike), and <br />
* one higl-<math>\ell</math> likelihood CAMspec. <br />
<br />
The ''Commander'' likelihood covers the multipoles 2 to 49. It uses a semi-analytic method to sample the low-<math>\ell</math> temperature likelihood on an intermediate product of one of the component separated maps. The samples are used along with an analytical approximation of the likelihood posterior to perform the likelihood computation in the code. See {{PlanckPapers|planck2013-p08}} section 8.1 for more details.<br />
<br />
The ''lowlike'' likelihood covers the multipoles 2 to 32 for temperature and polarization data. Since Planck is not releasing polarisation data at this time, the polarization map from WMAP9 is used instead. A temperature map is needed to perform the computation nevertheless, and we use here the same commander map. The likelihood is computed using a map-based approximation at low resolution and a master one at intermediate resolution, as in WMAP. The likelihood code actually calls a very slightly modified version of the WMAP9 code. This piece of the likelihood essentially provides a prior on the optical depth and has almost no other impact on cosmological parameter estimation. As such it could be replaced by a simple prior, and a user can decide to do so, which is one of the motivation to leave the three pieces of the CMB likelihood as different data packages; see {{PlanckPapers|planck2013-p08}} section 8.3 for more details. Note that the version of the WMAP code used here (code version v1.0) does not perform any test on the positive definiteness of the TT, TE, EE covariance matrices, and will return a null log likelihood in the unphysical cases where the absolute value of TE is too large. This will be corrected in a later version.<br />
<br />
The ''CAMspec'' likelihood covers the multipoles 50 to 2500 for temperature only. The likelihood is computed using a quadratic approximation, including mode to mode correlations that have been precomputed on a fiducial model. The likelihood uses data from the 100, 143 and 217 GHz channels. To do so it models the foreground at each frequency using the model described in the likelihood paper. Uncertainties on the relative calibration and on the beam transfer functions are included either as parametric models, or marginalized and integrated in the covariance matrix. Detailed description of the different nuisance parameters is given below. Priors are included in the likelihood on the CIB spectral index, relative calibration factors and beam error eigenmodes. See {{PlanckPapers|planck2013-p08}} section 2.1 for more details.<br />
<br />
The ''act/spt'' likelihood covers the multipoles 1500 to 10000 for temperature. It is described in{{BibCite|dun2013}}{{BibCite|Keis2011}}{{BibCite|Reic2012}}. It uses the code and data that can be retrieved from the [http://lambda.gsfc.nasa.gov/ Lambda archive] for [http://lambda.gsfc.nasa.gov/product/act/act_prod_table.cfm ACT] and [http://lambda.gsfc.nasa.gov/product/spt/spt_prod_table.cfm SPT]. It has been slightly modified to use a thermal and kinetic SZ model that matches the one used in CAMspec. As stated in{{BibCite|dun2013}}, the dust parameters a_ge and a_gs must be explored with the following priors: a_ge = 0.8 ± 0.2 and a_gs = 0.4 ± 0.2. Those priors are not included in the log likelihood computed by the code.<br />
<br />
The ''lensing'' likelihood covers the multipoles 40 to 400 using the result of the [[Specially_processed_maps | lensing reconstruction]]. It uses a quadratic approximation for the likelihood, with a covariance matrix including the marginalized contribution of the beam transfer function uncertainties, the diffuse point source correction uncertainties and the cosmological model uncertainty affecting the first order non-gaussian bias (N1). The correlation between temperature and lensing is not taken into account. Cosmological uncertainty effects on the normalization are dealt with using a first order renormalization procedure. This means that the code will need both the TT and $\phi\phi$ power spectrum up to <math>\ell</math> = 2048 to correctly perform the integrals needed for the renormalization. Nevertheless, the code will only produce an estimate based on the data between <math>\ell</math> = 40 to 400. See {{PlanckPapers|planck2013-p12}} section 6.1 for more details.<br />
</span><br />
<span style="color:red">OUTSTANDING: description of likelihood masks </span><br />
==Production process==<br />
<br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
The code is based on some basic routines from the libpmc library in the [http://arxiv.org/abs/1101.0950 cosmoPMC] code. It also uses some code from the [http://lambda.gsfc.nasa.gov/product/map/dr5/likelihood_get.cfm WMAP9 likelihood] for the lowlike likelihood and{{BibCite|dun2013}}{{BibCite|Keis2011}}{{BibCite|Reic2012}} for the act/spt one. The rest of the code has been specifically written for the Planck data. Each likelihood file has been processed using a different and dedicated pipeline as described in the likelihood paper {{PlanckPapers|planck2013-p08}} (section 2 and 8) and in the lensing paper {{PlanckPapers|planck2013-p12}} (section 6.1). We refer the reader to those papers for full details. The data are then encapsulated into the specific file format.<br />
<br />
Each dataset comes with its own self check. Whenever the code is used to read a data file, a computation will be done against an included test spectrum/nuisance parameter, and the log-likelihood will be displayed along with the expected result. Difference of the order of 10<math>^{-6}</math> or less are expected depending of the architecture.<br />
<br />
==Inputs==<br />
<br />
===Likelihood===<br />
<br />
; ''commander'' :<br />
* all Planck channels maps<br />
* compact source catalogs<br />
* common masks<br />
* beam transfer functions for all channels<br />
<br />
; ''lowlike'' :<br />
* WMAP9 likelihood data<br />
* Low-<math>\ell</math> Commander map<br />
<br />
; ''CAMspec'' :<br />
* 100, 143 and 217 GHz detector and detsets maps<br />
* 857GHz channel map<br />
* compact source catalog<br />
* common masks (0,1 & 3)<br />
* beam transfer function and error eigenmodes and covariance for 100, 143 and 217 GHz detectors & detsets<br />
* theoretical templates for the tSZ and kSZ contributions<br />
* color corrections for the CIB emission for the 143 and 217GHz detectors and detsets<br />
* fiducial CMB model (bootstrapped from WMAP7 best fit spectrum) estimated noise contribution from the half-ring maps for 100, 143 and 217 GHz<br />
<br />
; ''lensing'' :<br />
* the lensing map<br />
* beam error eigenmodes and covariance for the 143 and 217GHz channel maps<br />
* fiducial CMB model (from Planck cosmological parameter best fit)<br />
<br />
; ''act/spt'' :<br />
* data and code from [http://lambda.gsfc.nasa.gov/product/act/act_fulllikelihood_get.cfm here]<br />
* the tSZ andkSZ template are changed to match those of CAMspec<br />
<br />
== File names and Meta data ==<br />
<br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
<br />
'''Likelihood source code'''<br />
<br />
The source code is in the file<br />
: {{PLASingleFile |fileType=cosmo|name=COM_Code_Likelihood-v1.0_R1.10.tar.gz|link=COM_Code_Likelihood-v1.0_R1.10.tar.gz}} (C, f90 and python likelihood library and tools)<br />
<br />
'''Likelihood data packages'''<br />
<br />
The {{PLALikelihood|type=Data|link=data packages}} are<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-commander_R1.10.tar.gz | link=COM_Data_Likelihood-commander_R1.10.tar.gz}}'' (low-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-lowlike_R1.10.tar.gz | link=COM_Data_Likelihood-lowlike_R1.10.tar.gz}}'' (low-ell TE,EE,BB likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-CAMspec_R1.10.tar.gz | link=COM_Data_Likelihood-CAMspec_R1.10.tar.gz}}'' (high-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-actspt_R1.10.tar | link=COM_Data_Likelihood-actspt_R1.10.tar.gz}}'' (high-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-lensing_R1.10.tar.gz | link=COM_Data_Likelihood-lensing_R1.10.tar.gz}}'' (lensing likelihood)<br />
<br />
Untar and unzip all files to recover the code and likelihood data. Each package comes with a README file; follow the instructions inclosed to<br />
build the code and use it. To compute the CMB likelihood one has to sum the log likelihood of each of the commander_v4.1_lm49.clik, lowlike_v222.clik and CAMspec_v6.2TN_2013_02_26.clik, actspt_2013_01.clik. To compute the CMB+lensing likelihood, one has to sum the log likelihood of all 5 files.<br />
<br />
The CMB and lensing likelihood format are different. The CMB files have the termination .clik, the lensing one .clik_lensing. The lensing data being simpler (due to the less detailled modeling permitted by the lower signal-noise), the file is a simple ascii file containing all the data along with comments describing it, and linking the different quantities to the lensing paper. The CMB file format is more complex and must accommodate different forms of data (maps, power spectrum, distribution samples, covariance matrices...). It consists of a tree structure containing the data. At each level of the tree structure a given directory can contain array data (in the form of FITS files or ascii files for strings) and scalar data (joined in a single ascii file "_mdb"). Those files are not user modifiable and do not contain interesting meta data for the user. Tools to manipulate those files are included in the code package as optional python tools. They are documented in the code package.<br />
<br />
'''Likelihood masks'''<br />
<br />
The masks used in the Likelihood paper {{PlanckPapers|planck2013-p08}} are found in<br />
{{PLASingleFile|fileType=map|name=COM_Mask_Likelihood_2048_R1.10.fits|link=COM_Mask_Likelihood_2048_R1.10.fits}}<br />
<br />
which contains ten masks which are written into a single ''BINTABLE'' extension of 10 columns by 50331648 rows (the number of Healpix pixels in an Nside = 2048 map). The structure is as follows, where the column names are the names of the masks: <br />
<br />
{| border="1" cellpadding="3" cellspacing="0" align="center" style="text-align:left" width=800px<br />
|+ '''Likelihodd masks file data structure'''<br />
|- bgcolor="ffdead" <br />
!colspan="4" | 1. EXTNAME = 'MSK-LIKE' : Data columns<br />
|- bgcolor="ffdead" <br />
! Column Name || Data Type || Units || Description<br />
|-<br />
|CL31 || Real*4 || none || mask<br />
|-<br />
|CL39 || Real*4 || none || mask<br />
|-<br />
|CL49 || Real*4 || none || mask<br />
|-<br />
|G22 || Real*4 || none || mask <br />
|-<br />
|G35 || Real*4 || none || mask<br />
|-<br />
|G45 || Real*4 || none || mask<br />
|-<br />
|G56 || Real*4 || none || mask<br />
|-<br />
|G65 || Real*4 || none || mask<br />
|-<br />
|PS96 || Real*4 || none || mask<br />
|-<br />
|PSA82 || Real*4 || none || mask<br />
|-<br />
|- bgcolor="ffdead" <br />
! Keyword || Data Type || Value || Description<br />
|-<br />
|PIXTYPE || string || HEALPIX ||<br />
|-<br />
|COORDSYS || string || GALACTIC ||Coordinate system <br />
|-<br />
|ORDERING || string || NESTED || Healpix ordering<br />
|-<br />
|NSIDE || Int || 2048 || Healpix Nside <br />
|-<br />
|FIRSTPIX || Int*4 || 0 || First pixel number<br />
|-<br />
|LASTPIX || Int*4 || 50331647 || Last pixel number, for LFI and HFI, respectively<br />
<br />
|}<br />
--><br />
== References ==<br />
<References /><br />
<br />
<br />
<br />
[[Category:Mission products|008]]</div>Sgallihttps://wiki.cosmos.esa.int/planckpla2015/index.php?title=CMB_spectrum_%26_Likelihood_Code&diff=11237CMB spectrum & Likelihood Code2015-02-04T17:07:47Z<p>Sgalli: </p>
<hr />
<div>{{DISPLAYTITLE:CMB spectrum and likelihood code}}<br />
<br />
==CMB spectra==<br />
<br />
<br />
===General description===<br />
====TT====<br />
The Planck best-fit CMB temperature power spectrum, shown in figure below, covers the wide range of multipoles <math> \ell </math> = 2-2508. <br />
<span style="color:red"> UPDATE COMMANDER: Over the multipole range <math> \ell </math> = 2–29, the power spectrum is derived from a component-separation algorithm, ''Commander'': applied to maps in the frequency range 30–353 GHz over 91% of the sky {{PlanckPapers|planck2013-p06}} . The asymmetric error bars associated to this spectrum are the 68% confidence limits and include the uncertainties due to foreground subtraction. </span><br />
<br />
For multipoles equal or greater than <math>\ell=30</math>, instead, the spectrum is derived from the ''Plik'' likelihood {{PlanckPapers|planck2014-a13}} by optimally combining the spectra in the frequency range 100-217 GHz, and correcting them for unresolved foregrounds using the best-fit foreground solution from Planck TT+lowP LCDM run. Associated 1-sigma errors include beam uncertainties. Both ''Commander'' and ''Plik'' are described in more details in the sections below.<br />
<br />
[[File: Planck2014 TT Dl NORES bin30 w180mm.jpeg|thumb|center|700px|'''CMB TT spectrum. Logarithmic x-scale up to <math>\ell=30</math>, linear at higher <math>\ell</math>; all points with error bars. The red line is the Planck best-fit primordial power spectrum (cf Planck TT+lowP in Table 3 of {{PlanckPapers|planck2014-a15}}). The blue shaded area shows the uncertainties due to cosmic variance alone.''']]<br />
<br />
====TE and EE====<br />
The Planck best-fit CMB polarization and temperature-polarization cross-correlation power spectra, shown in the figure below, cover the multipole range <math> \ell </math> = 30-1996. The data points relative to the multipole range <math> \ell </math> = 2-29 will be released in a second moment.<br />
Analogously to the TT case, the <math> \ell\ge 30 </math> spectrum is derived from the ''Plik'' likelihood {{PlanckPapers|planck2014-a13}} by optimally combining the spectra in the frequency range 100-217 GHz, and correcting them for unresolved foregrounds using the best-fit foreground solution from a Planck TT,TE,EE+lowP LCDM run. <br />
<br />
{|style="margin: 0 auto;"<br />
|[[File: Planck2014 EE Dl NORES bin30 w180mm.jpeg|thumb|center|500px|'''CMB EE spectrum. The red line is the Planck best-fit primordial power spectrum (cf Planck TT+lowP in Table 3 of {{PlanckPapers|planck2014-a15}}). The blue shaded area shows the uncertainties due to cosmic variance alone.''']]<br />
|[[File: Planck2014 TE Dl NORES bin30 w180mm.jpeg|thumb|center|500px|'''CMB TE spectrum. The red line is the Planck best-fit primordial power spectrum (cf Planck TT+lowP in Table 3 of {{PlanckPapers|planck2014-a15}}). The blue shaded area shows the uncertainties due to cosmic variance alone.''']]<br />
|}<br />
<br />
===Production process===<br />
<span style="color:red"> UPDATE COMMANDER<br />
The <math>\ell</math> < 50 part of the Planck TT power spectrum is derived from the Commander approach, which implements Bayesian component separation in pixel space, fitting a parametric model to the data by sampling the posterior distribution for the model parameters {{PlanckPapers|planck2013-p06}}. The power spectrum at any multipole <math>\ell</math> is given as the maximum probability point for the posterior <math>C_\ell</math> distribution, marginalized over the other multipoles, and the error bars are 68% confidence level {{PlanckPapers|planck2013-p08}}. </span><br />
<br />
The <math>\ell \ge 30</math> part of the TT, TE and EE power spectra have been derived by the Plik likelihood, a code that implements a pseudo-Cl based technique, extensively described in Sec. 2 and the Appendix of {{PlanckPapers|planck2013-p08}} and {{PlanckPapers|planck2014-a13}}. Frequency spectra are computed as cross-spectra between half-mission maps. Mask and multipole range choices for each frequency spectrum are summarized in Section 3.3 of {{PlanckPapers|planck2014-a15}} and in {{PlanckPapers|planck2014-a13}}. The final power spectrum is an optimal combination of the 100, 143, 143x217 and 217 GHz spectra, corrected for the best-fit unresolved foregrounds and inter-frequency calibration factors, as derived from the full likelihood analysis (for TT we use the best-fit solutions for the nuisance parameters from the Planck+TT+lowP data combination, while for TE and EE we use the best fit from Planck+TT+lowP, cf Table 3 of {{PlanckPapers|planck2014-a15}}). A thorough description of the models of unresolved foregrounds is given in {{PlanckPapers|planck2014-a13}}. The spectrum covariance matrix accounts for cosmic variance and noise contributions, together with beam uncertainties. The <math>\ell \ge 30</math> CMB TT spectrum and associated covariance matrix are available in two formats:<br />
#Unbinned. TT: 2479 bandpowers (<math>\ell=30-2508</math>); TE or EE: 1697 bandpowers (<math>\ell=30-1996</math>).<br />
#Binned, in bins of <math> \Delta\ell=30 </math>. TT: 83 bandpowers. TE or EE: 66 bandpowers. We bin the <math> C_\ell </math> power spectrum with a weight proportional to <math> \ell (\ell+1) </math>, so that the <math> C_{\ell_b} </math> binned bandpower centered in <math> \ell_b </math> is: <math> \\ C_{\ell_b}=\Sigma_{\ell \in b} w_{\ell_b\ell} C_\ell \quad \text{with} \quad w_{\ell_b\ell}=\frac{\ell (\ell+1)}{\Sigma_{\ell \in b} \ell (\ell+1)}. \\</math> Equivalently, using the matrix formalism, we can construct the binning matrix B as: <math>\\ B_{\ell_b \ell}=w_{\ell_b\ell} \\ </math> where B is a <math> n_b\times n_\ell</math> matrix, with <math>n_b=83</math> the number of bins and <math>n_\ell=2479</math> the number of unbinned multipoles. Thus: <math> \\ \vec{C}_\mathrm{binned}=B \, \vec{C} \\ \mathrm{cov_\mathrm{binned}}= B\, \mathrm{cov}\, B^T \\ \ell_b=B\, \ell \\ </math> Here, <math> \vec{C}_{binned}\, (\vec{C}) </math> is the vector containing all the binned (unbinned) <math>C_\ell</math> bandpowers, <math>\mathrm{cov} </math> is the covariance matrix and <math>\ell_b</math> is the weighted average multipole in each bin. The binned <math>D_{\ell_B}</math> power spectrum is then calculated as: <math> \\ D_{\ell_b}=\frac{\ell_b (\ell_b+1)}{2\pi} C_{\ell_b} </math>.<br />
<br />
===Inputs===<br />
<span style="color:red"> UPDATE COMMANDER</span><br />
<br />
; Low-l spectrum (<math>\ell < 30</math>):<br />
* frequency maps from 30–353 GHz<br />
* common mask {{PlanckPapers|planck2013-p06}}<br />
* compact sources catalog<br />
<br />
; High-l spectrum (<math>30 \ge \ell \lesssim 2500</math>): <br />
<br />
* 100, 143, 143x217 and 217 GHz spectra and their covariance matrix (Sec. 3.3 {{PlanckPapers|planck2014-a15}})<br />
* best-fit foreground templates and inter-frequency calibration factors (Table 3 of {{PlanckPapers|planck2014-a15}})<br />
* Beam transfer function uncertainties {{PlanckPapers|planck2014-a08}}<br />
=== File names and Meta data ===<br />
<br />
<span style="color:red"> CHECK EXTENSION NAMES </span><br />
<br />
The CMB spectrum and its covariance matrix are distributed in a single FITS file named <br />
<!--- * ''{{PLASingleFile | fileType=cosmo | name=COM_PowerSpect_CMB_R2.00.fits | link=COM_PowerSpect_CMB_R1.10.fits}}'' ---><br />
* ''COM_PowerSpect_CMB_R2.nn.fits''<br />
which contains 5 extensions<br />
<br />
; LOW-ELL (BINTABLE)<br />
: with the low ell part of the spectrum, not binned, and for l=2-49. The table columns are<br />
# ''ELL'' (integer): multipole number<br />
# ''D_ELL'' (float): <math>D_l</math> as described above<br />
# ''ERRUP'' (float): the upward uncertainty<br />
# ''ERRDOWN'' (float): the downward uncertainty<br />
<br />
; BINNED HIGH-ELL (BINTABLE) <br />
: with the high-ell part of the spectrum, binned into 83 bins covering <math>\langle l \rangle = 47-2499\ </math> in bins of width <math>l=30</math> (with the exception of the last bin that is smaller). The table columns are as follows:<br />
# ''ELL'' (integer): mean multipole number of bin<br />
# ''L_MIN'' (integer): lowest multipole of bin<br />
# ''L_MAX'' (integer): highest multipole of bin<br />
# ''D_ELL'' (float): <math>D_\ell<\math> as described above<br />
# ''ERR'' (float): the uncertainty<br />
<br />
; UNBINNED HIGH-ELL (BINTABLE) <br />
: with the high-ell part of the spectrum, unbinned, in 2979 bins covering <math>\langle l \rangle = 30-2508\ </math>. The table columns are as follows:<br />
# ''ELL'' (integer): multipole <br />
# ''D_ELL'' (float): $D_l$ as described above<br />
# ''ERR'' (float): the uncertainty<br />
<br />
<br />
<br />
The spectra give <math>D_\ell = \ell(\ell+1)C_\ell / 2\pi </math> in units of <math>\mu\, K^2</math>.<br />
<!-- <br />
<br />
The CMB spectrum is also given in a simple text comma-separated file:<br />
* ''{{PLASingleFile | fileType=cosmo | name=COM_PowerSpect_CMB_R1.10.txt |link=COM_PowerSpect_CMB_R1.10.txt}}''<br />
<br />
--><br />
==Likelihood==<br />
The likelihood will soon be released with an accompanying paper and an Explanatory Supplement update. <br />
<!-- <br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
The likelihood code (and the data that comes with it) used to compute the likelihood of a model that predicts the CMB power spectra, lensing power spectrum, together with some foreground and some instrumental parameters. The data files are built primarily from the Planck mission results, but include also some results from the WMAP-9 data release. The data files are written in a specific format that can only be read by the code. The code consists in a c/f90 library, along with some optional tools in python. The code is used to read the data files, and given model power spectra and nuisance parameters it computes the log likelihood of that model. <br />
<br />
Detailed description of the installation and usage of the likelihood code and data is provided in the package. The package includes five data files: four for the CMB likelihoods and one for the lensing likelihood. All of the likelihoods delivered are described in detail in the {{PlanckPapers|planck2013-p08|1|Power spectrum & Likelihood Paper}} (for the CMB based likelihood) and in the {{PlanckPapers|planck2013-p12|1|Lensing Paper}} (for the lensing likelihood) .<br />
<br />
The CMB full likelihood has been divided into four parts to allow using selectively different ranges of multipoles. It also reflects the fact that the mathematical approximations used for those different parts are very different, as is the underlying data. In detail, we distribute<br />
* one low-<math>\ell</math> temperature only likelihood (commander), <br />
* one low-<math>\ell</math> temperature and polarisation likelihood (lowlike), and <br />
* one higl-<math>\ell</math> likelihood CAMspec. <br />
<br />
The ''Commander'' likelihood covers the multipoles 2 to 49. It uses a semi-analytic method to sample the low-<math>\ell</math> temperature likelihood on an intermediate product of one of the component separated maps. The samples are used along with an analytical approximation of the likelihood posterior to perform the likelihood computation in the code. See {{PlanckPapers|planck2013-p08}} section 8.1 for more details.<br />
<br />
The ''lowlike'' likelihood covers the multipoles 2 to 32 for temperature and polarization data. Since Planck is not releasing polarisation data at this time, the polarization map from WMAP9 is used instead. A temperature map is needed to perform the computation nevertheless, and we use here the same commander map. The likelihood is computed using a map-based approximation at low resolution and a master one at intermediate resolution, as in WMAP. The likelihood code actually calls a very slightly modified version of the WMAP9 code. This piece of the likelihood essentially provides a prior on the optical depth and has almost no other impact on cosmological parameter estimation. As such it could be replaced by a simple prior, and a user can decide to do so, which is one of the motivation to leave the three pieces of the CMB likelihood as different data packages; see {{PlanckPapers|planck2013-p08}} section 8.3 for more details. Note that the version of the WMAP code used here (code version v1.0) does not perform any test on the positive definiteness of the TT, TE, EE covariance matrices, and will return a null log likelihood in the unphysical cases where the absolute value of TE is too large. This will be corrected in a later version.<br />
<br />
The ''CAMspec'' likelihood covers the multipoles 50 to 2500 for temperature only. The likelihood is computed using a quadratic approximation, including mode to mode correlations that have been precomputed on a fiducial model. The likelihood uses data from the 100, 143 and 217 GHz channels. To do so it models the foreground at each frequency using the model described in the likelihood paper. Uncertainties on the relative calibration and on the beam transfer functions are included either as parametric models, or marginalized and integrated in the covariance matrix. Detailed description of the different nuisance parameters is given below. Priors are included in the likelihood on the CIB spectral index, relative calibration factors and beam error eigenmodes. See {{PlanckPapers|planck2013-p08}} section 2.1 for more details.<br />
<br />
The ''act/spt'' likelihood covers the multipoles 1500 to 10000 for temperature. It is described in{{BibCite|dun2013}}{{BibCite|Keis2011}}{{BibCite|Reic2012}}. It uses the code and data that can be retrieved from the [http://lambda.gsfc.nasa.gov/ Lambda archive] for [http://lambda.gsfc.nasa.gov/product/act/act_prod_table.cfm ACT] and [http://lambda.gsfc.nasa.gov/product/spt/spt_prod_table.cfm SPT]. It has been slightly modified to use a thermal and kinetic SZ model that matches the one used in CAMspec. As stated in{{BibCite|dun2013}}, the dust parameters a_ge and a_gs must be explored with the following priors: a_ge = 0.8 ± 0.2 and a_gs = 0.4 ± 0.2. Those priors are not included in the log likelihood computed by the code.<br />
<br />
The ''lensing'' likelihood covers the multipoles 40 to 400 using the result of the [[Specially_processed_maps | lensing reconstruction]]. It uses a quadratic approximation for the likelihood, with a covariance matrix including the marginalized contribution of the beam transfer function uncertainties, the diffuse point source correction uncertainties and the cosmological model uncertainty affecting the first order non-gaussian bias (N1). The correlation between temperature and lensing is not taken into account. Cosmological uncertainty effects on the normalization are dealt with using a first order renormalization procedure. This means that the code will need both the TT and $\phi\phi$ power spectrum up to <math>\ell</math> = 2048 to correctly perform the integrals needed for the renormalization. Nevertheless, the code will only produce an estimate based on the data between <math>\ell</math> = 40 to 400. See {{PlanckPapers|planck2013-p12}} section 6.1 for more details.<br />
</span><br />
<span style="color:red">OUTSTANDING: description of likelihood masks </span><br />
==Production process==<br />
<br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
The code is based on some basic routines from the libpmc library in the [http://arxiv.org/abs/1101.0950 cosmoPMC] code. It also uses some code from the [http://lambda.gsfc.nasa.gov/product/map/dr5/likelihood_get.cfm WMAP9 likelihood] for the lowlike likelihood and{{BibCite|dun2013}}{{BibCite|Keis2011}}{{BibCite|Reic2012}} for the act/spt one. The rest of the code has been specifically written for the Planck data. Each likelihood file has been processed using a different and dedicated pipeline as described in the likelihood paper {{PlanckPapers|planck2013-p08}} (section 2 and 8) and in the lensing paper {{PlanckPapers|planck2013-p12}} (section 6.1). We refer the reader to those papers for full details. The data are then encapsulated into the specific file format.<br />
<br />
Each dataset comes with its own self check. Whenever the code is used to read a data file, a computation will be done against an included test spectrum/nuisance parameter, and the log-likelihood will be displayed along with the expected result. Difference of the order of 10<math>^{-6}</math> or less are expected depending of the architecture.<br />
<br />
==Inputs==<br />
<br />
===Likelihood===<br />
<br />
; ''commander'' :<br />
* all Planck channels maps<br />
* compact source catalogs<br />
* common masks<br />
* beam transfer functions for all channels<br />
<br />
; ''lowlike'' :<br />
* WMAP9 likelihood data<br />
* Low-<math>\ell</math> Commander map<br />
<br />
; ''CAMspec'' :<br />
* 100, 143 and 217 GHz detector and detsets maps<br />
* 857GHz channel map<br />
* compact source catalog<br />
* common masks (0,1 & 3)<br />
* beam transfer function and error eigenmodes and covariance for 100, 143 and 217 GHz detectors & detsets<br />
* theoretical templates for the tSZ and kSZ contributions<br />
* color corrections for the CIB emission for the 143 and 217GHz detectors and detsets<br />
* fiducial CMB model (bootstrapped from WMAP7 best fit spectrum) estimated noise contribution from the half-ring maps for 100, 143 and 217 GHz<br />
<br />
; ''lensing'' :<br />
* the lensing map<br />
* beam error eigenmodes and covariance for the 143 and 217GHz channel maps<br />
* fiducial CMB model (from Planck cosmological parameter best fit)<br />
<br />
; ''act/spt'' :<br />
* data and code from [http://lambda.gsfc.nasa.gov/product/act/act_fulllikelihood_get.cfm here]<br />
* the tSZ andkSZ template are changed to match those of CAMspec<br />
<br />
== File names and Meta data ==<br />
<br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
<br />
'''Likelihood source code'''<br />
<br />
The source code is in the file<br />
: {{PLASingleFile |fileType=cosmo|name=COM_Code_Likelihood-v1.0_R1.10.tar.gz|link=COM_Code_Likelihood-v1.0_R1.10.tar.gz}} (C, f90 and python likelihood library and tools)<br />
<br />
'''Likelihood data packages'''<br />
<br />
The {{PLALikelihood|type=Data|link=data packages}} are<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-commander_R1.10.tar.gz | link=COM_Data_Likelihood-commander_R1.10.tar.gz}}'' (low-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-lowlike_R1.10.tar.gz | link=COM_Data_Likelihood-lowlike_R1.10.tar.gz}}'' (low-ell TE,EE,BB likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-CAMspec_R1.10.tar.gz | link=COM_Data_Likelihood-CAMspec_R1.10.tar.gz}}'' (high-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-actspt_R1.10.tar | link=COM_Data_Likelihood-actspt_R1.10.tar.gz}}'' (high-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-lensing_R1.10.tar.gz | link=COM_Data_Likelihood-lensing_R1.10.tar.gz}}'' (lensing likelihood)<br />
<br />
Untar and unzip all files to recover the code and likelihood data. Each package comes with a README file; follow the instructions inclosed to<br />
build the code and use it. To compute the CMB likelihood one has to sum the log likelihood of each of the commander_v4.1_lm49.clik, lowlike_v222.clik and CAMspec_v6.2TN_2013_02_26.clik, actspt_2013_01.clik. To compute the CMB+lensing likelihood, one has to sum the log likelihood of all 5 files.<br />
<br />
The CMB and lensing likelihood format are different. The CMB files have the termination .clik, the lensing one .clik_lensing. The lensing data being simpler (due to the less detailled modeling permitted by the lower signal-noise), the file is a simple ascii file containing all the data along with comments describing it, and linking the different quantities to the lensing paper. The CMB file format is more complex and must accommodate different forms of data (maps, power spectrum, distribution samples, covariance matrices...). It consists of a tree structure containing the data. At each level of the tree structure a given directory can contain array data (in the form of FITS files or ascii files for strings) and scalar data (joined in a single ascii file "_mdb"). Those files are not user modifiable and do not contain interesting meta data for the user. Tools to manipulate those files are included in the code package as optional python tools. They are documented in the code package.<br />
<br />
'''Likelihood masks'''<br />
<br />
The masks used in the Likelihood paper {{PlanckPapers|planck2013-p08}} are found in<br />
{{PLASingleFile|fileType=map|name=COM_Mask_Likelihood_2048_R1.10.fits|link=COM_Mask_Likelihood_2048_R1.10.fits}}<br />
<br />
which contains ten masks which are written into a single ''BINTABLE'' extension of 10 columns by 50331648 rows (the number of Healpix pixels in an Nside = 2048 map). The structure is as follows, where the column names are the names of the masks: <br />
<br />
{| border="1" cellpadding="3" cellspacing="0" align="center" style="text-align:left" width=800px<br />
|+ '''Likelihodd masks file data structure'''<br />
|- bgcolor="ffdead" <br />
!colspan="4" | 1. EXTNAME = 'MSK-LIKE' : Data columns<br />
|- bgcolor="ffdead" <br />
! Column Name || Data Type || Units || Description<br />
|-<br />
|CL31 || Real*4 || none || mask<br />
|-<br />
|CL39 || Real*4 || none || mask<br />
|-<br />
|CL49 || Real*4 || none || mask<br />
|-<br />
|G22 || Real*4 || none || mask <br />
|-<br />
|G35 || Real*4 || none || mask<br />
|-<br />
|G45 || Real*4 || none || mask<br />
|-<br />
|G56 || Real*4 || none || mask<br />
|-<br />
|G65 || Real*4 || none || mask<br />
|-<br />
|PS96 || Real*4 || none || mask<br />
|-<br />
|PSA82 || Real*4 || none || mask<br />
|-<br />
|- bgcolor="ffdead" <br />
! Keyword || Data Type || Value || Description<br />
|-<br />
|PIXTYPE || string || HEALPIX ||<br />
|-<br />
|COORDSYS || string || GALACTIC ||Coordinate system <br />
|-<br />
|ORDERING || string || NESTED || Healpix ordering<br />
|-<br />
|NSIDE || Int || 2048 || Healpix Nside <br />
|-<br />
|FIRSTPIX || Int*4 || 0 || First pixel number<br />
|-<br />
|LASTPIX || Int*4 || 50331647 || Last pixel number, for LFI and HFI, respectively<br />
<br />
|}<br />
--><br />
== References ==<br />
<References /><br />
<br />
<br />
<br />
[[Category:Mission products|008]]</div>Sgallihttps://wiki.cosmos.esa.int/planckpla2015/index.php?title=CMB_spectrum_%26_Likelihood_Code&diff=11229CMB spectrum & Likelihood Code2015-02-04T16:55:46Z<p>Sgalli: </p>
<hr />
<div>{{DISPLAYTITLE:CMB spectrum and likelihood code}}<br />
<br />
==CMB spectra==<br />
<br />
<br />
===General description===<br />
====TT====<br />
The Planck best-fit CMB temperature power spectrum, shown in figure below, covers the wide range of multipoles <math> \ell </math> = 2-2508. <br />
<span style="color:red"> UPDATE COMMANDER: Over the multipole range <math> \ell </math> = 2–29, the power spectrum is derived from a component-separation algorithm, ''Commander'': applied to maps in the frequency range 30–353 GHz over 91% of the sky {{PlanckPapers|planck2013-p06}} . The asymmetric error bars associated to this spectrum are the 68% confidence limits and include the uncertainties due to foreground subtraction. </span><br />
<br />
For multipoles equal or greater than <math>\ell=30</math>, instead, the spectrum is derived from the ''Plik'' likelihood {{PlanckPapers|planck2014-a13}} by optimally combining the spectra in the frequency range 100-217 GHz, and correcting them for unresolved foregrounds using the best-fit foreground solution from Planck TT+lowP run. . Associated 1-sigma errors include beam uncertainties. Both ''Commander'' and ''Plik'' are described in more details in the sections below.<br />
<br />
[[File: Planck2014 TT Dl NORES bin30 w180mm.jpeg|thumb|center|700px|'''CMB TT spectrum. Logarithmic x-scale up to <math>\ell=30</math>, linear at higher <math>\ell</math>; all points with error bars. The red line is the Planck best-fit primordial power spectrum (cf Planck TT+lowP in Table 3 of {{PlanckPapers|planck2014-a15}}). The blue shaded area shows the uncertainties due to cosmic variance alone.''']]<br />
<br />
====TE and EE====<br />
The Planck best-fit CMB polarization and temperature-polarization cross-correlation power spectra, shown in the figure below, cover the multipole range <math> \ell </math> = 30-1996. The data points relative to the multipole range <math> \ell </math> = 2-29 will be released in a second moment.<br />
Analogously to the TT case, the <math> \ell\ge 30 </math> spectrum is derived from the ''Plik'' likelihood {{PlanckPapers|planck2014-a13}} by optimally combining the spectra in the frequency range 100-217 GHz, and correcting them for unresolved foregrounds using the best-fit foreground solution from Planck TT,TE,EE+lowP run. <br />
<br />
{|style="margin: 0 auto;"<br />
|[[File: Planck2014 EE Dl NORES bin30 w180mm.jpeg|thumb|center|500px|'''CMB EE spectrum. The red line is the Planck best-fit primordial power spectrum (cf Planck TT+lowP in Table 3 of {{PlanckPapers|planck2014-a15}}). The blue shaded area shows the uncertainties due to cosmic variance alone.''']]<br />
|[[File: Planck2014 TE Dl NORES bin30 w180mm.jpeg|thumb|center|500px|'''CMB TE spectrum. The red line is the Planck best-fit primordial power spectrum (cf Planck TT+lowP in Table 3 of {{PlanckPapers|planck2014-a15}}). The blue shaded area shows the uncertainties due to cosmic variance alone.''']]<br />
|}<br />
<br />
===Production process===<br />
<span style="color:red"> UPDATE COMMANDER<br />
The <math>\ell</math> < 50 part of the Planck TT power spectrum is derived from the Commander approach, which implements Bayesian component separation in pixel space, fitting a parametric model to the data by sampling the posterior distribution for the model parameters {{PlanckPapers|planck2013-p06}}. The power spectrum at any multipole <math>\ell</math> is given as the maximum probability point for the posterior <math>C_\ell</math> distribution, marginalized over the other multipoles, and the error bars are 68% confidence level {{PlanckPapers|planck2013-p08}}. </span><br />
<br />
The <math>\ell \ge 30</math> part of the TT, TE and EE power spectra have been derived by the Plik likelihood, a code that implements a pseudo-Cl based technique, extensively described in Sec. 2 and the Appendix of {{PlanckPapers|planck2013-p08}} and {{PlanckPapers|planck2014-a13}}. Frequency spectra are computed as cross-spectra between half-mission maps. Mask and multipole range choices for each frequency spectrum are summarized in Section 3.3 of {{PlanckPapers|planck2014-a15}} and in {{PlanckPapers|planck2014-a13}}. The final power spectrum is an optimal combination of the 100, 143, 143x217 and 217 GHz spectra, corrected for the best-fit unresolved foregrounds and inter-frequency calibration factors, as derived from the full likelihood analysis (for TT we use the best-fit solutions for the nuisance parameters from the Planck+TT+lowP data combination, while for TE and EE we use the best fit from Planck+TT+lowP, cf Table 3 of {{PlanckPapers|planck2014-a15}}). A thorough description of the models of unresolved foregrounds is given in {{PlanckPapers|planck2014-a13}}. The spectrum covariance matrix accounts for cosmic variance and noise contributions, together with beam uncertainties. The <math>\ell \ge 30</math> CMB TT spectrum and associated covariance matrix are available in two formats:<br />
#Unbinned. TT: 2479 bandpowers (<math>\ell=30-2508</math>); TE or EE:1697 bandpowers (<math>\ell=30-1996</math>).<br />
#Binned, in bins of <math> \Delta\ell=30 </math>. TT: 83 bandpowers. TE or EE: 66 bandpowers. We bin the <math> C_\ell </math> power spectrum with a weight proportional to <math> \ell (\ell+1) </math>, so that the <math> C_{\ell_b} </math> binned bandpower centered in <math> \ell_b </math> is: <math> \\ C_{\ell_b}=\Sigma_{\ell \in b} w_{\ell_b\ell} C_\ell \quad \text{with} \quad w_{\ell_b\ell}=\frac{\ell (\ell+1)}{\Sigma_{\ell \in b} \ell (\ell+1)}. \\</math> Equivalently, using the matrix formalism, we can construct the binning matrix B as: <math>\\ B_{\ell_b \ell}=w_{\ell_b\ell} \\ </math> where B is a <math> n_b\times n_\ell</math> matrix, with <math>n_b=83</math> the number of bins and <math>n_\ell=2479</math> the number of unbinned multipoles. Thus: <math> \\ \vec{C}_\mathrm{binned}=B \, \vec{C} \\ \mathrm{cov_\mathrm{binned}}= B\, \mathrm{cov}\, B^T \\ \ell_b=B\, \ell \\ </math> Here, <math> \vec{C}_{binned}\, (\vec{C}) </math> is the vector containing all the binned (unbinned) <math>C_\ell</math> bandpowers, <math>\mathrm{cov} </math> is the covariance matrix and <math>\ell_b</math> is the weighted average multipole in each bin. The binned <math>D_{\ell_B}</math> power spectrum is then calculated as: <math> \\ D_{\ell_b}=\frac{\ell_b (\ell_b+1)}{2\pi} C_{\ell_b} </math>.<br />
<br />
===Inputs===<br />
<span style="color:red"> UPDATE COMMANDER</span><br />
<br />
; Low-l spectrum (<math>\ell < 30</math>):<br />
* frequency maps from 30–353 GHz<br />
* common mask {{PlanckPapers|planck2013-p06}}<br />
* compact sources catalog<br />
<br />
; High-l spectrum (<math>30 \ge 30 \ell \lessim 2500</math>): <br />
<br />
* 100, 143, 143x217 and 217 GHz spectra and their covariance matrix (Sec. 3.3 {{PlanckPapers|planck2014-a15}})<br />
* best-fit foreground templates and inter-frequency calibration factors (Table 3 of {{PlanckPapers|planck2014-a15}})<br />
* Beam transfer function uncertainties {{PlanckPapers|planck2014-a08}}<br />
=== File names and Meta data ===<br />
<br />
<span style="color:red"> CHECK EXTENSION NAMES </span><br />
<br />
The CMB spectrum and its covariance matrix are distributed in a single FITS file named <br />
<!--- * ''{{PLASingleFile | fileType=cosmo | name=COM_PowerSpect_CMB_R2.00.fits | link=COM_PowerSpect_CMB_R1.10.fits}}'' ---><br />
* ''COM_PowerSpect_CMB_R2.nn.fits''<br />
which contains 5 extensions<br />
<br />
; LOW-ELL (BINTABLE)<br />
: with the low ell part of the spectrum, not binned, and for l=2-49. The table columns are<br />
# ''ELL'' (integer): multipole number<br />
# ''D_ELL'' (float): <math>D_l</math> as described below<br />
# ''ERRUP'' (float): the upward uncertainty<br />
# ''ERRDOWN'' (float): the downward uncertainty<br />
<br />
; BINNED HIGH-ELL (BINTABLE) <br />
: with the high-ell part of the spectrum, binned into 83 bins covering <math>\langle l \rangle = 47-2499\ </math> in bins of width <math>l=30</math> (with the exception of the last bin that is smaller). The table columns are as follows:<br />
# ''ELL'' (integer): mean multipole number of bin<br />
# ''L_MIN'' (integer): lowest multipole of bin<br />
# ''L_MAX'' (integer): highest multipole of bin<br />
# ''D_ELL'' (float): <math>D_l<\math> as described below<br />
# ''ERR'' (float): the uncertainty<br />
<br />
;BINNED COV-MAT (IMAGE)<br />
: with the covariance matrix of the high-ell part of the spectrum in a 83x83 pixel image, i.e., covering the same bins as the ''HIGH-ELL'' table. Note that this is the covariance matrix of the <math>C_\ell</math>, not of the <math>D_\ell</math>.<br />
<br />
; UNBINNED HIGH-ELL (BINTABLE) <br />
: with the high-ell part of the spectrum, unbinned, in 2979 bins covering <math>\langle l \rangle = 30-2508\ </math>. The table columns are as follows:<br />
# ''ELL'' (integer): multipole <br />
# ''D_ELL'' (float): $D_l$ as described below<br />
# ''ERR'' (float): the uncertainty<br />
<br />
; UNBINNED COV-MAT (IMAGE)<br />
: with the covariance matrix of the high-ell part of the spectrum in a 2979x2979 pixel image, i.e., covering the same bins as the ''HIGH-ELL'' table. Note that this is the covariance matrix of the <math>C_\ell</math>, not of the <math>D_\ell</math>.<br />
<br />
<br />
The spectra give $D_\ell = \ell(\ell+1)C_\ell / 2\pi$ in units of $\mu\, K^2$, and the covariance matrix is in units of $\mu\, K^4$ (NOTE that the covariance matrix is for the <math>C_\ell</math>, not for the <math>D_\ell</math>). <br />
<br />
The CMB spectrum is also given in a simple text comma-separated file:<br />
* ''{{PLASingleFile | fileType=cosmo | name=COM_PowerSpect_CMB_R1.10.txt |link=COM_PowerSpect_CMB_R1.10.txt}}''<br />
<br />
==Likelihood==<br />
The likelihood will soon be released with an accompanying paper and an Explanatory Supplement update. <br />
<!-- <br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
The likelihood code (and the data that comes with it) used to compute the likelihood of a model that predicts the CMB power spectra, lensing power spectrum, together with some foreground and some instrumental parameters. The data files are built primarily from the Planck mission results, but include also some results from the WMAP-9 data release. The data files are written in a specific format that can only be read by the code. The code consists in a c/f90 library, along with some optional tools in python. The code is used to read the data files, and given model power spectra and nuisance parameters it computes the log likelihood of that model. <br />
<br />
Detailed description of the installation and usage of the likelihood code and data is provided in the package. The package includes five data files: four for the CMB likelihoods and one for the lensing likelihood. All of the likelihoods delivered are described in detail in the {{PlanckPapers|planck2013-p08|1|Power spectrum & Likelihood Paper}} (for the CMB based likelihood) and in the {{PlanckPapers|planck2013-p12|1|Lensing Paper}} (for the lensing likelihood) .<br />
<br />
The CMB full likelihood has been divided into four parts to allow using selectively different ranges of multipoles. It also reflects the fact that the mathematical approximations used for those different parts are very different, as is the underlying data. In detail, we distribute<br />
* one low-<math>\ell</math> temperature only likelihood (commander), <br />
* one low-<math>\ell</math> temperature and polarisation likelihood (lowlike), and <br />
* one higl-<math>\ell</math> likelihood CAMspec. <br />
<br />
The ''Commander'' likelihood covers the multipoles 2 to 49. It uses a semi-analytic method to sample the low-<math>\ell</math> temperature likelihood on an intermediate product of one of the component separated maps. The samples are used along with an analytical approximation of the likelihood posterior to perform the likelihood computation in the code. See {{PlanckPapers|planck2013-p08}} section 8.1 for more details.<br />
<br />
The ''lowlike'' likelihood covers the multipoles 2 to 32 for temperature and polarization data. Since Planck is not releasing polarisation data at this time, the polarization map from WMAP9 is used instead. A temperature map is needed to perform the computation nevertheless, and we use here the same commander map. The likelihood is computed using a map-based approximation at low resolution and a master one at intermediate resolution, as in WMAP. The likelihood code actually calls a very slightly modified version of the WMAP9 code. This piece of the likelihood essentially provides a prior on the optical depth and has almost no other impact on cosmological parameter estimation. As such it could be replaced by a simple prior, and a user can decide to do so, which is one of the motivation to leave the three pieces of the CMB likelihood as different data packages; see {{PlanckPapers|planck2013-p08}} section 8.3 for more details. Note that the version of the WMAP code used here (code version v1.0) does not perform any test on the positive definiteness of the TT, TE, EE covariance matrices, and will return a null log likelihood in the unphysical cases where the absolute value of TE is too large. This will be corrected in a later version.<br />
<br />
The ''CAMspec'' likelihood covers the multipoles 50 to 2500 for temperature only. The likelihood is computed using a quadratic approximation, including mode to mode correlations that have been precomputed on a fiducial model. The likelihood uses data from the 100, 143 and 217 GHz channels. To do so it models the foreground at each frequency using the model described in the likelihood paper. Uncertainties on the relative calibration and on the beam transfer functions are included either as parametric models, or marginalized and integrated in the covariance matrix. Detailed description of the different nuisance parameters is given below. Priors are included in the likelihood on the CIB spectral index, relative calibration factors and beam error eigenmodes. See {{PlanckPapers|planck2013-p08}} section 2.1 for more details.<br />
<br />
The ''act/spt'' likelihood covers the multipoles 1500 to 10000 for temperature. It is described in{{BibCite|dun2013}}{{BibCite|Keis2011}}{{BibCite|Reic2012}}. It uses the code and data that can be retrieved from the [http://lambda.gsfc.nasa.gov/ Lambda archive] for [http://lambda.gsfc.nasa.gov/product/act/act_prod_table.cfm ACT] and [http://lambda.gsfc.nasa.gov/product/spt/spt_prod_table.cfm SPT]. It has been slightly modified to use a thermal and kinetic SZ model that matches the one used in CAMspec. As stated in{{BibCite|dun2013}}, the dust parameters a_ge and a_gs must be explored with the following priors: a_ge = 0.8 ± 0.2 and a_gs = 0.4 ± 0.2. Those priors are not included in the log likelihood computed by the code.<br />
<br />
The ''lensing'' likelihood covers the multipoles 40 to 400 using the result of the [[Specially_processed_maps | lensing reconstruction]]. It uses a quadratic approximation for the likelihood, with a covariance matrix including the marginalized contribution of the beam transfer function uncertainties, the diffuse point source correction uncertainties and the cosmological model uncertainty affecting the first order non-gaussian bias (N1). The correlation between temperature and lensing is not taken into account. Cosmological uncertainty effects on the normalization are dealt with using a first order renormalization procedure. This means that the code will need both the TT and $\phi\phi$ power spectrum up to <math>\ell</math> = 2048 to correctly perform the integrals needed for the renormalization. Nevertheless, the code will only produce an estimate based on the data between <math>\ell</math> = 40 to 400. See {{PlanckPapers|planck2013-p12}} section 6.1 for more details.<br />
</span><br />
<span style="color:red">OUTSTANDING: description of likelihood masks </span><br />
==Production process==<br />
<br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
The code is based on some basic routines from the libpmc library in the [http://arxiv.org/abs/1101.0950 cosmoPMC] code. It also uses some code from the [http://lambda.gsfc.nasa.gov/product/map/dr5/likelihood_get.cfm WMAP9 likelihood] for the lowlike likelihood and{{BibCite|dun2013}}{{BibCite|Keis2011}}{{BibCite|Reic2012}} for the act/spt one. The rest of the code has been specifically written for the Planck data. Each likelihood file has been processed using a different and dedicated pipeline as described in the likelihood paper {{PlanckPapers|planck2013-p08}} (section 2 and 8) and in the lensing paper {{PlanckPapers|planck2013-p12}} (section 6.1). We refer the reader to those papers for full details. The data are then encapsulated into the specific file format.<br />
<br />
Each dataset comes with its own self check. Whenever the code is used to read a data file, a computation will be done against an included test spectrum/nuisance parameter, and the log-likelihood will be displayed along with the expected result. Difference of the order of 10<math>^{-6}</math> or less are expected depending of the architecture.<br />
<br />
==Inputs==<br />
<br />
===Likelihood===<br />
<br />
; ''commander'' :<br />
* all Planck channels maps<br />
* compact source catalogs<br />
* common masks<br />
* beam transfer functions for all channels<br />
<br />
; ''lowlike'' :<br />
* WMAP9 likelihood data<br />
* Low-<math>\ell</math> Commander map<br />
<br />
; ''CAMspec'' :<br />
* 100, 143 and 217 GHz detector and detsets maps<br />
* 857GHz channel map<br />
* compact source catalog<br />
* common masks (0,1 & 3)<br />
* beam transfer function and error eigenmodes and covariance for 100, 143 and 217 GHz detectors & detsets<br />
* theoretical templates for the tSZ and kSZ contributions<br />
* color corrections for the CIB emission for the 143 and 217GHz detectors and detsets<br />
* fiducial CMB model (bootstrapped from WMAP7 best fit spectrum) estimated noise contribution from the half-ring maps for 100, 143 and 217 GHz<br />
<br />
; ''lensing'' :<br />
* the lensing map<br />
* beam error eigenmodes and covariance for the 143 and 217GHz channel maps<br />
* fiducial CMB model (from Planck cosmological parameter best fit)<br />
<br />
; ''act/spt'' :<br />
* data and code from [http://lambda.gsfc.nasa.gov/product/act/act_fulllikelihood_get.cfm here]<br />
* the tSZ andkSZ template are changed to match those of CAMspec<br />
<br />
== File names and Meta data ==<br />
<br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
<br />
'''Likelihood source code'''<br />
<br />
The source code is in the file<br />
: {{PLASingleFile |fileType=cosmo|name=COM_Code_Likelihood-v1.0_R1.10.tar.gz|link=COM_Code_Likelihood-v1.0_R1.10.tar.gz}} (C, f90 and python likelihood library and tools)<br />
<br />
'''Likelihood data packages'''<br />
<br />
The {{PLALikelihood|type=Data|link=data packages}} are<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-commander_R1.10.tar.gz | link=COM_Data_Likelihood-commander_R1.10.tar.gz}}'' (low-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-lowlike_R1.10.tar.gz | link=COM_Data_Likelihood-lowlike_R1.10.tar.gz}}'' (low-ell TE,EE,BB likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-CAMspec_R1.10.tar.gz | link=COM_Data_Likelihood-CAMspec_R1.10.tar.gz}}'' (high-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-actspt_R1.10.tar | link=COM_Data_Likelihood-actspt_R1.10.tar.gz}}'' (high-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-lensing_R1.10.tar.gz | link=COM_Data_Likelihood-lensing_R1.10.tar.gz}}'' (lensing likelihood)<br />
<br />
Untar and unzip all files to recover the code and likelihood data. Each package comes with a README file; follow the instructions inclosed to<br />
build the code and use it. To compute the CMB likelihood one has to sum the log likelihood of each of the commander_v4.1_lm49.clik, lowlike_v222.clik and CAMspec_v6.2TN_2013_02_26.clik, actspt_2013_01.clik. To compute the CMB+lensing likelihood, one has to sum the log likelihood of all 5 files.<br />
<br />
The CMB and lensing likelihood format are different. The CMB files have the termination .clik, the lensing one .clik_lensing. The lensing data being simpler (due to the less detailled modeling permitted by the lower signal-noise), the file is a simple ascii file containing all the data along with comments describing it, and linking the different quantities to the lensing paper. The CMB file format is more complex and must accommodate different forms of data (maps, power spectrum, distribution samples, covariance matrices...). It consists of a tree structure containing the data. At each level of the tree structure a given directory can contain array data (in the form of FITS files or ascii files for strings) and scalar data (joined in a single ascii file "_mdb"). Those files are not user modifiable and do not contain interesting meta data for the user. Tools to manipulate those files are included in the code package as optional python tools. They are documented in the code package.<br />
<br />
'''Likelihood masks'''<br />
<br />
The masks used in the Likelihood paper {{PlanckPapers|planck2013-p08}} are found in<br />
{{PLASingleFile|fileType=map|name=COM_Mask_Likelihood_2048_R1.10.fits|link=COM_Mask_Likelihood_2048_R1.10.fits}}<br />
<br />
which contains ten masks which are written into a single ''BINTABLE'' extension of 10 columns by 50331648 rows (the number of Healpix pixels in an Nside = 2048 map). The structure is as follows, where the column names are the names of the masks: <br />
<br />
{| border="1" cellpadding="3" cellspacing="0" align="center" style="text-align:left" width=800px<br />
|+ '''Likelihodd masks file data structure'''<br />
|- bgcolor="ffdead" <br />
!colspan="4" | 1. EXTNAME = 'MSK-LIKE' : Data columns<br />
|- bgcolor="ffdead" <br />
! Column Name || Data Type || Units || Description<br />
|-<br />
|CL31 || Real*4 || none || mask<br />
|-<br />
|CL39 || Real*4 || none || mask<br />
|-<br />
|CL49 || Real*4 || none || mask<br />
|-<br />
|G22 || Real*4 || none || mask <br />
|-<br />
|G35 || Real*4 || none || mask<br />
|-<br />
|G45 || Real*4 || none || mask<br />
|-<br />
|G56 || Real*4 || none || mask<br />
|-<br />
|G65 || Real*4 || none || mask<br />
|-<br />
|PS96 || Real*4 || none || mask<br />
|-<br />
|PSA82 || Real*4 || none || mask<br />
|-<br />
|- bgcolor="ffdead" <br />
! Keyword || Data Type || Value || Description<br />
|-<br />
|PIXTYPE || string || HEALPIX ||<br />
|-<br />
|COORDSYS || string || GALACTIC ||Coordinate system <br />
|-<br />
|ORDERING || string || NESTED || Healpix ordering<br />
|-<br />
|NSIDE || Int || 2048 || Healpix Nside <br />
|-<br />
|FIRSTPIX || Int*4 || 0 || First pixel number<br />
|-<br />
|LASTPIX || Int*4 || 50331647 || Last pixel number, for LFI and HFI, respectively<br />
<br />
|}<br />
--><br />
== References ==<br />
<References /><br />
<br />
<br />
<br />
[[Category:Mission products|008]]</div>Sgallihttps://wiki.cosmos.esa.int/planckpla2015/index.php?title=CMB_spectrum_%26_Likelihood_Code&diff=11226CMB spectrum & Likelihood Code2015-02-04T16:44:27Z<p>Sgalli: </p>
<hr />
<div>{{DISPLAYTITLE:CMB spectrum and likelihood code}}<br />
<br />
==CMB spectra==<br />
<br />
<br />
===General description===<br />
====TT====<br />
The Planck best-fit CMB temperature power spectrum, shown in figure below, covers the wide range of multipoles <math> \ell </math> = 2-2508. <br />
<span style="color:red"> UPDATE COMMANDER: Over the multipole range <math> \ell </math> = 2–29, the power spectrum is derived from a component-separation algorithm, ''Commander'': applied to maps in the frequency range 30–353 GHz over 91% of the sky {{PlanckPapers|planck2013-p06}} . The asymmetric error bars associated to this spectrum are the 68% confidence limits and include the uncertainties due to foreground subtraction. </span><br />
<br />
For multipoles equal or greater than <math>\ell=30</math>, instead, the spectrum is derived from the ''Plik'' likelihood {{PlanckPapers|planck2014-a13}} by optimally combining the spectra in the frequency range 100-217 GHz, and correcting them for unresolved foregrounds using the best-fit foreground solution from Planck TT+lowP run. . Associated 1-sigma errors include beam uncertainties. Both ''Commander'' and ''Plik'' are described in more details in the sections below.<br />
<br />
[[File: Planck2014 TT Dl NORES bin30 w180mm.jpeg|thumb|center|700px|'''CMB TT spectrum. Logarithmic x-scale up to <math>\ell=30</math>, linear at higher <math>\ell</math>; all points with error bars. The red line is the Planck best-fit primordial power spectrum (cf Planck TT+lowP in Table 3 of {{PlanckPapers|planck2014-a15}}). The blue shaded area shows the uncertainties due to cosmic variance alone.''']]<br />
<br />
====TE and EE====<br />
The Planck best-fit CMB polarization and temperature-polarization cross-correlation power spectra, shown in the figure below, cover the multipole range <math> \ell </math> = 30-1996. The data points relative to the multipole range <math> \ell </math> = 2-29 will be released in a second moment.<br />
Analogously to the TT case, the spectrum is derived from the ''Plik'' likelihood {{PlanckPapers|planck2014-a13}} by optimally combining the spectra in the frequency range 100-217 GHz, and correcting them for unresolved foregrounds using the best-fit foreground solution from Planck TT,TE,EE+lowP run. <br />
<br />
{|style="margin: 0 auto;"<br />
|[[File: Planck2014 EE Dl NORES bin30 w180mm.jpeg|thumb|center|500px|'''CMB EE spectrum. The red line is the Planck best-fit primordial power spectrum (cf Planck TT+lowP in Table 3 of {{PlanckPapers|planck2014-a15}}). The blue shaded area shows the uncertainties due to cosmic variance alone.''']]<br />
|[[File: Planck2014 TE Dl NORES bin30 w180mm.jpeg|thumb|center|500px|'''CMB TE spectrum. The red line is the Planck best-fit primordial power spectrum (cf Planck TT+lowP in Table 3 of {{PlanckPapers|planck2014-a15}}). The blue shaded area shows the uncertainties due to cosmic variance alone.''']]<br />
|}<br />
<br />
===Production process===<br />
<span style="color:red"> UPDATE COMMANDER<br />
The <math>\ell</math> < 50 part of the Planck power spectrum is derived from the Commander approach, which implements Bayesian component separation in pixel space, fitting a parametric model to the data by sampling the posterior distribution for the model parameters {{PlanckPapers|planck2013-p06}}. The power spectrum at any multipole <math>\ell</math> is given as the maximum probability point for the posterior <math>C_\ell</math> distribution, marginalized over the other multipoles, and the error bars are 68% confidence level {{PlanckPapers|planck2013-p08}}. </span><br />
<br />
The <math>\ell</math> > 30 part of the CMB temperature power spectrum has been derived by the Plik likelihood, a code that implements a pseudo-Cl based technique, extensively described in Sec. 2 and the Appendix of {{PlanckPapers|planck2013-p08}}. Frequency spectra are computed as cross-spectra between half-mission maps. Mask and multipole range choices for each frequency spectrum are summarized in Section 3.3 of {{PlanckPapers|planck2014-a15}} and in {{PlanckPapers|planck2014-a13}}. The final power spectrum is an optimal combination of the 100, 143, 143x217 and 217 GHz spectra, corrected for the best-fit unresolved foregrounds and inter-frequency calibration factors, as derived from the full likelihood analysis (cf Planck+TT+lowP in Table 3 of {{PlanckPapers|planck2014-a15}}). A thorough description of the models of unresolved foregrounds is given in {{PlanckPapers|planck2014-a13}}. The spectrum covariance matrix accounts for cosmic variance and noise contributions, together with beam uncertainties. The <math>\ell</math> > 30 CMB TT spectrum and associated covariance matrix are available in two formats:<br />
#Unbinned, with 2479 bandpowers (<math>\ell=30-2508</math>).<br />
#Binned, in bins of <math> \Delta\ell=30 </math>, with 83 bandpowers in total. We bin the <math> C_\ell </math> power spectrum with a weight proportional to <math> \ell (\ell+1) </math>, so that the <math> C_{\ell_b} </math> binned bandpower centered in <math> \ell_b </math> is: <math> \\ C_{\ell_b}=\Sigma_{\ell \in b} w_{\ell_b\ell} C_\ell \quad \text{with} \quad w_{\ell_b\ell}=\frac{\ell (\ell+1)}{\Sigma_{\ell \in b} \ell (\ell+1)}. \\</math> Equivalently, using the matrix formalism, we can construct the binning matrix B as: <math>\\ B_{\ell_b \ell}=w_{\ell_b\ell} \\ </math> where B is a <math> n_b\times n_\ell</math> matrix, with <math>n_b=83</math> the number of bins and <math>n_\ell=2479</math> the number of unbinned multipoles. Thus: <math> \\ \vec{C}_\mathrm{binned}=B \, \vec{C} \\ \mathrm{cov_\mathrm{binned}}= B\, \mathrm{cov}\, B^T \\ \ell_b=B\, \ell \\ </math> Here, <math> \vec{C}_{binned}\, (\vec{C}) </math> is the vector containing all the binned (unbinned) <math>C_\ell</math> bandpowers, <math>\mathrm{cov} </math> is the covariance matrix and <math>\ell_b</math> is the weighted average multipole in each bin. The binned <math>D_{\ell_B}</math> power spectrum is then calculated as: <math> \\ D_{\ell_b}=\frac{\ell_b (\ell_b+1)}{2\pi} C_{\ell_b} </math>.<br />
<br />
===Inputs===<br />
<span style="color:red"> UPDATE COMMANDER</span><br />
<br />
; Low-l spectrum (<math>\ell < 30</math>):<br />
* frequency maps from 30–353 GHz<br />
* common mask {{PlanckPapers|planck2013-p06}}<br />
* compact sources catalog<br />
<br />
; High-l spectrum (<math>30 < \ell < 2500</math>): <br />
<br />
* 100, 143, 143x217 and 217 GHz spectra and their covariance matrix (Sec. 3.3 {{PlanckPapers|planck2014-a15}})<br />
* best-fit foreground templates and inter-frequency calibration factors (Table 3 of {{PlanckPapers|planck2014-a15}})<br />
* Beam transfer function uncertainties {{PlanckPapers|planck2014-a08}}<br />
=== File names and Meta data ===<br />
<br />
<span style="color:red"> CHECK EXTENSION NAMES </span><br />
<br />
The CMB spectrum and its covariance matrix are distributed in a single FITS file named <br />
<!--- * ''{{PLASingleFile | fileType=cosmo | name=COM_PowerSpect_CMB_R2.00.fits | link=COM_PowerSpect_CMB_R1.10.fits}}'' ---><br />
* ''COM_PowerSpect_CMB_R2.nn.fits''<br />
which contains 5 extensions<br />
<br />
; LOW-ELL (BINTABLE)<br />
: with the low ell part of the spectrum, not binned, and for l=2-49. The table columns are<br />
# ''ELL'' (integer): multipole number<br />
# ''D_ELL'' (float): <math>D_l</math> as described below<br />
# ''ERRUP'' (float): the upward uncertainty<br />
# ''ERRDOWN'' (float): the downward uncertainty<br />
<br />
; BINNED HIGH-ELL (BINTABLE) <br />
: with the high-ell part of the spectrum, binned into 83 bins covering <math>\langle l \rangle = 47-2499\ </math> in bins of width <math>l=30</math> (with the exception of the last bin that is smaller). The table columns are as follows:<br />
# ''ELL'' (integer): mean multipole number of bin<br />
# ''L_MIN'' (integer): lowest multipole of bin<br />
# ''L_MAX'' (integer): highest multipole of bin<br />
# ''D_ELL'' (float): <math>D_l<\math> as described below<br />
# ''ERR'' (float): the uncertainty<br />
<br />
;BINNED COV-MAT (IMAGE)<br />
: with the covariance matrix of the high-ell part of the spectrum in a 83x83 pixel image, i.e., covering the same bins as the ''HIGH-ELL'' table. Note that this is the covariance matrix of the <math>C_\ell</math>, not of the <math>D_\ell</math>.<br />
<br />
; UNBINNED HIGH-ELL (BINTABLE) <br />
: with the high-ell part of the spectrum, unbinned, in 2979 bins covering <math>\langle l \rangle = 30-2508\ </math>. The table columns are as follows:<br />
# ''ELL'' (integer): multipole <br />
# ''D_ELL'' (float): $D_l$ as described below<br />
# ''ERR'' (float): the uncertainty<br />
<br />
; UNBINNED COV-MAT (IMAGE)<br />
: with the covariance matrix of the high-ell part of the spectrum in a 2979x2979 pixel image, i.e., covering the same bins as the ''HIGH-ELL'' table. Note that this is the covariance matrix of the <math>C_\ell</math>, not of the <math>D_\ell</math>.<br />
<br />
<br />
The spectra give $D_\ell = \ell(\ell+1)C_\ell / 2\pi$ in units of $\mu\, K^2$, and the covariance matrix is in units of $\mu\, K^4$ (NOTE that the covariance matrix is for the <math>C_\ell</math>, not for the <math>D_\ell</math>). <br />
<br />
The CMB spectrum is also given in a simple text comma-separated file:<br />
* ''{{PLASingleFile | fileType=cosmo | name=COM_PowerSpect_CMB_R1.10.txt |link=COM_PowerSpect_CMB_R1.10.txt}}''<br />
<br />
==Likelihood==<br />
The likelihood will soon be released with an accompanying paper and an Explanatory Supplement update. <br />
<!-- <br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
The likelihood code (and the data that comes with it) used to compute the likelihood of a model that predicts the CMB power spectra, lensing power spectrum, together with some foreground and some instrumental parameters. The data files are built primarily from the Planck mission results, but include also some results from the WMAP-9 data release. The data files are written in a specific format that can only be read by the code. The code consists in a c/f90 library, along with some optional tools in python. The code is used to read the data files, and given model power spectra and nuisance parameters it computes the log likelihood of that model. <br />
<br />
Detailed description of the installation and usage of the likelihood code and data is provided in the package. The package includes five data files: four for the CMB likelihoods and one for the lensing likelihood. All of the likelihoods delivered are described in detail in the {{PlanckPapers|planck2013-p08|1|Power spectrum & Likelihood Paper}} (for the CMB based likelihood) and in the {{PlanckPapers|planck2013-p12|1|Lensing Paper}} (for the lensing likelihood) .<br />
<br />
The CMB full likelihood has been divided into four parts to allow using selectively different ranges of multipoles. It also reflects the fact that the mathematical approximations used for those different parts are very different, as is the underlying data. In detail, we distribute<br />
* one low-<math>\ell</math> temperature only likelihood (commander), <br />
* one low-<math>\ell</math> temperature and polarisation likelihood (lowlike), and <br />
* one higl-<math>\ell</math> likelihood CAMspec. <br />
<br />
The ''Commander'' likelihood covers the multipoles 2 to 49. It uses a semi-analytic method to sample the low-<math>\ell</math> temperature likelihood on an intermediate product of one of the component separated maps. The samples are used along with an analytical approximation of the likelihood posterior to perform the likelihood computation in the code. See {{PlanckPapers|planck2013-p08}} section 8.1 for more details.<br />
<br />
The ''lowlike'' likelihood covers the multipoles 2 to 32 for temperature and polarization data. Since Planck is not releasing polarisation data at this time, the polarization map from WMAP9 is used instead. A temperature map is needed to perform the computation nevertheless, and we use here the same commander map. The likelihood is computed using a map-based approximation at low resolution and a master one at intermediate resolution, as in WMAP. The likelihood code actually calls a very slightly modified version of the WMAP9 code. This piece of the likelihood essentially provides a prior on the optical depth and has almost no other impact on cosmological parameter estimation. As such it could be replaced by a simple prior, and a user can decide to do so, which is one of the motivation to leave the three pieces of the CMB likelihood as different data packages; see {{PlanckPapers|planck2013-p08}} section 8.3 for more details. Note that the version of the WMAP code used here (code version v1.0) does not perform any test on the positive definiteness of the TT, TE, EE covariance matrices, and will return a null log likelihood in the unphysical cases where the absolute value of TE is too large. This will be corrected in a later version.<br />
<br />
The ''CAMspec'' likelihood covers the multipoles 50 to 2500 for temperature only. The likelihood is computed using a quadratic approximation, including mode to mode correlations that have been precomputed on a fiducial model. The likelihood uses data from the 100, 143 and 217 GHz channels. To do so it models the foreground at each frequency using the model described in the likelihood paper. Uncertainties on the relative calibration and on the beam transfer functions are included either as parametric models, or marginalized and integrated in the covariance matrix. Detailed description of the different nuisance parameters is given below. Priors are included in the likelihood on the CIB spectral index, relative calibration factors and beam error eigenmodes. See {{PlanckPapers|planck2013-p08}} section 2.1 for more details.<br />
<br />
The ''act/spt'' likelihood covers the multipoles 1500 to 10000 for temperature. It is described in{{BibCite|dun2013}}{{BibCite|Keis2011}}{{BibCite|Reic2012}}. It uses the code and data that can be retrieved from the [http://lambda.gsfc.nasa.gov/ Lambda archive] for [http://lambda.gsfc.nasa.gov/product/act/act_prod_table.cfm ACT] and [http://lambda.gsfc.nasa.gov/product/spt/spt_prod_table.cfm SPT]. It has been slightly modified to use a thermal and kinetic SZ model that matches the one used in CAMspec. As stated in{{BibCite|dun2013}}, the dust parameters a_ge and a_gs must be explored with the following priors: a_ge = 0.8 ± 0.2 and a_gs = 0.4 ± 0.2. Those priors are not included in the log likelihood computed by the code.<br />
<br />
The ''lensing'' likelihood covers the multipoles 40 to 400 using the result of the [[Specially_processed_maps | lensing reconstruction]]. It uses a quadratic approximation for the likelihood, with a covariance matrix including the marginalized contribution of the beam transfer function uncertainties, the diffuse point source correction uncertainties and the cosmological model uncertainty affecting the first order non-gaussian bias (N1). The correlation between temperature and lensing is not taken into account. Cosmological uncertainty effects on the normalization are dealt with using a first order renormalization procedure. This means that the code will need both the TT and $\phi\phi$ power spectrum up to <math>\ell</math> = 2048 to correctly perform the integrals needed for the renormalization. Nevertheless, the code will only produce an estimate based on the data between <math>\ell</math> = 40 to 400. See {{PlanckPapers|planck2013-p12}} section 6.1 for more details.<br />
</span><br />
<span style="color:red">OUTSTANDING: description of likelihood masks </span><br />
==Production process==<br />
<br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
The code is based on some basic routines from the libpmc library in the [http://arxiv.org/abs/1101.0950 cosmoPMC] code. It also uses some code from the [http://lambda.gsfc.nasa.gov/product/map/dr5/likelihood_get.cfm WMAP9 likelihood] for the lowlike likelihood and{{BibCite|dun2013}}{{BibCite|Keis2011}}{{BibCite|Reic2012}} for the act/spt one. The rest of the code has been specifically written for the Planck data. Each likelihood file has been processed using a different and dedicated pipeline as described in the likelihood paper {{PlanckPapers|planck2013-p08}} (section 2 and 8) and in the lensing paper {{PlanckPapers|planck2013-p12}} (section 6.1). We refer the reader to those papers for full details. The data are then encapsulated into the specific file format.<br />
<br />
Each dataset comes with its own self check. Whenever the code is used to read a data file, a computation will be done against an included test spectrum/nuisance parameter, and the log-likelihood will be displayed along with the expected result. Difference of the order of 10<math>^{-6}</math> or less are expected depending of the architecture.<br />
<br />
==Inputs==<br />
<br />
===Likelihood===<br />
<br />
; ''commander'' :<br />
* all Planck channels maps<br />
* compact source catalogs<br />
* common masks<br />
* beam transfer functions for all channels<br />
<br />
; ''lowlike'' :<br />
* WMAP9 likelihood data<br />
* Low-<math>\ell</math> Commander map<br />
<br />
; ''CAMspec'' :<br />
* 100, 143 and 217 GHz detector and detsets maps<br />
* 857GHz channel map<br />
* compact source catalog<br />
* common masks (0,1 & 3)<br />
* beam transfer function and error eigenmodes and covariance for 100, 143 and 217 GHz detectors & detsets<br />
* theoretical templates for the tSZ and kSZ contributions<br />
* color corrections for the CIB emission for the 143 and 217GHz detectors and detsets<br />
* fiducial CMB model (bootstrapped from WMAP7 best fit spectrum) estimated noise contribution from the half-ring maps for 100, 143 and 217 GHz<br />
<br />
; ''lensing'' :<br />
* the lensing map<br />
* beam error eigenmodes and covariance for the 143 and 217GHz channel maps<br />
* fiducial CMB model (from Planck cosmological parameter best fit)<br />
<br />
; ''act/spt'' :<br />
* data and code from [http://lambda.gsfc.nasa.gov/product/act/act_fulllikelihood_get.cfm here]<br />
* the tSZ andkSZ template are changed to match those of CAMspec<br />
<br />
== File names and Meta data ==<br />
<br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
<br />
'''Likelihood source code'''<br />
<br />
The source code is in the file<br />
: {{PLASingleFile |fileType=cosmo|name=COM_Code_Likelihood-v1.0_R1.10.tar.gz|link=COM_Code_Likelihood-v1.0_R1.10.tar.gz}} (C, f90 and python likelihood library and tools)<br />
<br />
'''Likelihood data packages'''<br />
<br />
The {{PLALikelihood|type=Data|link=data packages}} are<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-commander_R1.10.tar.gz | link=COM_Data_Likelihood-commander_R1.10.tar.gz}}'' (low-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-lowlike_R1.10.tar.gz | link=COM_Data_Likelihood-lowlike_R1.10.tar.gz}}'' (low-ell TE,EE,BB likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-CAMspec_R1.10.tar.gz | link=COM_Data_Likelihood-CAMspec_R1.10.tar.gz}}'' (high-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-actspt_R1.10.tar | link=COM_Data_Likelihood-actspt_R1.10.tar.gz}}'' (high-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-lensing_R1.10.tar.gz | link=COM_Data_Likelihood-lensing_R1.10.tar.gz}}'' (lensing likelihood)<br />
<br />
Untar and unzip all files to recover the code and likelihood data. Each package comes with a README file; follow the instructions inclosed to<br />
build the code and use it. To compute the CMB likelihood one has to sum the log likelihood of each of the commander_v4.1_lm49.clik, lowlike_v222.clik and CAMspec_v6.2TN_2013_02_26.clik, actspt_2013_01.clik. To compute the CMB+lensing likelihood, one has to sum the log likelihood of all 5 files.<br />
<br />
The CMB and lensing likelihood format are different. The CMB files have the termination .clik, the lensing one .clik_lensing. The lensing data being simpler (due to the less detailled modeling permitted by the lower signal-noise), the file is a simple ascii file containing all the data along with comments describing it, and linking the different quantities to the lensing paper. The CMB file format is more complex and must accommodate different forms of data (maps, power spectrum, distribution samples, covariance matrices...). It consists of a tree structure containing the data. At each level of the tree structure a given directory can contain array data (in the form of FITS files or ascii files for strings) and scalar data (joined in a single ascii file "_mdb"). Those files are not user modifiable and do not contain interesting meta data for the user. Tools to manipulate those files are included in the code package as optional python tools. They are documented in the code package.<br />
<br />
'''Likelihood masks'''<br />
<br />
The masks used in the Likelihood paper {{PlanckPapers|planck2013-p08}} are found in<br />
{{PLASingleFile|fileType=map|name=COM_Mask_Likelihood_2048_R1.10.fits|link=COM_Mask_Likelihood_2048_R1.10.fits}}<br />
<br />
which contains ten masks which are written into a single ''BINTABLE'' extension of 10 columns by 50331648 rows (the number of Healpix pixels in an Nside = 2048 map). The structure is as follows, where the column names are the names of the masks: <br />
<br />
{| border="1" cellpadding="3" cellspacing="0" align="center" style="text-align:left" width=800px<br />
|+ '''Likelihodd masks file data structure'''<br />
|- bgcolor="ffdead" <br />
!colspan="4" | 1. EXTNAME = 'MSK-LIKE' : Data columns<br />
|- bgcolor="ffdead" <br />
! Column Name || Data Type || Units || Description<br />
|-<br />
|CL31 || Real*4 || none || mask<br />
|-<br />
|CL39 || Real*4 || none || mask<br />
|-<br />
|CL49 || Real*4 || none || mask<br />
|-<br />
|G22 || Real*4 || none || mask <br />
|-<br />
|G35 || Real*4 || none || mask<br />
|-<br />
|G45 || Real*4 || none || mask<br />
|-<br />
|G56 || Real*4 || none || mask<br />
|-<br />
|G65 || Real*4 || none || mask<br />
|-<br />
|PS96 || Real*4 || none || mask<br />
|-<br />
|PSA82 || Real*4 || none || mask<br />
|-<br />
|- bgcolor="ffdead" <br />
! Keyword || Data Type || Value || Description<br />
|-<br />
|PIXTYPE || string || HEALPIX ||<br />
|-<br />
|COORDSYS || string || GALACTIC ||Coordinate system <br />
|-<br />
|ORDERING || string || NESTED || Healpix ordering<br />
|-<br />
|NSIDE || Int || 2048 || Healpix Nside <br />
|-<br />
|FIRSTPIX || Int*4 || 0 || First pixel number<br />
|-<br />
|LASTPIX || Int*4 || 50331647 || Last pixel number, for LFI and HFI, respectively<br />
<br />
|}<br />
--><br />
== References ==<br />
<References /><br />
<br />
<br />
<br />
[[Category:Mission products|008]]</div>Sgallihttps://wiki.cosmos.esa.int/planckpla2015/index.php?title=CMB_spectrum_%26_Likelihood_Code&diff=11225CMB spectrum & Likelihood Code2015-02-04T16:43:28Z<p>Sgalli: </p>
<hr />
<div>{{DISPLAYTITLE:CMB spectrum and likelihood code}}<br />
<br />
==CMB spectra==<br />
<br />
<br />
===General description===<br />
====TT====<br />
The Planck best-fit CMB temperature power spectrum, shown in figure below, covers the wide range of multipoles <math> \ell </math> = 2-2508. <br />
<span style="color:red"> UPDATE COMMANDER: Over the multipole range <math> \ell </math> = 2–29, the power spectrum is derived from a component-separation algorithm, ''Commander'': applied to maps in the frequency range 30–353 GHz over 91% of the sky {{PlanckPapers|planck2013-p06}} . The asymmetric error bars associated to this spectrum are the 68% confidence limits and include the uncertainties due to foreground subtraction. </span><br />
<br />
For multipoles equal or greater than <math>\ell=30</math>, instead, the spectrum is derived from the ''Plik'' likelihood {{PlanckPapers|planck2014-a13}} by optimally combining the spectra in the frequency range 100-217 GHz, and correcting them for unresolved foregrounds using the best-fit foreground solution from Planck TT+lowP run. . Associated 1-sigma errors include beam uncertainties. Both ''Commander'' and ''Plik'' are described in more details in the sections below.<br />
<br />
[[File: Planck2014 TT Dl NORES bin30 w180mm.jpeg|thumb|center|700px|'''CMB TT spectrum. Logarithmic x-scale up to <math>\ell=30</math>, linear at higher <math>\ell</math>; all points with error bars. The red line is the Planck best-fit primordial power spectrum (cf Planck TT+lowP in Table 3 of {{PlanckPapers|planck2014-a15}}). The blue shaded area shows the uncertainties due to cosmic variance alone.''']]<br />
<br />
====TE and EE====<br />
The Planck best-fit CMB polarization and temperature-polarization cross-correlation power spectra, shown in the figure below, cover the multipole range <math> \ell </math> = 30-1996. The data points relative to the multipole range <math> \ell </math> = 2-29 will be released in a second moment.<br />
Analogously to the TT case, the spectrum is derived from the ''Plik'' likelihood {{PlanckPapers|planck2014-a13}} by optimally combining the spectra in the frequency range 100-217 GHz, and correcting them for unresolved foregrounds using the best-fit foreground solution from Planck TT,TE,EE+lowP run. <br />
<br />
{|style="margin: 0 auto;"<br />
|[[File: Planck2014 EE Dl NORES bin30 w180mm.jpeg|thumb|center|350px|'''CMB EE spectrum. The red line is the Planck best-fit primordial power spectrum (cf Planck TT+lowP in Table 3 of {{PlanckPapers|planck2014-a15}}). The blue shaded area shows the uncertainties due to cosmic variance alone.''']]<br />
|[[File: Planck2014 TE Dl NORES bin30 w180mm.jpeg|thumb|center|350px|'''CMB TE spectrum. The red line is the Planck best-fit primordial power spectrum (cf Planck TT+lowP in Table 3 of {{PlanckPapers|planck2014-a15}}). The blue shaded area shows the uncertainties due to cosmic variance alone.''']]<br />
|}<br />
<br />
===Production process===<br />
<span style="color:red"> UPDATE COMMANDER<br />
The <math>\ell</math> < 50 part of the Planck power spectrum is derived from the Commander approach, which implements Bayesian component separation in pixel space, fitting a parametric model to the data by sampling the posterior distribution for the model parameters {{PlanckPapers|planck2013-p06}}. The power spectrum at any multipole <math>\ell</math> is given as the maximum probability point for the posterior <math>C_\ell</math> distribution, marginalized over the other multipoles, and the error bars are 68% confidence level {{PlanckPapers|planck2013-p08}}. </span><br />
<br />
The <math>\ell</math> > 30 part of the CMB temperature power spectrum has been derived by the Plik likelihood, a code that implements a pseudo-Cl based technique, extensively described in Sec. 2 and the Appendix of {{PlanckPapers|planck2013-p08}}. Frequency spectra are computed as cross-spectra between half-mission maps. Mask and multipole range choices for each frequency spectrum are summarized in Section 3.3 of {{PlanckPapers|planck2014-a15}} and in {{PlanckPapers|planck2014-a13}}. The final power spectrum is an optimal combination of the 100, 143, 143x217 and 217 GHz spectra, corrected for the best-fit unresolved foregrounds and inter-frequency calibration factors, as derived from the full likelihood analysis (cf Planck+TT+lowP in Table 3 of {{PlanckPapers|planck2014-a15}}). A thorough description of the models of unresolved foregrounds is given in {{PlanckPapers|planck2014-a13}}. The spectrum covariance matrix accounts for cosmic variance and noise contributions, together with beam uncertainties. The <math>\ell</math> > 30 CMB TT spectrum and associated covariance matrix are available in two formats:<br />
#Unbinned, with 2479 bandpowers (<math>\ell=30-2508</math>).<br />
#Binned, in bins of <math> \Delta\ell=30 </math>, with 83 bandpowers in total. We bin the <math> C_\ell </math> power spectrum with a weight proportional to <math> \ell (\ell+1) </math>, so that the <math> C_{\ell_b} </math> binned bandpower centered in <math> \ell_b </math> is: <math> \\ C_{\ell_b}=\Sigma_{\ell \in b} w_{\ell_b\ell} C_\ell \quad \text{with} \quad w_{\ell_b\ell}=\frac{\ell (\ell+1)}{\Sigma_{\ell \in b} \ell (\ell+1)}. \\</math> Equivalently, using the matrix formalism, we can construct the binning matrix B as: <math>\\ B_{\ell_b \ell}=w_{\ell_b\ell} \\ </math> where B is a <math> n_b\times n_\ell</math> matrix, with <math>n_b=83</math> the number of bins and <math>n_\ell=2479</math> the number of unbinned multipoles. Thus: <math> \\ \vec{C}_\mathrm{binned}=B \, \vec{C} \\ \mathrm{cov_\mathrm{binned}}= B\, \mathrm{cov}\, B^T \\ \ell_b=B\, \ell \\ </math> Here, <math> \vec{C}_{binned}\, (\vec{C}) </math> is the vector containing all the binned (unbinned) <math>C_\ell</math> bandpowers, <math>\mathrm{cov} </math> is the covariance matrix and <math>\ell_b</math> is the weighted average multipole in each bin. The binned <math>D_{\ell_B}</math> power spectrum is then calculated as: <math> \\ D_{\ell_b}=\frac{\ell_b (\ell_b+1)}{2\pi} C_{\ell_b} </math>.<br />
<br />
===Inputs===<br />
<span style="color:red"> UPDATE COMMANDER</span><br />
<br />
; Low-l spectrum (<math>\ell < 30</math>):<br />
* frequency maps from 30–353 GHz<br />
* common mask {{PlanckPapers|planck2013-p06}}<br />
* compact sources catalog<br />
<br />
; High-l spectrum (<math>30 < \ell < 2500</math>): <br />
<br />
* 100, 143, 143x217 and 217 GHz spectra and their covariance matrix (Sec. 3.3 {{PlanckPapers|planck2014-a15}})<br />
* best-fit foreground templates and inter-frequency calibration factors (Table 3 of {{PlanckPapers|planck2014-a15}})<br />
* Beam transfer function uncertainties {{PlanckPapers|planck2014-a08}}<br />
=== File names and Meta data ===<br />
<br />
<span style="color:red"> CHECK EXTENSION NAMES </span><br />
<br />
The CMB spectrum and its covariance matrix are distributed in a single FITS file named <br />
<!--- * ''{{PLASingleFile | fileType=cosmo | name=COM_PowerSpect_CMB_R2.00.fits | link=COM_PowerSpect_CMB_R1.10.fits}}'' ---><br />
* ''COM_PowerSpect_CMB_R2.nn.fits''<br />
which contains 5 extensions<br />
<br />
; LOW-ELL (BINTABLE)<br />
: with the low ell part of the spectrum, not binned, and for l=2-49. The table columns are<br />
# ''ELL'' (integer): multipole number<br />
# ''D_ELL'' (float): <math>D_l</math> as described below<br />
# ''ERRUP'' (float): the upward uncertainty<br />
# ''ERRDOWN'' (float): the downward uncertainty<br />
<br />
; BINNED HIGH-ELL (BINTABLE) <br />
: with the high-ell part of the spectrum, binned into 83 bins covering <math>\langle l \rangle = 47-2499\ </math> in bins of width <math>l=30</math> (with the exception of the last bin that is smaller). The table columns are as follows:<br />
# ''ELL'' (integer): mean multipole number of bin<br />
# ''L_MIN'' (integer): lowest multipole of bin<br />
# ''L_MAX'' (integer): highest multipole of bin<br />
# ''D_ELL'' (float): <math>D_l<\math> as described below<br />
# ''ERR'' (float): the uncertainty<br />
<br />
;BINNED COV-MAT (IMAGE)<br />
: with the covariance matrix of the high-ell part of the spectrum in a 83x83 pixel image, i.e., covering the same bins as the ''HIGH-ELL'' table. Note that this is the covariance matrix of the <math>C_\ell</math>, not of the <math>D_\ell</math>.<br />
<br />
; UNBINNED HIGH-ELL (BINTABLE) <br />
: with the high-ell part of the spectrum, unbinned, in 2979 bins covering <math>\langle l \rangle = 30-2508\ </math>. The table columns are as follows:<br />
# ''ELL'' (integer): multipole <br />
# ''D_ELL'' (float): $D_l$ as described below<br />
# ''ERR'' (float): the uncertainty<br />
<br />
; UNBINNED COV-MAT (IMAGE)<br />
: with the covariance matrix of the high-ell part of the spectrum in a 2979x2979 pixel image, i.e., covering the same bins as the ''HIGH-ELL'' table. Note that this is the covariance matrix of the <math>C_\ell</math>, not of the <math>D_\ell</math>.<br />
<br />
<br />
The spectra give $D_\ell = \ell(\ell+1)C_\ell / 2\pi$ in units of $\mu\, K^2$, and the covariance matrix is in units of $\mu\, K^4$ (NOTE that the covariance matrix is for the <math>C_\ell</math>, not for the <math>D_\ell</math>). <br />
<br />
The CMB spectrum is also given in a simple text comma-separated file:<br />
* ''{{PLASingleFile | fileType=cosmo | name=COM_PowerSpect_CMB_R1.10.txt |link=COM_PowerSpect_CMB_R1.10.txt}}''<br />
<br />
==Likelihood==<br />
The likelihood will soon be released with an accompanying paper and an Explanatory Supplement update. <br />
<!-- <br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
The likelihood code (and the data that comes with it) used to compute the likelihood of a model that predicts the CMB power spectra, lensing power spectrum, together with some foreground and some instrumental parameters. The data files are built primarily from the Planck mission results, but include also some results from the WMAP-9 data release. The data files are written in a specific format that can only be read by the code. The code consists in a c/f90 library, along with some optional tools in python. The code is used to read the data files, and given model power spectra and nuisance parameters it computes the log likelihood of that model. <br />
<br />
Detailed description of the installation and usage of the likelihood code and data is provided in the package. The package includes five data files: four for the CMB likelihoods and one for the lensing likelihood. All of the likelihoods delivered are described in detail in the {{PlanckPapers|planck2013-p08|1|Power spectrum & Likelihood Paper}} (for the CMB based likelihood) and in the {{PlanckPapers|planck2013-p12|1|Lensing Paper}} (for the lensing likelihood) .<br />
<br />
The CMB full likelihood has been divided into four parts to allow using selectively different ranges of multipoles. It also reflects the fact that the mathematical approximations used for those different parts are very different, as is the underlying data. In detail, we distribute<br />
* one low-<math>\ell</math> temperature only likelihood (commander), <br />
* one low-<math>\ell</math> temperature and polarisation likelihood (lowlike), and <br />
* one higl-<math>\ell</math> likelihood CAMspec. <br />
<br />
The ''Commander'' likelihood covers the multipoles 2 to 49. It uses a semi-analytic method to sample the low-<math>\ell</math> temperature likelihood on an intermediate product of one of the component separated maps. The samples are used along with an analytical approximation of the likelihood posterior to perform the likelihood computation in the code. See {{PlanckPapers|planck2013-p08}} section 8.1 for more details.<br />
<br />
The ''lowlike'' likelihood covers the multipoles 2 to 32 for temperature and polarization data. Since Planck is not releasing polarisation data at this time, the polarization map from WMAP9 is used instead. A temperature map is needed to perform the computation nevertheless, and we use here the same commander map. The likelihood is computed using a map-based approximation at low resolution and a master one at intermediate resolution, as in WMAP. The likelihood code actually calls a very slightly modified version of the WMAP9 code. This piece of the likelihood essentially provides a prior on the optical depth and has almost no other impact on cosmological parameter estimation. As such it could be replaced by a simple prior, and a user can decide to do so, which is one of the motivation to leave the three pieces of the CMB likelihood as different data packages; see {{PlanckPapers|planck2013-p08}} section 8.3 for more details. Note that the version of the WMAP code used here (code version v1.0) does not perform any test on the positive definiteness of the TT, TE, EE covariance matrices, and will return a null log likelihood in the unphysical cases where the absolute value of TE is too large. This will be corrected in a later version.<br />
<br />
The ''CAMspec'' likelihood covers the multipoles 50 to 2500 for temperature only. The likelihood is computed using a quadratic approximation, including mode to mode correlations that have been precomputed on a fiducial model. The likelihood uses data from the 100, 143 and 217 GHz channels. To do so it models the foreground at each frequency using the model described in the likelihood paper. Uncertainties on the relative calibration and on the beam transfer functions are included either as parametric models, or marginalized and integrated in the covariance matrix. Detailed description of the different nuisance parameters is given below. Priors are included in the likelihood on the CIB spectral index, relative calibration factors and beam error eigenmodes. See {{PlanckPapers|planck2013-p08}} section 2.1 for more details.<br />
<br />
The ''act/spt'' likelihood covers the multipoles 1500 to 10000 for temperature. It is described in{{BibCite|dun2013}}{{BibCite|Keis2011}}{{BibCite|Reic2012}}. It uses the code and data that can be retrieved from the [http://lambda.gsfc.nasa.gov/ Lambda archive] for [http://lambda.gsfc.nasa.gov/product/act/act_prod_table.cfm ACT] and [http://lambda.gsfc.nasa.gov/product/spt/spt_prod_table.cfm SPT]. It has been slightly modified to use a thermal and kinetic SZ model that matches the one used in CAMspec. As stated in{{BibCite|dun2013}}, the dust parameters a_ge and a_gs must be explored with the following priors: a_ge = 0.8 ± 0.2 and a_gs = 0.4 ± 0.2. Those priors are not included in the log likelihood computed by the code.<br />
<br />
The ''lensing'' likelihood covers the multipoles 40 to 400 using the result of the [[Specially_processed_maps | lensing reconstruction]]. It uses a quadratic approximation for the likelihood, with a covariance matrix including the marginalized contribution of the beam transfer function uncertainties, the diffuse point source correction uncertainties and the cosmological model uncertainty affecting the first order non-gaussian bias (N1). The correlation between temperature and lensing is not taken into account. Cosmological uncertainty effects on the normalization are dealt with using a first order renormalization procedure. This means that the code will need both the TT and $\phi\phi$ power spectrum up to <math>\ell</math> = 2048 to correctly perform the integrals needed for the renormalization. Nevertheless, the code will only produce an estimate based on the data between <math>\ell</math> = 40 to 400. See {{PlanckPapers|planck2013-p12}} section 6.1 for more details.<br />
</span><br />
<span style="color:red">OUTSTANDING: description of likelihood masks </span><br />
==Production process==<br />
<br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
The code is based on some basic routines from the libpmc library in the [http://arxiv.org/abs/1101.0950 cosmoPMC] code. It also uses some code from the [http://lambda.gsfc.nasa.gov/product/map/dr5/likelihood_get.cfm WMAP9 likelihood] for the lowlike likelihood and{{BibCite|dun2013}}{{BibCite|Keis2011}}{{BibCite|Reic2012}} for the act/spt one. The rest of the code has been specifically written for the Planck data. Each likelihood file has been processed using a different and dedicated pipeline as described in the likelihood paper {{PlanckPapers|planck2013-p08}} (section 2 and 8) and in the lensing paper {{PlanckPapers|planck2013-p12}} (section 6.1). We refer the reader to those papers for full details. The data are then encapsulated into the specific file format.<br />
<br />
Each dataset comes with its own self check. Whenever the code is used to read a data file, a computation will be done against an included test spectrum/nuisance parameter, and the log-likelihood will be displayed along with the expected result. Difference of the order of 10<math>^{-6}</math> or less are expected depending of the architecture.<br />
<br />
==Inputs==<br />
<br />
===Likelihood===<br />
<br />
; ''commander'' :<br />
* all Planck channels maps<br />
* compact source catalogs<br />
* common masks<br />
* beam transfer functions for all channels<br />
<br />
; ''lowlike'' :<br />
* WMAP9 likelihood data<br />
* Low-<math>\ell</math> Commander map<br />
<br />
; ''CAMspec'' :<br />
* 100, 143 and 217 GHz detector and detsets maps<br />
* 857GHz channel map<br />
* compact source catalog<br />
* common masks (0,1 & 3)<br />
* beam transfer function and error eigenmodes and covariance for 100, 143 and 217 GHz detectors & detsets<br />
* theoretical templates for the tSZ and kSZ contributions<br />
* color corrections for the CIB emission for the 143 and 217GHz detectors and detsets<br />
* fiducial CMB model (bootstrapped from WMAP7 best fit spectrum) estimated noise contribution from the half-ring maps for 100, 143 and 217 GHz<br />
<br />
; ''lensing'' :<br />
* the lensing map<br />
* beam error eigenmodes and covariance for the 143 and 217GHz channel maps<br />
* fiducial CMB model (from Planck cosmological parameter best fit)<br />
<br />
; ''act/spt'' :<br />
* data and code from [http://lambda.gsfc.nasa.gov/product/act/act_fulllikelihood_get.cfm here]<br />
* the tSZ andkSZ template are changed to match those of CAMspec<br />
<br />
== File names and Meta data ==<br />
<br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
<br />
'''Likelihood source code'''<br />
<br />
The source code is in the file<br />
: {{PLASingleFile |fileType=cosmo|name=COM_Code_Likelihood-v1.0_R1.10.tar.gz|link=COM_Code_Likelihood-v1.0_R1.10.tar.gz}} (C, f90 and python likelihood library and tools)<br />
<br />
'''Likelihood data packages'''<br />
<br />
The {{PLALikelihood|type=Data|link=data packages}} are<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-commander_R1.10.tar.gz | link=COM_Data_Likelihood-commander_R1.10.tar.gz}}'' (low-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-lowlike_R1.10.tar.gz | link=COM_Data_Likelihood-lowlike_R1.10.tar.gz}}'' (low-ell TE,EE,BB likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-CAMspec_R1.10.tar.gz | link=COM_Data_Likelihood-CAMspec_R1.10.tar.gz}}'' (high-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-actspt_R1.10.tar | link=COM_Data_Likelihood-actspt_R1.10.tar.gz}}'' (high-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-lensing_R1.10.tar.gz | link=COM_Data_Likelihood-lensing_R1.10.tar.gz}}'' (lensing likelihood)<br />
<br />
Untar and unzip all files to recover the code and likelihood data. Each package comes with a README file; follow the instructions inclosed to<br />
build the code and use it. To compute the CMB likelihood one has to sum the log likelihood of each of the commander_v4.1_lm49.clik, lowlike_v222.clik and CAMspec_v6.2TN_2013_02_26.clik, actspt_2013_01.clik. To compute the CMB+lensing likelihood, one has to sum the log likelihood of all 5 files.<br />
<br />
The CMB and lensing likelihood format are different. The CMB files have the termination .clik, the lensing one .clik_lensing. The lensing data being simpler (due to the less detailled modeling permitted by the lower signal-noise), the file is a simple ascii file containing all the data along with comments describing it, and linking the different quantities to the lensing paper. The CMB file format is more complex and must accommodate different forms of data (maps, power spectrum, distribution samples, covariance matrices...). It consists of a tree structure containing the data. At each level of the tree structure a given directory can contain array data (in the form of FITS files or ascii files for strings) and scalar data (joined in a single ascii file "_mdb"). Those files are not user modifiable and do not contain interesting meta data for the user. Tools to manipulate those files are included in the code package as optional python tools. They are documented in the code package.<br />
<br />
'''Likelihood masks'''<br />
<br />
The masks used in the Likelihood paper {{PlanckPapers|planck2013-p08}} are found in<br />
{{PLASingleFile|fileType=map|name=COM_Mask_Likelihood_2048_R1.10.fits|link=COM_Mask_Likelihood_2048_R1.10.fits}}<br />
<br />
which contains ten masks which are written into a single ''BINTABLE'' extension of 10 columns by 50331648 rows (the number of Healpix pixels in an Nside = 2048 map). The structure is as follows, where the column names are the names of the masks: <br />
<br />
{| border="1" cellpadding="3" cellspacing="0" align="center" style="text-align:left" width=800px<br />
|+ '''Likelihodd masks file data structure'''<br />
|- bgcolor="ffdead" <br />
!colspan="4" | 1. EXTNAME = 'MSK-LIKE' : Data columns<br />
|- bgcolor="ffdead" <br />
! Column Name || Data Type || Units || Description<br />
|-<br />
|CL31 || Real*4 || none || mask<br />
|-<br />
|CL39 || Real*4 || none || mask<br />
|-<br />
|CL49 || Real*4 || none || mask<br />
|-<br />
|G22 || Real*4 || none || mask <br />
|-<br />
|G35 || Real*4 || none || mask<br />
|-<br />
|G45 || Real*4 || none || mask<br />
|-<br />
|G56 || Real*4 || none || mask<br />
|-<br />
|G65 || Real*4 || none || mask<br />
|-<br />
|PS96 || Real*4 || none || mask<br />
|-<br />
|PSA82 || Real*4 || none || mask<br />
|-<br />
|- bgcolor="ffdead" <br />
! Keyword || Data Type || Value || Description<br />
|-<br />
|PIXTYPE || string || HEALPIX ||<br />
|-<br />
|COORDSYS || string || GALACTIC ||Coordinate system <br />
|-<br />
|ORDERING || string || NESTED || Healpix ordering<br />
|-<br />
|NSIDE || Int || 2048 || Healpix Nside <br />
|-<br />
|FIRSTPIX || Int*4 || 0 || First pixel number<br />
|-<br />
|LASTPIX || Int*4 || 50331647 || Last pixel number, for LFI and HFI, respectively<br />
<br />
|}<br />
--><br />
== References ==<br />
<References /><br />
<br />
<br />
<br />
[[Category:Mission products|008]]</div>Sgallihttps://wiki.cosmos.esa.int/planckpla2015/index.php?title=File:Planck2014_TE_Dl_NORES_bin30_w180mm.jpeg&diff=11223File:Planck2014 TE Dl NORES bin30 w180mm.jpeg2015-02-04T16:41:03Z<p>Sgalli: </p>
<hr />
<div></div>Sgallihttps://wiki.cosmos.esa.int/planckpla2015/index.php?title=File:Planck2014_EE_Dl_NORES_bin30_w180mm.jpeg&diff=11222File:Planck2014 EE Dl NORES bin30 w180mm.jpeg2015-02-04T16:40:16Z<p>Sgalli: </p>
<hr />
<div></div>Sgallihttps://wiki.cosmos.esa.int/planckpla2015/index.php?title=CMB_spectrum_%26_Likelihood_Code&diff=11221CMB spectrum & Likelihood Code2015-02-04T16:39:12Z<p>Sgalli: </p>
<hr />
<div>{{DISPLAYTITLE:CMB spectrum and likelihood code}}<br />
<br />
==CMB spectra==<br />
<br />
<br />
===General description===<br />
====TT====<br />
The Planck best-fit CMB temperature power spectrum, shown in figure below, covers the wide range of multipoles <math> \ell </math> = 2-2508. <br />
<span style="color:red"> UPDATE COMMANDER: Over the multipole range <math> \ell </math> = 2–29, the power spectrum is derived from a component-separation algorithm, ''Commander'': applied to maps in the frequency range 30–353 GHz over 91% of the sky {{PlanckPapers|planck2013-p06}} . The asymmetric error bars associated to this spectrum are the 68% confidence limits and include the uncertainties due to foreground subtraction. </span><br />
<br />
For multipoles equal or greater than <math>\ell=30</math>, instead, the spectrum is derived from the ''Plik'' likelihood {{PlanckPapers|planck2014-a13}} by optimally combining the spectra in the frequency range 100-217 GHz, and correcting them for unresolved foregrounds using the best-fit foreground solution from Planck TT+lowP run. . Associated 1-sigma errors include beam uncertainties. Both ''Commander'' and ''Plik'' are described in more details in the sections below.<br />
<br />
[[File: Planck2014 TT Dl NORES bin30 w180mm.jpeg|thumb|center|700px|'''CMB TT spectrum. Logarithmic x-scale up to <math>\ell=30</math>, linear at higher <math>\ell</math>; all points with error bars. The red line is the Planck best-fit primordial power spectrum (cf Planck TT+lowP in Table 3 of {{PlanckPapers|planck2014-a15}}). The blue shaded area shows the uncertainties due to cosmic variance alone.''']]<br />
<br />
====TE and EE====<br />
The Planck best-fit CMB polarization and temperature-polarization cross-correlation power spectra, shown in the figure below, cover the multipole range <math> \ell </math> = 30-1996. The data points relative to the multipole range <math> \ell </math> = 2-29 will be released in a second moment.<br />
Analogously to the TT case, the spectrum is derived from the ''Plik'' likelihood {{PlanckPapers|planck2014-a13}} by optimally combining the spectra in the frequency range 100-217 GHz, and correcting them for unresolved foregrounds using the best-fit foreground solution from Planck TT,TE,EE+lowP run. <br />
<br />
<br />
[[File: Planck2014 EE Dl NORES bin30 w180mm.jpeg|thumb|center|350px|'''CMB EE spectrum. The red line is the Planck best-fit primordial power spectrum (cf Planck TT+lowP in Table 3 of {{PlanckPapers|planck2014-a15}}). The blue shaded area shows the uncertainties due to cosmic variance alone.''']]<br />
<br />
[[File: Planck2014 TE Dl NORES bin30 w180mm.jpeg|thumb|center|350px|'''CMB TE spectrum. The red line is the Planck best-fit primordial power spectrum (cf Planck TT+lowP in Table 3 of {{PlanckPapers|planck2014-a15}}). The blue shaded area shows the uncertainties due to cosmic variance alone.''']]<br />
<br />
<br />
===Production process===<br />
<span style="color:red"> UPDATE COMMANDER<br />
The <math>\ell</math> < 50 part of the Planck power spectrum is derived from the Commander approach, which implements Bayesian component separation in pixel space, fitting a parametric model to the data by sampling the posterior distribution for the model parameters {{PlanckPapers|planck2013-p06}}. The power spectrum at any multipole <math>\ell</math> is given as the maximum probability point for the posterior <math>C_\ell</math> distribution, marginalized over the other multipoles, and the error bars are 68% confidence level {{PlanckPapers|planck2013-p08}}. </span><br />
<br />
The <math>\ell</math> > 30 part of the CMB temperature power spectrum has been derived by the Plik likelihood, a code that implements a pseudo-Cl based technique, extensively described in Sec. 2 and the Appendix of {{PlanckPapers|planck2013-p08}}. Frequency spectra are computed as cross-spectra between half-mission maps. Mask and multipole range choices for each frequency spectrum are summarized in Section 3.3 of {{PlanckPapers|planck2014-a15}} and in {{PlanckPapers|planck2014-a13}}. The final power spectrum is an optimal combination of the 100, 143, 143x217 and 217 GHz spectra, corrected for the best-fit unresolved foregrounds and inter-frequency calibration factors, as derived from the full likelihood analysis (cf Planck+TT+lowP in Table 3 of {{PlanckPapers|planck2014-a15}}). A thorough description of the models of unresolved foregrounds is given in {{PlanckPapers|planck2014-a13}}. The spectrum covariance matrix accounts for cosmic variance and noise contributions, together with beam uncertainties. The <math>\ell</math> > 30 CMB TT spectrum and associated covariance matrix are available in two formats:<br />
#Unbinned, with 2479 bandpowers (<math>\ell=30-2508</math>).<br />
#Binned, in bins of <math> \Delta\ell=30 </math>, with 83 bandpowers in total. We bin the <math> C_\ell </math> power spectrum with a weight proportional to <math> \ell (\ell+1) </math>, so that the <math> C_{\ell_b} </math> binned bandpower centered in <math> \ell_b </math> is: <math> \\ C_{\ell_b}=\Sigma_{\ell \in b} w_{\ell_b\ell} C_\ell \quad \text{with} \quad w_{\ell_b\ell}=\frac{\ell (\ell+1)}{\Sigma_{\ell \in b} \ell (\ell+1)}. \\</math> Equivalently, using the matrix formalism, we can construct the binning matrix B as: <math>\\ B_{\ell_b \ell}=w_{\ell_b\ell} \\ </math> where B is a <math> n_b\times n_\ell</math> matrix, with <math>n_b=83</math> the number of bins and <math>n_\ell=2479</math> the number of unbinned multipoles. Thus: <math> \\ \vec{C}_\mathrm{binned}=B \, \vec{C} \\ \mathrm{cov_\mathrm{binned}}= B\, \mathrm{cov}\, B^T \\ \ell_b=B\, \ell \\ </math> Here, <math> \vec{C}_{binned}\, (\vec{C}) </math> is the vector containing all the binned (unbinned) <math>C_\ell</math> bandpowers, <math>\mathrm{cov} </math> is the covariance matrix and <math>\ell_b</math> is the weighted average multipole in each bin. The binned <math>D_{\ell_B}</math> power spectrum is then calculated as: <math> \\ D_{\ell_b}=\frac{\ell_b (\ell_b+1)}{2\pi} C_{\ell_b} </math>.<br />
<br />
===Inputs===<br />
<span style="color:red"> UPDATE COMMANDER</span><br />
<br />
; Low-l spectrum (<math>\ell < 30</math>):<br />
* frequency maps from 30–353 GHz<br />
* common mask {{PlanckPapers|planck2013-p06}}<br />
* compact sources catalog<br />
<br />
; High-l spectrum (<math>30 < \ell < 2500</math>): <br />
<br />
* 100, 143, 143x217 and 217 GHz spectra and their covariance matrix (Sec. 3.3 {{PlanckPapers|planck2014-a15}})<br />
* best-fit foreground templates and inter-frequency calibration factors (Table 3 of {{PlanckPapers|planck2014-a15}})<br />
* Beam transfer function uncertainties {{PlanckPapers|planck2014-a08}}<br />
=== File names and Meta data ===<br />
<br />
<span style="color:red"> CHECK EXTENSION NAMES </span><br />
<br />
The CMB spectrum and its covariance matrix are distributed in a single FITS file named <br />
<!--- * ''{{PLASingleFile | fileType=cosmo | name=COM_PowerSpect_CMB_R2.00.fits | link=COM_PowerSpect_CMB_R1.10.fits}}'' ---><br />
* ''COM_PowerSpect_CMB_R2.nn.fits''<br />
which contains 5 extensions<br />
<br />
; LOW-ELL (BINTABLE)<br />
: with the low ell part of the spectrum, not binned, and for l=2-49. The table columns are<br />
# ''ELL'' (integer): multipole number<br />
# ''D_ELL'' (float): <math>D_l</math> as described below<br />
# ''ERRUP'' (float): the upward uncertainty<br />
# ''ERRDOWN'' (float): the downward uncertainty<br />
<br />
; BINNED HIGH-ELL (BINTABLE) <br />
: with the high-ell part of the spectrum, binned into 83 bins covering <math>\langle l \rangle = 47-2499\ </math> in bins of width <math>l=30</math> (with the exception of the last bin that is smaller). The table columns are as follows:<br />
# ''ELL'' (integer): mean multipole number of bin<br />
# ''L_MIN'' (integer): lowest multipole of bin<br />
# ''L_MAX'' (integer): highest multipole of bin<br />
# ''D_ELL'' (float): <math>D_l<\math> as described below<br />
# ''ERR'' (float): the uncertainty<br />
<br />
;BINNED COV-MAT (IMAGE)<br />
: with the covariance matrix of the high-ell part of the spectrum in a 83x83 pixel image, i.e., covering the same bins as the ''HIGH-ELL'' table. Note that this is the covariance matrix of the <math>C_\ell</math>, not of the <math>D_\ell</math>.<br />
<br />
; UNBINNED HIGH-ELL (BINTABLE) <br />
: with the high-ell part of the spectrum, unbinned, in 2979 bins covering <math>\langle l \rangle = 30-2508\ </math>. The table columns are as follows:<br />
# ''ELL'' (integer): multipole <br />
# ''D_ELL'' (float): $D_l$ as described below<br />
# ''ERR'' (float): the uncertainty<br />
<br />
; UNBINNED COV-MAT (IMAGE)<br />
: with the covariance matrix of the high-ell part of the spectrum in a 2979x2979 pixel image, i.e., covering the same bins as the ''HIGH-ELL'' table. Note that this is the covariance matrix of the <math>C_\ell</math>, not of the <math>D_\ell</math>.<br />
<br />
<br />
The spectra give $D_\ell = \ell(\ell+1)C_\ell / 2\pi$ in units of $\mu\, K^2$, and the covariance matrix is in units of $\mu\, K^4$ (NOTE that the covariance matrix is for the <math>C_\ell</math>, not for the <math>D_\ell</math>). <br />
<br />
The CMB spectrum is also given in a simple text comma-separated file:<br />
* ''{{PLASingleFile | fileType=cosmo | name=COM_PowerSpect_CMB_R1.10.txt |link=COM_PowerSpect_CMB_R1.10.txt}}''<br />
<br />
==Likelihood==<br />
The likelihood will soon be released with an accompanying paper and an Explanatory Supplement update. <br />
<!-- <br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
The likelihood code (and the data that comes with it) used to compute the likelihood of a model that predicts the CMB power spectra, lensing power spectrum, together with some foreground and some instrumental parameters. The data files are built primarily from the Planck mission results, but include also some results from the WMAP-9 data release. The data files are written in a specific format that can only be read by the code. The code consists in a c/f90 library, along with some optional tools in python. The code is used to read the data files, and given model power spectra and nuisance parameters it computes the log likelihood of that model. <br />
<br />
Detailed description of the installation and usage of the likelihood code and data is provided in the package. The package includes five data files: four for the CMB likelihoods and one for the lensing likelihood. All of the likelihoods delivered are described in detail in the {{PlanckPapers|planck2013-p08|1|Power spectrum & Likelihood Paper}} (for the CMB based likelihood) and in the {{PlanckPapers|planck2013-p12|1|Lensing Paper}} (for the lensing likelihood) .<br />
<br />
The CMB full likelihood has been divided into four parts to allow using selectively different ranges of multipoles. It also reflects the fact that the mathematical approximations used for those different parts are very different, as is the underlying data. In detail, we distribute<br />
* one low-<math>\ell</math> temperature only likelihood (commander), <br />
* one low-<math>\ell</math> temperature and polarisation likelihood (lowlike), and <br />
* one higl-<math>\ell</math> likelihood CAMspec. <br />
<br />
The ''Commander'' likelihood covers the multipoles 2 to 49. It uses a semi-analytic method to sample the low-<math>\ell</math> temperature likelihood on an intermediate product of one of the component separated maps. The samples are used along with an analytical approximation of the likelihood posterior to perform the likelihood computation in the code. See {{PlanckPapers|planck2013-p08}} section 8.1 for more details.<br />
<br />
The ''lowlike'' likelihood covers the multipoles 2 to 32 for temperature and polarization data. Since Planck is not releasing polarisation data at this time, the polarization map from WMAP9 is used instead. A temperature map is needed to perform the computation nevertheless, and we use here the same commander map. The likelihood is computed using a map-based approximation at low resolution and a master one at intermediate resolution, as in WMAP. The likelihood code actually calls a very slightly modified version of the WMAP9 code. This piece of the likelihood essentially provides a prior on the optical depth and has almost no other impact on cosmological parameter estimation. As such it could be replaced by a simple prior, and a user can decide to do so, which is one of the motivation to leave the three pieces of the CMB likelihood as different data packages; see {{PlanckPapers|planck2013-p08}} section 8.3 for more details. Note that the version of the WMAP code used here (code version v1.0) does not perform any test on the positive definiteness of the TT, TE, EE covariance matrices, and will return a null log likelihood in the unphysical cases where the absolute value of TE is too large. This will be corrected in a later version.<br />
<br />
The ''CAMspec'' likelihood covers the multipoles 50 to 2500 for temperature only. The likelihood is computed using a quadratic approximation, including mode to mode correlations that have been precomputed on a fiducial model. The likelihood uses data from the 100, 143 and 217 GHz channels. To do so it models the foreground at each frequency using the model described in the likelihood paper. Uncertainties on the relative calibration and on the beam transfer functions are included either as parametric models, or marginalized and integrated in the covariance matrix. Detailed description of the different nuisance parameters is given below. Priors are included in the likelihood on the CIB spectral index, relative calibration factors and beam error eigenmodes. See {{PlanckPapers|planck2013-p08}} section 2.1 for more details.<br />
<br />
The ''act/spt'' likelihood covers the multipoles 1500 to 10000 for temperature. It is described in{{BibCite|dun2013}}{{BibCite|Keis2011}}{{BibCite|Reic2012}}. It uses the code and data that can be retrieved from the [http://lambda.gsfc.nasa.gov/ Lambda archive] for [http://lambda.gsfc.nasa.gov/product/act/act_prod_table.cfm ACT] and [http://lambda.gsfc.nasa.gov/product/spt/spt_prod_table.cfm SPT]. It has been slightly modified to use a thermal and kinetic SZ model that matches the one used in CAMspec. As stated in{{BibCite|dun2013}}, the dust parameters a_ge and a_gs must be explored with the following priors: a_ge = 0.8 ± 0.2 and a_gs = 0.4 ± 0.2. Those priors are not included in the log likelihood computed by the code.<br />
<br />
The ''lensing'' likelihood covers the multipoles 40 to 400 using the result of the [[Specially_processed_maps | lensing reconstruction]]. It uses a quadratic approximation for the likelihood, with a covariance matrix including the marginalized contribution of the beam transfer function uncertainties, the diffuse point source correction uncertainties and the cosmological model uncertainty affecting the first order non-gaussian bias (N1). The correlation between temperature and lensing is not taken into account. Cosmological uncertainty effects on the normalization are dealt with using a first order renormalization procedure. This means that the code will need both the TT and $\phi\phi$ power spectrum up to <math>\ell</math> = 2048 to correctly perform the integrals needed for the renormalization. Nevertheless, the code will only produce an estimate based on the data between <math>\ell</math> = 40 to 400. See {{PlanckPapers|planck2013-p12}} section 6.1 for more details.<br />
</span><br />
<span style="color:red">OUTSTANDING: description of likelihood masks </span><br />
==Production process==<br />
<br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
The code is based on some basic routines from the libpmc library in the [http://arxiv.org/abs/1101.0950 cosmoPMC] code. It also uses some code from the [http://lambda.gsfc.nasa.gov/product/map/dr5/likelihood_get.cfm WMAP9 likelihood] for the lowlike likelihood and{{BibCite|dun2013}}{{BibCite|Keis2011}}{{BibCite|Reic2012}} for the act/spt one. The rest of the code has been specifically written for the Planck data. Each likelihood file has been processed using a different and dedicated pipeline as described in the likelihood paper {{PlanckPapers|planck2013-p08}} (section 2 and 8) and in the lensing paper {{PlanckPapers|planck2013-p12}} (section 6.1). We refer the reader to those papers for full details. The data are then encapsulated into the specific file format.<br />
<br />
Each dataset comes with its own self check. Whenever the code is used to read a data file, a computation will be done against an included test spectrum/nuisance parameter, and the log-likelihood will be displayed along with the expected result. Difference of the order of 10<math>^{-6}</math> or less are expected depending of the architecture.<br />
<br />
==Inputs==<br />
<br />
===Likelihood===<br />
<br />
; ''commander'' :<br />
* all Planck channels maps<br />
* compact source catalogs<br />
* common masks<br />
* beam transfer functions for all channels<br />
<br />
; ''lowlike'' :<br />
* WMAP9 likelihood data<br />
* Low-<math>\ell</math> Commander map<br />
<br />
; ''CAMspec'' :<br />
* 100, 143 and 217 GHz detector and detsets maps<br />
* 857GHz channel map<br />
* compact source catalog<br />
* common masks (0,1 & 3)<br />
* beam transfer function and error eigenmodes and covariance for 100, 143 and 217 GHz detectors & detsets<br />
* theoretical templates for the tSZ and kSZ contributions<br />
* color corrections for the CIB emission for the 143 and 217GHz detectors and detsets<br />
* fiducial CMB model (bootstrapped from WMAP7 best fit spectrum) estimated noise contribution from the half-ring maps for 100, 143 and 217 GHz<br />
<br />
; ''lensing'' :<br />
* the lensing map<br />
* beam error eigenmodes and covariance for the 143 and 217GHz channel maps<br />
* fiducial CMB model (from Planck cosmological parameter best fit)<br />
<br />
; ''act/spt'' :<br />
* data and code from [http://lambda.gsfc.nasa.gov/product/act/act_fulllikelihood_get.cfm here]<br />
* the tSZ andkSZ template are changed to match those of CAMspec<br />
<br />
== File names and Meta data ==<br />
<br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
<br />
'''Likelihood source code'''<br />
<br />
The source code is in the file<br />
: {{PLASingleFile |fileType=cosmo|name=COM_Code_Likelihood-v1.0_R1.10.tar.gz|link=COM_Code_Likelihood-v1.0_R1.10.tar.gz}} (C, f90 and python likelihood library and tools)<br />
<br />
'''Likelihood data packages'''<br />
<br />
The {{PLALikelihood|type=Data|link=data packages}} are<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-commander_R1.10.tar.gz | link=COM_Data_Likelihood-commander_R1.10.tar.gz}}'' (low-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-lowlike_R1.10.tar.gz | link=COM_Data_Likelihood-lowlike_R1.10.tar.gz}}'' (low-ell TE,EE,BB likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-CAMspec_R1.10.tar.gz | link=COM_Data_Likelihood-CAMspec_R1.10.tar.gz}}'' (high-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-actspt_R1.10.tar | link=COM_Data_Likelihood-actspt_R1.10.tar.gz}}'' (high-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-lensing_R1.10.tar.gz | link=COM_Data_Likelihood-lensing_R1.10.tar.gz}}'' (lensing likelihood)<br />
<br />
Untar and unzip all files to recover the code and likelihood data. Each package comes with a README file; follow the instructions inclosed to<br />
build the code and use it. To compute the CMB likelihood one has to sum the log likelihood of each of the commander_v4.1_lm49.clik, lowlike_v222.clik and CAMspec_v6.2TN_2013_02_26.clik, actspt_2013_01.clik. To compute the CMB+lensing likelihood, one has to sum the log likelihood of all 5 files.<br />
<br />
The CMB and lensing likelihood format are different. The CMB files have the termination .clik, the lensing one .clik_lensing. The lensing data being simpler (due to the less detailled modeling permitted by the lower signal-noise), the file is a simple ascii file containing all the data along with comments describing it, and linking the different quantities to the lensing paper. The CMB file format is more complex and must accommodate different forms of data (maps, power spectrum, distribution samples, covariance matrices...). It consists of a tree structure containing the data. At each level of the tree structure a given directory can contain array data (in the form of FITS files or ascii files for strings) and scalar data (joined in a single ascii file "_mdb"). Those files are not user modifiable and do not contain interesting meta data for the user. Tools to manipulate those files are included in the code package as optional python tools. They are documented in the code package.<br />
<br />
'''Likelihood masks'''<br />
<br />
The masks used in the Likelihood paper {{PlanckPapers|planck2013-p08}} are found in<br />
{{PLASingleFile|fileType=map|name=COM_Mask_Likelihood_2048_R1.10.fits|link=COM_Mask_Likelihood_2048_R1.10.fits}}<br />
<br />
which contains ten masks which are written into a single ''BINTABLE'' extension of 10 columns by 50331648 rows (the number of Healpix pixels in an Nside = 2048 map). The structure is as follows, where the column names are the names of the masks: <br />
<br />
{| border="1" cellpadding="3" cellspacing="0" align="center" style="text-align:left" width=800px<br />
|+ '''Likelihodd masks file data structure'''<br />
|- bgcolor="ffdead" <br />
!colspan="4" | 1. EXTNAME = 'MSK-LIKE' : Data columns<br />
|- bgcolor="ffdead" <br />
! Column Name || Data Type || Units || Description<br />
|-<br />
|CL31 || Real*4 || none || mask<br />
|-<br />
|CL39 || Real*4 || none || mask<br />
|-<br />
|CL49 || Real*4 || none || mask<br />
|-<br />
|G22 || Real*4 || none || mask <br />
|-<br />
|G35 || Real*4 || none || mask<br />
|-<br />
|G45 || Real*4 || none || mask<br />
|-<br />
|G56 || Real*4 || none || mask<br />
|-<br />
|G65 || Real*4 || none || mask<br />
|-<br />
|PS96 || Real*4 || none || mask<br />
|-<br />
|PSA82 || Real*4 || none || mask<br />
|-<br />
|- bgcolor="ffdead" <br />
! Keyword || Data Type || Value || Description<br />
|-<br />
|PIXTYPE || string || HEALPIX ||<br />
|-<br />
|COORDSYS || string || GALACTIC ||Coordinate system <br />
|-<br />
|ORDERING || string || NESTED || Healpix ordering<br />
|-<br />
|NSIDE || Int || 2048 || Healpix Nside <br />
|-<br />
|FIRSTPIX || Int*4 || 0 || First pixel number<br />
|-<br />
|LASTPIX || Int*4 || 50331647 || Last pixel number, for LFI and HFI, respectively<br />
<br />
|}<br />
--><br />
== References ==<br />
<References /><br />
<br />
<br />
<br />
[[Category:Mission products|008]]</div>Sgallihttps://wiki.cosmos.esa.int/planckpla2015/index.php?title=CMB_spectrum_%26_Likelihood_Code&diff=11191CMB spectrum & Likelihood Code2015-02-04T15:50:52Z<p>Sgalli: </p>
<hr />
<div>{{DISPLAYTITLE:CMB spectrum and likelihood code}}<br />
<br />
==CMB spectra==<br />
<br />
<br />
===General description===<br />
====TT====<br />
The Planck best-fit CMB temperature power spectrum, shown in figure below, covers the wide range of multipoles <math> \ell </math> = 2-2508. <br />
<span style="color:red"> UPDATE COMMANDER: Over the multipole range <math> \ell </math> = 2–29, the power spectrum is derived from a component-separation algorithm, ''Commander'': applied to maps in the frequency range 30–353 GHz over 91% of the sky {{PlanckPapers|planck2013-p06}} . The asymmetric error bars associated to this spectrum are the 68% confidence limits and include the uncertainties due to foreground subtraction. </span><br />
<br />
For multipoles equal or greater than <math>\ell=30</math>, instead, the spectrum is derived from the ''Plik'' likelihood {{PlanckPapers|planck2014-a13}} by optimally combining the spectra in the frequency range 100-217 GHz, and correcting them for unresolved foregrounds. Associated 1-sigma errors include beam uncertainties. Both ''Commander'' and ''Plik'' are described in more details in the sections below.<br />
<br />
[[File: Planck2014 TT Dl NORES bin30 w180mm.jpeg|thumb|center|700px|'''CMB spectrum. Logarithmic x-scale up to <math>\ell=30</math>, linear at higher <math>\ell</math>; all points with error bars. The red line is the Planck best-fit primordial power spectrum (cf Planck TT+lowP in Table 3 of {{PlanckPapers|planck2014-a15}}). The blue shaded area shows the uncertainties due to cosmic variance alone.''']]<br />
===Production process===<br />
<br />
<span style="color:red"> UPDATE COMMANDER<br />
The <math>\ell</math> < 50 part of the Planck power spectrum is derived from the Commander approach, which implements Bayesian component separation in pixel space, fitting a parametric model to the data by sampling the posterior distribution for the model parameters {{PlanckPapers|planck2013-p06}}. The power spectrum at any multipole <math>\ell</math> is given as the maximum probability point for the posterior <math>C_\ell</math> distribution, marginalized over the other multipoles, and the error bars are 68% confidence level {{PlanckPapers|planck2013-p08}}. </span><br />
<br />
The <math>\ell</math> > 30 part of the CMB temperature power spectrum has been derived by the Plik likelihood, a code that implements a pseudo-Cl based technique, extensively described in Sec. 2 and the Appendix of {{PlanckPapers|planck2013-p08}}. Frequency spectra are computed as cross-spectra between half-mission maps. Mask and multipole range choices for each frequency spectrum are summarized in Section 3.3 of {{PlanckPapers|planck2014-a15}} and in {{PlanckPapers|planck2014-a13}}. The final power spectrum is an optimal combination of the 100, 143, 143x217 and 217 GHz spectra, corrected for the best-fit unresolved foregrounds and inter-frequency calibration factors, as derived from the full likelihood analysis (cf Planck+TT+lowP in Table 3 of {{PlanckPapers|planck2014-a15}}). A thorough description of the models of unresolved foregrounds is given in {{PlanckPapers|planck2014-a13}}. The spectrum covariance matrix accounts for cosmic variance and noise contributions, together with beam uncertainties. The <math>\ell</math> > 30 CMB TT spectrum and associated covariance matrix are available in two formats:<br />
#Unbinned, with 2479 bandpowers (<math>\ell=30-2508</math>).<br />
#Binned, in bins of <math> \Delta\ell=30 </math>, with 83 bandpowers in total. We bin the <math> C_\ell </math> power spectrum with a weight proportional to <math> \ell (\ell+1) </math>, so that the <math> C_{\ell_b} </math> binned bandpower centered in <math> \ell_b </math> is: <math> \\ C_{\ell_b}=\Sigma_{\ell \in b} w_{\ell_b\ell} C_\ell \quad \text{with} \quad w_{\ell_b\ell}=\frac{\ell (\ell+1)}{\Sigma_{\ell \in b} \ell (\ell+1)}. \\</math> Equivalently, using the matrix formalism, we can construct the binning matrix B as: <math>\\ B_{\ell_b \ell}=w_{\ell_b\ell} \\ </math> where B is a <math> n_b\times n_\ell</math> matrix, with <math>n_b=83</math> the number of bins and <math>n_\ell=2479</math> the number of unbinned multipoles. Thus: <math> \\ \vec{C}_\mathrm{binned}=B \, \vec{C} \\ \mathrm{cov_\mathrm{binned}}= B\, \mathrm{cov}\, B^T \\ \ell_b=B\, \ell \\ </math> Here, <math> \vec{C}_{binned}\, (\vec{C}) </math> is the vector containing all the binned (unbinned) <math>C_\ell</math> bandpowers, <math>\mathrm{cov} </math> is the covariance matrix and <math>\ell_b</math> is the weighted average multipole in each bin. The binned <math>D_{\ell_B}</math> power spectrum is then calculated as: <math> \\ D_{\ell_b}=\frac{\ell_b (\ell_b+1)}{2\pi} C_{\ell_b} </math>.<br />
<br />
===Inputs===<br />
<span style="color:red"> UPDATE COMMANDER</span><br />
<br />
; Low-l spectrum (<math>\ell < 30</math>):<br />
* frequency maps from 30–353 GHz<br />
* common mask {{PlanckPapers|planck2013-p06}}<br />
* compact sources catalog<br />
<br />
; High-l spectrum (<math>30 < \ell < 2500</math>): <br />
<br />
* 100, 143, 143x217 and 217 GHz spectra and their covariance matrix (Sec. 3.3 {{PlanckPapers|planck2014-a15}})<br />
* best-fit foreground templates and inter-frequency calibration factors (Table 3 of {{PlanckPapers|planck2014-a15}})<br />
* Beam transfer function uncertainties {{PlanckPapers|planck2014-a08}}<br />
=== File names and Meta data ===<br />
<br />
<span style="color:red"> CHECK EXTENSION NAMES </span><br />
<br />
The CMB spectrum and its covariance matrix are distributed in a single FITS file named <br />
<!--- * ''{{PLASingleFile | fileType=cosmo | name=COM_PowerSpect_CMB_R2.00.fits | link=COM_PowerSpect_CMB_R1.10.fits}}'' ---><br />
* ''COM_PowerSpect_CMB_R2.nn.fits''<br />
which contains 5 extensions<br />
<br />
; LOW-ELL (BINTABLE)<br />
: with the low ell part of the spectrum, not binned, and for l=2-49. The table columns are<br />
# ''ELL'' (integer): multipole number<br />
# ''D_ELL'' (float): <math>D_l</math> as described below<br />
# ''ERRUP'' (float): the upward uncertainty<br />
# ''ERRDOWN'' (float): the downward uncertainty<br />
<br />
; BINNED HIGH-ELL (BINTABLE) <br />
: with the high-ell part of the spectrum, binned into 83 bins covering <math>\langle l \rangle = 47-2499\ </math> in bins of width <math>l=30</math> (with the exception of the last bin that is smaller). The table columns are as follows:<br />
# ''ELL'' (integer): mean multipole number of bin<br />
# ''L_MIN'' (integer): lowest multipole of bin<br />
# ''L_MAX'' (integer): highest multipole of bin<br />
# ''D_ELL'' (float): <math>D_l<\math> as described below<br />
# ''ERR'' (float): the uncertainty<br />
<br />
;BINNED COV-MAT (IMAGE)<br />
: with the covariance matrix of the high-ell part of the spectrum in a 83x83 pixel image, i.e., covering the same bins as the ''HIGH-ELL'' table. Note that this is the covariance matrix of the <math>C_\ell</math>, not of the <math>D_\ell</math>.<br />
<br />
; UNBINNED HIGH-ELL (BINTABLE) <br />
: with the high-ell part of the spectrum, unbinned, in 2979 bins covering <math>\langle l \rangle = 30-2508\ </math>. The table columns are as follows:<br />
# ''ELL'' (integer): multipole <br />
# ''D_ELL'' (float): $D_l$ as described below<br />
# ''ERR'' (float): the uncertainty<br />
<br />
; UNBINNED COV-MAT (IMAGE)<br />
: with the covariance matrix of the high-ell part of the spectrum in a 2979x2979 pixel image, i.e., covering the same bins as the ''HIGH-ELL'' table. Note that this is the covariance matrix of the <math>C_\ell</math>, not of the <math>D_\ell</math>.<br />
<br />
<br />
The spectra give $D_\ell = \ell(\ell+1)C_\ell / 2\pi$ in units of $\mu\, K^2$, and the covariance matrix is in units of $\mu\, K^4$ (NOTE that the covariance matrix is for the <math>C_\ell</math>, not for the <math>D_\ell</math>). <br />
<br />
The CMB spectrum is also given in a simple text comma-separated file:<br />
* ''{{PLASingleFile | fileType=cosmo | name=COM_PowerSpect_CMB_R1.10.txt |link=COM_PowerSpect_CMB_R1.10.txt}}''<br />
<br />
==Likelihood==<br />
The likelihood will soon be released with an accompanying paper and an Explanatory Supplement update. <br />
<!-- <br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
The likelihood code (and the data that comes with it) used to compute the likelihood of a model that predicts the CMB power spectra, lensing power spectrum, together with some foreground and some instrumental parameters. The data files are built primarily from the Planck mission results, but include also some results from the WMAP-9 data release. The data files are written in a specific format that can only be read by the code. The code consists in a c/f90 library, along with some optional tools in python. The code is used to read the data files, and given model power spectra and nuisance parameters it computes the log likelihood of that model. <br />
<br />
Detailed description of the installation and usage of the likelihood code and data is provided in the package. The package includes five data files: four for the CMB likelihoods and one for the lensing likelihood. All of the likelihoods delivered are described in detail in the {{PlanckPapers|planck2013-p08|1|Power spectrum & Likelihood Paper}} (for the CMB based likelihood) and in the {{PlanckPapers|planck2013-p12|1|Lensing Paper}} (for the lensing likelihood) .<br />
<br />
The CMB full likelihood has been divided into four parts to allow using selectively different ranges of multipoles. It also reflects the fact that the mathematical approximations used for those different parts are very different, as is the underlying data. In detail, we distribute<br />
* one low-<math>\ell</math> temperature only likelihood (commander), <br />
* one low-<math>\ell</math> temperature and polarisation likelihood (lowlike), and <br />
* one higl-<math>\ell</math> likelihood CAMspec. <br />
<br />
The ''Commander'' likelihood covers the multipoles 2 to 49. It uses a semi-analytic method to sample the low-<math>\ell</math> temperature likelihood on an intermediate product of one of the component separated maps. The samples are used along with an analytical approximation of the likelihood posterior to perform the likelihood computation in the code. See {{PlanckPapers|planck2013-p08}} section 8.1 for more details.<br />
<br />
The ''lowlike'' likelihood covers the multipoles 2 to 32 for temperature and polarization data. Since Planck is not releasing polarisation data at this time, the polarization map from WMAP9 is used instead. A temperature map is needed to perform the computation nevertheless, and we use here the same commander map. The likelihood is computed using a map-based approximation at low resolution and a master one at intermediate resolution, as in WMAP. The likelihood code actually calls a very slightly modified version of the WMAP9 code. This piece of the likelihood essentially provides a prior on the optical depth and has almost no other impact on cosmological parameter estimation. As such it could be replaced by a simple prior, and a user can decide to do so, which is one of the motivation to leave the three pieces of the CMB likelihood as different data packages; see {{PlanckPapers|planck2013-p08}} section 8.3 for more details. Note that the version of the WMAP code used here (code version v1.0) does not perform any test on the positive definiteness of the TT, TE, EE covariance matrices, and will return a null log likelihood in the unphysical cases where the absolute value of TE is too large. This will be corrected in a later version.<br />
<br />
The ''CAMspec'' likelihood covers the multipoles 50 to 2500 for temperature only. The likelihood is computed using a quadratic approximation, including mode to mode correlations that have been precomputed on a fiducial model. The likelihood uses data from the 100, 143 and 217 GHz channels. To do so it models the foreground at each frequency using the model described in the likelihood paper. Uncertainties on the relative calibration and on the beam transfer functions are included either as parametric models, or marginalized and integrated in the covariance matrix. Detailed description of the different nuisance parameters is given below. Priors are included in the likelihood on the CIB spectral index, relative calibration factors and beam error eigenmodes. See {{PlanckPapers|planck2013-p08}} section 2.1 for more details.<br />
<br />
The ''act/spt'' likelihood covers the multipoles 1500 to 10000 for temperature. It is described in{{BibCite|dun2013}}{{BibCite|Keis2011}}{{BibCite|Reic2012}}. It uses the code and data that can be retrieved from the [http://lambda.gsfc.nasa.gov/ Lambda archive] for [http://lambda.gsfc.nasa.gov/product/act/act_prod_table.cfm ACT] and [http://lambda.gsfc.nasa.gov/product/spt/spt_prod_table.cfm SPT]. It has been slightly modified to use a thermal and kinetic SZ model that matches the one used in CAMspec. As stated in{{BibCite|dun2013}}, the dust parameters a_ge and a_gs must be explored with the following priors: a_ge = 0.8 ± 0.2 and a_gs = 0.4 ± 0.2. Those priors are not included in the log likelihood computed by the code.<br />
<br />
The ''lensing'' likelihood covers the multipoles 40 to 400 using the result of the [[Specially_processed_maps | lensing reconstruction]]. It uses a quadratic approximation for the likelihood, with a covariance matrix including the marginalized contribution of the beam transfer function uncertainties, the diffuse point source correction uncertainties and the cosmological model uncertainty affecting the first order non-gaussian bias (N1). The correlation between temperature and lensing is not taken into account. Cosmological uncertainty effects on the normalization are dealt with using a first order renormalization procedure. This means that the code will need both the TT and $\phi\phi$ power spectrum up to <math>\ell</math> = 2048 to correctly perform the integrals needed for the renormalization. Nevertheless, the code will only produce an estimate based on the data between <math>\ell</math> = 40 to 400. See {{PlanckPapers|planck2013-p12}} section 6.1 for more details.<br />
</span><br />
<span style="color:red">OUTSTANDING: description of likelihood masks </span><br />
==Production process==<br />
<br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
The code is based on some basic routines from the libpmc library in the [http://arxiv.org/abs/1101.0950 cosmoPMC] code. It also uses some code from the [http://lambda.gsfc.nasa.gov/product/map/dr5/likelihood_get.cfm WMAP9 likelihood] for the lowlike likelihood and{{BibCite|dun2013}}{{BibCite|Keis2011}}{{BibCite|Reic2012}} for the act/spt one. The rest of the code has been specifically written for the Planck data. Each likelihood file has been processed using a different and dedicated pipeline as described in the likelihood paper {{PlanckPapers|planck2013-p08}} (section 2 and 8) and in the lensing paper {{PlanckPapers|planck2013-p12}} (section 6.1). We refer the reader to those papers for full details. The data are then encapsulated into the specific file format.<br />
<br />
Each dataset comes with its own self check. Whenever the code is used to read a data file, a computation will be done against an included test spectrum/nuisance parameter, and the log-likelihood will be displayed along with the expected result. Difference of the order of 10<math>^{-6}</math> or less are expected depending of the architecture.<br />
<br />
==Inputs==<br />
<br />
===Likelihood===<br />
<br />
; ''commander'' :<br />
* all Planck channels maps<br />
* compact source catalogs<br />
* common masks<br />
* beam transfer functions for all channels<br />
<br />
; ''lowlike'' :<br />
* WMAP9 likelihood data<br />
* Low-<math>\ell</math> Commander map<br />
<br />
; ''CAMspec'' :<br />
* 100, 143 and 217 GHz detector and detsets maps<br />
* 857GHz channel map<br />
* compact source catalog<br />
* common masks (0,1 & 3)<br />
* beam transfer function and error eigenmodes and covariance for 100, 143 and 217 GHz detectors & detsets<br />
* theoretical templates for the tSZ and kSZ contributions<br />
* color corrections for the CIB emission for the 143 and 217GHz detectors and detsets<br />
* fiducial CMB model (bootstrapped from WMAP7 best fit spectrum) estimated noise contribution from the half-ring maps for 100, 143 and 217 GHz<br />
<br />
; ''lensing'' :<br />
* the lensing map<br />
* beam error eigenmodes and covariance for the 143 and 217GHz channel maps<br />
* fiducial CMB model (from Planck cosmological parameter best fit)<br />
<br />
; ''act/spt'' :<br />
* data and code from [http://lambda.gsfc.nasa.gov/product/act/act_fulllikelihood_get.cfm here]<br />
* the tSZ andkSZ template are changed to match those of CAMspec<br />
<br />
== File names and Meta data ==<br />
<br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
<br />
'''Likelihood source code'''<br />
<br />
The source code is in the file<br />
: {{PLASingleFile |fileType=cosmo|name=COM_Code_Likelihood-v1.0_R1.10.tar.gz|link=COM_Code_Likelihood-v1.0_R1.10.tar.gz}} (C, f90 and python likelihood library and tools)<br />
<br />
'''Likelihood data packages'''<br />
<br />
The {{PLALikelihood|type=Data|link=data packages}} are<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-commander_R1.10.tar.gz | link=COM_Data_Likelihood-commander_R1.10.tar.gz}}'' (low-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-lowlike_R1.10.tar.gz | link=COM_Data_Likelihood-lowlike_R1.10.tar.gz}}'' (low-ell TE,EE,BB likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-CAMspec_R1.10.tar.gz | link=COM_Data_Likelihood-CAMspec_R1.10.tar.gz}}'' (high-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-actspt_R1.10.tar | link=COM_Data_Likelihood-actspt_R1.10.tar.gz}}'' (high-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-lensing_R1.10.tar.gz | link=COM_Data_Likelihood-lensing_R1.10.tar.gz}}'' (lensing likelihood)<br />
<br />
Untar and unzip all files to recover the code and likelihood data. Each package comes with a README file; follow the instructions inclosed to<br />
build the code and use it. To compute the CMB likelihood one has to sum the log likelihood of each of the commander_v4.1_lm49.clik, lowlike_v222.clik and CAMspec_v6.2TN_2013_02_26.clik, actspt_2013_01.clik. To compute the CMB+lensing likelihood, one has to sum the log likelihood of all 5 files.<br />
<br />
The CMB and lensing likelihood format are different. The CMB files have the termination .clik, the lensing one .clik_lensing. The lensing data being simpler (due to the less detailled modeling permitted by the lower signal-noise), the file is a simple ascii file containing all the data along with comments describing it, and linking the different quantities to the lensing paper. The CMB file format is more complex and must accommodate different forms of data (maps, power spectrum, distribution samples, covariance matrices...). It consists of a tree structure containing the data. At each level of the tree structure a given directory can contain array data (in the form of FITS files or ascii files for strings) and scalar data (joined in a single ascii file "_mdb"). Those files are not user modifiable and do not contain interesting meta data for the user. Tools to manipulate those files are included in the code package as optional python tools. They are documented in the code package.<br />
<br />
'''Likelihood masks'''<br />
<br />
The masks used in the Likelihood paper {{PlanckPapers|planck2013-p08}} are found in<br />
{{PLASingleFile|fileType=map|name=COM_Mask_Likelihood_2048_R1.10.fits|link=COM_Mask_Likelihood_2048_R1.10.fits}}<br />
<br />
which contains ten masks which are written into a single ''BINTABLE'' extension of 10 columns by 50331648 rows (the number of Healpix pixels in an Nside = 2048 map). The structure is as follows, where the column names are the names of the masks: <br />
<br />
{| border="1" cellpadding="3" cellspacing="0" align="center" style="text-align:left" width=800px<br />
|+ '''Likelihodd masks file data structure'''<br />
|- bgcolor="ffdead" <br />
!colspan="4" | 1. EXTNAME = 'MSK-LIKE' : Data columns<br />
|- bgcolor="ffdead" <br />
! Column Name || Data Type || Units || Description<br />
|-<br />
|CL31 || Real*4 || none || mask<br />
|-<br />
|CL39 || Real*4 || none || mask<br />
|-<br />
|CL49 || Real*4 || none || mask<br />
|-<br />
|G22 || Real*4 || none || mask <br />
|-<br />
|G35 || Real*4 || none || mask<br />
|-<br />
|G45 || Real*4 || none || mask<br />
|-<br />
|G56 || Real*4 || none || mask<br />
|-<br />
|G65 || Real*4 || none || mask<br />
|-<br />
|PS96 || Real*4 || none || mask<br />
|-<br />
|PSA82 || Real*4 || none || mask<br />
|-<br />
|- bgcolor="ffdead" <br />
! Keyword || Data Type || Value || Description<br />
|-<br />
|PIXTYPE || string || HEALPIX ||<br />
|-<br />
|COORDSYS || string || GALACTIC ||Coordinate system <br />
|-<br />
|ORDERING || string || NESTED || Healpix ordering<br />
|-<br />
|NSIDE || Int || 2048 || Healpix Nside <br />
|-<br />
|FIRSTPIX || Int*4 || 0 || First pixel number<br />
|-<br />
|LASTPIX || Int*4 || 50331647 || Last pixel number, for LFI and HFI, respectively<br />
<br />
|}<br />
--><br />
== References ==<br />
<References /><br />
<br />
<br />
<br />
[[Category:Mission products|008]]</div>Sgallihttps://wiki.cosmos.esa.int/planckpla2015/index.php?title=CMB_spectrum_%26_Likelihood_Code&diff=11087CMB spectrum & Likelihood Code2015-02-04T01:36:33Z<p>Sgalli: </p>
<hr />
<div>{{DISPLAYTITLE:CMB spectrum and likelihood code}}<br />
<br />
==CMB spectra==<br />
<br />
===General description===<br />
<br />
<br />
The Planck best-fit CMB temperature power spectrum, shown in figure below, covers the wide range of multipoles <math> \ell </math> = 2-2508. <br />
<span style="color:red"> UPDATE COMMANDER: Over the multipole range <math> \ell </math> = 2–29, the power spectrum is derived from a component-separation algorithm, ''Commander'': applied to maps in the frequency range 30–353 GHz over 91% of the sky {{PlanckPapers|planck2013-p06}} . The asymmetric error bars associated to this spectrum are the 68% confidence limits and include the uncertainties due to foreground subtraction. </span><br />
<br />
For multipoles equal or greater than <math>\ell=30</math>, instead, the spectrum is derived from the ''Plik'' likelihood {{PlanckPapers|planck2014-a13}} by optimally combining the spectra in the frequency range 100-217 GHz, and correcting them for unresolved foregrounds. Associated 1-sigma errors include beam uncertainties. Both ''Commander'' and ''Plik'' are described in more details in the sections below.<br />
<br />
[[File: Planck2014 TT Dl NORES bin30 w180mm.jpeg|thumb|center|700px|'''CMB spectrum. Logarithmic x-scale up to <math>\ell=30</math>, linear at higher <math>\ell</math>; all points with error bars. The red line is the Planck best-fit primordial power spectrum (cf Planck TT+lowP in Table 3 of {{PlanckPapers|planck2014-a15}}). The blue shaded area shows the uncertainties due to cosmic variance alone.''']]<br />
===Production process===<br />
<br />
<span style="color:red"> UPDATE COMMANDER<br />
The <math>\ell</math> < 50 part of the Planck power spectrum is derived from the Commander approach, which implements Bayesian component separation in pixel space, fitting a parametric model to the data by sampling the posterior distribution for the model parameters {{PlanckPapers|planck2013-p06}}. The power spectrum at any multipole <math>\ell</math> is given as the maximum probability point for the posterior <math>C_\ell</math> distribution, marginalized over the other multipoles, and the error bars are 68% confidence level {{PlanckPapers|planck2013-p08}}. </span><br />
<br />
The <math>\ell</math> > 30 part of the CMB temperature power spectrum has been derived by the Plik likelihood, a code that implements a pseudo-Cl based technique, extensively described in Sec. 2 and the Appendix of {{PlanckPapers|planck2013-p08}}. Frequency spectra are computed as cross-spectra between half-mission maps. Mask and multipole range choices for each frequency spectrum are summarized in Section 3.3 of {{PlanckPapers|planck2014-a15}} and in {{PlanckPapers|planck2014-a13}}. The final power spectrum is an optimal combination of the 100, 143, 143x217 and 217 GHz spectra, corrected for the best-fit unresolved foregrounds and inter-frequency calibration factors, as derived from the full likelihood analysis (cf Planck+TT+lowP in Table 3 of {{PlanckPapers|planck2014-a15}}). A thorough description of the models of unresolved foregrounds is given in {{PlanckPapers|planck2014-a13}}. The spectrum covariance matrix accounts for cosmic variance and noise contributions, together with beam uncertainties. The <math>\ell</math> > 30 CMB TT spectrum and associated covariance matrix are available in two formats:<br />
#Unbinned, with 2479 bandpowers (<math>\ell=30-2508</math>).<br />
#Binned, in bins of <math> \Delta\ell=30 </math>, with 83 bandpowers in total. We bin the <math> C_\ell </math> power spectrum with a weight proportional to <math> \ell (\ell+1) </math>, so that the <math> C_{\ell_b} </math> binned bandpower centered in <math> \ell_b </math> is: <math> \\ C_{\ell_b}=\Sigma_{\ell \in b} w_{\ell_b\ell} C_\ell \quad \text{with} \quad w_{\ell_b\ell}=\frac{\ell (\ell+1)}{\Sigma_{\ell \in b} \ell (\ell+1)}. \\</math> Equivalently, using the matrix formalism, we can construct the binning matrix B as: <math>\\ B_{\ell_b \ell}=w_{\ell_b\ell} \\ </math> where B is a <math> n_b\times n_\ell</math> matrix, with <math>n_b=83</math> the number of bins and <math>n_\ell=2479</math> the number of unbinned multipoles. Thus: <math> \\ \vec{C}_\mathrm{binned}=B \, \vec{C} \\ \mathrm{cov_\mathrm{binned}}= B\, \mathrm{cov}\, B^T \\ \ell_b=B\, \ell \\ </math> Here, <math> \vec{C}_{binned}\, (\vec{C}) </math> is the vector containing all the binned (unbinned) <math>C_\ell</math> bandpowers, <math>\mathrm{cov} </math> is the covariance matrix and <math>\ell_b</math> is the weighted average multipole in each bin. The binned <math>D_{\ell_B}</math> power spectrum is then calculated as: <math> \\ D_{\ell_b}=\frac{\ell_b (\ell_b+1)}{2\pi} C_{\ell_b} </math>.<br />
<br />
===Inputs===<br />
<span style="color:red"> UPDATE COMMANDER</span><br />
<br />
; Low-l spectrum (<math>\ell < 30</math>):<br />
* frequency maps from 30–353 GHz<br />
* common mask {{PlanckPapers|planck2013-p06}}<br />
* compact sources catalog<br />
<br />
; High-l spectrum (<math>30 < \ell < 2500</math>): <br />
<br />
* 100, 143, 143x217 and 217 GHz spectra and their covariance matrix (Sec. 3.3 {{PlanckPapers|planck2014-a15}})<br />
* best-fit foreground templates and inter-frequency calibration factors (Table 3 of {{PlanckPapers|planck2014-a15}})<br />
* Beam transfer function uncertainties {{PlanckPapers|planck2014-a08}}<br />
=== File names and Meta data ===<br />
<br />
<span style="color:red"> CHECK EXTENSION NAMES </span><br />
<br />
The CMB spectrum and its covariance matrix are distributed in a single FITS file named <br />
* ''{{PLASingleFile | fileType=cosmo | name=COM_PowerSpect_CMB_R1.10.fits | link=COM_PowerSpect_CMB_R1.10.fits}}'' <br />
<br />
which contains 5 extensions<br />
<br />
; LOW-ELL (BINTABLE)<br />
: with the low ell part of the spectrum, not binned, and for l=2-49. The table columns are<br />
# ''ELL'' (integer): multipole number<br />
# ''D_ELL'' (float): $D_l$ as described below<br />
# ''ERRUP'' (float): the upward uncertainty<br />
# ''ERRDOWN'' (float): the downward uncertainty<br />
<br />
; BINNED HIGH-ELL (BINTABLE) <br />
: with the high-ell part of the spectrum, binned into 83 bins covering <math>\langle l \rangle = 47-2499\ </math> in bins of width <math>l=30</math> (with the exception of the last bin that is smaller). The table columns are as follows:<br />
# ''ELL'' (integer): mean multipole number of bin<br />
# ''L_MIN'' (integer): lowest multipole of bin<br />
# ''L_MAX'' (integer): highest multipole of bin<br />
# ''D_ELL'' (float): $D_l$ as described below<br />
# ''ERR'' (float): the uncertainty<br />
<br />
;BINNED COV-MAT (IMAGE)<br />
: with the covariance matrix of the high-ell part of the spectrum in a 83x83 pixel image, i.e., covering the same bins as the ''HIGH-ELL'' table. Note that this is the covariance matrix of the <math>C_\ell</math>, not of the <math>D_\ell</math>.<br />
<br />
; UNBINNED HIGH-ELL (BINTABLE) <br />
: with the high-ell part of the spectrum, unbinned, in 2979 bins covering <math>\langle l \rangle = 30-2508\ </math>. The table columns are as follows:<br />
# ''ELL'' (integer): multipole <br />
# ''D_ELL'' (float): $D_l$ as described below<br />
# ''ERR'' (float): the uncertainty<br />
<br />
; UNBINNED COV-MAT (IMAGE)<br />
: with the covariance matrix of the high-ell part of the spectrum in a 2979x2979 pixel image, i.e., covering the same bins as the ''HIGH-ELL'' table. Note that this is the covariance matrix of the <math>C_\ell</math>, not of the <math>D_\ell</math>.<br />
<br />
<br />
The spectra give $D_\ell = \ell(\ell+1)C_\ell / 2\pi$ in units of $\mu\, K^2$, and the covariance matrix is in units of $\mu\, K^4$ (NOTE that the covariance matrix is for the <math>C_\ell</math>, not for the <math>D_\ell</math>). <br />
<br />
The CMB spectrum is also given in a simple text comma-separated file:<br />
* ''{{PLASingleFile | fileType=cosmo | name=COM_PowerSpect_CMB_R1.10.txt |link=COM_PowerSpect_CMB_R1.10.txt}}''<br />
<br />
==Likelihood==<br />
The likelihood will soon be released with an accompanying paper and an Explanatory Supplement update. <br />
<!-- <br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
The likelihood code (and the data that comes with it) used to compute the likelihood of a model that predicts the CMB power spectra, lensing power spectrum, together with some foreground and some instrumental parameters. The data files are built primarily from the Planck mission results, but include also some results from the WMAP-9 data release. The data files are written in a specific format that can only be read by the code. The code consists in a c/f90 library, along with some optional tools in python. The code is used to read the data files, and given model power spectra and nuisance parameters it computes the log likelihood of that model. <br />
<br />
Detailed description of the installation and usage of the likelihood code and data is provided in the package. The package includes five data files: four for the CMB likelihoods and one for the lensing likelihood. All of the likelihoods delivered are described in detail in the {{PlanckPapers|planck2013-p08|1|Power spectrum & Likelihood Paper}} (for the CMB based likelihood) and in the {{PlanckPapers|planck2013-p12|1|Lensing Paper}} (for the lensing likelihood) .<br />
<br />
The CMB full likelihood has been divided into four parts to allow using selectively different ranges of multipoles. It also reflects the fact that the mathematical approximations used for those different parts are very different, as is the underlying data. In detail, we distribute<br />
* one low-<math>\ell</math> temperature only likelihood (commander), <br />
* one low-<math>\ell</math> temperature and polarisation likelihood (lowlike), and <br />
* one higl-<math>\ell</math> likelihood CAMspec. <br />
<br />
The ''Commander'' likelihood covers the multipoles 2 to 49. It uses a semi-analytic method to sample the low-<math>\ell</math> temperature likelihood on an intermediate product of one of the component separated maps. The samples are used along with an analytical approximation of the likelihood posterior to perform the likelihood computation in the code. See {{PlanckPapers|planck2013-p08}} section 8.1 for more details.<br />
<br />
The ''lowlike'' likelihood covers the multipoles 2 to 32 for temperature and polarization data. Since Planck is not releasing polarisation data at this time, the polarization map from WMAP9 is used instead. A temperature map is needed to perform the computation nevertheless, and we use here the same commander map. The likelihood is computed using a map-based approximation at low resolution and a master one at intermediate resolution, as in WMAP. The likelihood code actually calls a very slightly modified version of the WMAP9 code. This piece of the likelihood essentially provides a prior on the optical depth and has almost no other impact on cosmological parameter estimation. As such it could be replaced by a simple prior, and a user can decide to do so, which is one of the motivation to leave the three pieces of the CMB likelihood as different data packages; see {{PlanckPapers|planck2013-p08}} section 8.3 for more details. Note that the version of the WMAP code used here (code version v1.0) does not perform any test on the positive definiteness of the TT, TE, EE covariance matrices, and will return a null log likelihood in the unphysical cases where the absolute value of TE is too large. This will be corrected in a later version.<br />
<br />
The ''CAMspec'' likelihood covers the multipoles 50 to 2500 for temperature only. The likelihood is computed using a quadratic approximation, including mode to mode correlations that have been precomputed on a fiducial model. The likelihood uses data from the 100, 143 and 217 GHz channels. To do so it models the foreground at each frequency using the model described in the likelihood paper. Uncertainties on the relative calibration and on the beam transfer functions are included either as parametric models, or marginalized and integrated in the covariance matrix. Detailed description of the different nuisance parameters is given below. Priors are included in the likelihood on the CIB spectral index, relative calibration factors and beam error eigenmodes. See {{PlanckPapers|planck2013-p08}} section 2.1 for more details.<br />
<br />
The ''act/spt'' likelihood covers the multipoles 1500 to 10000 for temperature. It is described in{{BibCite|dun2013}}{{BibCite|Keis2011}}{{BibCite|Reic2012}}. It uses the code and data that can be retrieved from the [http://lambda.gsfc.nasa.gov/ Lambda archive] for [http://lambda.gsfc.nasa.gov/product/act/act_prod_table.cfm ACT] and [http://lambda.gsfc.nasa.gov/product/spt/spt_prod_table.cfm SPT]. It has been slightly modified to use a thermal and kinetic SZ model that matches the one used in CAMspec. As stated in{{BibCite|dun2013}}, the dust parameters a_ge and a_gs must be explored with the following priors: a_ge = 0.8 ± 0.2 and a_gs = 0.4 ± 0.2. Those priors are not included in the log likelihood computed by the code.<br />
<br />
The ''lensing'' likelihood covers the multipoles 40 to 400 using the result of the [[Specially_processed_maps | lensing reconstruction]]. It uses a quadratic approximation for the likelihood, with a covariance matrix including the marginalized contribution of the beam transfer function uncertainties, the diffuse point source correction uncertainties and the cosmological model uncertainty affecting the first order non-gaussian bias (N1). The correlation between temperature and lensing is not taken into account. Cosmological uncertainty effects on the normalization are dealt with using a first order renormalization procedure. This means that the code will need both the TT and $\phi\phi$ power spectrum up to <math>\ell</math> = 2048 to correctly perform the integrals needed for the renormalization. Nevertheless, the code will only produce an estimate based on the data between <math>\ell</math> = 40 to 400. See {{PlanckPapers|planck2013-p12}} section 6.1 for more details.<br />
</span><br />
<span style="color:red">OUTSTANDING: description of likelihood masks </span><br />
==Production process==<br />
<br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
The code is based on some basic routines from the libpmc library in the [http://arxiv.org/abs/1101.0950 cosmoPMC] code. It also uses some code from the [http://lambda.gsfc.nasa.gov/product/map/dr5/likelihood_get.cfm WMAP9 likelihood] for the lowlike likelihood and{{BibCite|dun2013}}{{BibCite|Keis2011}}{{BibCite|Reic2012}} for the act/spt one. The rest of the code has been specifically written for the Planck data. Each likelihood file has been processed using a different and dedicated pipeline as described in the likelihood paper {{PlanckPapers|planck2013-p08}} (section 2 and 8) and in the lensing paper {{PlanckPapers|planck2013-p12}} (section 6.1). We refer the reader to those papers for full details. The data are then encapsulated into the specific file format.<br />
<br />
Each dataset comes with its own self check. Whenever the code is used to read a data file, a computation will be done against an included test spectrum/nuisance parameter, and the log-likelihood will be displayed along with the expected result. Difference of the order of 10<math>^{-6}</math> or less are expected depending of the architecture.<br />
<br />
==Inputs==<br />
<br />
===Likelihood===<br />
<br />
; ''commander'' :<br />
* all Planck channels maps<br />
* compact source catalogs<br />
* common masks<br />
* beam transfer functions for all channels<br />
<br />
; ''lowlike'' :<br />
* WMAP9 likelihood data<br />
* Low-<math>\ell</math> Commander map<br />
<br />
; ''CAMspec'' :<br />
* 100, 143 and 217 GHz detector and detsets maps<br />
* 857GHz channel map<br />
* compact source catalog<br />
* common masks (0,1 & 3)<br />
* beam transfer function and error eigenmodes and covariance for 100, 143 and 217 GHz detectors & detsets<br />
* theoretical templates for the tSZ and kSZ contributions<br />
* color corrections for the CIB emission for the 143 and 217GHz detectors and detsets<br />
* fiducial CMB model (bootstrapped from WMAP7 best fit spectrum) estimated noise contribution from the half-ring maps for 100, 143 and 217 GHz<br />
<br />
; ''lensing'' :<br />
* the lensing map<br />
* beam error eigenmodes and covariance for the 143 and 217GHz channel maps<br />
* fiducial CMB model (from Planck cosmological parameter best fit)<br />
<br />
; ''act/spt'' :<br />
* data and code from [http://lambda.gsfc.nasa.gov/product/act/act_fulllikelihood_get.cfm here]<br />
* the tSZ andkSZ template are changed to match those of CAMspec<br />
<br />
== File names and Meta data ==<br />
<br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
<br />
'''Likelihood source code'''<br />
<br />
The source code is in the file<br />
: {{PLASingleFile |fileType=cosmo|name=COM_Code_Likelihood-v1.0_R1.10.tar.gz|link=COM_Code_Likelihood-v1.0_R1.10.tar.gz}} (C, f90 and python likelihood library and tools)<br />
<br />
'''Likelihood data packages'''<br />
<br />
The {{PLALikelihood|type=Data|link=data packages}} are<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-commander_R1.10.tar.gz | link=COM_Data_Likelihood-commander_R1.10.tar.gz}}'' (low-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-lowlike_R1.10.tar.gz | link=COM_Data_Likelihood-lowlike_R1.10.tar.gz}}'' (low-ell TE,EE,BB likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-CAMspec_R1.10.tar.gz | link=COM_Data_Likelihood-CAMspec_R1.10.tar.gz}}'' (high-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-actspt_R1.10.tar | link=COM_Data_Likelihood-actspt_R1.10.tar.gz}}'' (high-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-lensing_R1.10.tar.gz | link=COM_Data_Likelihood-lensing_R1.10.tar.gz}}'' (lensing likelihood)<br />
<br />
Untar and unzip all files to recover the code and likelihood data. Each package comes with a README file; follow the instructions inclosed to<br />
build the code and use it. To compute the CMB likelihood one has to sum the log likelihood of each of the commander_v4.1_lm49.clik, lowlike_v222.clik and CAMspec_v6.2TN_2013_02_26.clik, actspt_2013_01.clik. To compute the CMB+lensing likelihood, one has to sum the log likelihood of all 5 files.<br />
<br />
The CMB and lensing likelihood format are different. The CMB files have the termination .clik, the lensing one .clik_lensing. The lensing data being simpler (due to the less detailled modeling permitted by the lower signal-noise), the file is a simple ascii file containing all the data along with comments describing it, and linking the different quantities to the lensing paper. The CMB file format is more complex and must accommodate different forms of data (maps, power spectrum, distribution samples, covariance matrices...). It consists of a tree structure containing the data. At each level of the tree structure a given directory can contain array data (in the form of FITS files or ascii files for strings) and scalar data (joined in a single ascii file "_mdb"). Those files are not user modifiable and do not contain interesting meta data for the user. Tools to manipulate those files are included in the code package as optional python tools. They are documented in the code package.<br />
<br />
'''Likelihood masks'''<br />
<br />
The masks used in the Likelihood paper {{PlanckPapers|planck2013-p08}} are found in<br />
{{PLASingleFile|fileType=map|name=COM_Mask_Likelihood_2048_R1.10.fits|link=COM_Mask_Likelihood_2048_R1.10.fits}}<br />
<br />
which contains ten masks which are written into a single ''BINTABLE'' extension of 10 columns by 50331648 rows (the number of Healpix pixels in an Nside = 2048 map). The structure is as follows, where the column names are the names of the masks: <br />
<br />
{| border="1" cellpadding="3" cellspacing="0" align="center" style="text-align:left" width=800px<br />
|+ '''Likelihodd masks file data structure'''<br />
|- bgcolor="ffdead" <br />
!colspan="4" | 1. EXTNAME = 'MSK-LIKE' : Data columns<br />
|- bgcolor="ffdead" <br />
! Column Name || Data Type || Units || Description<br />
|-<br />
|CL31 || Real*4 || none || mask<br />
|-<br />
|CL39 || Real*4 || none || mask<br />
|-<br />
|CL49 || Real*4 || none || mask<br />
|-<br />
|G22 || Real*4 || none || mask <br />
|-<br />
|G35 || Real*4 || none || mask<br />
|-<br />
|G45 || Real*4 || none || mask<br />
|-<br />
|G56 || Real*4 || none || mask<br />
|-<br />
|G65 || Real*4 || none || mask<br />
|-<br />
|PS96 || Real*4 || none || mask<br />
|-<br />
|PSA82 || Real*4 || none || mask<br />
|-<br />
|- bgcolor="ffdead" <br />
! Keyword || Data Type || Value || Description<br />
|-<br />
|PIXTYPE || string || HEALPIX ||<br />
|-<br />
|COORDSYS || string || GALACTIC ||Coordinate system <br />
|-<br />
|ORDERING || string || NESTED || Healpix ordering<br />
|-<br />
|NSIDE || Int || 2048 || Healpix Nside <br />
|-<br />
|FIRSTPIX || Int*4 || 0 || First pixel number<br />
|-<br />
|LASTPIX || Int*4 || 50331647 || Last pixel number, for LFI and HFI, respectively<br />
<br />
|}<br />
--><br />
== References ==<br />
<References /><br />
<br />
<br />
<br />
[[Category:Mission products|008]]</div>Sgallihttps://wiki.cosmos.esa.int/planckpla2015/index.php?title=CMB_spectrum_%26_Likelihood_Code&diff=11086CMB spectrum & Likelihood Code2015-02-04T01:27:40Z<p>Sgalli: </p>
<hr />
<div>{{DISPLAYTITLE:CMB spectrum and likelihood code}}<br />
<br />
==CMB spectra==<br />
<br />
===General description===<br />
<br />
<br />
The Planck best-fit CMB temperature power spectrum, shown in figure below, covers the wide range of multipoles <math> \ell </math> = 2-2508. <br />
<span style="color:red"> UPDATE COMMANDER: Over the multipole range <math> \ell </math> = 2–29, the power spectrum is derived from a component-separation algorithm, ''Commander'': applied to maps in the frequency range 30–353 GHz over 91% of the sky {{PlanckPapers|planck2013-p06}} . The asymmetric error bars associated to this spectrum are the 68% confidence limits and include the uncertainties due to foreground subtraction. </span><br />
<br />
For multipoles equal or greater than <math>\ell=30</math>, instead, the spectrum is derived from the ''Plik'' likelihood {{PlanckPapers|planck2014-a13}} by optimally combining the spectra in the frequency range 100-217 GHz, and correcting them for unresolved foregrounds. Associated 1-sigma errors include beam uncertainties. Both ''Commander'' and ''Plik'' are described in more details in the sections below.<br />
<br />
[[File: Planck2014 TT Dl NORES bin30 w180mm.jpeg|thumb|center|700px|'''CMB spectrum. Logarithmic x-scale up to <math>\ell=30</math>, linear at higher <math>\ell</math>; all points with error bars. The red line is the Planck best-fit primordial power spectrum (cf Planck TT+lowP in Table 3 of {{PlanckPapers|planck2014-a15}}). The blue shaded area shows the uncertainties due to cosmic variance alone.''']]<br />
===Production process===<br />
<br />
<span style="color:red"> UPDATE COMMANDER<br />
The <math>\ell</math> < 50 part of the Planck power spectrum is derived from the Commander approach, which implements Bayesian component separation in pixel space, fitting a parametric model to the data by sampling the posterior distribution for the model parameters {{PlanckPapers|planck2013-p06}}. The power spectrum at any multipole <math>\ell</math> is given as the maximum probability point for the posterior <math>C_\ell</math> distribution, marginalized over the other multipoles, and the error bars are 68% confidence level {{PlanckPapers|planck2013-p08}}. </span><br />
<br />
The <math>\ell</math> > 30 part of the CMB temperature power spectrum has been derived by the Plik likelihood, a code that implements a pseudo-Cl based technique, extensively described in Sec. 2 and the Appendix of {{PlanckPapers|planck2013-p08}}. Frequency spectra are computed as cross-spectra between half-mission maps. Mask and multipole range choices for each frequency spectrum are summarized in Section 3.3 of {{PlanckPapers|planck2014-a15}} and in {{PlanckPapers|planck2014-a13}}. The final power spectrum is an optimal combination of the 100, 143, 143x217 and 217 GHz spectra, corrected for the best-fit unresolved foregrounds and inter-frequency calibration factors, as derived from the full likelihood analysis (cf Planck+TT+lowP in Table 3 of {{PlanckPapers|planck2014-a15}}). A thorough description of the models of unresolved foregrounds is given in {{PlanckPapers|planck2014-a13}}. The spectrum covariance matrix accounts for cosmic variance and noise contributions, together with beam uncertainties. The <math>\ell</math> > 30 CMB TT spectrum and associated covariance matrix are available in two formats:<br />
#Unbinned, with 2479 bandpowers (<math>\ell=30-2508</math>).<br />
#Binned, in bins of <math> \Delta\ell=30 </math>, with 83 bandpowers in total. We bin the <math> C_\ell </math> power spectrum with a weight proportional to <math> \ell (\ell+1) </math>, so that the <math> C_{\ell_b} </math> binned bandpower centered in <math> \ell_b </math> is: <math> \\ C_{\ell_b}=\Sigma_{\ell \in b} w_{\ell_b\ell} C_\ell \quad \text{with} \quad w_{\ell_b\ell}=\frac{\ell (\ell+1)}{\Sigma_{\ell \in b} \ell (\ell+1)}. \\</math> Equivalently, using the matrix formalism, we can construct the binning matrix B as: <math>\\ B_{\ell_b \ell}=w_{\ell_b\ell} \\ </math> where B is a <math> n_b\times n_\ell</math> matrix, with <math>n_b=83</math> the number of bins and <math>n_\ell=2479</math> the number of unbinned multipoles. Thus: <math> \\ \vec{C}_\mathrm{binned}=B \, \vec{C} \\ \mathrm{cov_\mathrm{binned}}= B\, \mathrm{cov}\, B^T \\ \ell_b=B\, \ell \\ </math> Here, <math> \vec{C}_{binned}\, (\vec{C}) </math> is the vector containing all the binned (unbinned) <math>C_\ell</math> bandpowers, <math>\mathrm{cov} </math> is the covariance matrix and <math>\ell_b</math> is the weighted average multipole in each bin. The binned <math>D_{\ell_B}</math> power spectrum is then calculated as: <math> \\ D_{\ell_b}=\frac{\ell_b (\ell_b+1)}{2\pi} C_{\ell_b} </math>.<br />
<br />
===Inputs===<br />
<span style="color:red"> UPDATE COMMANDER</span><br />
<br />
; Low-l spectrum (<math>\ell < 30</math>):<br />
* frequency maps from 30–353 GHz<br />
* common mask {{PlanckPapers|planck2013-p06}}<br />
* compact sources catalog<br />
<br />
; High-l spectrum (<math>30 < \ell < 2500</math>): <br />
<br />
* 100, 143, 143x217 and 217 GHz spectra and their covariance matrix (Sec. 3.3 {{PlanckPapers|planck2014-a15}})<br />
* best-fit foreground templates and inter-frequency calibration factors (Table 3 of {{PlanckPapers|planck2014-a15}})<br />
* Beam transfer function uncertainties {{PlanckPapers|planck2014-a08}}<br />
=== File names and Meta data ===<br />
<br />
<span style="color:red"> CHECK EXTENSION NAMES </span><br />
<br />
The CMB spectrum and its covariance matrix are distributed in a single FITS file named <br />
* ''{{PLASingleFile | fileType=cosmo | name=COM_PowerSpect_CMB_R1.10.fits | link=COM_PowerSpect_CMB_R1.10.fits}}'' <br />
<br />
which contains 5 extensions<br />
<br />
; LOW-ELL (BINTABLE)<br />
: with the low ell part of the spectrum, not binned, and for l=2-49. The table columns are<br />
# ''ELL'' (integer): multipole number<br />
# ''D_ELL'' (float): $D_l$ as described below<br />
# ''ERRUP'' (float): the upward uncertainty<br />
# ''ERRDOWN'' (float): the downward uncertainty<br />
<br />
; HIGH-ELL (BINTABLE) <br />
: with the high-ell part of the spectrum, binned into 83 bins covering <math>\langle l \rangle = 47-2499\ </math> in bins of width <math>l=30</math> (with the exception of the last bin that is smaller). The table columns are as follows:<br />
# ''ELL'' (integer): mean multipole number of bin<br />
# ''L_MIN'' (integer): lowest multipole of bin<br />
# ''L_MAX'' (integer): highest multipole of bin<br />
# ''D_ELL'' (float): $D_l$ as described below<br />
# ''ERR'' (float): the uncertainty<br />
<br />
; COV-MAT (IMAGE)<br />
: with the covariance matrix of the high-ell part of the spectrum in a 83x83 pixel image, i.e., covering the same bins as the ''HIGH-ELL'' table.<br />
Note that this is the covariance matrix of the <math>C_\ell</math>, not of the <math>D_\ell</math>.<br />
<br />
; HIGH-ELL (BINTABLE)<br />
: with the high-ell part of the spectrum, unbinned, in 2979 bins covering <math>\langle l \rangle = 30-2508\ </math>. The table columns are as follows:<br />
# ''ELL'' (integer): multipole <br />
# ''D_ELL'' (float): $D_l$ as described below<br />
# ''ERR'' (float): the uncertainty<br />
<br />
; COV-MAT (IMAGE)<br />
: with the covariance matrix of the high-ell part of the spectrum in a 2979x2979 pixel image, i.e., covering the same bins as the ''HIGH-ELL'' table.<br />
<br />
The spectra give $D_\ell = \ell(\ell+1)C_\ell / 2\pi$ in units of $\mu\, K^2$, and the covariance matrix is in units of $\mu\, K^4$. <br />
<br />
The CMB spectrum is also given in a simple text comma-separated file:<br />
* ''{{PLASingleFile | fileType=cosmo | name=COM_PowerSpect_CMB_R1.10.txt |link=COM_PowerSpect_CMB_R1.10.txt}}''<br />
<br />
==Likelihood==<br />
TO BE WRITTEN.<br />
<!-- <br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
The likelihood code (and the data that comes with it) used to compute the likelihood of a model that predicts the CMB power spectra, lensing power spectrum, together with some foreground and some instrumental parameters. The data files are built primarily from the Planck mission results, but include also some results from the WMAP-9 data release. The data files are written in a specific format that can only be read by the code. The code consists in a c/f90 library, along with some optional tools in python. The code is used to read the data files, and given model power spectra and nuisance parameters it computes the log likelihood of that model. <br />
<br />
Detailed description of the installation and usage of the likelihood code and data is provided in the package. The package includes five data files: four for the CMB likelihoods and one for the lensing likelihood. All of the likelihoods delivered are described in detail in the {{PlanckPapers|planck2013-p08|1|Power spectrum & Likelihood Paper}} (for the CMB based likelihood) and in the {{PlanckPapers|planck2013-p12|1|Lensing Paper}} (for the lensing likelihood) .<br />
<br />
The CMB full likelihood has been divided into four parts to allow using selectively different ranges of multipoles. It also reflects the fact that the mathematical approximations used for those different parts are very different, as is the underlying data. In detail, we distribute<br />
* one low-<math>\ell</math> temperature only likelihood (commander), <br />
* one low-<math>\ell</math> temperature and polarisation likelihood (lowlike), and <br />
* one higl-<math>\ell</math> likelihood CAMspec. <br />
<br />
The ''Commander'' likelihood covers the multipoles 2 to 49. It uses a semi-analytic method to sample the low-<math>\ell</math> temperature likelihood on an intermediate product of one of the component separated maps. The samples are used along with an analytical approximation of the likelihood posterior to perform the likelihood computation in the code. See {{PlanckPapers|planck2013-p08}} section 8.1 for more details.<br />
<br />
The ''lowlike'' likelihood covers the multipoles 2 to 32 for temperature and polarization data. Since Planck is not releasing polarisation data at this time, the polarization map from WMAP9 is used instead. A temperature map is needed to perform the computation nevertheless, and we use here the same commander map. The likelihood is computed using a map-based approximation at low resolution and a master one at intermediate resolution, as in WMAP. The likelihood code actually calls a very slightly modified version of the WMAP9 code. This piece of the likelihood essentially provides a prior on the optical depth and has almost no other impact on cosmological parameter estimation. As such it could be replaced by a simple prior, and a user can decide to do so, which is one of the motivation to leave the three pieces of the CMB likelihood as different data packages; see {{PlanckPapers|planck2013-p08}} section 8.3 for more details. Note that the version of the WMAP code used here (code version v1.0) does not perform any test on the positive definiteness of the TT, TE, EE covariance matrices, and will return a null log likelihood in the unphysical cases where the absolute value of TE is too large. This will be corrected in a later version.<br />
<br />
The ''CAMspec'' likelihood covers the multipoles 50 to 2500 for temperature only. The likelihood is computed using a quadratic approximation, including mode to mode correlations that have been precomputed on a fiducial model. The likelihood uses data from the 100, 143 and 217 GHz channels. To do so it models the foreground at each frequency using the model described in the likelihood paper. Uncertainties on the relative calibration and on the beam transfer functions are included either as parametric models, or marginalized and integrated in the covariance matrix. Detailed description of the different nuisance parameters is given below. Priors are included in the likelihood on the CIB spectral index, relative calibration factors and beam error eigenmodes. See {{PlanckPapers|planck2013-p08}} section 2.1 for more details.<br />
<br />
The ''act/spt'' likelihood covers the multipoles 1500 to 10000 for temperature. It is described in{{BibCite|dun2013}}{{BibCite|Keis2011}}{{BibCite|Reic2012}}. It uses the code and data that can be retrieved from the [http://lambda.gsfc.nasa.gov/ Lambda archive] for [http://lambda.gsfc.nasa.gov/product/act/act_prod_table.cfm ACT] and [http://lambda.gsfc.nasa.gov/product/spt/spt_prod_table.cfm SPT]. It has been slightly modified to use a thermal and kinetic SZ model that matches the one used in CAMspec. As stated in{{BibCite|dun2013}}, the dust parameters a_ge and a_gs must be explored with the following priors: a_ge = 0.8 ± 0.2 and a_gs = 0.4 ± 0.2. Those priors are not included in the log likelihood computed by the code.<br />
<br />
The ''lensing'' likelihood covers the multipoles 40 to 400 using the result of the [[Specially_processed_maps | lensing reconstruction]]. It uses a quadratic approximation for the likelihood, with a covariance matrix including the marginalized contribution of the beam transfer function uncertainties, the diffuse point source correction uncertainties and the cosmological model uncertainty affecting the first order non-gaussian bias (N1). The correlation between temperature and lensing is not taken into account. Cosmological uncertainty effects on the normalization are dealt with using a first order renormalization procedure. This means that the code will need both the TT and $\phi\phi$ power spectrum up to <math>\ell</math> = 2048 to correctly perform the integrals needed for the renormalization. Nevertheless, the code will only produce an estimate based on the data between <math>\ell</math> = 40 to 400. See {{PlanckPapers|planck2013-p12}} section 6.1 for more details.<br />
</span><br />
<span style="color:red">OUTSTANDING: description of likelihood masks </span><br />
==Production process==<br />
<br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
The code is based on some basic routines from the libpmc library in the [http://arxiv.org/abs/1101.0950 cosmoPMC] code. It also uses some code from the [http://lambda.gsfc.nasa.gov/product/map/dr5/likelihood_get.cfm WMAP9 likelihood] for the lowlike likelihood and{{BibCite|dun2013}}{{BibCite|Keis2011}}{{BibCite|Reic2012}} for the act/spt one. The rest of the code has been specifically written for the Planck data. Each likelihood file has been processed using a different and dedicated pipeline as described in the likelihood paper {{PlanckPapers|planck2013-p08}} (section 2 and 8) and in the lensing paper {{PlanckPapers|planck2013-p12}} (section 6.1). We refer the reader to those papers for full details. The data are then encapsulated into the specific file format.<br />
<br />
Each dataset comes with its own self check. Whenever the code is used to read a data file, a computation will be done against an included test spectrum/nuisance parameter, and the log-likelihood will be displayed along with the expected result. Difference of the order of 10<math>^{-6}</math> or less are expected depending of the architecture.<br />
<br />
==Inputs==<br />
<br />
===Likelihood===<br />
<br />
; ''commander'' :<br />
* all Planck channels maps<br />
* compact source catalogs<br />
* common masks<br />
* beam transfer functions for all channels<br />
<br />
; ''lowlike'' :<br />
* WMAP9 likelihood data<br />
* Low-<math>\ell</math> Commander map<br />
<br />
; ''CAMspec'' :<br />
* 100, 143 and 217 GHz detector and detsets maps<br />
* 857GHz channel map<br />
* compact source catalog<br />
* common masks (0,1 & 3)<br />
* beam transfer function and error eigenmodes and covariance for 100, 143 and 217 GHz detectors & detsets<br />
* theoretical templates for the tSZ and kSZ contributions<br />
* color corrections for the CIB emission for the 143 and 217GHz detectors and detsets<br />
* fiducial CMB model (bootstrapped from WMAP7 best fit spectrum) estimated noise contribution from the half-ring maps for 100, 143 and 217 GHz<br />
<br />
; ''lensing'' :<br />
* the lensing map<br />
* beam error eigenmodes and covariance for the 143 and 217GHz channel maps<br />
* fiducial CMB model (from Planck cosmological parameter best fit)<br />
<br />
; ''act/spt'' :<br />
* data and code from [http://lambda.gsfc.nasa.gov/product/act/act_fulllikelihood_get.cfm here]<br />
* the tSZ andkSZ template are changed to match those of CAMspec<br />
<br />
== File names and Meta data ==<br />
<br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
<br />
'''Likelihood source code'''<br />
<br />
The source code is in the file<br />
: {{PLASingleFile |fileType=cosmo|name=COM_Code_Likelihood-v1.0_R1.10.tar.gz|link=COM_Code_Likelihood-v1.0_R1.10.tar.gz}} (C, f90 and python likelihood library and tools)<br />
<br />
'''Likelihood data packages'''<br />
<br />
The {{PLALikelihood|type=Data|link=data packages}} are<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-commander_R1.10.tar.gz | link=COM_Data_Likelihood-commander_R1.10.tar.gz}}'' (low-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-lowlike_R1.10.tar.gz | link=COM_Data_Likelihood-lowlike_R1.10.tar.gz}}'' (low-ell TE,EE,BB likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-CAMspec_R1.10.tar.gz | link=COM_Data_Likelihood-CAMspec_R1.10.tar.gz}}'' (high-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-actspt_R1.10.tar | link=COM_Data_Likelihood-actspt_R1.10.tar.gz}}'' (high-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-lensing_R1.10.tar.gz | link=COM_Data_Likelihood-lensing_R1.10.tar.gz}}'' (lensing likelihood)<br />
<br />
Untar and unzip all files to recover the code and likelihood data. Each package comes with a README file; follow the instructions inclosed to<br />
build the code and use it. To compute the CMB likelihood one has to sum the log likelihood of each of the commander_v4.1_lm49.clik, lowlike_v222.clik and CAMspec_v6.2TN_2013_02_26.clik, actspt_2013_01.clik. To compute the CMB+lensing likelihood, one has to sum the log likelihood of all 5 files.<br />
<br />
The CMB and lensing likelihood format are different. The CMB files have the termination .clik, the lensing one .clik_lensing. The lensing data being simpler (due to the less detailled modeling permitted by the lower signal-noise), the file is a simple ascii file containing all the data along with comments describing it, and linking the different quantities to the lensing paper. The CMB file format is more complex and must accommodate different forms of data (maps, power spectrum, distribution samples, covariance matrices...). It consists of a tree structure containing the data. At each level of the tree structure a given directory can contain array data (in the form of FITS files or ascii files for strings) and scalar data (joined in a single ascii file "_mdb"). Those files are not user modifiable and do not contain interesting meta data for the user. Tools to manipulate those files are included in the code package as optional python tools. They are documented in the code package.<br />
<br />
'''Likelihood masks'''<br />
<br />
The masks used in the Likelihood paper {{PlanckPapers|planck2013-p08}} are found in<br />
{{PLASingleFile|fileType=map|name=COM_Mask_Likelihood_2048_R1.10.fits|link=COM_Mask_Likelihood_2048_R1.10.fits}}<br />
<br />
which contains ten masks which are written into a single ''BINTABLE'' extension of 10 columns by 50331648 rows (the number of Healpix pixels in an Nside = 2048 map). The structure is as follows, where the column names are the names of the masks: <br />
<br />
{| border="1" cellpadding="3" cellspacing="0" align="center" style="text-align:left" width=800px<br />
|+ '''Likelihodd masks file data structure'''<br />
|- bgcolor="ffdead" <br />
!colspan="4" | 1. EXTNAME = 'MSK-LIKE' : Data columns<br />
|- bgcolor="ffdead" <br />
! Column Name || Data Type || Units || Description<br />
|-<br />
|CL31 || Real*4 || none || mask<br />
|-<br />
|CL39 || Real*4 || none || mask<br />
|-<br />
|CL49 || Real*4 || none || mask<br />
|-<br />
|G22 || Real*4 || none || mask <br />
|-<br />
|G35 || Real*4 || none || mask<br />
|-<br />
|G45 || Real*4 || none || mask<br />
|-<br />
|G56 || Real*4 || none || mask<br />
|-<br />
|G65 || Real*4 || none || mask<br />
|-<br />
|PS96 || Real*4 || none || mask<br />
|-<br />
|PSA82 || Real*4 || none || mask<br />
|-<br />
|- bgcolor="ffdead" <br />
! Keyword || Data Type || Value || Description<br />
|-<br />
|PIXTYPE || string || HEALPIX ||<br />
|-<br />
|COORDSYS || string || GALACTIC ||Coordinate system <br />
|-<br />
|ORDERING || string || NESTED || Healpix ordering<br />
|-<br />
|NSIDE || Int || 2048 || Healpix Nside <br />
|-<br />
|FIRSTPIX || Int*4 || 0 || First pixel number<br />
|-<br />
|LASTPIX || Int*4 || 50331647 || Last pixel number, for LFI and HFI, respectively<br />
<br />
|}<br />
--><br />
== References ==<br />
<References /><br />
<br />
<br />
<br />
[[Category:Mission products|008]]</div>Sgallihttps://wiki.cosmos.esa.int/planckpla2015/index.php?title=CMB_spectrum_%26_Likelihood_Code&diff=11085CMB spectrum & Likelihood Code2015-02-04T01:22:48Z<p>Sgalli: </p>
<hr />
<div>{{DISPLAYTITLE:CMB spectrum and likelihood code}}<br />
<br />
==CMB spectra==<br />
<br />
===General description===<br />
<br />
<br />
The Planck best-fit CMB temperature power spectrum, shown in figure below, covers the wide range of multipoles <math> \ell </math> = 2-2508. <br />
<span style="color:red"> UPDATE COMMANDER: Over the multipole range <math> \ell </math> = 2–29, the power spectrum is derived from a component-separation algorithm, ''Commander'': applied to maps in the frequency range 30–353 GHz over 91% of the sky {{PlanckPapers|planck2013-p06}} . The asymmetric error bars associated to this spectrum are the 68% confidence limits and include the uncertainties due to foreground subtraction. </span><br />
<br />
For multipoles equal or greater than <math>\ell=30</math>, instead, the spectrum is derived from the ''Plik'' likelihood {{PlanckPapers|planck2014-a13}} by optimally combining the spectra in the frequency range 100-217 GHz, and correcting them for unresolved foregrounds. Associated 1-sigma errors include beam uncertainties. Both ''Commander'' and ''Plik'' are described in more details in the sections below.<br />
<br />
[[File: Planck2014 TT Dl NORES bin30 w180mm.jpeg|thumb|center|700px|'''CMB spectrum. Logarithmic x-scale up to <math>\ell=30</math>, linear at higher <math>\ell</math>; all points with error bars. The red line is the Planck best-fit primordial power spectrum (cf Planck TT+lowP in Table 3 of {{PlanckPapers|planck2014-a15}}). The blue shaded area shows the uncertainties due to cosmic variance alone.''']]<br />
===Production process===<br />
<br />
<span style="color:red"> UPDATE COMMANDER<br />
The <math>\ell</math> < 50 part of the Planck power spectrum is derived from the Commander approach, which implements Bayesian component separation in pixel space, fitting a parametric model to the data by sampling the posterior distribution for the model parameters {{PlanckPapers|planck2013-p06}}. The power spectrum at any multipole <math>\ell</math> is given as the maximum probability point for the posterior <math>C_\ell</math> distribution, marginalized over the other multipoles, and the error bars are 68% confidence level {{PlanckPapers|planck2013-p08}}. </span><br />
<br />
The <math>\ell</math> > 30 part of the CMB temperature power spectrum has been derived by the Plik likelihood, a code that implements a pseudo-Cl based technique, extensively described in Sec. 2 and the Appendix of {{PlanckPapers|planck2013-p08}}. Frequency spectra are computed as cross-spectra between half-mission maps. Mask and multipole range choices for each frequency spectrum are summarized in Section 3.3 of {{PlanckPapers|planck2014-a15}} and in {{PlanckPapers|planck2014-a13}}. The final power spectrum is an optimal combination of the 100, 143, 143x217 and 217 GHz spectra, corrected for the best-fit unresolved foregrounds and inter-frequency calibration factors, as derived from the full likelihood analysis (cf Planck+TT+lowP in Table 3 of {{PlanckPapers|planck2014-a15}}). A thorough description of the models of unresolved foregrounds is given in {{PlanckPapers|planck2014-a13}}. The spectrum covariance matrix accounts for cosmic variance and noise contributions, together with beam uncertainties. The <math>\ell</math> > 30 CMB TT spectrum and associated covariance matrix are available in two formats:<br />
#Unbinned, with 2479 bandpowers (<math>\ell=30-2508</math>).<br />
#Binned, in bins of <math> \Delta\ell=30 </math>, with 83 bandpowers in total. We bin the <math> C_\ell </math> power spectrum with a weight proportional to <math> \ell (\ell+1) </math>, so that the <math> C_{\ell_b} </math> binned bandpower centered in <math> \ell_b </math> is: <math> \\ C_{\ell_b}=\Sigma_{\ell \in b} w_{\ell_b\ell} C_\ell \quad \text{with} \quad w_{\ell_b\ell}=\frac{\ell (\ell+1)}{\Sigma_{\ell \in b} \ell (\ell+1)}. \\</math> Equivalently, using the matrix formalism, we can construct the binning matrix B as: <math>\\ B_{\ell_b \ell}=w_{\ell_b\ell} \\ </math> where B is a <math> n_b\times n_\ell</math> matrix, with <math>n_b=83</math> the number of bins and <math>n_\ell=2479</math> the number of unbinned multipoles. Thus: <math> \\ \vec{C}_\mathrm{binned}=B \, \vec{C} \\ \mathrm{cov_\mathrm{binned}}= B\, \mathrm{cov}\, B^T \\ \ell_b=B\, \ell \\ </math> Here, <math> \vec{C}_{binned}\, (\vec{C}) </math> is the vector containing all the binned (unbinned) <math>C_\ell</math> bandpowers, <math>\mathrm{cov} </math> is the covariance matrix and <math>\ell_b</math> is the weighted multipole average in each bin. The binned <math>D_{\ell_B}</math> power spectrum is then calculated as: <math> \\ D_{\ell_b}=\frac{\ell_b (\ell_b+1)}{2\pi} C_{\ell_b} </math>.<br />
<br />
===Inputs===<br />
<span style="color:red"> UPDATE COMMANDER</span><br />
<br />
; Low-l spectrum (<math>\ell < 30</math>):<br />
* frequency maps from 30–353 GHz<br />
* common mask {{PlanckPapers|planck2013-p06}}<br />
* compact sources catalog<br />
<br />
; High-l spectrum (<math>30 < \ell < 2500</math>): <br />
<br />
* 100, 143, 143x217 and 217 GHz spectra and their covariance matrix (Sec. 3.3 {{PlanckPapers|planck2014-a15}})<br />
* best-fit foreground templates and inter-frequency calibration factors (Table 3 of {{PlanckPapers|planck2014-a15}})<br />
* Beam transfer function uncertainties {{PlanckPapers|planck2014-a08}}<br />
=== File names and Meta data ===<br />
<br />
<span style="color:red"> CHECK EXTENSION NAMES </span><br />
<br />
The CMB spectrum and its covariance matrix are distributed in a single FITS file named <br />
* ''{{PLASingleFile | fileType=cosmo | name=COM_PowerSpect_CMB_R1.10.fits | link=COM_PowerSpect_CMB_R1.10.fits}}'' <br />
<br />
which contains 5 extensions<br />
<br />
; LOW-ELL (BINTABLE)<br />
: with the low ell part of the spectrum, not binned, and for l=2-49. The table columns are<br />
# ''ELL'' (integer): multipole number<br />
# ''D_ELL'' (float): $D_l$ as described below<br />
# ''ERRUP'' (float): the upward uncertainty<br />
# ''ERRDOWN'' (float): the downward uncertainty<br />
<br />
; HIGH-ELL (BINTABLE) <br />
: with the high-ell part of the spectrum, binned into 83 bins covering <math>\langle l \rangle = 47-2499\ </math> in bins of width <math>l=30</math> (with the exception of the last bin that is smaller). The table columns are as follows:<br />
# ''ELL'' (integer): mean multipole number of bin<br />
# ''L_MIN'' (integer): lowest multipole of bin<br />
# ''L_MAX'' (integer): highest multipole of bin<br />
# ''D_ELL'' (float): $D_l$ as described below<br />
# ''ERR'' (float): the uncertainty<br />
<br />
; COV-MAT (IMAGE)<br />
: with the covariance matrix of the high-ell part of the spectrum in a 83x83 pixel image, i.e., covering the same bins as the ''HIGH-ELL'' table.<br />
Note that this is the covariance matrix of the <math>C_\ell</math>, not of the <math>D_\ell</math>.<br />
<br />
; HIGH-ELL (BINTABLE)<br />
: with the high-ell part of the spectrum, unbinned, in 2979 bins covering <math>\langle l \rangle = 30-2508\ </math>. The table columns are as follows:<br />
# ''ELL'' (integer): multipole <br />
# ''D_ELL'' (float): $D_l$ as described below<br />
# ''ERR'' (float): the uncertainty<br />
<br />
; COV-MAT (IMAGE)<br />
: with the covariance matrix of the high-ell part of the spectrum in a 2979x2979 pixel image, i.e., covering the same bins as the ''HIGH-ELL'' table.<br />
<br />
The spectra give $D_\ell = \ell(\ell+1)C_\ell / 2\pi$ in units of $\mu\, K^2$, and the covariance matrix is in units of $\mu\, K^4$. <br />
<br />
The CMB spectrum is also given in a simple text comma-separated file:<br />
* ''{{PLASingleFile | fileType=cosmo | name=COM_PowerSpect_CMB_R1.10.txt |link=COM_PowerSpect_CMB_R1.10.txt}}''<br />
<br />
==Likelihood==<br />
TO BE WRITTEN.<br />
<!-- <br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
The likelihood code (and the data that comes with it) used to compute the likelihood of a model that predicts the CMB power spectra, lensing power spectrum, together with some foreground and some instrumental parameters. The data files are built primarily from the Planck mission results, but include also some results from the WMAP-9 data release. The data files are written in a specific format that can only be read by the code. The code consists in a c/f90 library, along with some optional tools in python. The code is used to read the data files, and given model power spectra and nuisance parameters it computes the log likelihood of that model. <br />
<br />
Detailed description of the installation and usage of the likelihood code and data is provided in the package. The package includes five data files: four for the CMB likelihoods and one for the lensing likelihood. All of the likelihoods delivered are described in detail in the {{PlanckPapers|planck2013-p08|1|Power spectrum & Likelihood Paper}} (for the CMB based likelihood) and in the {{PlanckPapers|planck2013-p12|1|Lensing Paper}} (for the lensing likelihood) .<br />
<br />
The CMB full likelihood has been divided into four parts to allow using selectively different ranges of multipoles. It also reflects the fact that the mathematical approximations used for those different parts are very different, as is the underlying data. In detail, we distribute<br />
* one low-<math>\ell</math> temperature only likelihood (commander), <br />
* one low-<math>\ell</math> temperature and polarisation likelihood (lowlike), and <br />
* one higl-<math>\ell</math> likelihood CAMspec. <br />
<br />
The ''Commander'' likelihood covers the multipoles 2 to 49. It uses a semi-analytic method to sample the low-<math>\ell</math> temperature likelihood on an intermediate product of one of the component separated maps. The samples are used along with an analytical approximation of the likelihood posterior to perform the likelihood computation in the code. See {{PlanckPapers|planck2013-p08}} section 8.1 for more details.<br />
<br />
The ''lowlike'' likelihood covers the multipoles 2 to 32 for temperature and polarization data. Since Planck is not releasing polarisation data at this time, the polarization map from WMAP9 is used instead. A temperature map is needed to perform the computation nevertheless, and we use here the same commander map. The likelihood is computed using a map-based approximation at low resolution and a master one at intermediate resolution, as in WMAP. The likelihood code actually calls a very slightly modified version of the WMAP9 code. This piece of the likelihood essentially provides a prior on the optical depth and has almost no other impact on cosmological parameter estimation. As such it could be replaced by a simple prior, and a user can decide to do so, which is one of the motivation to leave the three pieces of the CMB likelihood as different data packages; see {{PlanckPapers|planck2013-p08}} section 8.3 for more details. Note that the version of the WMAP code used here (code version v1.0) does not perform any test on the positive definiteness of the TT, TE, EE covariance matrices, and will return a null log likelihood in the unphysical cases where the absolute value of TE is too large. This will be corrected in a later version.<br />
<br />
The ''CAMspec'' likelihood covers the multipoles 50 to 2500 for temperature only. The likelihood is computed using a quadratic approximation, including mode to mode correlations that have been precomputed on a fiducial model. The likelihood uses data from the 100, 143 and 217 GHz channels. To do so it models the foreground at each frequency using the model described in the likelihood paper. Uncertainties on the relative calibration and on the beam transfer functions are included either as parametric models, or marginalized and integrated in the covariance matrix. Detailed description of the different nuisance parameters is given below. Priors are included in the likelihood on the CIB spectral index, relative calibration factors and beam error eigenmodes. See {{PlanckPapers|planck2013-p08}} section 2.1 for more details.<br />
<br />
The ''act/spt'' likelihood covers the multipoles 1500 to 10000 for temperature. It is described in{{BibCite|dun2013}}{{BibCite|Keis2011}}{{BibCite|Reic2012}}. It uses the code and data that can be retrieved from the [http://lambda.gsfc.nasa.gov/ Lambda archive] for [http://lambda.gsfc.nasa.gov/product/act/act_prod_table.cfm ACT] and [http://lambda.gsfc.nasa.gov/product/spt/spt_prod_table.cfm SPT]. It has been slightly modified to use a thermal and kinetic SZ model that matches the one used in CAMspec. As stated in{{BibCite|dun2013}}, the dust parameters a_ge and a_gs must be explored with the following priors: a_ge = 0.8 ± 0.2 and a_gs = 0.4 ± 0.2. Those priors are not included in the log likelihood computed by the code.<br />
<br />
The ''lensing'' likelihood covers the multipoles 40 to 400 using the result of the [[Specially_processed_maps | lensing reconstruction]]. It uses a quadratic approximation for the likelihood, with a covariance matrix including the marginalized contribution of the beam transfer function uncertainties, the diffuse point source correction uncertainties and the cosmological model uncertainty affecting the first order non-gaussian bias (N1). The correlation between temperature and lensing is not taken into account. Cosmological uncertainty effects on the normalization are dealt with using a first order renormalization procedure. This means that the code will need both the TT and $\phi\phi$ power spectrum up to <math>\ell</math> = 2048 to correctly perform the integrals needed for the renormalization. Nevertheless, the code will only produce an estimate based on the data between <math>\ell</math> = 40 to 400. See {{PlanckPapers|planck2013-p12}} section 6.1 for more details.<br />
</span><br />
<span style="color:red">OUTSTANDING: description of likelihood masks </span><br />
==Production process==<br />
<br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
The code is based on some basic routines from the libpmc library in the [http://arxiv.org/abs/1101.0950 cosmoPMC] code. It also uses some code from the [http://lambda.gsfc.nasa.gov/product/map/dr5/likelihood_get.cfm WMAP9 likelihood] for the lowlike likelihood and{{BibCite|dun2013}}{{BibCite|Keis2011}}{{BibCite|Reic2012}} for the act/spt one. The rest of the code has been specifically written for the Planck data. Each likelihood file has been processed using a different and dedicated pipeline as described in the likelihood paper {{PlanckPapers|planck2013-p08}} (section 2 and 8) and in the lensing paper {{PlanckPapers|planck2013-p12}} (section 6.1). We refer the reader to those papers for full details. The data are then encapsulated into the specific file format.<br />
<br />
Each dataset comes with its own self check. Whenever the code is used to read a data file, a computation will be done against an included test spectrum/nuisance parameter, and the log-likelihood will be displayed along with the expected result. Difference of the order of 10<math>^{-6}</math> or less are expected depending of the architecture.<br />
<br />
==Inputs==<br />
<br />
===Likelihood===<br />
<br />
; ''commander'' :<br />
* all Planck channels maps<br />
* compact source catalogs<br />
* common masks<br />
* beam transfer functions for all channels<br />
<br />
; ''lowlike'' :<br />
* WMAP9 likelihood data<br />
* Low-<math>\ell</math> Commander map<br />
<br />
; ''CAMspec'' :<br />
* 100, 143 and 217 GHz detector and detsets maps<br />
* 857GHz channel map<br />
* compact source catalog<br />
* common masks (0,1 & 3)<br />
* beam transfer function and error eigenmodes and covariance for 100, 143 and 217 GHz detectors & detsets<br />
* theoretical templates for the tSZ and kSZ contributions<br />
* color corrections for the CIB emission for the 143 and 217GHz detectors and detsets<br />
* fiducial CMB model (bootstrapped from WMAP7 best fit spectrum) estimated noise contribution from the half-ring maps for 100, 143 and 217 GHz<br />
<br />
; ''lensing'' :<br />
* the lensing map<br />
* beam error eigenmodes and covariance for the 143 and 217GHz channel maps<br />
* fiducial CMB model (from Planck cosmological parameter best fit)<br />
<br />
; ''act/spt'' :<br />
* data and code from [http://lambda.gsfc.nasa.gov/product/act/act_fulllikelihood_get.cfm here]<br />
* the tSZ andkSZ template are changed to match those of CAMspec<br />
<br />
== File names and Meta data ==<br />
<br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
<br />
'''Likelihood source code'''<br />
<br />
The source code is in the file<br />
: {{PLASingleFile |fileType=cosmo|name=COM_Code_Likelihood-v1.0_R1.10.tar.gz|link=COM_Code_Likelihood-v1.0_R1.10.tar.gz}} (C, f90 and python likelihood library and tools)<br />
<br />
'''Likelihood data packages'''<br />
<br />
The {{PLALikelihood|type=Data|link=data packages}} are<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-commander_R1.10.tar.gz | link=COM_Data_Likelihood-commander_R1.10.tar.gz}}'' (low-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-lowlike_R1.10.tar.gz | link=COM_Data_Likelihood-lowlike_R1.10.tar.gz}}'' (low-ell TE,EE,BB likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-CAMspec_R1.10.tar.gz | link=COM_Data_Likelihood-CAMspec_R1.10.tar.gz}}'' (high-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-actspt_R1.10.tar | link=COM_Data_Likelihood-actspt_R1.10.tar.gz}}'' (high-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-lensing_R1.10.tar.gz | link=COM_Data_Likelihood-lensing_R1.10.tar.gz}}'' (lensing likelihood)<br />
<br />
Untar and unzip all files to recover the code and likelihood data. Each package comes with a README file; follow the instructions inclosed to<br />
build the code and use it. To compute the CMB likelihood one has to sum the log likelihood of each of the commander_v4.1_lm49.clik, lowlike_v222.clik and CAMspec_v6.2TN_2013_02_26.clik, actspt_2013_01.clik. To compute the CMB+lensing likelihood, one has to sum the log likelihood of all 5 files.<br />
<br />
The CMB and lensing likelihood format are different. The CMB files have the termination .clik, the lensing one .clik_lensing. The lensing data being simpler (due to the less detailled modeling permitted by the lower signal-noise), the file is a simple ascii file containing all the data along with comments describing it, and linking the different quantities to the lensing paper. The CMB file format is more complex and must accommodate different forms of data (maps, power spectrum, distribution samples, covariance matrices...). It consists of a tree structure containing the data. At each level of the tree structure a given directory can contain array data (in the form of FITS files or ascii files for strings) and scalar data (joined in a single ascii file "_mdb"). Those files are not user modifiable and do not contain interesting meta data for the user. Tools to manipulate those files are included in the code package as optional python tools. They are documented in the code package.<br />
<br />
'''Likelihood masks'''<br />
<br />
The masks used in the Likelihood paper {{PlanckPapers|planck2013-p08}} are found in<br />
{{PLASingleFile|fileType=map|name=COM_Mask_Likelihood_2048_R1.10.fits|link=COM_Mask_Likelihood_2048_R1.10.fits}}<br />
<br />
which contains ten masks which are written into a single ''BINTABLE'' extension of 10 columns by 50331648 rows (the number of Healpix pixels in an Nside = 2048 map). The structure is as follows, where the column names are the names of the masks: <br />
<br />
{| border="1" cellpadding="3" cellspacing="0" align="center" style="text-align:left" width=800px<br />
|+ '''Likelihodd masks file data structure'''<br />
|- bgcolor="ffdead" <br />
!colspan="4" | 1. EXTNAME = 'MSK-LIKE' : Data columns<br />
|- bgcolor="ffdead" <br />
! Column Name || Data Type || Units || Description<br />
|-<br />
|CL31 || Real*4 || none || mask<br />
|-<br />
|CL39 || Real*4 || none || mask<br />
|-<br />
|CL49 || Real*4 || none || mask<br />
|-<br />
|G22 || Real*4 || none || mask <br />
|-<br />
|G35 || Real*4 || none || mask<br />
|-<br />
|G45 || Real*4 || none || mask<br />
|-<br />
|G56 || Real*4 || none || mask<br />
|-<br />
|G65 || Real*4 || none || mask<br />
|-<br />
|PS96 || Real*4 || none || mask<br />
|-<br />
|PSA82 || Real*4 || none || mask<br />
|-<br />
|- bgcolor="ffdead" <br />
! Keyword || Data Type || Value || Description<br />
|-<br />
|PIXTYPE || string || HEALPIX ||<br />
|-<br />
|COORDSYS || string || GALACTIC ||Coordinate system <br />
|-<br />
|ORDERING || string || NESTED || Healpix ordering<br />
|-<br />
|NSIDE || Int || 2048 || Healpix Nside <br />
|-<br />
|FIRSTPIX || Int*4 || 0 || First pixel number<br />
|-<br />
|LASTPIX || Int*4 || 50331647 || Last pixel number, for LFI and HFI, respectively<br />
<br />
|}<br />
--><br />
== References ==<br />
<References /><br />
<br />
<br />
<br />
[[Category:Mission products|008]]</div>Sgallihttps://wiki.cosmos.esa.int/planckpla2015/index.php?title=CMB_spectrum_%26_Likelihood_Code&diff=11083CMB spectrum & Likelihood Code2015-02-04T01:20:33Z<p>Sgalli: </p>
<hr />
<div>{{DISPLAYTITLE:CMB spectrum and likelihood code}}<br />
<br />
==CMB spectra==<br />
<br />
===General description===<br />
<br />
<br />
The Planck best-fit CMB temperature power spectrum, shown in figure below, covers the wide range of multipoles <math> \ell </math> = 2-2508. <br />
<span style="color:red"> UPDATE COMMANDER: Over the multipole range <math> \ell </math> = 2–29, the power spectrum is derived from a component-separation algorithm, ''Commander'': applied to maps in the frequency range 30–353 GHz over 91% of the sky {{PlanckPapers|planck2013-p06}} . The asymmetric error bars associated to this spectrum are the 68% confidence limits and include the uncertainties due to foreground subtraction. </span><br />
<br />
For multipoles equal or greater than <math>\ell=30</math>, instead, the spectrum is derived from the ''Plik'' likelihood {{PlanckPapers|planck2014-a13}} by optimally combining the spectra in the frequency range 100-217 GHz, and correcting them for unresolved foregrounds. Associated 1-sigma errors include beam uncertainties. Both ''Commander'' and ''Plik'' are described in more details in the sections below.<br />
<br />
[[File: Planck2014 TT Dl NORES bin30 w180mm.jpeg|thumb|center|700px|'''CMB spectrum. Logarithmic x-scale up to <math>\ell=30</math>, linear at higher <math>\ell</math>; all points with error bars. The red line is the Planck best-fit primordial power spectrum (cf Planck TT+lowP in Table 3 of {{PlanckPapers|planck2014-a15}}). The blue shaded area shows the uncertainties due to cosmic variance alone.''']]<br />
===Production process===<br />
<br />
<span style="color:red"> UPDATE COMMANDER<br />
The <math>\ell</math> < 50 part of the Planck power spectrum is derived from the Commander approach, which implements Bayesian component separation in pixel space, fitting a parametric model to the data by sampling the posterior distribution for the model parameters {{PlanckPapers|planck2013-p06}}. The power spectrum at any multipole <math>\ell</math> is given as the maximum probability point for the posterior <math>C_\ell</math> distribution, marginalized over the other multipoles, and the error bars are 68% confidence level {{PlanckPapers|planck2013-p08}}. </span><br />
<br />
The <math>\ell</math> > 30 part of the CMB temperature power spectrum has been derived by the Plik likelihood, a code that implements a pseudo-Cl based technique, extensively described in Sec. 2 and the Appendix of {{PlanckPapers|planck2013-p08}}. Frequency spectra are computed as cross-spectra between half-mission maps. Mask and multipole range choices for each frequency spectrum are summarized in Section 3.3 of {{PlanckPapers|planck2014-a15}} and in {{PlanckPapers|planck2014-a13}}. The final power spectrum is an optimal combination of the 100, 143, 143x217 and 217 GHz spectra, corrected for the best-fit unresolved foregrounds and inter-frequency calibration factors, as derived from the full likelihood analysis (cf Planck+TT+lowP in Table 3 of {{PlanckPapers|planck2014-a15}}). A thorough description of the models of unresolved foregrounds is given in {{PlanckPapers|planck2014-a13}}. The spectrum covariance matrix accounts for cosmic variance and noise contributions, together with beam uncertainties. The <math>\ell</math> > 30 CMB TT spectrum and associated covariance matrix are available in two formats:<br />
#Unbinned, with 2479 bandpowers (<math>\ell=30-2508</math>).<br />
#Binned, in bins of <math> \Delta\ell=30 </math>, with 83 bandpowers in total. We bin the <math> C_\ell </math> power spectrum with a weight proportional to <math> \ell (\ell+1) </math>, so that the <math> C_{\ell_b} </math> binned bandpower centered in <math> \ell_b </math> is: <math> \\ C_{\ell_b}=\Sigma_{\ell \in b} w_{\ell_b\ell} C_\ell \quad \text{with} \quad w_{\ell_b\ell}=\frac{\ell (\ell+1)}{\Sigma_{\ell \in b} \ell (\ell+1)}. \\</math> Equivalently, using the matrix formalism, we can construct the binning matrix B as: <math>\\ B_{\ell_b \ell}=w_{\ell_b\ell} \\ </math> where B is a <math> n_b\times n_\ell</math> matrix, with <math>n_b=83</math> the number of bins and <math>n_\ell=2479</math> the number of unbinned multipoles. Thus: <math> \\ \vec{C}_\mathrm{binned}=B \, \vec{C} \\ \mathrm{cov_\mathrm{binned}}= B\, \mathrm{cov}\, B^T \\ \ell_b=B\, \ell \\ </math> Here, <math> \vec{C}_{binned}\, (\vec{C}) </math> is the vector containing all the binned (unbinned) <math>C_\ell</math> bandpowers, <math>\mathrm{cov} </math> is the covariance matrix and <math>\ell_b</math> is the weighted multipole average in each bin. The binned <math>D_{\ell_B}</math> power spectrum is then calculated as: <math> \\ D_{\ell_b}=\frac{\ell_b (\ell_b+1)}{2\pi} C_{\ell_b} </math>.<br />
<br />
===Inputs===<br />
<span style="color:red"> UPDATE COMMANDER</span><br />
<br />
; Low-l spectrum (<math>\ell < 30</math>):<br />
* frequency maps from 30–353 GHz<br />
* common mask {{PlanckPapers|planck2013-p06}}<br />
* compact sources catalog<br />
<br />
; High-l spectrum (<math>30 < \ell < 2500</math>): <br />
<br />
* 100, 143, 143x217 and 217 GHz spectra and their covariance matrix (Sec. 3.3 {{PlanckPapers|planck2014-a15}})<br />
* best-fit foreground templates and inter-frequency calibration factors (Table 3 of {{PlanckPapers|planck2014-a15}})<br />
* Beam transfer function uncertainties {{PlanckPapers|planck2014-a08}}<br />
=== File names and Meta data ===<br />
<br />
<span style="color:red"> CHECK EXTENSION NAMES </span><br />
<br />
The CMB spectrum and its covariance matrix are distributed in a single FITS file named <br />
* ''{{PLASingleFile | fileType=cosmo | name=COM_PowerSpect_CMB_R1.10.fits | link=COM_PowerSpect_CMB_R1.10.fits}}'' <br />
<br />
which contains 5 extensions<br />
<br />
; LOW-ELL (BINTABLE)<br />
: with the low ell part of the spectrum, not binned, and for l=2-49. The table columns are<br />
# ''ELL'' (integer): multipole number<br />
# ''D_ELL'' (float): $D_l$ as described below<br />
# ''ERRUP'' (float): the upward uncertainty<br />
# ''ERRDOWN'' (float): the downward uncertainty<br />
<br />
; HIGH-ELL (BINTABLE) <br />
: with the high-ell part of the spectrum, binned into 83 bins covering <math>\langle l \rangle = 47-2499\ </math> in bins of width <math>l=30</math> (with the exception of the last bin that is smaller). The table columns are as follows:<br />
# ''ELL'' (integer): mean multipole number of bin<br />
# ''L_MIN'' (integer): lowest multipole of bin<br />
# ''L_MAX'' (integer): highest multipole of bin<br />
# ''D_ELL'' (float): $D_l$ as described below<br />
# ''ERR'' (float): the uncertainty<br />
<br />
; COV-MAT (IMAGE)<br />
: with the covariance matrix of the high-ell part of the spectrum in a 83x83 pixel image, i.e., covering the same bins as the ''HIGH-ELL'' table.<br />
<br />
<br />
; HIGH-ELL (BINTABLE)<br />
: with the high-ell part of the spectrum, unbinned, in 2979 bins covering <math>\langle l \rangle = 30-2508\ </math>. The table columns are as follows:<br />
# ''ELL'' (integer): multipole <br />
# ''D_ELL'' (float): $D_l$ as described below<br />
# ''ERR'' (float): the uncertainty<br />
<br />
; COV-MAT (IMAGE)<br />
: with the covariance matrix of the high-ell part of the spectrum in a 2979x2979 pixel image, i.e., covering the same bins as the ''HIGH-ELL'' table.<br />
<br />
The spectra give $D_\ell = \ell(\ell+1)C_\ell / 2\pi$ in units of $\mu\, K^2$, and the covariance matrix is in units of $\mu\, K^4$. <br />
<br />
The CMB spectrum is also given in a simple text comma-separated file:<br />
* ''{{PLASingleFile | fileType=cosmo | name=COM_PowerSpect_CMB_R1.10.txt |link=COM_PowerSpect_CMB_R1.10.txt}}''<br />
<br />
==Likelihood==<br />
TO BE WRITTEN.<br />
<!-- <br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
The likelihood code (and the data that comes with it) used to compute the likelihood of a model that predicts the CMB power spectra, lensing power spectrum, together with some foreground and some instrumental parameters. The data files are built primarily from the Planck mission results, but include also some results from the WMAP-9 data release. The data files are written in a specific format that can only be read by the code. The code consists in a c/f90 library, along with some optional tools in python. The code is used to read the data files, and given model power spectra and nuisance parameters it computes the log likelihood of that model. <br />
<br />
Detailed description of the installation and usage of the likelihood code and data is provided in the package. The package includes five data files: four for the CMB likelihoods and one for the lensing likelihood. All of the likelihoods delivered are described in detail in the {{PlanckPapers|planck2013-p08|1|Power spectrum & Likelihood Paper}} (for the CMB based likelihood) and in the {{PlanckPapers|planck2013-p12|1|Lensing Paper}} (for the lensing likelihood) .<br />
<br />
The CMB full likelihood has been divided into four parts to allow using selectively different ranges of multipoles. It also reflects the fact that the mathematical approximations used for those different parts are very different, as is the underlying data. In detail, we distribute<br />
* one low-<math>\ell</math> temperature only likelihood (commander), <br />
* one low-<math>\ell</math> temperature and polarisation likelihood (lowlike), and <br />
* one higl-<math>\ell</math> likelihood CAMspec. <br />
<br />
The ''Commander'' likelihood covers the multipoles 2 to 49. It uses a semi-analytic method to sample the low-<math>\ell</math> temperature likelihood on an intermediate product of one of the component separated maps. The samples are used along with an analytical approximation of the likelihood posterior to perform the likelihood computation in the code. See {{PlanckPapers|planck2013-p08}} section 8.1 for more details.<br />
<br />
The ''lowlike'' likelihood covers the multipoles 2 to 32 for temperature and polarization data. Since Planck is not releasing polarisation data at this time, the polarization map from WMAP9 is used instead. A temperature map is needed to perform the computation nevertheless, and we use here the same commander map. The likelihood is computed using a map-based approximation at low resolution and a master one at intermediate resolution, as in WMAP. The likelihood code actually calls a very slightly modified version of the WMAP9 code. This piece of the likelihood essentially provides a prior on the optical depth and has almost no other impact on cosmological parameter estimation. As such it could be replaced by a simple prior, and a user can decide to do so, which is one of the motivation to leave the three pieces of the CMB likelihood as different data packages; see {{PlanckPapers|planck2013-p08}} section 8.3 for more details. Note that the version of the WMAP code used here (code version v1.0) does not perform any test on the positive definiteness of the TT, TE, EE covariance matrices, and will return a null log likelihood in the unphysical cases where the absolute value of TE is too large. This will be corrected in a later version.<br />
<br />
The ''CAMspec'' likelihood covers the multipoles 50 to 2500 for temperature only. The likelihood is computed using a quadratic approximation, including mode to mode correlations that have been precomputed on a fiducial model. The likelihood uses data from the 100, 143 and 217 GHz channels. To do so it models the foreground at each frequency using the model described in the likelihood paper. Uncertainties on the relative calibration and on the beam transfer functions are included either as parametric models, or marginalized and integrated in the covariance matrix. Detailed description of the different nuisance parameters is given below. Priors are included in the likelihood on the CIB spectral index, relative calibration factors and beam error eigenmodes. See {{PlanckPapers|planck2013-p08}} section 2.1 for more details.<br />
<br />
The ''act/spt'' likelihood covers the multipoles 1500 to 10000 for temperature. It is described in{{BibCite|dun2013}}{{BibCite|Keis2011}}{{BibCite|Reic2012}}. It uses the code and data that can be retrieved from the [http://lambda.gsfc.nasa.gov/ Lambda archive] for [http://lambda.gsfc.nasa.gov/product/act/act_prod_table.cfm ACT] and [http://lambda.gsfc.nasa.gov/product/spt/spt_prod_table.cfm SPT]. It has been slightly modified to use a thermal and kinetic SZ model that matches the one used in CAMspec. As stated in{{BibCite|dun2013}}, the dust parameters a_ge and a_gs must be explored with the following priors: a_ge = 0.8 ± 0.2 and a_gs = 0.4 ± 0.2. Those priors are not included in the log likelihood computed by the code.<br />
<br />
The ''lensing'' likelihood covers the multipoles 40 to 400 using the result of the [[Specially_processed_maps | lensing reconstruction]]. It uses a quadratic approximation for the likelihood, with a covariance matrix including the marginalized contribution of the beam transfer function uncertainties, the diffuse point source correction uncertainties and the cosmological model uncertainty affecting the first order non-gaussian bias (N1). The correlation between temperature and lensing is not taken into account. Cosmological uncertainty effects on the normalization are dealt with using a first order renormalization procedure. This means that the code will need both the TT and $\phi\phi$ power spectrum up to <math>\ell</math> = 2048 to correctly perform the integrals needed for the renormalization. Nevertheless, the code will only produce an estimate based on the data between <math>\ell</math> = 40 to 400. See {{PlanckPapers|planck2013-p12}} section 6.1 for more details.<br />
</span><br />
<span style="color:red">OUTSTANDING: description of likelihood masks </span><br />
==Production process==<br />
<br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
The code is based on some basic routines from the libpmc library in the [http://arxiv.org/abs/1101.0950 cosmoPMC] code. It also uses some code from the [http://lambda.gsfc.nasa.gov/product/map/dr5/likelihood_get.cfm WMAP9 likelihood] for the lowlike likelihood and{{BibCite|dun2013}}{{BibCite|Keis2011}}{{BibCite|Reic2012}} for the act/spt one. The rest of the code has been specifically written for the Planck data. Each likelihood file has been processed using a different and dedicated pipeline as described in the likelihood paper {{PlanckPapers|planck2013-p08}} (section 2 and 8) and in the lensing paper {{PlanckPapers|planck2013-p12}} (section 6.1). We refer the reader to those papers for full details. The data are then encapsulated into the specific file format.<br />
<br />
Each dataset comes with its own self check. Whenever the code is used to read a data file, a computation will be done against an included test spectrum/nuisance parameter, and the log-likelihood will be displayed along with the expected result. Difference of the order of 10<math>^{-6}</math> or less are expected depending of the architecture.<br />
<br />
==Inputs==<br />
<br />
===Likelihood===<br />
<br />
; ''commander'' :<br />
* all Planck channels maps<br />
* compact source catalogs<br />
* common masks<br />
* beam transfer functions for all channels<br />
<br />
; ''lowlike'' :<br />
* WMAP9 likelihood data<br />
* Low-<math>\ell</math> Commander map<br />
<br />
; ''CAMspec'' :<br />
* 100, 143 and 217 GHz detector and detsets maps<br />
* 857GHz channel map<br />
* compact source catalog<br />
* common masks (0,1 & 3)<br />
* beam transfer function and error eigenmodes and covariance for 100, 143 and 217 GHz detectors & detsets<br />
* theoretical templates for the tSZ and kSZ contributions<br />
* color corrections for the CIB emission for the 143 and 217GHz detectors and detsets<br />
* fiducial CMB model (bootstrapped from WMAP7 best fit spectrum) estimated noise contribution from the half-ring maps for 100, 143 and 217 GHz<br />
<br />
; ''lensing'' :<br />
* the lensing map<br />
* beam error eigenmodes and covariance for the 143 and 217GHz channel maps<br />
* fiducial CMB model (from Planck cosmological parameter best fit)<br />
<br />
; ''act/spt'' :<br />
* data and code from [http://lambda.gsfc.nasa.gov/product/act/act_fulllikelihood_get.cfm here]<br />
* the tSZ andkSZ template are changed to match those of CAMspec<br />
<br />
== File names and Meta data ==<br />
<br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
<br />
'''Likelihood source code'''<br />
<br />
The source code is in the file<br />
: {{PLASingleFile |fileType=cosmo|name=COM_Code_Likelihood-v1.0_R1.10.tar.gz|link=COM_Code_Likelihood-v1.0_R1.10.tar.gz}} (C, f90 and python likelihood library and tools)<br />
<br />
'''Likelihood data packages'''<br />
<br />
The {{PLALikelihood|type=Data|link=data packages}} are<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-commander_R1.10.tar.gz | link=COM_Data_Likelihood-commander_R1.10.tar.gz}}'' (low-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-lowlike_R1.10.tar.gz | link=COM_Data_Likelihood-lowlike_R1.10.tar.gz}}'' (low-ell TE,EE,BB likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-CAMspec_R1.10.tar.gz | link=COM_Data_Likelihood-CAMspec_R1.10.tar.gz}}'' (high-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-actspt_R1.10.tar | link=COM_Data_Likelihood-actspt_R1.10.tar.gz}}'' (high-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-lensing_R1.10.tar.gz | link=COM_Data_Likelihood-lensing_R1.10.tar.gz}}'' (lensing likelihood)<br />
<br />
Untar and unzip all files to recover the code and likelihood data. Each package comes with a README file; follow the instructions inclosed to<br />
build the code and use it. To compute the CMB likelihood one has to sum the log likelihood of each of the commander_v4.1_lm49.clik, lowlike_v222.clik and CAMspec_v6.2TN_2013_02_26.clik, actspt_2013_01.clik. To compute the CMB+lensing likelihood, one has to sum the log likelihood of all 5 files.<br />
<br />
The CMB and lensing likelihood format are different. The CMB files have the termination .clik, the lensing one .clik_lensing. The lensing data being simpler (due to the less detailled modeling permitted by the lower signal-noise), the file is a simple ascii file containing all the data along with comments describing it, and linking the different quantities to the lensing paper. The CMB file format is more complex and must accommodate different forms of data (maps, power spectrum, distribution samples, covariance matrices...). It consists of a tree structure containing the data. At each level of the tree structure a given directory can contain array data (in the form of FITS files or ascii files for strings) and scalar data (joined in a single ascii file "_mdb"). Those files are not user modifiable and do not contain interesting meta data for the user. Tools to manipulate those files are included in the code package as optional python tools. They are documented in the code package.<br />
<br />
'''Likelihood masks'''<br />
<br />
The masks used in the Likelihood paper {{PlanckPapers|planck2013-p08}} are found in<br />
{{PLASingleFile|fileType=map|name=COM_Mask_Likelihood_2048_R1.10.fits|link=COM_Mask_Likelihood_2048_R1.10.fits}}<br />
<br />
which contains ten masks which are written into a single ''BINTABLE'' extension of 10 columns by 50331648 rows (the number of Healpix pixels in an Nside = 2048 map). The structure is as follows, where the column names are the names of the masks: <br />
<br />
{| border="1" cellpadding="3" cellspacing="0" align="center" style="text-align:left" width=800px<br />
|+ '''Likelihodd masks file data structure'''<br />
|- bgcolor="ffdead" <br />
!colspan="4" | 1. EXTNAME = 'MSK-LIKE' : Data columns<br />
|- bgcolor="ffdead" <br />
! Column Name || Data Type || Units || Description<br />
|-<br />
|CL31 || Real*4 || none || mask<br />
|-<br />
|CL39 || Real*4 || none || mask<br />
|-<br />
|CL49 || Real*4 || none || mask<br />
|-<br />
|G22 || Real*4 || none || mask <br />
|-<br />
|G35 || Real*4 || none || mask<br />
|-<br />
|G45 || Real*4 || none || mask<br />
|-<br />
|G56 || Real*4 || none || mask<br />
|-<br />
|G65 || Real*4 || none || mask<br />
|-<br />
|PS96 || Real*4 || none || mask<br />
|-<br />
|PSA82 || Real*4 || none || mask<br />
|-<br />
|- bgcolor="ffdead" <br />
! Keyword || Data Type || Value || Description<br />
|-<br />
|PIXTYPE || string || HEALPIX ||<br />
|-<br />
|COORDSYS || string || GALACTIC ||Coordinate system <br />
|-<br />
|ORDERING || string || NESTED || Healpix ordering<br />
|-<br />
|NSIDE || Int || 2048 || Healpix Nside <br />
|-<br />
|FIRSTPIX || Int*4 || 0 || First pixel number<br />
|-<br />
|LASTPIX || Int*4 || 50331647 || Last pixel number, for LFI and HFI, respectively<br />
<br />
|}<br />
--><br />
== References ==<br />
<References /><br />
<br />
<br />
<br />
[[Category:Mission products|008]]</div>Sgallihttps://wiki.cosmos.esa.int/planckpla2015/index.php?title=CMB_spectrum_%26_Likelihood_Code&diff=11082CMB spectrum & Likelihood Code2015-02-04T01:16:14Z<p>Sgalli: </p>
<hr />
<div>{{DISPLAYTITLE:CMB spectrum and likelihood code}}<br />
<br />
==CMB spectra==<br />
<br />
===General description===<br />
<br />
<br />
The Planck best-fit CMB temperature power spectrum, shown in figure below, covers the wide range of multipoles <math> \ell </math> = 2-2508. <br />
<span style="color:red"> UPDATE COMMANDER: Over the multipole range <math> \ell </math> = 2–29, the power spectrum is derived from a component-separation algorithm, ''Commander'': applied to maps in the frequency range 30–353 GHz over 91% of the sky {{PlanckPapers|planck2013-p06}} . The asymmetric error bars associated to this spectrum are the 68% confidence limits and include the uncertainties due to foreground subtraction. </span><br />
<br />
For multipoles equal or greater than <math>\ell=30</math>, instead, the spectrum is derived from the ''Plik'' likelihood {{PlanckPapers|planck2014-a13}} by optimally combining the spectra in the frequency range 100-217 GHz, and correcting them for unresolved foregrounds. Associated 1-sigma errors include beam uncertainties. Both ''Commander'' and ''Plik'' are described in more details in the sections below.<br />
<br />
[[File: Planck2014 TT Dl NORES bin30 w180mm.jpeg|thumb|center|700px|'''CMB spectrum. Logarithmic x-scale up to <math>\ell=30</math>, linear at higher <math>\ell</math>; all points with error bars. The red line is the Planck best-fit primordial power spectrum (cf Planck TT+lowP in Table 3 of {{PlanckPapers|planck2014-a15}}). The blue shaded area shows the uncertainties due to cosmic variance alone.''']]<br />
===Production process===<br />
<br />
<span style="color:red"> UPDATE COMMANDER<br />
The <math>\ell</math> < 50 part of the Planck power spectrum is derived from the Commander approach, which implements Bayesian component separation in pixel space, fitting a parametric model to the data by sampling the posterior distribution for the model parameters {{PlanckPapers|planck2013-p06}}. The power spectrum at any multipole <math>\ell</math> is given as the maximum probability point for the posterior <math>C_\ell</math> distribution, marginalized over the other multipoles, and the error bars are 68% confidence level {{PlanckPapers|planck2013-p08}}. </span><br />
<br />
The <math>\ell</math> > 30 part of the CMB temperature power spectrum has been derived by the Plik likelihood, a code that implements a pseudo-Cl based technique, extensively described in Sec. 2 and the Appendix of {{PlanckPapers|planck2013-p08}}. Frequency spectra are computed as cross-spectra between half-mission maps. Mask and multipole range choices for each frequency spectrum are summarized in Section 3.3 of {{PlanckPapers|planck2014-a15}} and in {{PlanckPapers|planck2014-a13}}. The final power spectrum is an optimal combination of the 100, 143, 143x217 and 217 GHz spectra, corrected for the best-fit unresolved foregrounds and inter-frequency calibration factors, as derived from the full likelihood analysis (cf Planck+TT+lowP in Table 3 of {{PlanckPapers|planck2014-a15}}). A thorough description of the models of unresolved foregrounds is given in {{PlanckPapers|planck2014-a13}}. The spectrum covariance matrix accounts for cosmic variance and noise contributions, together with beam uncertainties. The <math>\ell</math> > 30 CMB TT spectrum and associated covariance matrix are available in two formats:<br />
#Unbinned, with 2479 bandpowers (<math>\ell=30-2508</math>).<br />
#Binned, in bins of <math> \Delta\ell=30 </math>, with 83 bandpowers in total. We bin the <math> C_\ell </math> power spectrum with a weight proportional to <math> \ell (\ell+1) </math>, so that the <math> C_{\ell_b} </math> binned bandpower centered in <math> \ell_b </math> is: <math> \\ C_{\ell_b}=\Sigma_{\ell \in b} w_{\ell_b\ell} C_\ell \quad \text{with} \quad w_{\ell_b\ell}=\frac{\ell (\ell+1)}{\Sigma_{\ell \in b} \ell (\ell+1)}. \\</math> Equivalently, using the matrix formalism, we can construct the binning matrix B as: <math>\\ B_{\ell_b \ell}=w_{\ell_b\ell} \\ </math> where B is a <math> n_b\times n_\ell</math> matrix, with <math>n_b=83</math> the number of bins and <math>n_\ell=2479</math> the number of unbinned multipoles. Thus: <math> \\ \vec{C}_\mathrm{binned}=B \, \vec{C} \\ \mathrm{cov_\mathrm{binned}}= B\, \mathrm{cov}\, B^T \\ \ell_b=B\, \ell \\ </math> Here, <math> \vec{C}_{binned} (\vec{C}) </math> is the vector containing all the binned (unbinned) <math>C_\ell</math> bandpowers, <math>\mathrm{cov} </math> is the covariance matrix and <math>\ell_b</math> is the weighted multipole average in each bin. The binned <math>D_{\ell_B}</math> power spectrum is then calculated as: <math> \\ D_{\ell_b}=\ell_b (\ell_b+1)/2/\pi C_{\ell_b} </math>.<br />
<br />
===Inputs===<br />
<span style="color:red"> UPDATE COMMANDER</span><br />
<br />
; Low-l spectrum (<math>\ell < 30</math>):<br />
* frequency maps from 30–353 GHz<br />
* common mask {{PlanckPapers|planck2013-p06}}<br />
* compact sources catalog<br />
<br />
; High-l spectrum (<math>30 < \ell < 2500</math>): <br />
<br />
* 100, 143, 143x217 and 217 GHz spectra and their covariance matrix (Sec. 3.3 {{PlanckPapers|planck2014-a15}})<br />
* best-fit foreground templates and inter-frequency calibration factors (Table 3 of {{PlanckPapers|planck2014-a15}})<br />
* Beam transfer function uncertainties {{PlanckPapers|planck2014-a08}}<br />
=== File names and Meta data ===<br />
<br />
<span style="color:red"> CHECK EXTENSION NAMES </span><br />
<br />
The CMB spectrum and its covariance matrix are distributed in a single FITS file named <br />
* ''{{PLASingleFile | fileType=cosmo | name=COM_PowerSpect_CMB_R1.10.fits | link=COM_PowerSpect_CMB_R1.10.fits}}'' <br />
<br />
which contains 5 extensions<br />
<br />
; LOW-ELL (BINTABLE)<br />
: with the low ell part of the spectrum, not binned, and for l=2-49. The table columns are<br />
# ''ELL'' (integer): multipole number<br />
# ''D_ELL'' (float): $D_l$ as described below<br />
# ''ERRUP'' (float): the upward uncertainty<br />
# ''ERRDOWN'' (float): the downward uncertainty<br />
<br />
; HIGH-ELL (BINTABLE) <br />
: with the high-ell part of the spectrum, binned into 83 bins covering <math>\langle l \rangle = 47-2499\ </math> in bins of width <math>l=30</math> (with the exception of the last bin that is smaller). The table columns are as follows:<br />
# ''ELL'' (integer): mean multipole number of bin<br />
# ''L_MIN'' (integer): lowest multipole of bin<br />
# ''L_MAX'' (integer): highest multipole of bin<br />
# ''D_ELL'' (float): $D_l$ as described below<br />
# ''ERR'' (float): the uncertainty<br />
<br />
; COV-MAT (IMAGE)<br />
: with the covariance matrix of the high-ell part of the spectrum in a 83x83 pixel image, i.e., covering the same bins as the ''HIGH-ELL'' table.<br />
<br />
<br />
; HIGH-ELL (BINTABLE)<br />
: with the high-ell part of the spectrum, unbinned, in 2979 bins covering <math>\langle l \rangle = 30-2508\ </math>. The table columns are as follows:<br />
# ''ELL'' (integer): multipole <br />
# ''D_ELL'' (float): $D_l$ as described below<br />
# ''ERR'' (float): the uncertainty<br />
<br />
; COV-MAT (IMAGE)<br />
: with the covariance matrix of the high-ell part of the spectrum in a 2979x2979 pixel image, i.e., covering the same bins as the ''HIGH-ELL'' table.<br />
<br />
The spectra give $D_\ell = \ell(\ell+1)C_\ell / 2\pi$ in units of $\mu\, K^2$, and the covariance matrix is in units of $\mu\, K^4$. <br />
<br />
The CMB spectrum is also given in a simple text comma-separated file:<br />
* ''{{PLASingleFile | fileType=cosmo | name=COM_PowerSpect_CMB_R1.10.txt |link=COM_PowerSpect_CMB_R1.10.txt}}''<br />
<br />
==Likelihood==<br />
TO BE WRITTEN.<br />
<!-- <br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
The likelihood code (and the data that comes with it) used to compute the likelihood of a model that predicts the CMB power spectra, lensing power spectrum, together with some foreground and some instrumental parameters. The data files are built primarily from the Planck mission results, but include also some results from the WMAP-9 data release. The data files are written in a specific format that can only be read by the code. The code consists in a c/f90 library, along with some optional tools in python. The code is used to read the data files, and given model power spectra and nuisance parameters it computes the log likelihood of that model. <br />
<br />
Detailed description of the installation and usage of the likelihood code and data is provided in the package. The package includes five data files: four for the CMB likelihoods and one for the lensing likelihood. All of the likelihoods delivered are described in detail in the {{PlanckPapers|planck2013-p08|1|Power spectrum & Likelihood Paper}} (for the CMB based likelihood) and in the {{PlanckPapers|planck2013-p12|1|Lensing Paper}} (for the lensing likelihood) .<br />
<br />
The CMB full likelihood has been divided into four parts to allow using selectively different ranges of multipoles. It also reflects the fact that the mathematical approximations used for those different parts are very different, as is the underlying data. In detail, we distribute<br />
* one low-<math>\ell</math> temperature only likelihood (commander), <br />
* one low-<math>\ell</math> temperature and polarisation likelihood (lowlike), and <br />
* one higl-<math>\ell</math> likelihood CAMspec. <br />
<br />
The ''Commander'' likelihood covers the multipoles 2 to 49. It uses a semi-analytic method to sample the low-<math>\ell</math> temperature likelihood on an intermediate product of one of the component separated maps. The samples are used along with an analytical approximation of the likelihood posterior to perform the likelihood computation in the code. See {{PlanckPapers|planck2013-p08}} section 8.1 for more details.<br />
<br />
The ''lowlike'' likelihood covers the multipoles 2 to 32 for temperature and polarization data. Since Planck is not releasing polarisation data at this time, the polarization map from WMAP9 is used instead. A temperature map is needed to perform the computation nevertheless, and we use here the same commander map. The likelihood is computed using a map-based approximation at low resolution and a master one at intermediate resolution, as in WMAP. The likelihood code actually calls a very slightly modified version of the WMAP9 code. This piece of the likelihood essentially provides a prior on the optical depth and has almost no other impact on cosmological parameter estimation. As such it could be replaced by a simple prior, and a user can decide to do so, which is one of the motivation to leave the three pieces of the CMB likelihood as different data packages; see {{PlanckPapers|planck2013-p08}} section 8.3 for more details. Note that the version of the WMAP code used here (code version v1.0) does not perform any test on the positive definiteness of the TT, TE, EE covariance matrices, and will return a null log likelihood in the unphysical cases where the absolute value of TE is too large. This will be corrected in a later version.<br />
<br />
The ''CAMspec'' likelihood covers the multipoles 50 to 2500 for temperature only. The likelihood is computed using a quadratic approximation, including mode to mode correlations that have been precomputed on a fiducial model. The likelihood uses data from the 100, 143 and 217 GHz channels. To do so it models the foreground at each frequency using the model described in the likelihood paper. Uncertainties on the relative calibration and on the beam transfer functions are included either as parametric models, or marginalized and integrated in the covariance matrix. Detailed description of the different nuisance parameters is given below. Priors are included in the likelihood on the CIB spectral index, relative calibration factors and beam error eigenmodes. See {{PlanckPapers|planck2013-p08}} section 2.1 for more details.<br />
<br />
The ''act/spt'' likelihood covers the multipoles 1500 to 10000 for temperature. It is described in{{BibCite|dun2013}}{{BibCite|Keis2011}}{{BibCite|Reic2012}}. It uses the code and data that can be retrieved from the [http://lambda.gsfc.nasa.gov/ Lambda archive] for [http://lambda.gsfc.nasa.gov/product/act/act_prod_table.cfm ACT] and [http://lambda.gsfc.nasa.gov/product/spt/spt_prod_table.cfm SPT]. It has been slightly modified to use a thermal and kinetic SZ model that matches the one used in CAMspec. As stated in{{BibCite|dun2013}}, the dust parameters a_ge and a_gs must be explored with the following priors: a_ge = 0.8 ± 0.2 and a_gs = 0.4 ± 0.2. Those priors are not included in the log likelihood computed by the code.<br />
<br />
The ''lensing'' likelihood covers the multipoles 40 to 400 using the result of the [[Specially_processed_maps | lensing reconstruction]]. It uses a quadratic approximation for the likelihood, with a covariance matrix including the marginalized contribution of the beam transfer function uncertainties, the diffuse point source correction uncertainties and the cosmological model uncertainty affecting the first order non-gaussian bias (N1). The correlation between temperature and lensing is not taken into account. Cosmological uncertainty effects on the normalization are dealt with using a first order renormalization procedure. This means that the code will need both the TT and $\phi\phi$ power spectrum up to <math>\ell</math> = 2048 to correctly perform the integrals needed for the renormalization. Nevertheless, the code will only produce an estimate based on the data between <math>\ell</math> = 40 to 400. See {{PlanckPapers|planck2013-p12}} section 6.1 for more details.<br />
</span><br />
<span style="color:red">OUTSTANDING: description of likelihood masks </span><br />
==Production process==<br />
<br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
The code is based on some basic routines from the libpmc library in the [http://arxiv.org/abs/1101.0950 cosmoPMC] code. It also uses some code from the [http://lambda.gsfc.nasa.gov/product/map/dr5/likelihood_get.cfm WMAP9 likelihood] for the lowlike likelihood and{{BibCite|dun2013}}{{BibCite|Keis2011}}{{BibCite|Reic2012}} for the act/spt one. The rest of the code has been specifically written for the Planck data. Each likelihood file has been processed using a different and dedicated pipeline as described in the likelihood paper {{PlanckPapers|planck2013-p08}} (section 2 and 8) and in the lensing paper {{PlanckPapers|planck2013-p12}} (section 6.1). We refer the reader to those papers for full details. The data are then encapsulated into the specific file format.<br />
<br />
Each dataset comes with its own self check. Whenever the code is used to read a data file, a computation will be done against an included test spectrum/nuisance parameter, and the log-likelihood will be displayed along with the expected result. Difference of the order of 10<math>^{-6}</math> or less are expected depending of the architecture.<br />
<br />
==Inputs==<br />
<br />
===Likelihood===<br />
<br />
; ''commander'' :<br />
* all Planck channels maps<br />
* compact source catalogs<br />
* common masks<br />
* beam transfer functions for all channels<br />
<br />
; ''lowlike'' :<br />
* WMAP9 likelihood data<br />
* Low-<math>\ell</math> Commander map<br />
<br />
; ''CAMspec'' :<br />
* 100, 143 and 217 GHz detector and detsets maps<br />
* 857GHz channel map<br />
* compact source catalog<br />
* common masks (0,1 & 3)<br />
* beam transfer function and error eigenmodes and covariance for 100, 143 and 217 GHz detectors & detsets<br />
* theoretical templates for the tSZ and kSZ contributions<br />
* color corrections for the CIB emission for the 143 and 217GHz detectors and detsets<br />
* fiducial CMB model (bootstrapped from WMAP7 best fit spectrum) estimated noise contribution from the half-ring maps for 100, 143 and 217 GHz<br />
<br />
; ''lensing'' :<br />
* the lensing map<br />
* beam error eigenmodes and covariance for the 143 and 217GHz channel maps<br />
* fiducial CMB model (from Planck cosmological parameter best fit)<br />
<br />
; ''act/spt'' :<br />
* data and code from [http://lambda.gsfc.nasa.gov/product/act/act_fulllikelihood_get.cfm here]<br />
* the tSZ andkSZ template are changed to match those of CAMspec<br />
<br />
== File names and Meta data ==<br />
<br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
<br />
'''Likelihood source code'''<br />
<br />
The source code is in the file<br />
: {{PLASingleFile |fileType=cosmo|name=COM_Code_Likelihood-v1.0_R1.10.tar.gz|link=COM_Code_Likelihood-v1.0_R1.10.tar.gz}} (C, f90 and python likelihood library and tools)<br />
<br />
'''Likelihood data packages'''<br />
<br />
The {{PLALikelihood|type=Data|link=data packages}} are<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-commander_R1.10.tar.gz | link=COM_Data_Likelihood-commander_R1.10.tar.gz}}'' (low-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-lowlike_R1.10.tar.gz | link=COM_Data_Likelihood-lowlike_R1.10.tar.gz}}'' (low-ell TE,EE,BB likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-CAMspec_R1.10.tar.gz | link=COM_Data_Likelihood-CAMspec_R1.10.tar.gz}}'' (high-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-actspt_R1.10.tar | link=COM_Data_Likelihood-actspt_R1.10.tar.gz}}'' (high-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-lensing_R1.10.tar.gz | link=COM_Data_Likelihood-lensing_R1.10.tar.gz}}'' (lensing likelihood)<br />
<br />
Untar and unzip all files to recover the code and likelihood data. Each package comes with a README file; follow the instructions inclosed to<br />
build the code and use it. To compute the CMB likelihood one has to sum the log likelihood of each of the commander_v4.1_lm49.clik, lowlike_v222.clik and CAMspec_v6.2TN_2013_02_26.clik, actspt_2013_01.clik. To compute the CMB+lensing likelihood, one has to sum the log likelihood of all 5 files.<br />
<br />
The CMB and lensing likelihood format are different. The CMB files have the termination .clik, the lensing one .clik_lensing. The lensing data being simpler (due to the less detailled modeling permitted by the lower signal-noise), the file is a simple ascii file containing all the data along with comments describing it, and linking the different quantities to the lensing paper. The CMB file format is more complex and must accommodate different forms of data (maps, power spectrum, distribution samples, covariance matrices...). It consists of a tree structure containing the data. At each level of the tree structure a given directory can contain array data (in the form of FITS files or ascii files for strings) and scalar data (joined in a single ascii file "_mdb"). Those files are not user modifiable and do not contain interesting meta data for the user. Tools to manipulate those files are included in the code package as optional python tools. They are documented in the code package.<br />
<br />
'''Likelihood masks'''<br />
<br />
The masks used in the Likelihood paper {{PlanckPapers|planck2013-p08}} are found in<br />
{{PLASingleFile|fileType=map|name=COM_Mask_Likelihood_2048_R1.10.fits|link=COM_Mask_Likelihood_2048_R1.10.fits}}<br />
<br />
which contains ten masks which are written into a single ''BINTABLE'' extension of 10 columns by 50331648 rows (the number of Healpix pixels in an Nside = 2048 map). The structure is as follows, where the column names are the names of the masks: <br />
<br />
{| border="1" cellpadding="3" cellspacing="0" align="center" style="text-align:left" width=800px<br />
|+ '''Likelihodd masks file data structure'''<br />
|- bgcolor="ffdead" <br />
!colspan="4" | 1. EXTNAME = 'MSK-LIKE' : Data columns<br />
|- bgcolor="ffdead" <br />
! Column Name || Data Type || Units || Description<br />
|-<br />
|CL31 || Real*4 || none || mask<br />
|-<br />
|CL39 || Real*4 || none || mask<br />
|-<br />
|CL49 || Real*4 || none || mask<br />
|-<br />
|G22 || Real*4 || none || mask <br />
|-<br />
|G35 || Real*4 || none || mask<br />
|-<br />
|G45 || Real*4 || none || mask<br />
|-<br />
|G56 || Real*4 || none || mask<br />
|-<br />
|G65 || Real*4 || none || mask<br />
|-<br />
|PS96 || Real*4 || none || mask<br />
|-<br />
|PSA82 || Real*4 || none || mask<br />
|-<br />
|- bgcolor="ffdead" <br />
! Keyword || Data Type || Value || Description<br />
|-<br />
|PIXTYPE || string || HEALPIX ||<br />
|-<br />
|COORDSYS || string || GALACTIC ||Coordinate system <br />
|-<br />
|ORDERING || string || NESTED || Healpix ordering<br />
|-<br />
|NSIDE || Int || 2048 || Healpix Nside <br />
|-<br />
|FIRSTPIX || Int*4 || 0 || First pixel number<br />
|-<br />
|LASTPIX || Int*4 || 50331647 || Last pixel number, for LFI and HFI, respectively<br />
<br />
|}<br />
--><br />
== References ==<br />
<References /><br />
<br />
<br />
<br />
[[Category:Mission products|008]]</div>Sgallihttps://wiki.cosmos.esa.int/planckpla2015/index.php?title=CMB_spectrum_%26_Likelihood_Code&diff=11081CMB spectrum & Likelihood Code2015-02-04T01:10:39Z<p>Sgalli: </p>
<hr />
<div>{{DISPLAYTITLE:CMB spectrum and likelihood code}}<br />
<br />
==CMB spectra==<br />
<br />
===General description===<br />
<br />
<br />
The Planck best-fit CMB temperature power spectrum, shown in figure below, covers the wide range of multipoles <math> \ell </math> = 2-2508. <br />
<span style="color:red"> UPDATE COMMANDER: Over the multipole range <math> \ell </math> = 2–29, the power spectrum is derived from a component-separation algorithm, ''Commander'': applied to maps in the frequency range 30–353 GHz over 91% of the sky {{PlanckPapers|planck2013-p06}} . The asymmetric error bars associated to this spectrum are the 68% confidence limits and include the uncertainties due to foreground subtraction. </span><br />
<br />
For multipoles equal or greater than <math>\ell=30</math>, instead, the spectrum is derived from the ''Plik'' likelihood {{PlanckPapers|planck2014-a13}} by optimally combining the spectra in the frequency range 100-217 GHz, and correcting them for unresolved foregrounds. Associated 1-sigma errors include beam uncertainties. Both ''Commander'' and ''Plik'' are described in more details in the sections below.<br />
<br />
[[File: Planck2014 TT Dl NORES bin30 w180mm.jpeg|thumb|center|700px|'''CMB spectrum. Logarithmic x-scale up to <math>\ell=30</math>, linear at higher <math>\ell</math>; all points with error bars. The red line is the Planck best-fit primordial power spectrum (cf Planck TT+lowP in Table 3 of {{PlanckPapers|planck2014-a15}}). The blue shaded area shows the uncertainties due to cosmic variance alone.''']]<br />
===Production process===<br />
<br />
<span style="color:red"> UPDATE COMMANDER<br />
The <math>\ell</math> < 50 part of the Planck power spectrum is derived from the Commander approach, which implements Bayesian component separation in pixel space, fitting a parametric model to the data by sampling the posterior distribution for the model parameters {{PlanckPapers|planck2013-p06}}. The power spectrum at any multipole <math>\ell</math> is given as the maximum probability point for the posterior <math>C_\ell</math> distribution, marginalized over the other multipoles, and the error bars are 68% confidence level {{PlanckPapers|planck2013-p08}}. </span><br />
<br />
The <math>\ell</math> > 30 part of the CMB temperature power spectrum has been derived by the Plik likelihood, a code that implements a pseudo-Cl based technique, extensively described in Sec. 2 and the Appendix of {{PlanckPapers|planck2013-p08}}. Frequency spectra are computed as cross-spectra between half-mission maps. Mask and multipole range choices for each frequency spectrum are summarized in Section 3.3 of {{PlanckPapers|planck2014-a15}} and in {{PlanckPapers|planck2014-a13}}. The final power spectrum is an optimal combination of the 100, 143, 143x217 and 217 GHz spectra, corrected for the best-fit unresolved foregrounds and inter-frequency calibration factors, as derived from the full likelihood analysis (cf Planck+TT+lowP in Table 3 of {{PlanckPapers|planck2014-a15}}). A thorough description of the models of unresolved foregrounds is given in {{PlanckPapers|planck2014-a13}}. The spectrum covariance matrix accounts for cosmic variance and noise contributions, together with beam uncertainties. The <math>\ell</math> > 30 CMB TT spectrum and associated covariance matrix are available in two formats:<br />
#Unbinned, with 2479 bandpowers (<math>\ell=30-2508</math>).<br />
#Binned, in bins of <math> \Delta\ell=30 </math>, with 83 bandpowers in total. We bin the <math> C_\ell </math> power spectrum with a weight proportional to <math> \ell (\ell+1) </math>, so that the <math> C_{\ell_b} </math> binned bandpower centered in <math> \ell_b </math> is: <math> \\ C_{\ell_b}=\Sigma_{\ell \in b} w_{\ell_b\ell} C_\ell \quad \text{with} \quad w_{\ell_b\ell}=\frac{\ell (\ell+1)}{\Sigma_{\ell \in b} \ell (\ell+1)}. \\</math> Equivalently, using the matrix formalism, we can construct the binning matrix B as: <math>\\ B_{\ell \ell_b}=w_{\ell_b\ell} \\ </math> where B is a <math> n_b\times n_\ell</math> matrix, with <math>n_b=83</math> the number of bins and <math>n_\ell=2479</math> the number of unbinned multipoles. Thus: <math> \\ \vec{C}_\mathrm{binned}=B \, \vec{C} \\ \mathrm{cov_\mathrm{binned}}= B\, \mathrm{cov}\, B^T \\ \ell_b=B\, \ell \\ </math> Here, <math> \vec{C}_{binned} (\vec{C}) </math> is the vector containing all the binned (unbinned) <math>C_\ell</math> bandpowers, <math>\mathrm{cov} </math> is the covariance matrix and <math>\ell_b</math> is the weighted multipole average in each bin. The binned <math>D_{\ell_B}</math> power spectrum is then calculated as: <math> \\ D_{\ell_b}=\ell_b (\ell_b+1)/2/\pi C_{\ell_b} </math>.<br />
<br />
===Inputs===<br />
<span style="color:red"> UPDATE COMMANDER</span><br />
<br />
; Low-l spectrum (<math>\ell < 30</math>):<br />
* frequency maps from 30–353 GHz<br />
* common mask {{PlanckPapers|planck2013-p06}}<br />
* compact sources catalog<br />
<br />
; High-l spectrum (<math>30 < \ell < 2500</math>): <br />
<br />
* 100, 143, 143x217 and 217 GHz spectra and their covariance matrix (Sec. 3.3 {{PlanckPapers|planck2014-a15}})<br />
* best-fit foreground templates and inter-frequency calibration factors (Table 3 of {{PlanckPapers|planck2014-a15}})<br />
* Beam transfer function uncertainties {{PlanckPapers|planck2014-a08}}<br />
=== File names and Meta data ===<br />
<br />
<span style="color:red"> CHECK EXTENSION NAMES </span><br />
<br />
The CMB spectrum and its covariance matrix are distributed in a single FITS file named <br />
* ''{{PLASingleFile | fileType=cosmo | name=COM_PowerSpect_CMB_R1.10.fits | link=COM_PowerSpect_CMB_R1.10.fits}}'' <br />
<br />
which contains 5 extensions<br />
<br />
; LOW-ELL (BINTABLE)<br />
: with the low ell part of the spectrum, not binned, and for l=2-49. The table columns are<br />
# ''ELL'' (integer): multipole number<br />
# ''D_ELL'' (float): $D_l$ as described below<br />
# ''ERRUP'' (float): the upward uncertainty<br />
# ''ERRDOWN'' (float): the downward uncertainty<br />
<br />
; HIGH-ELL (BINTABLE) <br />
: with the high-ell part of the spectrum, binned into 83 bins covering <math>\langle l \rangle = 47-2499\ </math> in bins of width <math>l=30</math> (with the exception of the last bin that is smaller). The table columns are as follows:<br />
# ''ELL'' (integer): mean multipole number of bin<br />
# ''L_MIN'' (integer): lowest multipole of bin<br />
# ''L_MAX'' (integer): highest multipole of bin<br />
# ''D_ELL'' (float): $D_l$ as described below<br />
# ''ERR'' (float): the uncertainty<br />
<br />
; COV-MAT (IMAGE)<br />
: with the covariance matrix of the high-ell part of the spectrum in a 83x83 pixel image, i.e., covering the same bins as the ''HIGH-ELL'' table.<br />
<br />
<br />
; HIGH-ELL (BINTABLE)<br />
: with the high-ell part of the spectrum, unbinned, in 2979 bins covering <math>\langle l \rangle = 30-2508\ </math>. The table columns are as follows:<br />
# ''ELL'' (integer): multipole <br />
# ''D_ELL'' (float): $D_l$ as described below<br />
# ''ERR'' (float): the uncertainty<br />
<br />
; COV-MAT (IMAGE)<br />
: with the covariance matrix of the high-ell part of the spectrum in a 2979x2979 pixel image, i.e., covering the same bins as the ''HIGH-ELL'' table.<br />
<br />
The spectra give $D_\ell = \ell(\ell+1)C_\ell / 2\pi$ in units of $\mu\, K^2$, and the covariance matrix is in units of $\mu\, K^4$. <br />
<br />
The CMB spectrum is also given in a simple text comma-separated file:<br />
* ''{{PLASingleFile | fileType=cosmo | name=COM_PowerSpect_CMB_R1.10.txt |link=COM_PowerSpect_CMB_R1.10.txt}}''<br />
<br />
==Likelihood==<br />
TO BE WRITTEN.<br />
<!-- <br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
The likelihood code (and the data that comes with it) used to compute the likelihood of a model that predicts the CMB power spectra, lensing power spectrum, together with some foreground and some instrumental parameters. The data files are built primarily from the Planck mission results, but include also some results from the WMAP-9 data release. The data files are written in a specific format that can only be read by the code. The code consists in a c/f90 library, along with some optional tools in python. The code is used to read the data files, and given model power spectra and nuisance parameters it computes the log likelihood of that model. <br />
<br />
Detailed description of the installation and usage of the likelihood code and data is provided in the package. The package includes five data files: four for the CMB likelihoods and one for the lensing likelihood. All of the likelihoods delivered are described in detail in the {{PlanckPapers|planck2013-p08|1|Power spectrum & Likelihood Paper}} (for the CMB based likelihood) and in the {{PlanckPapers|planck2013-p12|1|Lensing Paper}} (for the lensing likelihood) .<br />
<br />
The CMB full likelihood has been divided into four parts to allow using selectively different ranges of multipoles. It also reflects the fact that the mathematical approximations used for those different parts are very different, as is the underlying data. In detail, we distribute<br />
* one low-<math>\ell</math> temperature only likelihood (commander), <br />
* one low-<math>\ell</math> temperature and polarisation likelihood (lowlike), and <br />
* one higl-<math>\ell</math> likelihood CAMspec. <br />
<br />
The ''Commander'' likelihood covers the multipoles 2 to 49. It uses a semi-analytic method to sample the low-<math>\ell</math> temperature likelihood on an intermediate product of one of the component separated maps. The samples are used along with an analytical approximation of the likelihood posterior to perform the likelihood computation in the code. See {{PlanckPapers|planck2013-p08}} section 8.1 for more details.<br />
<br />
The ''lowlike'' likelihood covers the multipoles 2 to 32 for temperature and polarization data. Since Planck is not releasing polarisation data at this time, the polarization map from WMAP9 is used instead. A temperature map is needed to perform the computation nevertheless, and we use here the same commander map. The likelihood is computed using a map-based approximation at low resolution and a master one at intermediate resolution, as in WMAP. The likelihood code actually calls a very slightly modified version of the WMAP9 code. This piece of the likelihood essentially provides a prior on the optical depth and has almost no other impact on cosmological parameter estimation. As such it could be replaced by a simple prior, and a user can decide to do so, which is one of the motivation to leave the three pieces of the CMB likelihood as different data packages; see {{PlanckPapers|planck2013-p08}} section 8.3 for more details. Note that the version of the WMAP code used here (code version v1.0) does not perform any test on the positive definiteness of the TT, TE, EE covariance matrices, and will return a null log likelihood in the unphysical cases where the absolute value of TE is too large. This will be corrected in a later version.<br />
<br />
The ''CAMspec'' likelihood covers the multipoles 50 to 2500 for temperature only. The likelihood is computed using a quadratic approximation, including mode to mode correlations that have been precomputed on a fiducial model. The likelihood uses data from the 100, 143 and 217 GHz channels. To do so it models the foreground at each frequency using the model described in the likelihood paper. Uncertainties on the relative calibration and on the beam transfer functions are included either as parametric models, or marginalized and integrated in the covariance matrix. Detailed description of the different nuisance parameters is given below. Priors are included in the likelihood on the CIB spectral index, relative calibration factors and beam error eigenmodes. See {{PlanckPapers|planck2013-p08}} section 2.1 for more details.<br />
<br />
The ''act/spt'' likelihood covers the multipoles 1500 to 10000 for temperature. It is described in{{BibCite|dun2013}}{{BibCite|Keis2011}}{{BibCite|Reic2012}}. It uses the code and data that can be retrieved from the [http://lambda.gsfc.nasa.gov/ Lambda archive] for [http://lambda.gsfc.nasa.gov/product/act/act_prod_table.cfm ACT] and [http://lambda.gsfc.nasa.gov/product/spt/spt_prod_table.cfm SPT]. It has been slightly modified to use a thermal and kinetic SZ model that matches the one used in CAMspec. As stated in{{BibCite|dun2013}}, the dust parameters a_ge and a_gs must be explored with the following priors: a_ge = 0.8 ± 0.2 and a_gs = 0.4 ± 0.2. Those priors are not included in the log likelihood computed by the code.<br />
<br />
The ''lensing'' likelihood covers the multipoles 40 to 400 using the result of the [[Specially_processed_maps | lensing reconstruction]]. It uses a quadratic approximation for the likelihood, with a covariance matrix including the marginalized contribution of the beam transfer function uncertainties, the diffuse point source correction uncertainties and the cosmological model uncertainty affecting the first order non-gaussian bias (N1). The correlation between temperature and lensing is not taken into account. Cosmological uncertainty effects on the normalization are dealt with using a first order renormalization procedure. This means that the code will need both the TT and $\phi\phi$ power spectrum up to <math>\ell</math> = 2048 to correctly perform the integrals needed for the renormalization. Nevertheless, the code will only produce an estimate based on the data between <math>\ell</math> = 40 to 400. See {{PlanckPapers|planck2013-p12}} section 6.1 for more details.<br />
</span><br />
<span style="color:red">OUTSTANDING: description of likelihood masks </span><br />
==Production process==<br />
<br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
The code is based on some basic routines from the libpmc library in the [http://arxiv.org/abs/1101.0950 cosmoPMC] code. It also uses some code from the [http://lambda.gsfc.nasa.gov/product/map/dr5/likelihood_get.cfm WMAP9 likelihood] for the lowlike likelihood and{{BibCite|dun2013}}{{BibCite|Keis2011}}{{BibCite|Reic2012}} for the act/spt one. The rest of the code has been specifically written for the Planck data. Each likelihood file has been processed using a different and dedicated pipeline as described in the likelihood paper {{PlanckPapers|planck2013-p08}} (section 2 and 8) and in the lensing paper {{PlanckPapers|planck2013-p12}} (section 6.1). We refer the reader to those papers for full details. The data are then encapsulated into the specific file format.<br />
<br />
Each dataset comes with its own self check. Whenever the code is used to read a data file, a computation will be done against an included test spectrum/nuisance parameter, and the log-likelihood will be displayed along with the expected result. Difference of the order of 10<math>^{-6}</math> or less are expected depending of the architecture.<br />
<br />
==Inputs==<br />
<br />
===Likelihood===<br />
<br />
; ''commander'' :<br />
* all Planck channels maps<br />
* compact source catalogs<br />
* common masks<br />
* beam transfer functions for all channels<br />
<br />
; ''lowlike'' :<br />
* WMAP9 likelihood data<br />
* Low-<math>\ell</math> Commander map<br />
<br />
; ''CAMspec'' :<br />
* 100, 143 and 217 GHz detector and detsets maps<br />
* 857GHz channel map<br />
* compact source catalog<br />
* common masks (0,1 & 3)<br />
* beam transfer function and error eigenmodes and covariance for 100, 143 and 217 GHz detectors & detsets<br />
* theoretical templates for the tSZ and kSZ contributions<br />
* color corrections for the CIB emission for the 143 and 217GHz detectors and detsets<br />
* fiducial CMB model (bootstrapped from WMAP7 best fit spectrum) estimated noise contribution from the half-ring maps for 100, 143 and 217 GHz<br />
<br />
; ''lensing'' :<br />
* the lensing map<br />
* beam error eigenmodes and covariance for the 143 and 217GHz channel maps<br />
* fiducial CMB model (from Planck cosmological parameter best fit)<br />
<br />
; ''act/spt'' :<br />
* data and code from [http://lambda.gsfc.nasa.gov/product/act/act_fulllikelihood_get.cfm here]<br />
* the tSZ andkSZ template are changed to match those of CAMspec<br />
<br />
== File names and Meta data ==<br />
<br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
<br />
'''Likelihood source code'''<br />
<br />
The source code is in the file<br />
: {{PLASingleFile |fileType=cosmo|name=COM_Code_Likelihood-v1.0_R1.10.tar.gz|link=COM_Code_Likelihood-v1.0_R1.10.tar.gz}} (C, f90 and python likelihood library and tools)<br />
<br />
'''Likelihood data packages'''<br />
<br />
The {{PLALikelihood|type=Data|link=data packages}} are<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-commander_R1.10.tar.gz | link=COM_Data_Likelihood-commander_R1.10.tar.gz}}'' (low-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-lowlike_R1.10.tar.gz | link=COM_Data_Likelihood-lowlike_R1.10.tar.gz}}'' (low-ell TE,EE,BB likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-CAMspec_R1.10.tar.gz | link=COM_Data_Likelihood-CAMspec_R1.10.tar.gz}}'' (high-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-actspt_R1.10.tar | link=COM_Data_Likelihood-actspt_R1.10.tar.gz}}'' (high-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-lensing_R1.10.tar.gz | link=COM_Data_Likelihood-lensing_R1.10.tar.gz}}'' (lensing likelihood)<br />
<br />
Untar and unzip all files to recover the code and likelihood data. Each package comes with a README file; follow the instructions inclosed to<br />
build the code and use it. To compute the CMB likelihood one has to sum the log likelihood of each of the commander_v4.1_lm49.clik, lowlike_v222.clik and CAMspec_v6.2TN_2013_02_26.clik, actspt_2013_01.clik. To compute the CMB+lensing likelihood, one has to sum the log likelihood of all 5 files.<br />
<br />
The CMB and lensing likelihood format are different. The CMB files have the termination .clik, the lensing one .clik_lensing. The lensing data being simpler (due to the less detailled modeling permitted by the lower signal-noise), the file is a simple ascii file containing all the data along with comments describing it, and linking the different quantities to the lensing paper. The CMB file format is more complex and must accommodate different forms of data (maps, power spectrum, distribution samples, covariance matrices...). It consists of a tree structure containing the data. At each level of the tree structure a given directory can contain array data (in the form of FITS files or ascii files for strings) and scalar data (joined in a single ascii file "_mdb"). Those files are not user modifiable and do not contain interesting meta data for the user. Tools to manipulate those files are included in the code package as optional python tools. They are documented in the code package.<br />
<br />
'''Likelihood masks'''<br />
<br />
The masks used in the Likelihood paper {{PlanckPapers|planck2013-p08}} are found in<br />
{{PLASingleFile|fileType=map|name=COM_Mask_Likelihood_2048_R1.10.fits|link=COM_Mask_Likelihood_2048_R1.10.fits}}<br />
<br />
which contains ten masks which are written into a single ''BINTABLE'' extension of 10 columns by 50331648 rows (the number of Healpix pixels in an Nside = 2048 map). The structure is as follows, where the column names are the names of the masks: <br />
<br />
{| border="1" cellpadding="3" cellspacing="0" align="center" style="text-align:left" width=800px<br />
|+ '''Likelihodd masks file data structure'''<br />
|- bgcolor="ffdead" <br />
!colspan="4" | 1. EXTNAME = 'MSK-LIKE' : Data columns<br />
|- bgcolor="ffdead" <br />
! Column Name || Data Type || Units || Description<br />
|-<br />
|CL31 || Real*4 || none || mask<br />
|-<br />
|CL39 || Real*4 || none || mask<br />
|-<br />
|CL49 || Real*4 || none || mask<br />
|-<br />
|G22 || Real*4 || none || mask <br />
|-<br />
|G35 || Real*4 || none || mask<br />
|-<br />
|G45 || Real*4 || none || mask<br />
|-<br />
|G56 || Real*4 || none || mask<br />
|-<br />
|G65 || Real*4 || none || mask<br />
|-<br />
|PS96 || Real*4 || none || mask<br />
|-<br />
|PSA82 || Real*4 || none || mask<br />
|-<br />
|- bgcolor="ffdead" <br />
! Keyword || Data Type || Value || Description<br />
|-<br />
|PIXTYPE || string || HEALPIX ||<br />
|-<br />
|COORDSYS || string || GALACTIC ||Coordinate system <br />
|-<br />
|ORDERING || string || NESTED || Healpix ordering<br />
|-<br />
|NSIDE || Int || 2048 || Healpix Nside <br />
|-<br />
|FIRSTPIX || Int*4 || 0 || First pixel number<br />
|-<br />
|LASTPIX || Int*4 || 50331647 || Last pixel number, for LFI and HFI, respectively<br />
<br />
|}<br />
--><br />
== References ==<br />
<References /><br />
<br />
<br />
<br />
[[Category:Mission products|008]]</div>Sgallihttps://wiki.cosmos.esa.int/planckpla2015/index.php?title=CMB_spectrum_%26_Likelihood_Code&diff=11080CMB spectrum & Likelihood Code2015-02-04T01:01:12Z<p>Sgalli: </p>
<hr />
<div>{{DISPLAYTITLE:CMB spectrum and likelihood code}}<br />
<br />
==CMB spectra==<br />
<br />
===General description===<br />
<span style="color:red"> UPDATE COMMANDER</span><br />
<br />
<br />
The Planck best-fit CMB temperature power spectrum, shown in figure below, covers the wide range of multipoles <math> \ell </math> = 2-2508. Over the multipole range <math> \ell </math> = 2–29, the power spectrum is derived from a component-separation algorithm, ''Commander'': applied to maps in the frequency range 30–353 GHz over 91% of the sky {{PlanckPapers|planck2013-p06}} . The asymmetric error bars associated to this spectrum are the 68% confidence limits and include the uncertainties due to foreground subtraction. For multipoles equal or greater than <math>\ell=30</math>, instead, the spectrum is derived from the ''Plik'' likelihood {{PlanckPapers|planck2014-a13}} by optimally combining the spectra in the frequency range 100-217 GHz, and correcting them for unresolved foregrounds. Associated 1-sigma errors include beam uncertainties. Both ''Commander'' and ''Plik'' are described in more details in the sections below.<br />
<br />
[[File: Planck2014 TT Dl NORES bin30 w180mm.jpeg|thumb|center|700px|'''CMB spectrum. Logarithmic x-scale up to <math>\ell=30</math>, linear at higher <math>\ell</math>; all points with error bars. The red line is the Planck best-fit primordial power spectrum (cf Planck TT+lowP in Table 3 of {{PlanckPapers|planck2014-a15}}). The blue shaded area shows the uncertainties due to cosmic variance alone.''']]<br />
===Production process===<br />
<br />
<span style="color:red"> UPDATE COMMANDER</span><br />
The <math>\ell</math> < 50 part of the Planck power spectrum is derived from the Commander approach, which implements Bayesian component separation in pixel space, fitting a parametric model to the data by sampling the posterior distribution for the model parameters {{PlanckPapers|planck2013-p06}}. The power spectrum at any multipole <math>\ell</math> is given as the maximum probability point for the posterior <math>C_\ell</math> distribution, marginalized over the other multipoles, and the error bars are 68% confidence level {{PlanckPapers|planck2013-p08}}. <br />
The <math>\ell</math> > 30 part of the CMB temperature power spectrum has been derived by the Plik likelihood, a code that implements a pseudo-Cl based technique, extensively described in Sec. 2 and the Appendix of {{PlanckPapers|planck2013-p08}}. Frequency spectra are computed as cross-spectra between half-mission maps. Mask and multipole range choices for each frequency spectrum are summarized in Section 3.3 of {{PlanckPapers|planck2014-a15}} and in {{PlanckPapers|planck2014-a13}}. The final power spectrum is an optimal combination of the 100, 143, 143x217 and 217 GHz spectra, corrected for the best-fit unresolved foregrounds and inter-frequency calibration factors, as derived from the full likelihood analysis (cf Planck+TT+lowP in Table 3 of {{PlanckPapers|planck2014-a15}}). A thorough description of the models of unresolved foregrounds is given in {{PlanckPapers|planck2014-a13}}. The spectrum covariance matrix accounts for cosmic variance and noise contributions, together with beam uncertainties. The <math>\ell</math> > 30 CMB TT spectrum and associated covariance matrix are available in two formats:<br />
#Unbinned, with 2479 bandpowers (<math>\ell=30-2508</math>).<br />
#Binned, in bins of <math> \Delta\ell=30 </math>, with 83 bandpowers in total. We bin the <math> C_\ell </math> power spectrum with a weight proportional to <math> \ell (\ell+1) </math>, so that the <math> C_{\ell_b} </math> binned bandpower centered in <math> \ell_b </math> is: <math> \\ C_{\ell_b}=\Sigma_{\ell \in b} w_{\ell_b\ell} C_\ell \quad \text{with} \quad w_{\ell_b\ell}=\frac{\ell (\ell+1)}{\Sigma_{\ell \in b} \ell (\ell+1)}. \\</math> Equivalently, using the matrix formalism, we can construct the binning matrix B as: <math>\\ B_{\ell \ell_b}=w_{\ell_b\ell} \\ </math> where B is a <math> n_b\times n_\ell</math> matrix, with <math>n_b=83</math> the number of bins and <math>n_\ell=2479</math> the number of unbinned multipoles. Thus: <math> \\ \vec{C}_\mathrm{binned}=B \, \vec{C} \\ \mathrm{cov_\mathrm{binned}}= B\, \mathrm{cov}\, B^T \\ \ell_b=B\, \ell \\ </math> Here, <math> \vec{C}_{binned} (\vec{C}) </math> is the vector containing all the binned (unbinned) <math>C_\ell</math> bandpowers, <math>\mathrm{cov} </math> is the covariance matrix and <math>\ell_b</math> is the weighted multipole average in each bin. The binned <math>D_{\ell_B}</math> power spectrum is then calculated as: <math> \\ D_{\ell_b}=\ell_b (\ell_b+1)/2/\pi C_{\ell_b} </math>.<br />
<br />
===Inputs===<br />
<span style="color:red"> UPDATE COMMANDER</span><br />
<br />
; Low-l spectrum (<math>\ell < 30</math>):<br />
* frequency maps from 30–353 GHz<br />
* common mask {{PlanckPapers|planck2013-p06}}<br />
* compact sources catalog<br />
<br />
; High-l spectrum (<math>30 < \ell < 2500</math>): <br />
<br />
* 100, 143, 143x217 and 217 GHz spectra and their covariance matrix (Sec. 3.3 {{PlanckPapers|planck2014-a15}})<br />
* best-fit foreground templates and inter-frequency calibration factors (Table 3 of {{PlanckPapers|planck2014-a15}})<br />
* Beam transfer function uncertainties {{PlanckPapers|planck2014-a08}}<br />
=== File names and Meta data ===<br />
<br />
<span style="color:red"> CHECK EXTENSION NAMES </span><br />
<br />
The CMB spectrum and its covariance matrix are distributed in a single FITS file named <br />
* ''{{PLASingleFile | fileType=cosmo | name=COM_PowerSpect_CMB_R1.10.fits | link=COM_PowerSpect_CMB_R1.10.fits}}'' <br />
<br />
which contains 5 extensions<br />
<br />
; LOW-ELL (BINTABLE)<br />
: with the low ell part of the spectrum, not binned, and for l=2-49. The table columns are<br />
# ''ELL'' (integer): multipole number<br />
# ''D_ELL'' (float): $D_l$ as described below<br />
# ''ERRUP'' (float): the upward uncertainty<br />
# ''ERRDOWN'' (float): the downward uncertainty<br />
<br />
; HIGH-ELL (BINTABLE) <br />
: with the high-ell part of the spectrum, binned into 83 bins covering <math>\langle l \rangle = 47-2499\ </math> in bins of width <math>l=30</math> (with the exception of the last bin that is smaller). The table columns are as follows:<br />
# ''ELL'' (integer): mean multipole number of bin<br />
# ''L_MIN'' (integer): lowest multipole of bin<br />
# ''L_MAX'' (integer): highest multipole of bin<br />
# ''D_ELL'' (float): $D_l$ as described below<br />
# ''ERR'' (float): the uncertainty<br />
<br />
; COV-MAT (IMAGE)<br />
: with the covariance matrix of the high-ell part of the spectrum in a 83x83 pixel image, i.e., covering the same bins as the ''HIGH-ELL'' table.<br />
<br />
<br />
; HIGH-ELL (BINTABLE)<br />
: with the high-ell part of the spectrum, unbinned, in 2979 bins covering <math>\langle l \rangle = 30-2508\ </math>. The table columns are as follows:<br />
# ''ELL'' (integer): multipole <br />
# ''D_ELL'' (float): $D_l$ as described below<br />
# ''ERR'' (float): the uncertainty<br />
<br />
; COV-MAT (IMAGE)<br />
: with the covariance matrix of the high-ell part of the spectrum in a 2979x2979 pixel image, i.e., covering the same bins as the ''HIGH-ELL'' table.<br />
<br />
The spectra give $D_\ell = \ell(\ell+1)C_\ell / 2\pi$ in units of $\mu\, K^2$, and the covariance matrix is in units of $\mu\, K^4$. <br />
<br />
The CMB spectrum is also given in a simple text comma-separated file:<br />
* ''{{PLASingleFile | fileType=cosmo | name=COM_PowerSpect_CMB_R1.10.txt |link=COM_PowerSpect_CMB_R1.10.txt}}''<br />
<br />
==Likelihood==<br />
TO BE WRITTEN.<br />
<!-- <br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
The likelihood code (and the data that comes with it) used to compute the likelihood of a model that predicts the CMB power spectra, lensing power spectrum, together with some foreground and some instrumental parameters. The data files are built primarily from the Planck mission results, but include also some results from the WMAP-9 data release. The data files are written in a specific format that can only be read by the code. The code consists in a c/f90 library, along with some optional tools in python. The code is used to read the data files, and given model power spectra and nuisance parameters it computes the log likelihood of that model. <br />
<br />
Detailed description of the installation and usage of the likelihood code and data is provided in the package. The package includes five data files: four for the CMB likelihoods and one for the lensing likelihood. All of the likelihoods delivered are described in detail in the {{PlanckPapers|planck2013-p08|1|Power spectrum & Likelihood Paper}} (for the CMB based likelihood) and in the {{PlanckPapers|planck2013-p12|1|Lensing Paper}} (for the lensing likelihood) .<br />
<br />
The CMB full likelihood has been divided into four parts to allow using selectively different ranges of multipoles. It also reflects the fact that the mathematical approximations used for those different parts are very different, as is the underlying data. In detail, we distribute<br />
* one low-<math>\ell</math> temperature only likelihood (commander), <br />
* one low-<math>\ell</math> temperature and polarisation likelihood (lowlike), and <br />
* one higl-<math>\ell</math> likelihood CAMspec. <br />
<br />
The ''Commander'' likelihood covers the multipoles 2 to 49. It uses a semi-analytic method to sample the low-<math>\ell</math> temperature likelihood on an intermediate product of one of the component separated maps. The samples are used along with an analytical approximation of the likelihood posterior to perform the likelihood computation in the code. See {{PlanckPapers|planck2013-p08}} section 8.1 for more details.<br />
<br />
The ''lowlike'' likelihood covers the multipoles 2 to 32 for temperature and polarization data. Since Planck is not releasing polarisation data at this time, the polarization map from WMAP9 is used instead. A temperature map is needed to perform the computation nevertheless, and we use here the same commander map. The likelihood is computed using a map-based approximation at low resolution and a master one at intermediate resolution, as in WMAP. The likelihood code actually calls a very slightly modified version of the WMAP9 code. This piece of the likelihood essentially provides a prior on the optical depth and has almost no other impact on cosmological parameter estimation. As such it could be replaced by a simple prior, and a user can decide to do so, which is one of the motivation to leave the three pieces of the CMB likelihood as different data packages; see {{PlanckPapers|planck2013-p08}} section 8.3 for more details. Note that the version of the WMAP code used here (code version v1.0) does not perform any test on the positive definiteness of the TT, TE, EE covariance matrices, and will return a null log likelihood in the unphysical cases where the absolute value of TE is too large. This will be corrected in a later version.<br />
<br />
The ''CAMspec'' likelihood covers the multipoles 50 to 2500 for temperature only. The likelihood is computed using a quadratic approximation, including mode to mode correlations that have been precomputed on a fiducial model. The likelihood uses data from the 100, 143 and 217 GHz channels. To do so it models the foreground at each frequency using the model described in the likelihood paper. Uncertainties on the relative calibration and on the beam transfer functions are included either as parametric models, or marginalized and integrated in the covariance matrix. Detailed description of the different nuisance parameters is given below. Priors are included in the likelihood on the CIB spectral index, relative calibration factors and beam error eigenmodes. See {{PlanckPapers|planck2013-p08}} section 2.1 for more details.<br />
<br />
The ''act/spt'' likelihood covers the multipoles 1500 to 10000 for temperature. It is described in{{BibCite|dun2013}}{{BibCite|Keis2011}}{{BibCite|Reic2012}}. It uses the code and data that can be retrieved from the [http://lambda.gsfc.nasa.gov/ Lambda archive] for [http://lambda.gsfc.nasa.gov/product/act/act_prod_table.cfm ACT] and [http://lambda.gsfc.nasa.gov/product/spt/spt_prod_table.cfm SPT]. It has been slightly modified to use a thermal and kinetic SZ model that matches the one used in CAMspec. As stated in{{BibCite|dun2013}}, the dust parameters a_ge and a_gs must be explored with the following priors: a_ge = 0.8 ± 0.2 and a_gs = 0.4 ± 0.2. Those priors are not included in the log likelihood computed by the code.<br />
<br />
The ''lensing'' likelihood covers the multipoles 40 to 400 using the result of the [[Specially_processed_maps | lensing reconstruction]]. It uses a quadratic approximation for the likelihood, with a covariance matrix including the marginalized contribution of the beam transfer function uncertainties, the diffuse point source correction uncertainties and the cosmological model uncertainty affecting the first order non-gaussian bias (N1). The correlation between temperature and lensing is not taken into account. Cosmological uncertainty effects on the normalization are dealt with using a first order renormalization procedure. This means that the code will need both the TT and $\phi\phi$ power spectrum up to <math>\ell</math> = 2048 to correctly perform the integrals needed for the renormalization. Nevertheless, the code will only produce an estimate based on the data between <math>\ell</math> = 40 to 400. See {{PlanckPapers|planck2013-p12}} section 6.1 for more details.<br />
</span><br />
<span style="color:red">OUTSTANDING: description of likelihood masks </span><br />
==Production process==<br />
<br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
The code is based on some basic routines from the libpmc library in the [http://arxiv.org/abs/1101.0950 cosmoPMC] code. It also uses some code from the [http://lambda.gsfc.nasa.gov/product/map/dr5/likelihood_get.cfm WMAP9 likelihood] for the lowlike likelihood and{{BibCite|dun2013}}{{BibCite|Keis2011}}{{BibCite|Reic2012}} for the act/spt one. The rest of the code has been specifically written for the Planck data. Each likelihood file has been processed using a different and dedicated pipeline as described in the likelihood paper {{PlanckPapers|planck2013-p08}} (section 2 and 8) and in the lensing paper {{PlanckPapers|planck2013-p12}} (section 6.1). We refer the reader to those papers for full details. The data are then encapsulated into the specific file format.<br />
<br />
Each dataset comes with its own self check. Whenever the code is used to read a data file, a computation will be done against an included test spectrum/nuisance parameter, and the log-likelihood will be displayed along with the expected result. Difference of the order of 10<math>^{-6}</math> or less are expected depending of the architecture.<br />
<br />
==Inputs==<br />
<br />
===Likelihood===<br />
<br />
; ''commander'' :<br />
* all Planck channels maps<br />
* compact source catalogs<br />
* common masks<br />
* beam transfer functions for all channels<br />
<br />
; ''lowlike'' :<br />
* WMAP9 likelihood data<br />
* Low-<math>\ell</math> Commander map<br />
<br />
; ''CAMspec'' :<br />
* 100, 143 and 217 GHz detector and detsets maps<br />
* 857GHz channel map<br />
* compact source catalog<br />
* common masks (0,1 & 3)<br />
* beam transfer function and error eigenmodes and covariance for 100, 143 and 217 GHz detectors & detsets<br />
* theoretical templates for the tSZ and kSZ contributions<br />
* color corrections for the CIB emission for the 143 and 217GHz detectors and detsets<br />
* fiducial CMB model (bootstrapped from WMAP7 best fit spectrum) estimated noise contribution from the half-ring maps for 100, 143 and 217 GHz<br />
<br />
; ''lensing'' :<br />
* the lensing map<br />
* beam error eigenmodes and covariance for the 143 and 217GHz channel maps<br />
* fiducial CMB model (from Planck cosmological parameter best fit)<br />
<br />
; ''act/spt'' :<br />
* data and code from [http://lambda.gsfc.nasa.gov/product/act/act_fulllikelihood_get.cfm here]<br />
* the tSZ andkSZ template are changed to match those of CAMspec<br />
<br />
== File names and Meta data ==<br />
<br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
<br />
'''Likelihood source code'''<br />
<br />
The source code is in the file<br />
: {{PLASingleFile |fileType=cosmo|name=COM_Code_Likelihood-v1.0_R1.10.tar.gz|link=COM_Code_Likelihood-v1.0_R1.10.tar.gz}} (C, f90 and python likelihood library and tools)<br />
<br />
'''Likelihood data packages'''<br />
<br />
The {{PLALikelihood|type=Data|link=data packages}} are<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-commander_R1.10.tar.gz | link=COM_Data_Likelihood-commander_R1.10.tar.gz}}'' (low-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-lowlike_R1.10.tar.gz | link=COM_Data_Likelihood-lowlike_R1.10.tar.gz}}'' (low-ell TE,EE,BB likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-CAMspec_R1.10.tar.gz | link=COM_Data_Likelihood-CAMspec_R1.10.tar.gz}}'' (high-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-actspt_R1.10.tar | link=COM_Data_Likelihood-actspt_R1.10.tar.gz}}'' (high-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-lensing_R1.10.tar.gz | link=COM_Data_Likelihood-lensing_R1.10.tar.gz}}'' (lensing likelihood)<br />
<br />
Untar and unzip all files to recover the code and likelihood data. Each package comes with a README file; follow the instructions inclosed to<br />
build the code and use it. To compute the CMB likelihood one has to sum the log likelihood of each of the commander_v4.1_lm49.clik, lowlike_v222.clik and CAMspec_v6.2TN_2013_02_26.clik, actspt_2013_01.clik. To compute the CMB+lensing likelihood, one has to sum the log likelihood of all 5 files.<br />
<br />
The CMB and lensing likelihood format are different. The CMB files have the termination .clik, the lensing one .clik_lensing. The lensing data being simpler (due to the less detailled modeling permitted by the lower signal-noise), the file is a simple ascii file containing all the data along with comments describing it, and linking the different quantities to the lensing paper. The CMB file format is more complex and must accommodate different forms of data (maps, power spectrum, distribution samples, covariance matrices...). It consists of a tree structure containing the data. At each level of the tree structure a given directory can contain array data (in the form of FITS files or ascii files for strings) and scalar data (joined in a single ascii file "_mdb"). Those files are not user modifiable and do not contain interesting meta data for the user. Tools to manipulate those files are included in the code package as optional python tools. They are documented in the code package.<br />
<br />
'''Likelihood masks'''<br />
<br />
The masks used in the Likelihood paper {{PlanckPapers|planck2013-p08}} are found in<br />
{{PLASingleFile|fileType=map|name=COM_Mask_Likelihood_2048_R1.10.fits|link=COM_Mask_Likelihood_2048_R1.10.fits}}<br />
<br />
which contains ten masks which are written into a single ''BINTABLE'' extension of 10 columns by 50331648 rows (the number of Healpix pixels in an Nside = 2048 map). The structure is as follows, where the column names are the names of the masks: <br />
<br />
{| border="1" cellpadding="3" cellspacing="0" align="center" style="text-align:left" width=800px<br />
|+ '''Likelihodd masks file data structure'''<br />
|- bgcolor="ffdead" <br />
!colspan="4" | 1. EXTNAME = 'MSK-LIKE' : Data columns<br />
|- bgcolor="ffdead" <br />
! Column Name || Data Type || Units || Description<br />
|-<br />
|CL31 || Real*4 || none || mask<br />
|-<br />
|CL39 || Real*4 || none || mask<br />
|-<br />
|CL49 || Real*4 || none || mask<br />
|-<br />
|G22 || Real*4 || none || mask <br />
|-<br />
|G35 || Real*4 || none || mask<br />
|-<br />
|G45 || Real*4 || none || mask<br />
|-<br />
|G56 || Real*4 || none || mask<br />
|-<br />
|G65 || Real*4 || none || mask<br />
|-<br />
|PS96 || Real*4 || none || mask<br />
|-<br />
|PSA82 || Real*4 || none || mask<br />
|-<br />
|- bgcolor="ffdead" <br />
! Keyword || Data Type || Value || Description<br />
|-<br />
|PIXTYPE || string || HEALPIX ||<br />
|-<br />
|COORDSYS || string || GALACTIC ||Coordinate system <br />
|-<br />
|ORDERING || string || NESTED || Healpix ordering<br />
|-<br />
|NSIDE || Int || 2048 || Healpix Nside <br />
|-<br />
|FIRSTPIX || Int*4 || 0 || First pixel number<br />
|-<br />
|LASTPIX || Int*4 || 50331647 || Last pixel number, for LFI and HFI, respectively<br />
<br />
|}<br />
--><br />
== References ==<br />
<References /><br />
<br />
<br />
<br />
[[Category:Mission products|008]]</div>Sgallihttps://wiki.cosmos.esa.int/planckpla2015/index.php?title=CMB_spectrum_%26_Likelihood_Code&diff=11079CMB spectrum & Likelihood Code2015-02-04T01:00:02Z<p>Sgalli: </p>
<hr />
<div>{{DISPLAYTITLE:CMB spectrum and likelihood code}}<br />
<br />
==CMB spectra==<br />
<br />
===General description===<br />
<span style="color:red"> UPDATE COMMANDER</span><br />
<br />
<br />
The Planck best-fit CMB temperature power spectrum, shown in figure below, covers the wide range of multipoles <math> \ell </math> = 2-2508. Over the multipole range <math> \ell </math> = 2–29, the power spectrum is derived from a component-separation algorithm, ''Commander'': applied to maps in the frequency range 30–353 GHz over 91% of the sky {{PlanckPapers|planck2013-p06}} . The asymmetric error bars associated to this spectrum are the 68% confidence limits and include the uncertainties due to foreground subtraction. For multipoles equal or greater than <math>\ell=30</math>, instead, the spectrum is derived from the ''Plik'' likelihood {{PlanckPapers|planck2014-a13}} by optimally combining the spectra in the frequency range 100-217 GHz, and correcting them for unresolved foregrounds. Associated 1-sigma errors include beam uncertainties. Both ''Commander'' and ''Plik'' are described in more details in the sections below.<br />
<br />
[[File: Planck2014 TT Dl NORES bin30 w180mm.jpeg|thumb|center|700px|'''CMB spectrum. Logarithmic x-scale up to <math>\ell=30</math>, linear at higher <math>\ell</math>; all points with error bars. The red line is the Planck best-fit primordial power spectrum (cf Planck TT+lowP in Table 3 of {{PlanckPapers|planck2014-a15}}). The blue shaded area shows the uncertainties due to cosmic variance alone.''']]<br />
===Production process===<br />
<br />
<span style="color:red"> UPDATE COMMANDER</span><br />
The <math>\ell</math> < 50 part of the Planck power spectrum is derived from the Commander approach, which implements Bayesian component separation in pixel space, fitting a parametric model to the data by sampling the posterior distribution for the model parameters {{PlanckPapers|planck2013-p06}}. The power spectrum at any multipole <math>\ell</math> is given as the maximum probability point for the posterior <math>C_\ell</math> distribution, marginalized over the other multipoles, and the error bars are 68% confidence level {{PlanckPapers|planck2013-p08}}. <br />
The <math>\ell</math> > 30 part of the CMB temperature power spectrum has been derived by the Plik likelihood, a code that implements a pseudo-Cl based technique, extensively described in Sec. 2 and the Appendix of {{PlanckPapers|planck2013-p08}}. Frequency spectra are computed as cross-spectra between half-mission maps. Mask and multipole range choices for each frequency spectrum are summarized in Section 3.3 of {{PlanckPapers|planck2014-a15}} and in {{PlanckPapers|planck2014-a13}}. The final power spectrum is an optimal combination of the 100, 143, 143x217 and 217 GHz spectra, corrected for the best-fit unresolved foregrounds and inter-frequency calibration factors, as derived from the full likelihood analysis (cf Planck+TT+lowP in Table 3 of {{PlanckPapers|planck2014-a15}}). A thorough description of the models of unresolved foregrounds is given in {{PlanckPapers|planck2014-a13}}. The spectrum covariance matrix accounts for cosmic variance and noise contributions, together with beam uncertainties. The <math>\ell</math> > 30 CMB TT spectrum and associated covariance matrix are available in two formats:<br />
#Unbinned, with 2479 bandpowers (<math>\ell=30-2508</math>).<br />
#Binned, in bins of <math> \Delta\ell=30 </math>, with 83 bandpowers in total. We bin the <math> C_\ell </math> power spectrum with a weight proportional to <math> \ell (\ell+1) </math>, so that the <math> C_{\ell_b} </math> binned bandpower centered in <math> \ell_b </math> is: <math> \\ C_{\ell_b}=\Sigma_{\ell \in b} w_{\ell_b\ell} C_\ell \quad \text{with} \quad w_{\ell_b\ell}=\frac{\ell (\ell+1)}{\Sigma_{\ell \in b} \ell (\ell+1)}. \\</math> Equivalently, using the matrix formalism, we can construct the binning matrix B as: <math>\\ B_{\ell \ell_b}=w_{\ell_b\ell} \\ </math> where B is a <math> n_b\times n_\ell</math> matrix, with <math>n_b=83</math> the number of bins and <math>n_\ell=2479</math> the number of unbinned multipoles. Thus: <math> \\ \vec{C}_\mathrm{binned}=B \, \vec{C} \\ \mathrm{cov_\mathrm{binned}}= B\, \mathrm{cov}\, B^T \\ \ell_b=B\, \ell \\ </math> Here, <math> \vec{C}_{binned} (\vec{C}) </math> is the vector containing all the binned (unbinned) <math>C_\ell</math> bandpowers, <math>\mathrm{cov} </math> is the covariance matrix and <math>\ell_b</math> is the weighted multipole average in each bin. The binned <math>D_{\ell_B}</math> power spectrum is then calculated as: <math> \\ D_{\ell_b}=\ell_b (\ell_b+1)/2/\pi C_{\ell_b} </math>.<br />
<br />
===Inputs===<br />
<span style="color:red"> UPDATE COMMANDER</span><br />
<br />
; Low-l spectrum (<math>\ell < 30</math>):<br />
* frequency maps from 30–353 GHz<br />
* common mask {{PlanckPapers|planck2013-p06}}<br />
* compact sources catalog<br />
<br />
; High-l spectrum (<math>30 < \ell < 2500</math>): <br />
<br />
* 100, 143, 143x217 and 217 GHz spectra and their covariance matrix (Sec. 3.3 {{PlanckPapers|planck2014-a15}})<br />
* best-fit foreground templates and inter-frequency calibration factors (Table 3 of {{PlanckPapers|planck2014-a15}})<br />
* Beam transfer function uncertainties {{PlanckPapers|planck2014-a08}}<br />
=== File names and Meta data ===<br />
<br />
<br />
The CMB spectrum and its covariance matrix are distributed in a single FITS file named <br />
* ''{{PLASingleFile | fileType=cosmo | name=COM_PowerSpect_CMB_R1.10.fits | link=COM_PowerSpect_CMB_R1.10.fits}}'' <br />
<br />
which contains 5 extensions<br />
<br />
; LOW-ELL (BINTABLE)<br />
: with the low ell part of the spectrum, not binned, and for l=2-49. The table columns are<br />
# ''ELL'' (integer): multipole number<br />
# ''D_ELL'' (float): $D_l$ as described below<br />
# ''ERRUP'' (float): the upward uncertainty<br />
# ''ERRDOWN'' (float): the downward uncertainty<br />
<br />
; HIGH-ELL (BINTABLE) <br />
: with the high-ell part of the spectrum, binned into 83 bins covering <math>\langle l \rangle = 47-2499\ </math> in bins of width <math>l=30</math> (with the exception of the last bin that is smaller). The table columns are as follows:<br />
# ''ELL'' (integer): mean multipole number of bin<br />
# ''L_MIN'' (integer): lowest multipole of bin<br />
# ''L_MAX'' (integer): highest multipole of bin<br />
# ''D_ELL'' (float): $D_l$ as described below<br />
# ''ERR'' (float): the uncertainty<br />
<br />
; COV-MAT (IMAGE)<br />
: with the covariance matrix of the high-ell part of the spectrum in a 83x83 pixel image, i.e., covering the same bins as the ''HIGH-ELL'' table.<br />
<br />
<br />
; HIGH-ELL (BINTABLE)<br />
: with the high-ell part of the spectrum, unbinned, in 2979 bins covering <math>\langle l \rangle = 30-2508\ </math>. The table columns are as follows:<br />
# ''ELL'' (integer): multipole <br />
# ''D_ELL'' (float): $D_l$ as described below<br />
# ''ERR'' (float): the uncertainty<br />
<br />
; COV-MAT (IMAGE)<br />
: with the covariance matrix of the high-ell part of the spectrum in a 2979x2979 pixel image, i.e., covering the same bins as the ''HIGH-ELL'' table.<br />
<br />
The spectra give $D_\ell = \ell(\ell+1)C_\ell / 2\pi$ in units of $\mu\, K^2$, and the covariance matrix is in units of $\mu\, K^4$. <br />
<br />
The CMB spectrum is also given in a simple text comma-separated file:<br />
* ''{{PLASingleFile | fileType=cosmo | name=COM_PowerSpect_CMB_R1.10.txt |link=COM_PowerSpect_CMB_R1.10.txt}}''<br />
<br />
==Likelihood==<br />
TO BE WRITTEN.<br />
<!-- <br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
The likelihood code (and the data that comes with it) used to compute the likelihood of a model that predicts the CMB power spectra, lensing power spectrum, together with some foreground and some instrumental parameters. The data files are built primarily from the Planck mission results, but include also some results from the WMAP-9 data release. The data files are written in a specific format that can only be read by the code. The code consists in a c/f90 library, along with some optional tools in python. The code is used to read the data files, and given model power spectra and nuisance parameters it computes the log likelihood of that model. <br />
<br />
Detailed description of the installation and usage of the likelihood code and data is provided in the package. The package includes five data files: four for the CMB likelihoods and one for the lensing likelihood. All of the likelihoods delivered are described in detail in the {{PlanckPapers|planck2013-p08|1|Power spectrum & Likelihood Paper}} (for the CMB based likelihood) and in the {{PlanckPapers|planck2013-p12|1|Lensing Paper}} (for the lensing likelihood) .<br />
<br />
The CMB full likelihood has been divided into four parts to allow using selectively different ranges of multipoles. It also reflects the fact that the mathematical approximations used for those different parts are very different, as is the underlying data. In detail, we distribute<br />
* one low-<math>\ell</math> temperature only likelihood (commander), <br />
* one low-<math>\ell</math> temperature and polarisation likelihood (lowlike), and <br />
* one higl-<math>\ell</math> likelihood CAMspec. <br />
<br />
The ''Commander'' likelihood covers the multipoles 2 to 49. It uses a semi-analytic method to sample the low-<math>\ell</math> temperature likelihood on an intermediate product of one of the component separated maps. The samples are used along with an analytical approximation of the likelihood posterior to perform the likelihood computation in the code. See {{PlanckPapers|planck2013-p08}} section 8.1 for more details.<br />
<br />
The ''lowlike'' likelihood covers the multipoles 2 to 32 for temperature and polarization data. Since Planck is not releasing polarisation data at this time, the polarization map from WMAP9 is used instead. A temperature map is needed to perform the computation nevertheless, and we use here the same commander map. The likelihood is computed using a map-based approximation at low resolution and a master one at intermediate resolution, as in WMAP. The likelihood code actually calls a very slightly modified version of the WMAP9 code. This piece of the likelihood essentially provides a prior on the optical depth and has almost no other impact on cosmological parameter estimation. As such it could be replaced by a simple prior, and a user can decide to do so, which is one of the motivation to leave the three pieces of the CMB likelihood as different data packages; see {{PlanckPapers|planck2013-p08}} section 8.3 for more details. Note that the version of the WMAP code used here (code version v1.0) does not perform any test on the positive definiteness of the TT, TE, EE covariance matrices, and will return a null log likelihood in the unphysical cases where the absolute value of TE is too large. This will be corrected in a later version.<br />
<br />
The ''CAMspec'' likelihood covers the multipoles 50 to 2500 for temperature only. The likelihood is computed using a quadratic approximation, including mode to mode correlations that have been precomputed on a fiducial model. The likelihood uses data from the 100, 143 and 217 GHz channels. To do so it models the foreground at each frequency using the model described in the likelihood paper. Uncertainties on the relative calibration and on the beam transfer functions are included either as parametric models, or marginalized and integrated in the covariance matrix. Detailed description of the different nuisance parameters is given below. Priors are included in the likelihood on the CIB spectral index, relative calibration factors and beam error eigenmodes. See {{PlanckPapers|planck2013-p08}} section 2.1 for more details.<br />
<br />
The ''act/spt'' likelihood covers the multipoles 1500 to 10000 for temperature. It is described in{{BibCite|dun2013}}{{BibCite|Keis2011}}{{BibCite|Reic2012}}. It uses the code and data that can be retrieved from the [http://lambda.gsfc.nasa.gov/ Lambda archive] for [http://lambda.gsfc.nasa.gov/product/act/act_prod_table.cfm ACT] and [http://lambda.gsfc.nasa.gov/product/spt/spt_prod_table.cfm SPT]. It has been slightly modified to use a thermal and kinetic SZ model that matches the one used in CAMspec. As stated in{{BibCite|dun2013}}, the dust parameters a_ge and a_gs must be explored with the following priors: a_ge = 0.8 ± 0.2 and a_gs = 0.4 ± 0.2. Those priors are not included in the log likelihood computed by the code.<br />
<br />
The ''lensing'' likelihood covers the multipoles 40 to 400 using the result of the [[Specially_processed_maps | lensing reconstruction]]. It uses a quadratic approximation for the likelihood, with a covariance matrix including the marginalized contribution of the beam transfer function uncertainties, the diffuse point source correction uncertainties and the cosmological model uncertainty affecting the first order non-gaussian bias (N1). The correlation between temperature and lensing is not taken into account. Cosmological uncertainty effects on the normalization are dealt with using a first order renormalization procedure. This means that the code will need both the TT and $\phi\phi$ power spectrum up to <math>\ell</math> = 2048 to correctly perform the integrals needed for the renormalization. Nevertheless, the code will only produce an estimate based on the data between <math>\ell</math> = 40 to 400. See {{PlanckPapers|planck2013-p12}} section 6.1 for more details.<br />
</span><br />
<span style="color:red">OUTSTANDING: description of likelihood masks </span><br />
==Production process==<br />
<br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
The code is based on some basic routines from the libpmc library in the [http://arxiv.org/abs/1101.0950 cosmoPMC] code. It also uses some code from the [http://lambda.gsfc.nasa.gov/product/map/dr5/likelihood_get.cfm WMAP9 likelihood] for the lowlike likelihood and{{BibCite|dun2013}}{{BibCite|Keis2011}}{{BibCite|Reic2012}} for the act/spt one. The rest of the code has been specifically written for the Planck data. Each likelihood file has been processed using a different and dedicated pipeline as described in the likelihood paper {{PlanckPapers|planck2013-p08}} (section 2 and 8) and in the lensing paper {{PlanckPapers|planck2013-p12}} (section 6.1). We refer the reader to those papers for full details. The data are then encapsulated into the specific file format.<br />
<br />
Each dataset comes with its own self check. Whenever the code is used to read a data file, a computation will be done against an included test spectrum/nuisance parameter, and the log-likelihood will be displayed along with the expected result. Difference of the order of 10<math>^{-6}</math> or less are expected depending of the architecture.<br />
<br />
==Inputs==<br />
<br />
===Likelihood===<br />
<br />
; ''commander'' :<br />
* all Planck channels maps<br />
* compact source catalogs<br />
* common masks<br />
* beam transfer functions for all channels<br />
<br />
; ''lowlike'' :<br />
* WMAP9 likelihood data<br />
* Low-<math>\ell</math> Commander map<br />
<br />
; ''CAMspec'' :<br />
* 100, 143 and 217 GHz detector and detsets maps<br />
* 857GHz channel map<br />
* compact source catalog<br />
* common masks (0,1 & 3)<br />
* beam transfer function and error eigenmodes and covariance for 100, 143 and 217 GHz detectors & detsets<br />
* theoretical templates for the tSZ and kSZ contributions<br />
* color corrections for the CIB emission for the 143 and 217GHz detectors and detsets<br />
* fiducial CMB model (bootstrapped from WMAP7 best fit spectrum) estimated noise contribution from the half-ring maps for 100, 143 and 217 GHz<br />
<br />
; ''lensing'' :<br />
* the lensing map<br />
* beam error eigenmodes and covariance for the 143 and 217GHz channel maps<br />
* fiducial CMB model (from Planck cosmological parameter best fit)<br />
<br />
; ''act/spt'' :<br />
* data and code from [http://lambda.gsfc.nasa.gov/product/act/act_fulllikelihood_get.cfm here]<br />
* the tSZ andkSZ template are changed to match those of CAMspec<br />
<br />
== File names and Meta data ==<br />
<br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
<br />
'''Likelihood source code'''<br />
<br />
The source code is in the file<br />
: {{PLASingleFile |fileType=cosmo|name=COM_Code_Likelihood-v1.0_R1.10.tar.gz|link=COM_Code_Likelihood-v1.0_R1.10.tar.gz}} (C, f90 and python likelihood library and tools)<br />
<br />
'''Likelihood data packages'''<br />
<br />
The {{PLALikelihood|type=Data|link=data packages}} are<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-commander_R1.10.tar.gz | link=COM_Data_Likelihood-commander_R1.10.tar.gz}}'' (low-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-lowlike_R1.10.tar.gz | link=COM_Data_Likelihood-lowlike_R1.10.tar.gz}}'' (low-ell TE,EE,BB likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-CAMspec_R1.10.tar.gz | link=COM_Data_Likelihood-CAMspec_R1.10.tar.gz}}'' (high-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-actspt_R1.10.tar | link=COM_Data_Likelihood-actspt_R1.10.tar.gz}}'' (high-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-lensing_R1.10.tar.gz | link=COM_Data_Likelihood-lensing_R1.10.tar.gz}}'' (lensing likelihood)<br />
<br />
Untar and unzip all files to recover the code and likelihood data. Each package comes with a README file; follow the instructions inclosed to<br />
build the code and use it. To compute the CMB likelihood one has to sum the log likelihood of each of the commander_v4.1_lm49.clik, lowlike_v222.clik and CAMspec_v6.2TN_2013_02_26.clik, actspt_2013_01.clik. To compute the CMB+lensing likelihood, one has to sum the log likelihood of all 5 files.<br />
<br />
The CMB and lensing likelihood format are different. The CMB files have the termination .clik, the lensing one .clik_lensing. The lensing data being simpler (due to the less detailled modeling permitted by the lower signal-noise), the file is a simple ascii file containing all the data along with comments describing it, and linking the different quantities to the lensing paper. The CMB file format is more complex and must accommodate different forms of data (maps, power spectrum, distribution samples, covariance matrices...). It consists of a tree structure containing the data. At each level of the tree structure a given directory can contain array data (in the form of FITS files or ascii files for strings) and scalar data (joined in a single ascii file "_mdb"). Those files are not user modifiable and do not contain interesting meta data for the user. Tools to manipulate those files are included in the code package as optional python tools. They are documented in the code package.<br />
<br />
'''Likelihood masks'''<br />
<br />
The masks used in the Likelihood paper {{PlanckPapers|planck2013-p08}} are found in<br />
{{PLASingleFile|fileType=map|name=COM_Mask_Likelihood_2048_R1.10.fits|link=COM_Mask_Likelihood_2048_R1.10.fits}}<br />
<br />
which contains ten masks which are written into a single ''BINTABLE'' extension of 10 columns by 50331648 rows (the number of Healpix pixels in an Nside = 2048 map). The structure is as follows, where the column names are the names of the masks: <br />
<br />
{| border="1" cellpadding="3" cellspacing="0" align="center" style="text-align:left" width=800px<br />
|+ '''Likelihodd masks file data structure'''<br />
|- bgcolor="ffdead" <br />
!colspan="4" | 1. EXTNAME = 'MSK-LIKE' : Data columns<br />
|- bgcolor="ffdead" <br />
! Column Name || Data Type || Units || Description<br />
|-<br />
|CL31 || Real*4 || none || mask<br />
|-<br />
|CL39 || Real*4 || none || mask<br />
|-<br />
|CL49 || Real*4 || none || mask<br />
|-<br />
|G22 || Real*4 || none || mask <br />
|-<br />
|G35 || Real*4 || none || mask<br />
|-<br />
|G45 || Real*4 || none || mask<br />
|-<br />
|G56 || Real*4 || none || mask<br />
|-<br />
|G65 || Real*4 || none || mask<br />
|-<br />
|PS96 || Real*4 || none || mask<br />
|-<br />
|PSA82 || Real*4 || none || mask<br />
|-<br />
|- bgcolor="ffdead" <br />
! Keyword || Data Type || Value || Description<br />
|-<br />
|PIXTYPE || string || HEALPIX ||<br />
|-<br />
|COORDSYS || string || GALACTIC ||Coordinate system <br />
|-<br />
|ORDERING || string || NESTED || Healpix ordering<br />
|-<br />
|NSIDE || Int || 2048 || Healpix Nside <br />
|-<br />
|FIRSTPIX || Int*4 || 0 || First pixel number<br />
|-<br />
|LASTPIX || Int*4 || 50331647 || Last pixel number, for LFI and HFI, respectively<br />
<br />
|}<br />
--><br />
== References ==<br />
<References /><br />
<br />
<br />
<br />
[[Category:Mission products|008]]</div>Sgallihttps://wiki.cosmos.esa.int/planckpla2015/index.php?title=CMB_spectrum_%26_Likelihood_Code&diff=11078CMB spectrum & Likelihood Code2015-02-04T00:57:57Z<p>Sgalli: </p>
<hr />
<div>{{DISPLAYTITLE:CMB spectrum and likelihood code}}<br />
<br />
==CMB spectra==<br />
<br />
===General description===<br />
<br />
<br />
The Planck best-fit CMB temperature power spectrum, shown in figure below, covers the wide range of multipoles <math> \ell </math> = 2-2508. Over the multipole range <math> \ell </math> = 2–29, the power spectrum is derived from a component-separation algorithm, ''Commander'', <span style="color:red"> UPDATE COMMANDER </span>: applied to maps in the frequency range 30–353 GHz over 91% of the sky {{PlanckPapers|planck2013-p06}} . The asymmetric error bars associated to this spectrum are the 68% confidence limits and include the uncertainties due to foreground subtraction. For multipoles equal or greater than <math>\ell=30</math>, instead, the spectrum is derived from the ''Plik'' likelihood {{PlanckPapers|planck2014-a13}} by optimally combining the spectra in the frequency range 100-217 GHz, and correcting them for unresolved foregrounds. Associated 1-sigma errors include beam uncertainties. Both ''Commander'' and ''Plik'' are described in more details in the sections below.<br />
<br />
[[File: Planck2014 TT Dl NORES bin30 w180mm.jpeg|thumb|center|700px|'''CMB spectrum. Logarithmic x-scale up to <math>\ell=30</math>, linear at higher <math>\ell</math>; all points with error bars. The red line is the Planck best-fit primordial power spectrum (cf Planck TT+lowP in Table 3 of {{PlanckPapers|planck2014-a15}}). The blue shaded area shows the uncertainties due to cosmic variance alone.''']]<br />
===Production process===<br />
<br />
<span style="color:red"> UPDATE COMMANDER</span><br />
The <math>\ell</math> < 50 part of the Planck power spectrum is derived from the Commander approach, which implements Bayesian component separation in pixel space, fitting a parametric model to the data by sampling the posterior distribution for the model parameters {{PlanckPapers|planck2013-p06}}. The power spectrum at any multipole <math>\ell</math> is given as the maximum probability point for the posterior <math>C_\ell</math> distribution, marginalized over the other multipoles, and the error bars are 68% confidence level {{PlanckPapers|planck2013-p08}}. <br />
The <math>\ell</math> > 30 part of the CMB temperature power spectrum has been derived by the Plik likelihood, a code that implements a pseudo-Cl based technique, extensively described in Sec. 2 and the Appendix of {{PlanckPapers|planck2013-p08}}. Frequency spectra are computed as cross-spectra between half-mission maps. Mask and multipole range choices for each frequency spectrum are summarized in Section 3.3 of {{PlanckPapers|planck2014-a15}} and in {{PlanckPapers|planck2014-a13}}. The final power spectrum is an optimal combination of the 100, 143, 143x217 and 217 GHz spectra, corrected for the best-fit unresolved foregrounds and inter-frequency calibration factors, as derived from the full likelihood analysis (cf Planck+TT+lowP in Table 3 of {{PlanckPapers|planck2014-a15}}). A thorough description of the models of unresolved foregrounds is given in {{PlanckPapers|planck2014-a13}}. The spectrum covariance matrix accounts for cosmic variance and noise contributions, together with beam uncertainties. The <math>\ell</math> > 30 CMB TT spectrum and associated covariance matrix are available in two formats:<br />
#Unbinned, with 2479 bandpowers (<math>\ell=30-2508</math>).<br />
#Binned, in bins of <math> \Delta\ell=30 </math>, with 83 bandpowers in total. We bin the <math> C_\ell </math> power spectrum with a weight proportional to <math> \ell (\ell+1) </math>, so that the <math> C_{\ell_b} </math> binned bandpower centered in <math> \ell_b </math> is: <math> \\ C_{\ell_b}=\Sigma_{\ell \in b} w_{\ell_b\ell} C_\ell \quad \text{with} \quad w_{\ell_b\ell}=\frac{\ell (\ell+1)}{\Sigma_{\ell \in b} \ell (\ell+1)}. \\</math> Equivalently, using the matrix formalism, we can construct the binning matrix B as: <math>\\ B_{\ell \ell_b}=w_{\ell_b\ell} \\ </math> where B is a <math> n_b\times n_\ell</math> matrix, with <math>n_b=83</math> the number of bins and <math>n_\ell=2479</math> the number of unbinned multipoles. Thus: <math> \\ \vec{C}_\mathrm{binned}=B \, \vec{C} \\ \mathrm{cov_\mathrm{binned}}= B\, \mathrm{cov}\, B^T \\ \ell_b=B\, \ell \\ </math> Here, <math> \vec{C}_{binned} (\vec{C}) </math> is the vector containing all the binned (unbinned) <math>C_\ell</math> bandpowers, <math>\mathrm{cov} </math> is the covariance matrix and <math>\ell_b</math> is the weighted multipole average in each bin. The binned <math>D_{\ell_B}</math> power spectrum is then calculated as: <math> \\ D_{\ell_b}=\ell_b (\ell_b+1)/2/\pi C_{\ell_b} </math>.<br />
<br />
===Inputs===<br />
<br />
; Low-l spectrum (<math>\ell < 30</math>):<br />
* frequency maps from 30–353 GHz<br />
* common mask {{PlanckPapers|planck2013-p06}}<br />
* compact sources catalog<br />
<br />
; High-l spectrum (<math>30 < \ell < 2500</math>): <br />
<br />
* 100, 143, 143x217 and 217 GHz spectra and their covariance matrix (Sec. 3.3 {{PlanckPapers|planck2014-p15}})<br />
* best-fit foreground templates and inter-frequency calibration factors (Table 3 of {{PlanckPapers|planck2014-p15}})<br />
* Beam transfer function uncertainties {{PlanckPapers|planck2014-p08}}<br />
=== File names and Meta data ===<br />
<br />
<br />
The CMB spectrum and its covariance matrix are distributed in a single FITS file named <br />
* ''{{PLASingleFile | fileType=cosmo | name=COM_PowerSpect_CMB_R1.10.fits | link=COM_PowerSpect_CMB_R1.10.fits}}'' <br />
<br />
which contains 5 extensions<br />
<br />
; LOW-ELL (BINTABLE)<br />
: with the low ell part of the spectrum, not binned, and for l=2-49. The table columns are<br />
# ''ELL'' (integer): multipole number<br />
# ''D_ELL'' (float): $D_l$ as described below<br />
# ''ERRUP'' (float): the upward uncertainty<br />
# ''ERRDOWN'' (float): the downward uncertainty<br />
<br />
; HIGH-ELL (BINTABLE) <br />
: with the high-ell part of the spectrum, binned into 83 bins covering <math>\langle l \rangle = 47-2499\ </math> in bins of width <math>l=30</math> (with the exception of the last bin that is smaller). The table columns are as follows:<br />
# ''ELL'' (integer): mean multipole number of bin<br />
# ''L_MIN'' (integer): lowest multipole of bin<br />
# ''L_MAX'' (integer): highest multipole of bin<br />
# ''D_ELL'' (float): $D_l$ as described below<br />
# ''ERR'' (float): the uncertainty<br />
<br />
; COV-MAT (IMAGE)<br />
: with the covariance matrix of the high-ell part of the spectrum in a 83x83 pixel image, i.e., covering the same bins as the ''HIGH-ELL'' table.<br />
<br />
<br />
; HIGH-ELL (BINTABLE)<br />
: with the high-ell part of the spectrum, unbinned, in 2979 bins covering <math>\langle l \rangle = 30-2508\ </math>. The table columns are as follows:<br />
# ''ELL'' (integer): multipole <br />
# ''D_ELL'' (float): $D_l$ as described below<br />
# ''ERR'' (float): the uncertainty<br />
<br />
; COV-MAT (IMAGE)<br />
: with the covariance matrix of the high-ell part of the spectrum in a 2979x2979 pixel image, i.e., covering the same bins as the ''HIGH-ELL'' table.<br />
<br />
The spectra give $D_\ell = \ell(\ell+1)C_\ell / 2\pi$ in units of $\mu\, K^2$, and the covariance matrix is in units of $\mu\, K^4$. <br />
<br />
The CMB spectrum is also given in a simple text comma-separated file:<br />
* ''{{PLASingleFile | fileType=cosmo | name=COM_PowerSpect_CMB_R1.10.txt |link=COM_PowerSpect_CMB_R1.10.txt}}''<br />
<br />
==Likelihood==<br />
TO BE WRITTEN.<br />
<!-- <br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
The likelihood code (and the data that comes with it) used to compute the likelihood of a model that predicts the CMB power spectra, lensing power spectrum, together with some foreground and some instrumental parameters. The data files are built primarily from the Planck mission results, but include also some results from the WMAP-9 data release. The data files are written in a specific format that can only be read by the code. The code consists in a c/f90 library, along with some optional tools in python. The code is used to read the data files, and given model power spectra and nuisance parameters it computes the log likelihood of that model. <br />
<br />
Detailed description of the installation and usage of the likelihood code and data is provided in the package. The package includes five data files: four for the CMB likelihoods and one for the lensing likelihood. All of the likelihoods delivered are described in detail in the {{PlanckPapers|planck2013-p08|1|Power spectrum & Likelihood Paper}} (for the CMB based likelihood) and in the {{PlanckPapers|planck2013-p12|1|Lensing Paper}} (for the lensing likelihood) .<br />
<br />
The CMB full likelihood has been divided into four parts to allow using selectively different ranges of multipoles. It also reflects the fact that the mathematical approximations used for those different parts are very different, as is the underlying data. In detail, we distribute<br />
* one low-<math>\ell</math> temperature only likelihood (commander), <br />
* one low-<math>\ell</math> temperature and polarisation likelihood (lowlike), and <br />
* one higl-<math>\ell</math> likelihood CAMspec. <br />
<br />
The ''Commander'' likelihood covers the multipoles 2 to 49. It uses a semi-analytic method to sample the low-<math>\ell</math> temperature likelihood on an intermediate product of one of the component separated maps. The samples are used along with an analytical approximation of the likelihood posterior to perform the likelihood computation in the code. See {{PlanckPapers|planck2013-p08}} section 8.1 for more details.<br />
<br />
The ''lowlike'' likelihood covers the multipoles 2 to 32 for temperature and polarization data. Since Planck is not releasing polarisation data at this time, the polarization map from WMAP9 is used instead. A temperature map is needed to perform the computation nevertheless, and we use here the same commander map. The likelihood is computed using a map-based approximation at low resolution and a master one at intermediate resolution, as in WMAP. The likelihood code actually calls a very slightly modified version of the WMAP9 code. This piece of the likelihood essentially provides a prior on the optical depth and has almost no other impact on cosmological parameter estimation. As such it could be replaced by a simple prior, and a user can decide to do so, which is one of the motivation to leave the three pieces of the CMB likelihood as different data packages; see {{PlanckPapers|planck2013-p08}} section 8.3 for more details. Note that the version of the WMAP code used here (code version v1.0) does not perform any test on the positive definiteness of the TT, TE, EE covariance matrices, and will return a null log likelihood in the unphysical cases where the absolute value of TE is too large. This will be corrected in a later version.<br />
<br />
The ''CAMspec'' likelihood covers the multipoles 50 to 2500 for temperature only. The likelihood is computed using a quadratic approximation, including mode to mode correlations that have been precomputed on a fiducial model. The likelihood uses data from the 100, 143 and 217 GHz channels. To do so it models the foreground at each frequency using the model described in the likelihood paper. Uncertainties on the relative calibration and on the beam transfer functions are included either as parametric models, or marginalized and integrated in the covariance matrix. Detailed description of the different nuisance parameters is given below. Priors are included in the likelihood on the CIB spectral index, relative calibration factors and beam error eigenmodes. See {{PlanckPapers|planck2013-p08}} section 2.1 for more details.<br />
<br />
The ''act/spt'' likelihood covers the multipoles 1500 to 10000 for temperature. It is described in{{BibCite|dun2013}}{{BibCite|Keis2011}}{{BibCite|Reic2012}}. It uses the code and data that can be retrieved from the [http://lambda.gsfc.nasa.gov/ Lambda archive] for [http://lambda.gsfc.nasa.gov/product/act/act_prod_table.cfm ACT] and [http://lambda.gsfc.nasa.gov/product/spt/spt_prod_table.cfm SPT]. It has been slightly modified to use a thermal and kinetic SZ model that matches the one used in CAMspec. As stated in{{BibCite|dun2013}}, the dust parameters a_ge and a_gs must be explored with the following priors: a_ge = 0.8 ± 0.2 and a_gs = 0.4 ± 0.2. Those priors are not included in the log likelihood computed by the code.<br />
<br />
The ''lensing'' likelihood covers the multipoles 40 to 400 using the result of the [[Specially_processed_maps | lensing reconstruction]]. It uses a quadratic approximation for the likelihood, with a covariance matrix including the marginalized contribution of the beam transfer function uncertainties, the diffuse point source correction uncertainties and the cosmological model uncertainty affecting the first order non-gaussian bias (N1). The correlation between temperature and lensing is not taken into account. Cosmological uncertainty effects on the normalization are dealt with using a first order renormalization procedure. This means that the code will need both the TT and $\phi\phi$ power spectrum up to <math>\ell</math> = 2048 to correctly perform the integrals needed for the renormalization. Nevertheless, the code will only produce an estimate based on the data between <math>\ell</math> = 40 to 400. See {{PlanckPapers|planck2013-p12}} section 6.1 for more details.<br />
</span><br />
<span style="color:red">OUTSTANDING: description of likelihood masks </span><br />
==Production process==<br />
<br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
The code is based on some basic routines from the libpmc library in the [http://arxiv.org/abs/1101.0950 cosmoPMC] code. It also uses some code from the [http://lambda.gsfc.nasa.gov/product/map/dr5/likelihood_get.cfm WMAP9 likelihood] for the lowlike likelihood and{{BibCite|dun2013}}{{BibCite|Keis2011}}{{BibCite|Reic2012}} for the act/spt one. The rest of the code has been specifically written for the Planck data. Each likelihood file has been processed using a different and dedicated pipeline as described in the likelihood paper {{PlanckPapers|planck2013-p08}} (section 2 and 8) and in the lensing paper {{PlanckPapers|planck2013-p12}} (section 6.1). We refer the reader to those papers for full details. The data are then encapsulated into the specific file format.<br />
<br />
Each dataset comes with its own self check. Whenever the code is used to read a data file, a computation will be done against an included test spectrum/nuisance parameter, and the log-likelihood will be displayed along with the expected result. Difference of the order of 10<math>^{-6}</math> or less are expected depending of the architecture.<br />
<br />
==Inputs==<br />
<br />
===Likelihood===<br />
<br />
; ''commander'' :<br />
* all Planck channels maps<br />
* compact source catalogs<br />
* common masks<br />
* beam transfer functions for all channels<br />
<br />
; ''lowlike'' :<br />
* WMAP9 likelihood data<br />
* Low-<math>\ell</math> Commander map<br />
<br />
; ''CAMspec'' :<br />
* 100, 143 and 217 GHz detector and detsets maps<br />
* 857GHz channel map<br />
* compact source catalog<br />
* common masks (0,1 & 3)<br />
* beam transfer function and error eigenmodes and covariance for 100, 143 and 217 GHz detectors & detsets<br />
* theoretical templates for the tSZ and kSZ contributions<br />
* color corrections for the CIB emission for the 143 and 217GHz detectors and detsets<br />
* fiducial CMB model (bootstrapped from WMAP7 best fit spectrum) estimated noise contribution from the half-ring maps for 100, 143 and 217 GHz<br />
<br />
; ''lensing'' :<br />
* the lensing map<br />
* beam error eigenmodes and covariance for the 143 and 217GHz channel maps<br />
* fiducial CMB model (from Planck cosmological parameter best fit)<br />
<br />
; ''act/spt'' :<br />
* data and code from [http://lambda.gsfc.nasa.gov/product/act/act_fulllikelihood_get.cfm here]<br />
* the tSZ andkSZ template are changed to match those of CAMspec<br />
<br />
== File names and Meta data ==<br />
<br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
<br />
'''Likelihood source code'''<br />
<br />
The source code is in the file<br />
: {{PLASingleFile |fileType=cosmo|name=COM_Code_Likelihood-v1.0_R1.10.tar.gz|link=COM_Code_Likelihood-v1.0_R1.10.tar.gz}} (C, f90 and python likelihood library and tools)<br />
<br />
'''Likelihood data packages'''<br />
<br />
The {{PLALikelihood|type=Data|link=data packages}} are<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-commander_R1.10.tar.gz | link=COM_Data_Likelihood-commander_R1.10.tar.gz}}'' (low-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-lowlike_R1.10.tar.gz | link=COM_Data_Likelihood-lowlike_R1.10.tar.gz}}'' (low-ell TE,EE,BB likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-CAMspec_R1.10.tar.gz | link=COM_Data_Likelihood-CAMspec_R1.10.tar.gz}}'' (high-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-actspt_R1.10.tar | link=COM_Data_Likelihood-actspt_R1.10.tar.gz}}'' (high-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-lensing_R1.10.tar.gz | link=COM_Data_Likelihood-lensing_R1.10.tar.gz}}'' (lensing likelihood)<br />
<br />
Untar and unzip all files to recover the code and likelihood data. Each package comes with a README file; follow the instructions inclosed to<br />
build the code and use it. To compute the CMB likelihood one has to sum the log likelihood of each of the commander_v4.1_lm49.clik, lowlike_v222.clik and CAMspec_v6.2TN_2013_02_26.clik, actspt_2013_01.clik. To compute the CMB+lensing likelihood, one has to sum the log likelihood of all 5 files.<br />
<br />
The CMB and lensing likelihood format are different. The CMB files have the termination .clik, the lensing one .clik_lensing. The lensing data being simpler (due to the less detailled modeling permitted by the lower signal-noise), the file is a simple ascii file containing all the data along with comments describing it, and linking the different quantities to the lensing paper. The CMB file format is more complex and must accommodate different forms of data (maps, power spectrum, distribution samples, covariance matrices...). It consists of a tree structure containing the data. At each level of the tree structure a given directory can contain array data (in the form of FITS files or ascii files for strings) and scalar data (joined in a single ascii file "_mdb"). Those files are not user modifiable and do not contain interesting meta data for the user. Tools to manipulate those files are included in the code package as optional python tools. They are documented in the code package.<br />
<br />
'''Likelihood masks'''<br />
<br />
The masks used in the Likelihood paper {{PlanckPapers|planck2013-p08}} are found in<br />
{{PLASingleFile|fileType=map|name=COM_Mask_Likelihood_2048_R1.10.fits|link=COM_Mask_Likelihood_2048_R1.10.fits}}<br />
<br />
which contains ten masks which are written into a single ''BINTABLE'' extension of 10 columns by 50331648 rows (the number of Healpix pixels in an Nside = 2048 map). The structure is as follows, where the column names are the names of the masks: <br />
<br />
{| border="1" cellpadding="3" cellspacing="0" align="center" style="text-align:left" width=800px<br />
|+ '''Likelihodd masks file data structure'''<br />
|- bgcolor="ffdead" <br />
!colspan="4" | 1. EXTNAME = 'MSK-LIKE' : Data columns<br />
|- bgcolor="ffdead" <br />
! Column Name || Data Type || Units || Description<br />
|-<br />
|CL31 || Real*4 || none || mask<br />
|-<br />
|CL39 || Real*4 || none || mask<br />
|-<br />
|CL49 || Real*4 || none || mask<br />
|-<br />
|G22 || Real*4 || none || mask <br />
|-<br />
|G35 || Real*4 || none || mask<br />
|-<br />
|G45 || Real*4 || none || mask<br />
|-<br />
|G56 || Real*4 || none || mask<br />
|-<br />
|G65 || Real*4 || none || mask<br />
|-<br />
|PS96 || Real*4 || none || mask<br />
|-<br />
|PSA82 || Real*4 || none || mask<br />
|-<br />
|- bgcolor="ffdead" <br />
! Keyword || Data Type || Value || Description<br />
|-<br />
|PIXTYPE || string || HEALPIX ||<br />
|-<br />
|COORDSYS || string || GALACTIC ||Coordinate system <br />
|-<br />
|ORDERING || string || NESTED || Healpix ordering<br />
|-<br />
|NSIDE || Int || 2048 || Healpix Nside <br />
|-<br />
|FIRSTPIX || Int*4 || 0 || First pixel number<br />
|-<br />
|LASTPIX || Int*4 || 50331647 || Last pixel number, for LFI and HFI, respectively<br />
<br />
|}<br />
--><br />
== References ==<br />
<References /><br />
<br />
<br />
<br />
[[Category:Mission products|008]]</div>Sgallihttps://wiki.cosmos.esa.int/planckpla2015/index.php?title=CMB_spectrum_%26_Likelihood_Code&diff=11077CMB spectrum & Likelihood Code2015-02-04T00:56:13Z<p>Sgalli: </p>
<hr />
<div>{{DISPLAYTITLE:CMB spectrum and likelihood code}}<br />
<br />
==CMB spectra==<br />
<br />
===General description===<br />
<br />
<br />
The Planck best-fit CMB temperature power spectrum, shown in figure below, covers the wide range of multipoles <math> \ell </math> = 2-2508. Over the multipole range <math> \ell </math> = 2–29, the power spectrum is derived from a component-separation algorithm, ''Commander'', <span style="color:red"> UPDATE COMMANDER: applied to maps in the frequency range 30–353 GHz over 91% of the sky {{PlanckPapers|planck2013-p06}} . The asymmetric error bars associated to this spectrum are the 68% confidence limits and include the uncertainties due to foreground subtraction </span>. For multipoles equal or greater than <math>\ell=30</math>, instead, the spectrum is derived from the ''Plik'' likelihood {{PlanckPapers|planck2014-a13}} by optimally combining the spectra in the frequency range 100-217 GHz, and correcting them for unresolved foregrounds. Associated 1-sigma errors include beam uncertainties. Both ''Commander'' and ''Plik'' are described in more details in the sections below.<br />
<br />
[[File: Planck2014 TT Dl NORES bin30 w180mm.jpeg|thumb|center|700px|'''CMB spectrum. Logarithmic x-scale up to <math>\ell=30</math>, linear at higher <math>\ell</math>; all points with error bars. The red line is the Planck best-fit primordial power spectrum (cf Planck TT+lowP in Table 3 of {{PlanckPapers|planck2014-a15}}). The blue shaded area shows the uncertainties due to cosmic variance alone.''']]<br />
===Production process===<br />
<br />
<span style="color:red"> UPDATE COMMANDER<br />
The <math>\ell</math> < 50 part of the Planck power spectrum is derived from the Commander approach, which implements Bayesian component separation in pixel space, fitting a parametric model to the data by sampling the posterior distribution for the model parameters {{PlanckPapers|planck2013-p06}}. The power spectrum at any multipole <math>\ell</math> is given as the maximum probability point for the posterior <math>C_\ell</math> distribution, marginalized over the other multipoles, and the error bars are 68% confidence level {{PlanckPapers|planck2013-p08}}. <br />
</span><br />
The <math>\ell</math> > 30 part of the CMB temperature power spectrum has been derived by the Plik likelihood, a code that implements a pseudo-Cl based technique, extensively described in Sec. 2 and the Appendix of {{PlanckPapers|planck2013-p08}}. Frequency spectra are computed as cross-spectra between half-mission maps. Mask and multipole range choices for each frequency spectrum are summarized in Section 3.3 of {{PlanckPapers|planck2014-a15}} and in {{PlanckPapers|planck2014-a13}}. The final power spectrum is an optimal combination of the 100, 143, 143x217 and 217 GHz spectra, corrected for the best-fit unresolved foregrounds and inter-frequency calibration factors, as derived from the full likelihood analysis (cf Planck+TT+lowP in Table 3 of {{PlanckPapers|planck2014-a15}}). A thorough description of the models of unresolved foregrounds is given in {{PlanckPapers|planck2014-a13}}. The spectrum covariance matrix accounts for cosmic variance and noise contributions, together with beam uncertainties. The <math>\ell</math> > 30 CMB TT spectrum and associated covariance matrix are available in two formats:<br />
#Unbinned, with 2479 bandpowers (<math>\ell=30-2508</math>).<br />
#Binned, in bins of <math> \Delta\ell=30 </math>, with 83 bandpowers in total. We bin the <math> C_\ell </math> power spectrum with a weight proportional to <math> \ell (\ell+1) </math>, so that the <math> C_{\ell_b} </math> binned bandpower centered in <math> \ell_b </math> is: <math> \\ C_{\ell_b}=\Sigma_{\ell \in b} w_{\ell_b\ell} C_\ell \quad \text{with} \quad w_{\ell_b\ell}=\frac{\ell (\ell+1)}{\Sigma_{\ell \in b} \ell (\ell+1)}. \\</math> Equivalently, using the matrix formalism, we can construct the binning matrix B as: <math>\\ B_{\ell \ell_b}=w_{\ell_b\ell} \\ </math> where B is a <math> n_b\times n_\ell</math> matrix, with <math>n_b=83</math> the number of bins and <math>n_\ell=2479</math> the number of unbinned multipoles. Thus: <math> \\ \vec{C}_\mathrm{binned}=B \, \vec{C} \\ \mathrm{cov_\mathrm{binned}}= B\, \mathrm{cov}\, B^T \\ \ell_b=B\, \ell \\ </math> Here, <math> \vec{C}_{binned} (\vec{C}) </math> is the vector containing all the binned (unbinned) <math>C_\ell</math> bandpowers, <math>\mathrm{cov} </math> is the covariance matrix and <math>\ell_b</math> is the weighted multipole average in each bin. The binned <math>D_{\ell_B}</math> power spectrum is then calculated as: <math> \\ D_{\ell_b}=\ell_b (\ell_b+1)/2/\pi C_{\ell_b} </math>.<br />
<br />
===Inputs===<br />
<br />
; Low-l spectrum (<math>\ell < 30</math>):<br />
* frequency maps from 30–353 GHz<br />
* common mask {{PlanckPapers|planck2013-p06}}<br />
* compact sources catalog<br />
<br />
; High-l spectrum (<math>30 < \ell < 2500</math>): <br />
<br />
* 100, 143, 143x217 and 217 GHz spectra and their covariance matrix (Sec. 3.3 {{PlanckPapers|planck2014-p15}})<br />
* best-fit foreground templates and inter-frequency calibration factors (Table 3 of {{PlanckPapers|planck2014-p15}})<br />
* Beam transfer function uncertainties {{PlanckPapers|planck2014-p08}}<br />
=== File names and Meta data ===<br />
<br />
<br />
The CMB spectrum and its covariance matrix are distributed in a single FITS file named <br />
* ''{{PLASingleFile | fileType=cosmo | name=COM_PowerSpect_CMB_R1.10.fits | link=COM_PowerSpect_CMB_R1.10.fits}}'' <br />
<br />
which contains 5 extensions<br />
<br />
; LOW-ELL (BINTABLE)<br />
: with the low ell part of the spectrum, not binned, and for l=2-49. The table columns are<br />
# ''ELL'' (integer): multipole number<br />
# ''D_ELL'' (float): $D_l$ as described below<br />
# ''ERRUP'' (float): the upward uncertainty<br />
# ''ERRDOWN'' (float): the downward uncertainty<br />
<br />
; HIGH-ELL (BINTABLE) <br />
: with the high-ell part of the spectrum, binned into 83 bins covering <math>\langle l \rangle = 47-2499\ </math> in bins of width <math>l=30</math> (with the exception of the last bin that is smaller). The table columns are as follows:<br />
# ''ELL'' (integer): mean multipole number of bin<br />
# ''L_MIN'' (integer): lowest multipole of bin<br />
# ''L_MAX'' (integer): highest multipole of bin<br />
# ''D_ELL'' (float): $D_l$ as described below<br />
# ''ERR'' (float): the uncertainty<br />
<br />
; COV-MAT (IMAGE)<br />
: with the covariance matrix of the high-ell part of the spectrum in a 83x83 pixel image, i.e., covering the same bins as the ''HIGH-ELL'' table.<br />
<br />
<br />
; HIGH-ELL (BINTABLE)<br />
: with the high-ell part of the spectrum, unbinned, in 2979 bins covering <math>\langle l \rangle = 30-2508\ </math>. The table columns are as follows:<br />
# ''ELL'' (integer): multipole <br />
# ''D_ELL'' (float): $D_l$ as described below<br />
# ''ERR'' (float): the uncertainty<br />
<br />
; COV-MAT (IMAGE)<br />
: with the covariance matrix of the high-ell part of the spectrum in a 2979x2979 pixel image, i.e., covering the same bins as the ''HIGH-ELL'' table.<br />
<br />
The spectra give $D_\ell = \ell(\ell+1)C_\ell / 2\pi$ in units of $\mu\, K^2$, and the covariance matrix is in units of $\mu\, K^4$. <br />
<br />
The CMB spectrum is also given in a simple text comma-separated file:<br />
* ''{{PLASingleFile | fileType=cosmo | name=COM_PowerSpect_CMB_R1.10.txt |link=COM_PowerSpect_CMB_R1.10.txt}}''<br />
<br />
==Likelihood==<br />
TO BE WRITTEN.<br />
<!-- <br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
The likelihood code (and the data that comes with it) used to compute the likelihood of a model that predicts the CMB power spectra, lensing power spectrum, together with some foreground and some instrumental parameters. The data files are built primarily from the Planck mission results, but include also some results from the WMAP-9 data release. The data files are written in a specific format that can only be read by the code. The code consists in a c/f90 library, along with some optional tools in python. The code is used to read the data files, and given model power spectra and nuisance parameters it computes the log likelihood of that model. <br />
<br />
Detailed description of the installation and usage of the likelihood code and data is provided in the package. The package includes five data files: four for the CMB likelihoods and one for the lensing likelihood. All of the likelihoods delivered are described in detail in the {{PlanckPapers|planck2013-p08|1|Power spectrum & Likelihood Paper}} (for the CMB based likelihood) and in the {{PlanckPapers|planck2013-p12|1|Lensing Paper}} (for the lensing likelihood) .<br />
<br />
The CMB full likelihood has been divided into four parts to allow using selectively different ranges of multipoles. It also reflects the fact that the mathematical approximations used for those different parts are very different, as is the underlying data. In detail, we distribute<br />
* one low-<math>\ell</math> temperature only likelihood (commander), <br />
* one low-<math>\ell</math> temperature and polarisation likelihood (lowlike), and <br />
* one higl-<math>\ell</math> likelihood CAMspec. <br />
<br />
The ''Commander'' likelihood covers the multipoles 2 to 49. It uses a semi-analytic method to sample the low-<math>\ell</math> temperature likelihood on an intermediate product of one of the component separated maps. The samples are used along with an analytical approximation of the likelihood posterior to perform the likelihood computation in the code. See {{PlanckPapers|planck2013-p08}} section 8.1 for more details.<br />
<br />
The ''lowlike'' likelihood covers the multipoles 2 to 32 for temperature and polarization data. Since Planck is not releasing polarisation data at this time, the polarization map from WMAP9 is used instead. A temperature map is needed to perform the computation nevertheless, and we use here the same commander map. The likelihood is computed using a map-based approximation at low resolution and a master one at intermediate resolution, as in WMAP. The likelihood code actually calls a very slightly modified version of the WMAP9 code. This piece of the likelihood essentially provides a prior on the optical depth and has almost no other impact on cosmological parameter estimation. As such it could be replaced by a simple prior, and a user can decide to do so, which is one of the motivation to leave the three pieces of the CMB likelihood as different data packages; see {{PlanckPapers|planck2013-p08}} section 8.3 for more details. Note that the version of the WMAP code used here (code version v1.0) does not perform any test on the positive definiteness of the TT, TE, EE covariance matrices, and will return a null log likelihood in the unphysical cases where the absolute value of TE is too large. This will be corrected in a later version.<br />
<br />
The ''CAMspec'' likelihood covers the multipoles 50 to 2500 for temperature only. The likelihood is computed using a quadratic approximation, including mode to mode correlations that have been precomputed on a fiducial model. The likelihood uses data from the 100, 143 and 217 GHz channels. To do so it models the foreground at each frequency using the model described in the likelihood paper. Uncertainties on the relative calibration and on the beam transfer functions are included either as parametric models, or marginalized and integrated in the covariance matrix. Detailed description of the different nuisance parameters is given below. Priors are included in the likelihood on the CIB spectral index, relative calibration factors and beam error eigenmodes. See {{PlanckPapers|planck2013-p08}} section 2.1 for more details.<br />
<br />
The ''act/spt'' likelihood covers the multipoles 1500 to 10000 for temperature. It is described in{{BibCite|dun2013}}{{BibCite|Keis2011}}{{BibCite|Reic2012}}. It uses the code and data that can be retrieved from the [http://lambda.gsfc.nasa.gov/ Lambda archive] for [http://lambda.gsfc.nasa.gov/product/act/act_prod_table.cfm ACT] and [http://lambda.gsfc.nasa.gov/product/spt/spt_prod_table.cfm SPT]. It has been slightly modified to use a thermal and kinetic SZ model that matches the one used in CAMspec. As stated in{{BibCite|dun2013}}, the dust parameters a_ge and a_gs must be explored with the following priors: a_ge = 0.8 ± 0.2 and a_gs = 0.4 ± 0.2. Those priors are not included in the log likelihood computed by the code.<br />
<br />
The ''lensing'' likelihood covers the multipoles 40 to 400 using the result of the [[Specially_processed_maps | lensing reconstruction]]. It uses a quadratic approximation for the likelihood, with a covariance matrix including the marginalized contribution of the beam transfer function uncertainties, the diffuse point source correction uncertainties and the cosmological model uncertainty affecting the first order non-gaussian bias (N1). The correlation between temperature and lensing is not taken into account. Cosmological uncertainty effects on the normalization are dealt with using a first order renormalization procedure. This means that the code will need both the TT and $\phi\phi$ power spectrum up to <math>\ell</math> = 2048 to correctly perform the integrals needed for the renormalization. Nevertheless, the code will only produce an estimate based on the data between <math>\ell</math> = 40 to 400. See {{PlanckPapers|planck2013-p12}} section 6.1 for more details.<br />
</span><br />
<span style="color:red">OUTSTANDING: description of likelihood masks </span><br />
==Production process==<br />
<br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
The code is based on some basic routines from the libpmc library in the [http://arxiv.org/abs/1101.0950 cosmoPMC] code. It also uses some code from the [http://lambda.gsfc.nasa.gov/product/map/dr5/likelihood_get.cfm WMAP9 likelihood] for the lowlike likelihood and{{BibCite|dun2013}}{{BibCite|Keis2011}}{{BibCite|Reic2012}} for the act/spt one. The rest of the code has been specifically written for the Planck data. Each likelihood file has been processed using a different and dedicated pipeline as described in the likelihood paper {{PlanckPapers|planck2013-p08}} (section 2 and 8) and in the lensing paper {{PlanckPapers|planck2013-p12}} (section 6.1). We refer the reader to those papers for full details. The data are then encapsulated into the specific file format.<br />
<br />
Each dataset comes with its own self check. Whenever the code is used to read a data file, a computation will be done against an included test spectrum/nuisance parameter, and the log-likelihood will be displayed along with the expected result. Difference of the order of 10<math>^{-6}</math> or less are expected depending of the architecture.<br />
<br />
==Inputs==<br />
<br />
===Likelihood===<br />
<br />
; ''commander'' :<br />
* all Planck channels maps<br />
* compact source catalogs<br />
* common masks<br />
* beam transfer functions for all channels<br />
<br />
; ''lowlike'' :<br />
* WMAP9 likelihood data<br />
* Low-<math>\ell</math> Commander map<br />
<br />
; ''CAMspec'' :<br />
* 100, 143 and 217 GHz detector and detsets maps<br />
* 857GHz channel map<br />
* compact source catalog<br />
* common masks (0,1 & 3)<br />
* beam transfer function and error eigenmodes and covariance for 100, 143 and 217 GHz detectors & detsets<br />
* theoretical templates for the tSZ and kSZ contributions<br />
* color corrections for the CIB emission for the 143 and 217GHz detectors and detsets<br />
* fiducial CMB model (bootstrapped from WMAP7 best fit spectrum) estimated noise contribution from the half-ring maps for 100, 143 and 217 GHz<br />
<br />
; ''lensing'' :<br />
* the lensing map<br />
* beam error eigenmodes and covariance for the 143 and 217GHz channel maps<br />
* fiducial CMB model (from Planck cosmological parameter best fit)<br />
<br />
; ''act/spt'' :<br />
* data and code from [http://lambda.gsfc.nasa.gov/product/act/act_fulllikelihood_get.cfm here]<br />
* the tSZ andkSZ template are changed to match those of CAMspec<br />
<br />
== File names and Meta data ==<br />
<br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
<br />
'''Likelihood source code'''<br />
<br />
The source code is in the file<br />
: {{PLASingleFile |fileType=cosmo|name=COM_Code_Likelihood-v1.0_R1.10.tar.gz|link=COM_Code_Likelihood-v1.0_R1.10.tar.gz}} (C, f90 and python likelihood library and tools)<br />
<br />
'''Likelihood data packages'''<br />
<br />
The {{PLALikelihood|type=Data|link=data packages}} are<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-commander_R1.10.tar.gz | link=COM_Data_Likelihood-commander_R1.10.tar.gz}}'' (low-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-lowlike_R1.10.tar.gz | link=COM_Data_Likelihood-lowlike_R1.10.tar.gz}}'' (low-ell TE,EE,BB likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-CAMspec_R1.10.tar.gz | link=COM_Data_Likelihood-CAMspec_R1.10.tar.gz}}'' (high-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-actspt_R1.10.tar | link=COM_Data_Likelihood-actspt_R1.10.tar.gz}}'' (high-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-lensing_R1.10.tar.gz | link=COM_Data_Likelihood-lensing_R1.10.tar.gz}}'' (lensing likelihood)<br />
<br />
Untar and unzip all files to recover the code and likelihood data. Each package comes with a README file; follow the instructions inclosed to<br />
build the code and use it. To compute the CMB likelihood one has to sum the log likelihood of each of the commander_v4.1_lm49.clik, lowlike_v222.clik and CAMspec_v6.2TN_2013_02_26.clik, actspt_2013_01.clik. To compute the CMB+lensing likelihood, one has to sum the log likelihood of all 5 files.<br />
<br />
The CMB and lensing likelihood format are different. The CMB files have the termination .clik, the lensing one .clik_lensing. The lensing data being simpler (due to the less detailled modeling permitted by the lower signal-noise), the file is a simple ascii file containing all the data along with comments describing it, and linking the different quantities to the lensing paper. The CMB file format is more complex and must accommodate different forms of data (maps, power spectrum, distribution samples, covariance matrices...). It consists of a tree structure containing the data. At each level of the tree structure a given directory can contain array data (in the form of FITS files or ascii files for strings) and scalar data (joined in a single ascii file "_mdb"). Those files are not user modifiable and do not contain interesting meta data for the user. Tools to manipulate those files are included in the code package as optional python tools. They are documented in the code package.<br />
<br />
'''Likelihood masks'''<br />
<br />
The masks used in the Likelihood paper {{PlanckPapers|planck2013-p08}} are found in<br />
{{PLASingleFile|fileType=map|name=COM_Mask_Likelihood_2048_R1.10.fits|link=COM_Mask_Likelihood_2048_R1.10.fits}}<br />
<br />
which contains ten masks which are written into a single ''BINTABLE'' extension of 10 columns by 50331648 rows (the number of Healpix pixels in an Nside = 2048 map). The structure is as follows, where the column names are the names of the masks: <br />
<br />
{| border="1" cellpadding="3" cellspacing="0" align="center" style="text-align:left" width=800px<br />
|+ '''Likelihodd masks file data structure'''<br />
|- bgcolor="ffdead" <br />
!colspan="4" | 1. EXTNAME = 'MSK-LIKE' : Data columns<br />
|- bgcolor="ffdead" <br />
! Column Name || Data Type || Units || Description<br />
|-<br />
|CL31 || Real*4 || none || mask<br />
|-<br />
|CL39 || Real*4 || none || mask<br />
|-<br />
|CL49 || Real*4 || none || mask<br />
|-<br />
|G22 || Real*4 || none || mask <br />
|-<br />
|G35 || Real*4 || none || mask<br />
|-<br />
|G45 || Real*4 || none || mask<br />
|-<br />
|G56 || Real*4 || none || mask<br />
|-<br />
|G65 || Real*4 || none || mask<br />
|-<br />
|PS96 || Real*4 || none || mask<br />
|-<br />
|PSA82 || Real*4 || none || mask<br />
|-<br />
|- bgcolor="ffdead" <br />
! Keyword || Data Type || Value || Description<br />
|-<br />
|PIXTYPE || string || HEALPIX ||<br />
|-<br />
|COORDSYS || string || GALACTIC ||Coordinate system <br />
|-<br />
|ORDERING || string || NESTED || Healpix ordering<br />
|-<br />
|NSIDE || Int || 2048 || Healpix Nside <br />
|-<br />
|FIRSTPIX || Int*4 || 0 || First pixel number<br />
|-<br />
|LASTPIX || Int*4 || 50331647 || Last pixel number, for LFI and HFI, respectively<br />
<br />
|}<br />
--><br />
== References ==<br />
<References /><br />
<br />
<br />
<br />
[[Category:Mission products|008]]</div>Sgallihttps://wiki.cosmos.esa.int/planckpla2015/index.php?title=CMB_spectrum_%26_Likelihood_Code&diff=11076CMB spectrum & Likelihood Code2015-02-04T00:54:02Z<p>Sgalli: </p>
<hr />
<div>{{DISPLAYTITLE:CMB spectrum and likelihood code}}<br />
<br />
==CMB spectra==<br />
<br />
===General description===<br />
<br />
<br />
The Planck best-fit CMB temperature power spectrum, shown in figure below, covers the wide range of multipoles <math> \ell </math> = 2-2508. Over the multipole range <math> \ell </math> = 2–29, the power spectrum is derived from a component-separation algorithm, ''Commander'', <span style="color:red"> UPDATE COMMANDER: applied to maps in the frequency range 30–353 GHz over 91% of the sky {{PlanckPapers|planck2013-p06}} . The asymmetric error bars associated to this spectrum are the 68% confidence limits and include the uncertainties due to foreground subtraction </span>. For multipoles equal or greater than <math>\ell=30</math>, instead, the spectrum is derived from the ''Plik'' likelihood {{PlanckPapers|planck2014-a13}} by optimally combining the spectra in the frequency range 100-217 GHz, and correcting them for unresolved foregrounds. Associated 1-sigma errors include beam uncertainties. Both ''Commander'' and ''Plik'' are described in more details in the sections below.<br />
<br />
[[File: Planck2014 TT Dl NORES bin30 w180mm.jpeg|thumb|center|700px|'''CMB spectrum. Logarithmic x-scale up to <math>\ell=30</math>, linear at higher <math>\ell</math>; all points with error bars. The red line is the Planck best-fit primordial power spectrum (cf Planck TT+lowP in Table 3 of {{PlanckPapers|planck2014-a15}}).''']]<br />
===Production process===<br />
<br />
<span style="color:red"> UPDATE COMMANDER<br />
The <math>\ell</math> < 50 part of the Planck power spectrum is derived from the Commander approach, which implements Bayesian component separation in pixel space, fitting a parametric model to the data by sampling the posterior distribution for the model parameters {{PlanckPapers|planck2013-p06}}. The power spectrum at any multipole <math>\ell</math> is given as the maximum probability point for the posterior <math>C_\ell</math> distribution, marginalized over the other multipoles, and the error bars are 68% confidence level {{PlanckPapers|planck2013-p08}}. <br />
</span><br />
The <math>\ell</math> > 30 part of the CMB temperature power spectrum has been derived by the Plik likelihood, a code that implements a pseudo-Cl based technique, extensively described in Sec. 2 and the Appendix of {{PlanckPapers|planck2013-p08}}. Frequency spectra are computed as cross-spectra between half-mission maps. Mask and multipole range choices for each frequency spectrum are summarized in Section 3.3 of {{PlanckPapers|planck2014-a15}} and in {{PlanckPapers|planck2014-a13}}. The final power spectrum is an optimal combination of the 100, 143, 143x217 and 217 GHz spectra, corrected for the best-fit unresolved foregrounds and inter-frequency calibration factors, as derived from the full likelihood analysis (cf Planck+TT+lowP in Table 3 of {{PlanckPapers|planck2014-a15}}). A thorough description of the models of unresolved foregrounds is given in {{PlanckPapers|planck2014-a13}}. The spectrum covariance matrix accounts for cosmic variance and noise contributions, together with beam uncertainties. The <math>\ell</math> > 30 CMB TT spectrum and associated covariance matrix are available in two formats:<br />
#Unbinned, with 2479 bandpowers (<math>\ell=30-2508</math>).<br />
#Binned, in bins of <math> \Delta\ell=30 </math>, with 83 bandpowers in total. We bin the <math> C_\ell </math> power spectrum with a weight proportional to <math> \ell (\ell+1) </math>, so that the <math> C_{\ell_b} </math> binned bandpower centered in <math> \ell_b </math> is: <math> \\ C_{\ell_b}=\Sigma_{\ell \in b} w_{\ell_b\ell} C_\ell \quad \text{with} \quad w_{\ell_b\ell}=\frac{\ell (\ell+1)}{\Sigma_{\ell \in b} \ell (\ell+1)}. \\</math> Equivalently, using the matrix formalism, we can construct the binning matrix B as: <math>\\ B_{\ell \ell_b}=w_{\ell_b\ell} \\ </math> where B is a <math> n_b\times n_\ell</math> matrix, with <math>n_b=83</math> the number of bins and <math>n_\ell=2479</math> the number of unbinned multipoles. Thus: <math> \\ \vec{C}_\mathrm{binned}=B \, \vec{C} \\ \mathrm{cov_\mathrm{binned}}= B\, \mathrm{cov}\, B^T \\ \ell_b=B\, \ell \\ </math> Here, <math> \vec{C}_{binned} (\vec{C}) </math> is the vector containing all the binned (unbinned) <math>C_\ell</math> bandpowers, <math>\mathrm{cov} </math> is the covariance matrix and <math>\ell_b</math> is the weighted multipole average in each bin. The binned <math>D_{\ell_B}</math> power spectrum is then calculated as: <math> \\ D_{\ell_b}=\ell_b (\ell_b+1)/2/\pi C_{\ell_b} </math>.<br />
<br />
===Inputs===<br />
<br />
; Low-l spectrum (<math>\ell < 30</math>):<br />
* frequency maps from 30–353 GHz<br />
* common mask {{PlanckPapers|planck2013-p06}}<br />
* compact sources catalog<br />
<br />
; High-l spectrum (<math>30 < \ell < 2500</math>): <br />
<br />
* 100, 143, 143x217 and 217 GHz spectra and their covariance matrix (Sec. 3.3 {{PlanckPapers|planck2014-p15}})<br />
* best-fit foreground templates and inter-frequency calibration factors (Table 3 of {{PlanckPapers|planck2014-p15}})<br />
* Beam transfer function uncertainties {{PlanckPapers|planck2014-p08}}<br />
=== File names and Meta data ===<br />
<br />
<br />
The CMB spectrum and its covariance matrix are distributed in a single FITS file named <br />
* ''{{PLASingleFile | fileType=cosmo | name=COM_PowerSpect_CMB_R1.10.fits | link=COM_PowerSpect_CMB_R1.10.fits}}'' <br />
<br />
which contains 5 extensions<br />
<br />
; LOW-ELL (BINTABLE)<br />
: with the low ell part of the spectrum, not binned, and for l=2-49. The table columns are<br />
# ''ELL'' (integer): multipole number<br />
# ''D_ELL'' (float): $D_l$ as described below<br />
# ''ERRUP'' (float): the upward uncertainty<br />
# ''ERRDOWN'' (float): the downward uncertainty<br />
<br />
; HIGH-ELL (BINTABLE) <br />
: with the high-ell part of the spectrum, binned into 83 bins covering <math>\langle l \rangle = 47-2499\ </math> in bins of width <math>l=30</math> (with the exception of the last bin that is smaller). The table columns are as follows:<br />
# ''ELL'' (integer): mean multipole number of bin<br />
# ''L_MIN'' (integer): lowest multipole of bin<br />
# ''L_MAX'' (integer): highest multipole of bin<br />
# ''D_ELL'' (float): $D_l$ as described below<br />
# ''ERR'' (float): the uncertainty<br />
<br />
; COV-MAT (IMAGE)<br />
: with the covariance matrix of the high-ell part of the spectrum in a 83x83 pixel image, i.e., covering the same bins as the ''HIGH-ELL'' table.<br />
<br />
<br />
; HIGH-ELL (BINTABLE)<br />
: with the high-ell part of the spectrum, unbinned, in 2979 bins covering <math>\langle l \rangle = 30-2508\ </math>. The table columns are as follows:<br />
# ''ELL'' (integer): multipole <br />
# ''D_ELL'' (float): $D_l$ as described below<br />
# ''ERR'' (float): the uncertainty<br />
<br />
; COV-MAT (IMAGE)<br />
: with the covariance matrix of the high-ell part of the spectrum in a 2979x2979 pixel image, i.e., covering the same bins as the ''HIGH-ELL'' table.<br />
<br />
The spectra give $D_\ell = \ell(\ell+1)C_\ell / 2\pi$ in units of $\mu\, K^2$, and the covariance matrix is in units of $\mu\, K^4$. <br />
<br />
The CMB spectrum is also given in a simple text comma-separated file:<br />
* ''{{PLASingleFile | fileType=cosmo | name=COM_PowerSpect_CMB_R1.10.txt |link=COM_PowerSpect_CMB_R1.10.txt}}''<br />
<br />
==Likelihood==<br />
TO BE WRITTEN.<br />
<!-- <br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
The likelihood code (and the data that comes with it) used to compute the likelihood of a model that predicts the CMB power spectra, lensing power spectrum, together with some foreground and some instrumental parameters. The data files are built primarily from the Planck mission results, but include also some results from the WMAP-9 data release. The data files are written in a specific format that can only be read by the code. The code consists in a c/f90 library, along with some optional tools in python. The code is used to read the data files, and given model power spectra and nuisance parameters it computes the log likelihood of that model. <br />
<br />
Detailed description of the installation and usage of the likelihood code and data is provided in the package. The package includes five data files: four for the CMB likelihoods and one for the lensing likelihood. All of the likelihoods delivered are described in detail in the {{PlanckPapers|planck2013-p08|1|Power spectrum & Likelihood Paper}} (for the CMB based likelihood) and in the {{PlanckPapers|planck2013-p12|1|Lensing Paper}} (for the lensing likelihood) .<br />
<br />
The CMB full likelihood has been divided into four parts to allow using selectively different ranges of multipoles. It also reflects the fact that the mathematical approximations used for those different parts are very different, as is the underlying data. In detail, we distribute<br />
* one low-<math>\ell</math> temperature only likelihood (commander), <br />
* one low-<math>\ell</math> temperature and polarisation likelihood (lowlike), and <br />
* one higl-<math>\ell</math> likelihood CAMspec. <br />
<br />
The ''Commander'' likelihood covers the multipoles 2 to 49. It uses a semi-analytic method to sample the low-<math>\ell</math> temperature likelihood on an intermediate product of one of the component separated maps. The samples are used along with an analytical approximation of the likelihood posterior to perform the likelihood computation in the code. See {{PlanckPapers|planck2013-p08}} section 8.1 for more details.<br />
<br />
The ''lowlike'' likelihood covers the multipoles 2 to 32 for temperature and polarization data. Since Planck is not releasing polarisation data at this time, the polarization map from WMAP9 is used instead. A temperature map is needed to perform the computation nevertheless, and we use here the same commander map. The likelihood is computed using a map-based approximation at low resolution and a master one at intermediate resolution, as in WMAP. The likelihood code actually calls a very slightly modified version of the WMAP9 code. This piece of the likelihood essentially provides a prior on the optical depth and has almost no other impact on cosmological parameter estimation. As such it could be replaced by a simple prior, and a user can decide to do so, which is one of the motivation to leave the three pieces of the CMB likelihood as different data packages; see {{PlanckPapers|planck2013-p08}} section 8.3 for more details. Note that the version of the WMAP code used here (code version v1.0) does not perform any test on the positive definiteness of the TT, TE, EE covariance matrices, and will return a null log likelihood in the unphysical cases where the absolute value of TE is too large. This will be corrected in a later version.<br />
<br />
The ''CAMspec'' likelihood covers the multipoles 50 to 2500 for temperature only. The likelihood is computed using a quadratic approximation, including mode to mode correlations that have been precomputed on a fiducial model. The likelihood uses data from the 100, 143 and 217 GHz channels. To do so it models the foreground at each frequency using the model described in the likelihood paper. Uncertainties on the relative calibration and on the beam transfer functions are included either as parametric models, or marginalized and integrated in the covariance matrix. Detailed description of the different nuisance parameters is given below. Priors are included in the likelihood on the CIB spectral index, relative calibration factors and beam error eigenmodes. See {{PlanckPapers|planck2013-p08}} section 2.1 for more details.<br />
<br />
The ''act/spt'' likelihood covers the multipoles 1500 to 10000 for temperature. It is described in{{BibCite|dun2013}}{{BibCite|Keis2011}}{{BibCite|Reic2012}}. It uses the code and data that can be retrieved from the [http://lambda.gsfc.nasa.gov/ Lambda archive] for [http://lambda.gsfc.nasa.gov/product/act/act_prod_table.cfm ACT] and [http://lambda.gsfc.nasa.gov/product/spt/spt_prod_table.cfm SPT]. It has been slightly modified to use a thermal and kinetic SZ model that matches the one used in CAMspec. As stated in{{BibCite|dun2013}}, the dust parameters a_ge and a_gs must be explored with the following priors: a_ge = 0.8 ± 0.2 and a_gs = 0.4 ± 0.2. Those priors are not included in the log likelihood computed by the code.<br />
<br />
The ''lensing'' likelihood covers the multipoles 40 to 400 using the result of the [[Specially_processed_maps | lensing reconstruction]]. It uses a quadratic approximation for the likelihood, with a covariance matrix including the marginalized contribution of the beam transfer function uncertainties, the diffuse point source correction uncertainties and the cosmological model uncertainty affecting the first order non-gaussian bias (N1). The correlation between temperature and lensing is not taken into account. Cosmological uncertainty effects on the normalization are dealt with using a first order renormalization procedure. This means that the code will need both the TT and $\phi\phi$ power spectrum up to <math>\ell</math> = 2048 to correctly perform the integrals needed for the renormalization. Nevertheless, the code will only produce an estimate based on the data between <math>\ell</math> = 40 to 400. See {{PlanckPapers|planck2013-p12}} section 6.1 for more details.<br />
</span><br />
<span style="color:red">OUTSTANDING: description of likelihood masks </span><br />
==Production process==<br />
<br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
The code is based on some basic routines from the libpmc library in the [http://arxiv.org/abs/1101.0950 cosmoPMC] code. It also uses some code from the [http://lambda.gsfc.nasa.gov/product/map/dr5/likelihood_get.cfm WMAP9 likelihood] for the lowlike likelihood and{{BibCite|dun2013}}{{BibCite|Keis2011}}{{BibCite|Reic2012}} for the act/spt one. The rest of the code has been specifically written for the Planck data. Each likelihood file has been processed using a different and dedicated pipeline as described in the likelihood paper {{PlanckPapers|planck2013-p08}} (section 2 and 8) and in the lensing paper {{PlanckPapers|planck2013-p12}} (section 6.1). We refer the reader to those papers for full details. The data are then encapsulated into the specific file format.<br />
<br />
Each dataset comes with its own self check. Whenever the code is used to read a data file, a computation will be done against an included test spectrum/nuisance parameter, and the log-likelihood will be displayed along with the expected result. Difference of the order of 10<math>^{-6}</math> or less are expected depending of the architecture.<br />
<br />
==Inputs==<br />
<br />
===Likelihood===<br />
<br />
; ''commander'' :<br />
* all Planck channels maps<br />
* compact source catalogs<br />
* common masks<br />
* beam transfer functions for all channels<br />
<br />
; ''lowlike'' :<br />
* WMAP9 likelihood data<br />
* Low-<math>\ell</math> Commander map<br />
<br />
; ''CAMspec'' :<br />
* 100, 143 and 217 GHz detector and detsets maps<br />
* 857GHz channel map<br />
* compact source catalog<br />
* common masks (0,1 & 3)<br />
* beam transfer function and error eigenmodes and covariance for 100, 143 and 217 GHz detectors & detsets<br />
* theoretical templates for the tSZ and kSZ contributions<br />
* color corrections for the CIB emission for the 143 and 217GHz detectors and detsets<br />
* fiducial CMB model (bootstrapped from WMAP7 best fit spectrum) estimated noise contribution from the half-ring maps for 100, 143 and 217 GHz<br />
<br />
; ''lensing'' :<br />
* the lensing map<br />
* beam error eigenmodes and covariance for the 143 and 217GHz channel maps<br />
* fiducial CMB model (from Planck cosmological parameter best fit)<br />
<br />
; ''act/spt'' :<br />
* data and code from [http://lambda.gsfc.nasa.gov/product/act/act_fulllikelihood_get.cfm here]<br />
* the tSZ andkSZ template are changed to match those of CAMspec<br />
<br />
== File names and Meta data ==<br />
<br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
<br />
'''Likelihood source code'''<br />
<br />
The source code is in the file<br />
: {{PLASingleFile |fileType=cosmo|name=COM_Code_Likelihood-v1.0_R1.10.tar.gz|link=COM_Code_Likelihood-v1.0_R1.10.tar.gz}} (C, f90 and python likelihood library and tools)<br />
<br />
'''Likelihood data packages'''<br />
<br />
The {{PLALikelihood|type=Data|link=data packages}} are<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-commander_R1.10.tar.gz | link=COM_Data_Likelihood-commander_R1.10.tar.gz}}'' (low-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-lowlike_R1.10.tar.gz | link=COM_Data_Likelihood-lowlike_R1.10.tar.gz}}'' (low-ell TE,EE,BB likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-CAMspec_R1.10.tar.gz | link=COM_Data_Likelihood-CAMspec_R1.10.tar.gz}}'' (high-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-actspt_R1.10.tar | link=COM_Data_Likelihood-actspt_R1.10.tar.gz}}'' (high-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-lensing_R1.10.tar.gz | link=COM_Data_Likelihood-lensing_R1.10.tar.gz}}'' (lensing likelihood)<br />
<br />
Untar and unzip all files to recover the code and likelihood data. Each package comes with a README file; follow the instructions inclosed to<br />
build the code and use it. To compute the CMB likelihood one has to sum the log likelihood of each of the commander_v4.1_lm49.clik, lowlike_v222.clik and CAMspec_v6.2TN_2013_02_26.clik, actspt_2013_01.clik. To compute the CMB+lensing likelihood, one has to sum the log likelihood of all 5 files.<br />
<br />
The CMB and lensing likelihood format are different. The CMB files have the termination .clik, the lensing one .clik_lensing. The lensing data being simpler (due to the less detailled modeling permitted by the lower signal-noise), the file is a simple ascii file containing all the data along with comments describing it, and linking the different quantities to the lensing paper. The CMB file format is more complex and must accommodate different forms of data (maps, power spectrum, distribution samples, covariance matrices...). It consists of a tree structure containing the data. At each level of the tree structure a given directory can contain array data (in the form of FITS files or ascii files for strings) and scalar data (joined in a single ascii file "_mdb"). Those files are not user modifiable and do not contain interesting meta data for the user. Tools to manipulate those files are included in the code package as optional python tools. They are documented in the code package.<br />
<br />
'''Likelihood masks'''<br />
<br />
The masks used in the Likelihood paper {{PlanckPapers|planck2013-p08}} are found in<br />
{{PLASingleFile|fileType=map|name=COM_Mask_Likelihood_2048_R1.10.fits|link=COM_Mask_Likelihood_2048_R1.10.fits}}<br />
<br />
which contains ten masks which are written into a single ''BINTABLE'' extension of 10 columns by 50331648 rows (the number of Healpix pixels in an Nside = 2048 map). The structure is as follows, where the column names are the names of the masks: <br />
<br />
{| border="1" cellpadding="3" cellspacing="0" align="center" style="text-align:left" width=800px<br />
|+ '''Likelihodd masks file data structure'''<br />
|- bgcolor="ffdead" <br />
!colspan="4" | 1. EXTNAME = 'MSK-LIKE' : Data columns<br />
|- bgcolor="ffdead" <br />
! Column Name || Data Type || Units || Description<br />
|-<br />
|CL31 || Real*4 || none || mask<br />
|-<br />
|CL39 || Real*4 || none || mask<br />
|-<br />
|CL49 || Real*4 || none || mask<br />
|-<br />
|G22 || Real*4 || none || mask <br />
|-<br />
|G35 || Real*4 || none || mask<br />
|-<br />
|G45 || Real*4 || none || mask<br />
|-<br />
|G56 || Real*4 || none || mask<br />
|-<br />
|G65 || Real*4 || none || mask<br />
|-<br />
|PS96 || Real*4 || none || mask<br />
|-<br />
|PSA82 || Real*4 || none || mask<br />
|-<br />
|- bgcolor="ffdead" <br />
! Keyword || Data Type || Value || Description<br />
|-<br />
|PIXTYPE || string || HEALPIX ||<br />
|-<br />
|COORDSYS || string || GALACTIC ||Coordinate system <br />
|-<br />
|ORDERING || string || NESTED || Healpix ordering<br />
|-<br />
|NSIDE || Int || 2048 || Healpix Nside <br />
|-<br />
|FIRSTPIX || Int*4 || 0 || First pixel number<br />
|-<br />
|LASTPIX || Int*4 || 50331647 || Last pixel number, for LFI and HFI, respectively<br />
<br />
|}<br />
--><br />
== References ==<br />
<References /><br />
<br />
<br />
<br />
[[Category:Mission products|008]]</div>Sgallihttps://wiki.cosmos.esa.int/planckpla2015/index.php?title=CMB_spectrum_%26_Likelihood_Code&diff=11075CMB spectrum & Likelihood Code2015-02-04T00:45:16Z<p>Sgalli: </p>
<hr />
<div>{{DISPLAYTITLE:CMB spectrum and likelihood code}}<br />
<br />
==CMB spectra==<br />
<br />
===General description===<br />
<br />
<br />
The Planck best-fit CMB temperature power spectrum, shown in figure below, covers the wide range of multipoles <math> \ell </math> = 2-2508. Over the multipole range <math> \ell </math> = 2–29, the power spectrum is derived from a component-separation algorithm, ''Commander'', <span style="color:red"> UPDATE COMMANDER: applied to maps in the frequency range 30–353 GHz over 91% of the sky {{PlanckPapers|planck2013-p06}} . The asymmetric error bars associated to this spectrum are the 68% confidence limits and include the uncertainties due to foreground subtraction </span>. For multipoles equal or greater than <math>\ell=30</math>, instead, the spectrum is derived from the ''Plik'' likelihood {{PlanckPapers|planck2014-a13}} by optimally combining the spectra in the frequency range 100-217 GHz, and correcting them for unresolved foregrounds. Associated 1-sigma errors include beam uncertainties. Both ''Commander'' and ''Plik'' are described in more details in the sections below.<br />
<br />
[[File: Planck2014 TT Dl NORES bin30 w180mm.jpeg|thumb|center|700px|'''CMB spectrum. Logarithmic x-scale up to <math>\ell=30</math>, linear at higher <math>\ell</math>; all points with error bars. The red line is the Planck best-fit primordial power spectrum (cf Planck TT+lowP in Table 3 of {{PlanckPapers|planck2014-a15}}).''']]<br />
===Production process===<br />
<br />
<span style="color:red"> UPDATE COMMANDER<br />
The <math>\ell</math> < 50 part of the Planck power spectrum is derived from the Commander approach, which implements Bayesian component separation in pixel space, fitting a parametric model to the data by sampling the posterior distribution for the model parameters {{PlanckPapers|planck2013-p06}}. The power spectrum at any multipole <math>\ell</math> is given as the maximum probability point for the posterior <math>C_\ell</math> distribution, marginalized over the other multipoles, and the error bars are 68% confidence level {{PlanckPapers|planck2013-p08}}. <br />
</span><br />
The <math>\ell</math> > 30 part of the CMB temperature power spectrum has been derived by the Plik likelihood, a code that implements a pseudo-Cl based technique, extensively described in Sec. 2 and the Appendix of {{PlanckPapers|planck2013-p08}}. Frequency spectra are computed as cross-spectra between half-mission maps. Mask and multipole range choices for each frequency spectrum are summarized in Section 3.3 of {{PlanckPapers|planck2014-p15}} and in {{PlanckPapers|planck2014-p13}}. The final power spectrum is an optimal combination of the 100, 143, 143x217 and 217 GHz spectra, corrected for the best-fit unresolved foregrounds and inter-frequency calibration factors, as derived from the full likelihood analysis (cf Planck+TT+lowP in Table 3 of {{PlanckPapers|planck2014-p15}}). A thorough description of the models of unresolved foregrounds is given in {{PlanckPapers|planck2014-p13}}. The spectrum covariance matrix accounts for cosmic variance and noise contributions, together with beam uncertainties. The <math>\ell</math> > 30 CMB TT spectrum and associated covariance matrix are available in two formats:<br />
#Unbinned, with 2479 bandpowers (<math>\ell=30-2508</math>).<br />
#Binned, in bins of <math> \Delta\ell=30 </math>, with 83 bandpowers in total. We bin the <math> C_\ell </math> power spectrum with a weight proportional to <math> \ell (\ell+1) </math>, so that the <math> C_{\ell_b} </math> binned bandpower centered in <math> \ell_b </math> is: <math> \\ C_{\ell_b}=\Sigma_{\ell \in b} w_{\ell_b\ell} C_\ell \quad \text{with} \quad w_{\ell_b\ell}=\frac{\ell (\ell+1)}{\Sigma_{\ell \in b} \ell (\ell+1)}. \\</math> Equivalently, using the matrix formalism, we can construct the binning matrix B as: <math>\\ B_{\ell \ell_b}=w_{\ell_b\ell} \\ </math> where B is a <math> n_b\times n_\ell</math> matrix, with <math>n_b=83</math> the number of bins and <math>n_\ell=2479</math> the number of unbinned multipoles. Thus: <math> \\ \vec{C}_\mathrm{binned}=B \, \vec{C} \\ \mathrm{cov_\mathrm{binned}}= B\, \mathrm{cov}\, B^T \\ \ell_b=B\, \ell \\ </math> Here, <math> \vec{C}_{binned} (\vec{C}) </math> is the vector containing all the binned (unbinned) <math>C_\ell</math> bandpowers, <math>\mathrm{cov} </math> is the covariance matrix and <math>\ell_b</math> is the weighted multipole average in each bin. The binned <math>D_{\ell_B}</math> power spectrum is then calculated as: <math> \\ D_{\ell_b}=\ell_b (\ell_b+1)/2/\pi C_{\ell_b} </math>.<br />
<br />
===Inputs===<br />
<br />
; Low-l spectrum (<math>\ell < 30</math>):<br />
* frequency maps from 30–353 GHz<br />
* common mask {{PlanckPapers|planck2013-p06}}<br />
* compact sources catalog<br />
<br />
; High-l spectrum (<math>30 < \ell < 2500</math>): <br />
<br />
* 100, 143, 143x217 and 217 GHz spectra and their covariance matrix (Sec. 3.3 {{PlanckPapers|planck2014-p15}})<br />
* best-fit foreground templates and inter-frequency calibration factors (Table 3 of {{PlanckPapers|planck2014-p15}})<br />
* Beam transfer function uncertainties {{PlanckPapers|planck2014-p08}}<br />
=== File names and Meta data ===<br />
<br />
<br />
The CMB spectrum and its covariance matrix are distributed in a single FITS file named <br />
* ''{{PLASingleFile | fileType=cosmo | name=COM_PowerSpect_CMB_R1.10.fits | link=COM_PowerSpect_CMB_R1.10.fits}}'' <br />
<br />
which contains 5 extensions<br />
<br />
; LOW-ELL (BINTABLE)<br />
: with the low ell part of the spectrum, not binned, and for l=2-49. The table columns are<br />
# ''ELL'' (integer): multipole number<br />
# ''D_ELL'' (float): $D_l$ as described below<br />
# ''ERRUP'' (float): the upward uncertainty<br />
# ''ERRDOWN'' (float): the downward uncertainty<br />
<br />
; HIGH-ELL (BINTABLE) <br />
: with the high-ell part of the spectrum, binned into 83 bins covering <math>\langle l \rangle = 47-2499\ </math> in bins of width <math>l=30</math> (with the exception of the last bin that is smaller). The table columns are as follows:<br />
# ''ELL'' (integer): mean multipole number of bin<br />
# ''L_MIN'' (integer): lowest multipole of bin<br />
# ''L_MAX'' (integer): highest multipole of bin<br />
# ''D_ELL'' (float): $D_l$ as described below<br />
# ''ERR'' (float): the uncertainty<br />
<br />
; COV-MAT (IMAGE)<br />
: with the covariance matrix of the high-ell part of the spectrum in a 83x83 pixel image, i.e., covering the same bins as the ''HIGH-ELL'' table.<br />
<br />
<br />
; HIGH-ELL (BINTABLE)<br />
: with the high-ell part of the spectrum, unbinned, in 2979 bins covering <math>\langle l \rangle = 30-2508\ </math>. The table columns are as follows:<br />
# ''ELL'' (integer): multipole <br />
# ''D_ELL'' (float): $D_l$ as described below<br />
# ''ERR'' (float): the uncertainty<br />
<br />
; COV-MAT (IMAGE)<br />
: with the covariance matrix of the high-ell part of the spectrum in a 2979x2979 pixel image, i.e., covering the same bins as the ''HIGH-ELL'' table.<br />
<br />
The spectra give $D_\ell = \ell(\ell+1)C_\ell / 2\pi$ in units of $\mu\, K^2$, and the covariance matrix is in units of $\mu\, K^4$. <br />
<br />
The CMB spectrum is also given in a simple text comma-separated file:<br />
* ''{{PLASingleFile | fileType=cosmo | name=COM_PowerSpect_CMB_R1.10.txt |link=COM_PowerSpect_CMB_R1.10.txt}}''<br />
<br />
==Likelihood==<br />
TO BE WRITTEN.<br />
<!-- <br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
The likelihood code (and the data that comes with it) used to compute the likelihood of a model that predicts the CMB power spectra, lensing power spectrum, together with some foreground and some instrumental parameters. The data files are built primarily from the Planck mission results, but include also some results from the WMAP-9 data release. The data files are written in a specific format that can only be read by the code. The code consists in a c/f90 library, along with some optional tools in python. The code is used to read the data files, and given model power spectra and nuisance parameters it computes the log likelihood of that model. <br />
<br />
Detailed description of the installation and usage of the likelihood code and data is provided in the package. The package includes five data files: four for the CMB likelihoods and one for the lensing likelihood. All of the likelihoods delivered are described in detail in the {{PlanckPapers|planck2013-p08|1|Power spectrum & Likelihood Paper}} (for the CMB based likelihood) and in the {{PlanckPapers|planck2013-p12|1|Lensing Paper}} (for the lensing likelihood) .<br />
<br />
The CMB full likelihood has been divided into four parts to allow using selectively different ranges of multipoles. It also reflects the fact that the mathematical approximations used for those different parts are very different, as is the underlying data. In detail, we distribute<br />
* one low-<math>\ell</math> temperature only likelihood (commander), <br />
* one low-<math>\ell</math> temperature and polarisation likelihood (lowlike), and <br />
* one higl-<math>\ell</math> likelihood CAMspec. <br />
<br />
The ''Commander'' likelihood covers the multipoles 2 to 49. It uses a semi-analytic method to sample the low-<math>\ell</math> temperature likelihood on an intermediate product of one of the component separated maps. The samples are used along with an analytical approximation of the likelihood posterior to perform the likelihood computation in the code. See {{PlanckPapers|planck2013-p08}} section 8.1 for more details.<br />
<br />
The ''lowlike'' likelihood covers the multipoles 2 to 32 for temperature and polarization data. Since Planck is not releasing polarisation data at this time, the polarization map from WMAP9 is used instead. A temperature map is needed to perform the computation nevertheless, and we use here the same commander map. The likelihood is computed using a map-based approximation at low resolution and a master one at intermediate resolution, as in WMAP. The likelihood code actually calls a very slightly modified version of the WMAP9 code. This piece of the likelihood essentially provides a prior on the optical depth and has almost no other impact on cosmological parameter estimation. As such it could be replaced by a simple prior, and a user can decide to do so, which is one of the motivation to leave the three pieces of the CMB likelihood as different data packages; see {{PlanckPapers|planck2013-p08}} section 8.3 for more details. Note that the version of the WMAP code used here (code version v1.0) does not perform any test on the positive definiteness of the TT, TE, EE covariance matrices, and will return a null log likelihood in the unphysical cases where the absolute value of TE is too large. This will be corrected in a later version.<br />
<br />
The ''CAMspec'' likelihood covers the multipoles 50 to 2500 for temperature only. The likelihood is computed using a quadratic approximation, including mode to mode correlations that have been precomputed on a fiducial model. The likelihood uses data from the 100, 143 and 217 GHz channels. To do so it models the foreground at each frequency using the model described in the likelihood paper. Uncertainties on the relative calibration and on the beam transfer functions are included either as parametric models, or marginalized and integrated in the covariance matrix. Detailed description of the different nuisance parameters is given below. Priors are included in the likelihood on the CIB spectral index, relative calibration factors and beam error eigenmodes. See {{PlanckPapers|planck2013-p08}} section 2.1 for more details.<br />
<br />
The ''act/spt'' likelihood covers the multipoles 1500 to 10000 for temperature. It is described in{{BibCite|dun2013}}{{BibCite|Keis2011}}{{BibCite|Reic2012}}. It uses the code and data that can be retrieved from the [http://lambda.gsfc.nasa.gov/ Lambda archive] for [http://lambda.gsfc.nasa.gov/product/act/act_prod_table.cfm ACT] and [http://lambda.gsfc.nasa.gov/product/spt/spt_prod_table.cfm SPT]. It has been slightly modified to use a thermal and kinetic SZ model that matches the one used in CAMspec. As stated in{{BibCite|dun2013}}, the dust parameters a_ge and a_gs must be explored with the following priors: a_ge = 0.8 ± 0.2 and a_gs = 0.4 ± 0.2. Those priors are not included in the log likelihood computed by the code.<br />
<br />
The ''lensing'' likelihood covers the multipoles 40 to 400 using the result of the [[Specially_processed_maps | lensing reconstruction]]. It uses a quadratic approximation for the likelihood, with a covariance matrix including the marginalized contribution of the beam transfer function uncertainties, the diffuse point source correction uncertainties and the cosmological model uncertainty affecting the first order non-gaussian bias (N1). The correlation between temperature and lensing is not taken into account. Cosmological uncertainty effects on the normalization are dealt with using a first order renormalization procedure. This means that the code will need both the TT and $\phi\phi$ power spectrum up to <math>\ell</math> = 2048 to correctly perform the integrals needed for the renormalization. Nevertheless, the code will only produce an estimate based on the data between <math>\ell</math> = 40 to 400. See {{PlanckPapers|planck2013-p12}} section 6.1 for more details.<br />
</span><br />
<span style="color:red">OUTSTANDING: description of likelihood masks </span><br />
==Production process==<br />
<br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
The code is based on some basic routines from the libpmc library in the [http://arxiv.org/abs/1101.0950 cosmoPMC] code. It also uses some code from the [http://lambda.gsfc.nasa.gov/product/map/dr5/likelihood_get.cfm WMAP9 likelihood] for the lowlike likelihood and{{BibCite|dun2013}}{{BibCite|Keis2011}}{{BibCite|Reic2012}} for the act/spt one. The rest of the code has been specifically written for the Planck data. Each likelihood file has been processed using a different and dedicated pipeline as described in the likelihood paper {{PlanckPapers|planck2013-p08}} (section 2 and 8) and in the lensing paper {{PlanckPapers|planck2013-p12}} (section 6.1). We refer the reader to those papers for full details. The data are then encapsulated into the specific file format.<br />
<br />
Each dataset comes with its own self check. Whenever the code is used to read a data file, a computation will be done against an included test spectrum/nuisance parameter, and the log-likelihood will be displayed along with the expected result. Difference of the order of 10<math>^{-6}</math> or less are expected depending of the architecture.<br />
<br />
==Inputs==<br />
<br />
===Likelihood===<br />
<br />
; ''commander'' :<br />
* all Planck channels maps<br />
* compact source catalogs<br />
* common masks<br />
* beam transfer functions for all channels<br />
<br />
; ''lowlike'' :<br />
* WMAP9 likelihood data<br />
* Low-<math>\ell</math> Commander map<br />
<br />
; ''CAMspec'' :<br />
* 100, 143 and 217 GHz detector and detsets maps<br />
* 857GHz channel map<br />
* compact source catalog<br />
* common masks (0,1 & 3)<br />
* beam transfer function and error eigenmodes and covariance for 100, 143 and 217 GHz detectors & detsets<br />
* theoretical templates for the tSZ and kSZ contributions<br />
* color corrections for the CIB emission for the 143 and 217GHz detectors and detsets<br />
* fiducial CMB model (bootstrapped from WMAP7 best fit spectrum) estimated noise contribution from the half-ring maps for 100, 143 and 217 GHz<br />
<br />
; ''lensing'' :<br />
* the lensing map<br />
* beam error eigenmodes and covariance for the 143 and 217GHz channel maps<br />
* fiducial CMB model (from Planck cosmological parameter best fit)<br />
<br />
; ''act/spt'' :<br />
* data and code from [http://lambda.gsfc.nasa.gov/product/act/act_fulllikelihood_get.cfm here]<br />
* the tSZ andkSZ template are changed to match those of CAMspec<br />
<br />
== File names and Meta data ==<br />
<br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
<br />
'''Likelihood source code'''<br />
<br />
The source code is in the file<br />
: {{PLASingleFile |fileType=cosmo|name=COM_Code_Likelihood-v1.0_R1.10.tar.gz|link=COM_Code_Likelihood-v1.0_R1.10.tar.gz}} (C, f90 and python likelihood library and tools)<br />
<br />
'''Likelihood data packages'''<br />
<br />
The {{PLALikelihood|type=Data|link=data packages}} are<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-commander_R1.10.tar.gz | link=COM_Data_Likelihood-commander_R1.10.tar.gz}}'' (low-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-lowlike_R1.10.tar.gz | link=COM_Data_Likelihood-lowlike_R1.10.tar.gz}}'' (low-ell TE,EE,BB likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-CAMspec_R1.10.tar.gz | link=COM_Data_Likelihood-CAMspec_R1.10.tar.gz}}'' (high-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-actspt_R1.10.tar | link=COM_Data_Likelihood-actspt_R1.10.tar.gz}}'' (high-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-lensing_R1.10.tar.gz | link=COM_Data_Likelihood-lensing_R1.10.tar.gz}}'' (lensing likelihood)<br />
<br />
Untar and unzip all files to recover the code and likelihood data. Each package comes with a README file; follow the instructions inclosed to<br />
build the code and use it. To compute the CMB likelihood one has to sum the log likelihood of each of the commander_v4.1_lm49.clik, lowlike_v222.clik and CAMspec_v6.2TN_2013_02_26.clik, actspt_2013_01.clik. To compute the CMB+lensing likelihood, one has to sum the log likelihood of all 5 files.<br />
<br />
The CMB and lensing likelihood format are different. The CMB files have the termination .clik, the lensing one .clik_lensing. The lensing data being simpler (due to the less detailled modeling permitted by the lower signal-noise), the file is a simple ascii file containing all the data along with comments describing it, and linking the different quantities to the lensing paper. The CMB file format is more complex and must accommodate different forms of data (maps, power spectrum, distribution samples, covariance matrices...). It consists of a tree structure containing the data. At each level of the tree structure a given directory can contain array data (in the form of FITS files or ascii files for strings) and scalar data (joined in a single ascii file "_mdb"). Those files are not user modifiable and do not contain interesting meta data for the user. Tools to manipulate those files are included in the code package as optional python tools. They are documented in the code package.<br />
<br />
'''Likelihood masks'''<br />
<br />
The masks used in the Likelihood paper {{PlanckPapers|planck2013-p08}} are found in<br />
{{PLASingleFile|fileType=map|name=COM_Mask_Likelihood_2048_R1.10.fits|link=COM_Mask_Likelihood_2048_R1.10.fits}}<br />
<br />
which contains ten masks which are written into a single ''BINTABLE'' extension of 10 columns by 50331648 rows (the number of Healpix pixels in an Nside = 2048 map). The structure is as follows, where the column names are the names of the masks: <br />
<br />
{| border="1" cellpadding="3" cellspacing="0" align="center" style="text-align:left" width=800px<br />
|+ '''Likelihodd masks file data structure'''<br />
|- bgcolor="ffdead" <br />
!colspan="4" | 1. EXTNAME = 'MSK-LIKE' : Data columns<br />
|- bgcolor="ffdead" <br />
! Column Name || Data Type || Units || Description<br />
|-<br />
|CL31 || Real*4 || none || mask<br />
|-<br />
|CL39 || Real*4 || none || mask<br />
|-<br />
|CL49 || Real*4 || none || mask<br />
|-<br />
|G22 || Real*4 || none || mask <br />
|-<br />
|G35 || Real*4 || none || mask<br />
|-<br />
|G45 || Real*4 || none || mask<br />
|-<br />
|G56 || Real*4 || none || mask<br />
|-<br />
|G65 || Real*4 || none || mask<br />
|-<br />
|PS96 || Real*4 || none || mask<br />
|-<br />
|PSA82 || Real*4 || none || mask<br />
|-<br />
|- bgcolor="ffdead" <br />
! Keyword || Data Type || Value || Description<br />
|-<br />
|PIXTYPE || string || HEALPIX ||<br />
|-<br />
|COORDSYS || string || GALACTIC ||Coordinate system <br />
|-<br />
|ORDERING || string || NESTED || Healpix ordering<br />
|-<br />
|NSIDE || Int || 2048 || Healpix Nside <br />
|-<br />
|FIRSTPIX || Int*4 || 0 || First pixel number<br />
|-<br />
|LASTPIX || Int*4 || 50331647 || Last pixel number, for LFI and HFI, respectively<br />
<br />
|}<br />
--><br />
== References ==<br />
<References /><br />
<br />
<br />
<br />
[[Category:Mission products|008]]</div>Sgallihttps://wiki.cosmos.esa.int/planckpla2015/index.php?title=CMB_spectrum_%26_Likelihood_Code&diff=11074CMB spectrum & Likelihood Code2015-02-04T00:31:54Z<p>Sgalli: </p>
<hr />
<div>{{DISPLAYTITLE:CMB spectrum and likelihood code}}<br />
<br />
==CMB spectra==<br />
<br />
===General description===<br />
<br />
<br />
The Planck best-fit CMB temperature power spectrum, shown in figure below, covers the wide range of multipoles <math> \ell </math> = 2-2508. Over the multipole range <math> \ell </math> = 2–29, the power spectrum is derived from a component-separation algorithm, ''Commander'', <span style="color:red"> UPDATE COMMANDER: applied to maps in the frequency range 30–353 GHz over 91% of the sky {{PlanckPapers|planck2013-p06}} . The asymmetric error bars associated to this spectrum are the 68% confidence limits and include the uncertainties due to foreground subtraction </span>. For multipoles equal or greater than <math>\ell=30</math>, instead, the spectrum is derived from the ''Plik'' likelihood {{PlanckPapers|planck2014-a13}} by optimally combining the spectra in the frequency range 100-217 GHz, and correcting them for unresolved foregrounds. Associated 1-sigma errors include beam uncertainties. Both ''Commander'' and ''Plik'' are described in more details in the sections below.<br />
<br />
[[File: Planck2014 TT Dl NORES bin30 w180mm.jpeg|thumb|center|700px|'''CMB spectrum. Logarithmic x-scale up to <math>\ell=30</math>, linear at higher <math>\ell</math>; all points with error bars. The red line is the Planck best-fit primordial power spectrum (cf Planck TT+lowP in Table 3 of {{PlanckPapers|planck2014-a15}}).''']]<br />
===Production process===<br />
<br />
<span style="color:red"> UPDATE COMMANDER<br />
The <math>\ell</math> < 50 part of the Planck power spectrum is derived from the Commander approach, which implements Bayesian component separation in pixel space, fitting a parametric model to the data by sampling the posterior distribution for the model parameters {{PlanckPapers|planck2013-p06}}. The power spectrum at any multipole <math>\ell</math> is given as the maximum probability point for the posterior <math>C_\ell</math> distribution, marginalized over the other multipoles, and the error bars are 68% confidence level {{PlanckPapers|planck2013-p08}}. <br />
</span><br />
The <math>\ell</math> > 30 part of the CMB temperature power spectrum has been derived by the Plik likelihood, a code that implements a pseudo-Cl based technique, extensively described in Sec. 2 and the Appendix of {{PlanckPapers|planck2013-p08}}. Frequency spectra are computed as cross-spectra between half-mission maps. Mask and multipole range choices for each frequency spectrum are summarized in Section 3.3 of {{PlanckPapers|planck2014-p15}} and in {{PlanckPapers|planck2014-p13}}. The final power spectrum is an optimal combination of the 100, 143, 143x217 and 217 GHz spectra, corrected for the best-fit unresolved foregrounds and inter-frequency calibration factors, as derived from the full likelihood analysis (cf Planck+TT+lowP in Table 3 of {{PlanckPapers|planck2014-p15}}). A thorough description of the models of unresolved foregrounds is given in {{PlanckPapers|planck2014-p13}}. The spectrum covariance matrix accounts for cosmic variance and noise contributions, together with beam uncertainties. The <math>\ell</math> > 30 CMB TT spectrum and associated covariance matrix are available in two formats:<br />
#Unbinned, with 2479 bandpowers (<math>\ell=30-2508</math>).<br />
#Binned, in bins of <math> \Delta\ell=30 </math>, with 83 bandpowers in total. We bin the <math> C_\ell </math> power spectrum with a weight proportional to <math> \ell (\ell+1) </math>, so that the <math> C_{\ell_b} </math> binned bandpower centered in <math> \ell_b </math> is: <math> \\ C_{\ell_b}=\Sigma_{\ell \in b} w_{\ell_b\ell} C_\ell \quad \text{with} \quad w_{\ell_b\ell}=\frac{\ell (\ell+1)}{\Sigma_{\ell \in b} \ell (\ell+1)}. \\</math> Equivalently, using the matrix formalism, we can construct the binning matrix B as: <math>\\ B_{\ell \ell_b}=w_{\ell_b\ell} \\ </math> where B is a <math> n_b\times n_\ell</math> matrix, with <math>n_b=83</math> the number of bins and <math>n_\ell=2479</math> the number of unbinned multipoles. Thus: <math> \\ \vec{C_\mathrm{binned}}=B \, \vec{C} \\ \mathrm{cov_\mathrm{binned}}= B\, \mathrm{cov}\, B^T \\ \ell_b=B\, \ell \\ </math> Here, <math> \vec{C_{binned}} (\vec{C}) </math> is the vector containing all the binned (unbinned) <math>C_\ell</math> bandpowers, <math>\mathcal{C} </math> is the covariance matrix and <math>\ell_b</math> is the weighted multipole average in each bin. The binned <math>D_{\ell_B}</math> power spectrum is then calculated as: <math> \\ D_{\ell_b}=\ell_b (\ell_b+1)/2/\pi C_{\ell_b} </math>.<br />
===Inputs===<br />
<br />
<br />
; Low-l spectrum (<math>\ell < 50</math>):<br />
* frequency maps from 30–353 GHz<br />
* common mask {{PlanckPapers|planck2013-p06}}<br />
* compact sources catalog<br />
<br />
; High-l spectrum (<math>50 < \ell < 2500</math>): <br />
<br />
* 100, 143, 143x217 and 217 GHz spectra and their covariance matrix (Sec. 2 in {{PlanckPapers|planck2013-p08}})<br />
* best-fit foreground templates and inter-frequency calibration factors (Table 5 of {{PlanckPapers|planck2013-p11}})<br />
* Beam transfer function uncertainties {{PlanckPapers|planck2013-p03c}}<br />
=== File names and Meta data ===<br />
<br />
<br />
The CMB spectrum and its covariance matrix are distributed in a single FITS file named <br />
* ''{{PLASingleFile | fileType=cosmo | name=COM_PowerSpect_CMB_R1.10.fits | link=COM_PowerSpect_CMB_R1.10.fits}}'' <br />
<br />
which contains 3 extensions<br />
<br />
; LOW-ELL (BINTABLE)<br />
: with the low ell part of the spectrum, not binned, and for l=2-49. The table columns are<br />
# ''ELL'' (integer): multipole number<br />
# ''D_ELL'' (float): $D_l$ as described below<br />
# ''ERRUP'' (float): the upward uncertainty<br />
# ''ERRDOWN'' (float): the downward uncertainty<br />
<br />
; HIGH-ELL (BINTABLE)<br />
: with the high-ell part of the spectrum, binned into 74 bins covering <math>\langle l \rangle = 47-2419\ </math> in bins of width <math>l=31</math> (with the exception of the last 4 bins that are wider). The table columns are as follows:<br />
# ''ELL'' (integer): mean multipole number of bin<br />
# ''L_MIN'' (integer): lowest multipole of bin<br />
# ''L_MAX'' (integer): highest multipole of bin<br />
# ''D_ELL'' (float): $D_l$ as described below<br />
# ''ERR'' (float): the uncertainty<br />
<br />
; COV-MAT (IMAGE)<br />
: with the covariance matrix of the high-ell part of the spectrum in a 74x74 pixel image, i.e., covering the same bins as the ''HIGH-ELL'' table.<br />
<br />
The spectra give $D_\ell = \ell(\ell+1)C_\ell / 2\pi$ in units of $\mu\, K^2$, and the covariance matrix is in units of $\mu\, K^4$. The spectra are shown in the figure below, in blue and red for the low- and high-<math>\ell</math> parts, respectively, and with the error bars for the high-ell part only in order to avoid confusion.<br />
<br />
[[File: CMBspect.jpg|thumb|center|700px|'''CMB spectrum. Linear x-scale; error bars only at high <math>\ell</math>.''']]<br />
<br />
The CMB spectrum is also given in a simple text comma-separated file:<br />
* ''{{PLASingleFile | fileType=cosmo | name=COM_PowerSpect_CMB_R1.10.txt |link=COM_PowerSpect_CMB_R1.10.txt}}''<br />
<br />
==Likelihood==<br />
TO BE WRITTEN.<br />
<!-- <br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
The likelihood code (and the data that comes with it) used to compute the likelihood of a model that predicts the CMB power spectra, lensing power spectrum, together with some foreground and some instrumental parameters. The data files are built primarily from the Planck mission results, but include also some results from the WMAP-9 data release. The data files are written in a specific format that can only be read by the code. The code consists in a c/f90 library, along with some optional tools in python. The code is used to read the data files, and given model power spectra and nuisance parameters it computes the log likelihood of that model. <br />
<br />
Detailed description of the installation and usage of the likelihood code and data is provided in the package. The package includes five data files: four for the CMB likelihoods and one for the lensing likelihood. All of the likelihoods delivered are described in detail in the {{PlanckPapers|planck2013-p08|1|Power spectrum & Likelihood Paper}} (for the CMB based likelihood) and in the {{PlanckPapers|planck2013-p12|1|Lensing Paper}} (for the lensing likelihood) .<br />
<br />
The CMB full likelihood has been divided into four parts to allow using selectively different ranges of multipoles. It also reflects the fact that the mathematical approximations used for those different parts are very different, as is the underlying data. In detail, we distribute<br />
* one low-<math>\ell</math> temperature only likelihood (commander), <br />
* one low-<math>\ell</math> temperature and polarisation likelihood (lowlike), and <br />
* one higl-<math>\ell</math> likelihood CAMspec. <br />
<br />
The ''Commander'' likelihood covers the multipoles 2 to 49. It uses a semi-analytic method to sample the low-<math>\ell</math> temperature likelihood on an intermediate product of one of the component separated maps. The samples are used along with an analytical approximation of the likelihood posterior to perform the likelihood computation in the code. See {{PlanckPapers|planck2013-p08}} section 8.1 for more details.<br />
<br />
The ''lowlike'' likelihood covers the multipoles 2 to 32 for temperature and polarization data. Since Planck is not releasing polarisation data at this time, the polarization map from WMAP9 is used instead. A temperature map is needed to perform the computation nevertheless, and we use here the same commander map. The likelihood is computed using a map-based approximation at low resolution and a master one at intermediate resolution, as in WMAP. The likelihood code actually calls a very slightly modified version of the WMAP9 code. This piece of the likelihood essentially provides a prior on the optical depth and has almost no other impact on cosmological parameter estimation. As such it could be replaced by a simple prior, and a user can decide to do so, which is one of the motivation to leave the three pieces of the CMB likelihood as different data packages; see {{PlanckPapers|planck2013-p08}} section 8.3 for more details. Note that the version of the WMAP code used here (code version v1.0) does not perform any test on the positive definiteness of the TT, TE, EE covariance matrices, and will return a null log likelihood in the unphysical cases where the absolute value of TE is too large. This will be corrected in a later version.<br />
<br />
The ''CAMspec'' likelihood covers the multipoles 50 to 2500 for temperature only. The likelihood is computed using a quadratic approximation, including mode to mode correlations that have been precomputed on a fiducial model. The likelihood uses data from the 100, 143 and 217 GHz channels. To do so it models the foreground at each frequency using the model described in the likelihood paper. Uncertainties on the relative calibration and on the beam transfer functions are included either as parametric models, or marginalized and integrated in the covariance matrix. Detailed description of the different nuisance parameters is given below. Priors are included in the likelihood on the CIB spectral index, relative calibration factors and beam error eigenmodes. See {{PlanckPapers|planck2013-p08}} section 2.1 for more details.<br />
<br />
The ''act/spt'' likelihood covers the multipoles 1500 to 10000 for temperature. It is described in{{BibCite|dun2013}}{{BibCite|Keis2011}}{{BibCite|Reic2012}}. It uses the code and data that can be retrieved from the [http://lambda.gsfc.nasa.gov/ Lambda archive] for [http://lambda.gsfc.nasa.gov/product/act/act_prod_table.cfm ACT] and [http://lambda.gsfc.nasa.gov/product/spt/spt_prod_table.cfm SPT]. It has been slightly modified to use a thermal and kinetic SZ model that matches the one used in CAMspec. As stated in{{BibCite|dun2013}}, the dust parameters a_ge and a_gs must be explored with the following priors: a_ge = 0.8 ± 0.2 and a_gs = 0.4 ± 0.2. Those priors are not included in the log likelihood computed by the code.<br />
<br />
The ''lensing'' likelihood covers the multipoles 40 to 400 using the result of the [[Specially_processed_maps | lensing reconstruction]]. It uses a quadratic approximation for the likelihood, with a covariance matrix including the marginalized contribution of the beam transfer function uncertainties, the diffuse point source correction uncertainties and the cosmological model uncertainty affecting the first order non-gaussian bias (N1). The correlation between temperature and lensing is not taken into account. Cosmological uncertainty effects on the normalization are dealt with using a first order renormalization procedure. This means that the code will need both the TT and $\phi\phi$ power spectrum up to <math>\ell</math> = 2048 to correctly perform the integrals needed for the renormalization. Nevertheless, the code will only produce an estimate based on the data between <math>\ell</math> = 40 to 400. See {{PlanckPapers|planck2013-p12}} section 6.1 for more details.<br />
</span><br />
<span style="color:red">OUTSTANDING: description of likelihood masks </span><br />
==Production process==<br />
<br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
The code is based on some basic routines from the libpmc library in the [http://arxiv.org/abs/1101.0950 cosmoPMC] code. It also uses some code from the [http://lambda.gsfc.nasa.gov/product/map/dr5/likelihood_get.cfm WMAP9 likelihood] for the lowlike likelihood and{{BibCite|dun2013}}{{BibCite|Keis2011}}{{BibCite|Reic2012}} for the act/spt one. The rest of the code has been specifically written for the Planck data. Each likelihood file has been processed using a different and dedicated pipeline as described in the likelihood paper {{PlanckPapers|planck2013-p08}} (section 2 and 8) and in the lensing paper {{PlanckPapers|planck2013-p12}} (section 6.1). We refer the reader to those papers for full details. The data are then encapsulated into the specific file format.<br />
<br />
Each dataset comes with its own self check. Whenever the code is used to read a data file, a computation will be done against an included test spectrum/nuisance parameter, and the log-likelihood will be displayed along with the expected result. Difference of the order of 10<math>^{-6}</math> or less are expected depending of the architecture.<br />
<br />
==Inputs==<br />
<br />
===Likelihood===<br />
<br />
; ''commander'' :<br />
* all Planck channels maps<br />
* compact source catalogs<br />
* common masks<br />
* beam transfer functions for all channels<br />
<br />
; ''lowlike'' :<br />
* WMAP9 likelihood data<br />
* Low-<math>\ell</math> Commander map<br />
<br />
; ''CAMspec'' :<br />
* 100, 143 and 217 GHz detector and detsets maps<br />
* 857GHz channel map<br />
* compact source catalog<br />
* common masks (0,1 & 3)<br />
* beam transfer function and error eigenmodes and covariance for 100, 143 and 217 GHz detectors & detsets<br />
* theoretical templates for the tSZ and kSZ contributions<br />
* color corrections for the CIB emission for the 143 and 217GHz detectors and detsets<br />
* fiducial CMB model (bootstrapped from WMAP7 best fit spectrum) estimated noise contribution from the half-ring maps for 100, 143 and 217 GHz<br />
<br />
; ''lensing'' :<br />
* the lensing map<br />
* beam error eigenmodes and covariance for the 143 and 217GHz channel maps<br />
* fiducial CMB model (from Planck cosmological parameter best fit)<br />
<br />
; ''act/spt'' :<br />
* data and code from [http://lambda.gsfc.nasa.gov/product/act/act_fulllikelihood_get.cfm here]<br />
* the tSZ andkSZ template are changed to match those of CAMspec<br />
<br />
== File names and Meta data ==<br />
<br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
<br />
'''Likelihood source code'''<br />
<br />
The source code is in the file<br />
: {{PLASingleFile |fileType=cosmo|name=COM_Code_Likelihood-v1.0_R1.10.tar.gz|link=COM_Code_Likelihood-v1.0_R1.10.tar.gz}} (C, f90 and python likelihood library and tools)<br />
<br />
'''Likelihood data packages'''<br />
<br />
The {{PLALikelihood|type=Data|link=data packages}} are<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-commander_R1.10.tar.gz | link=COM_Data_Likelihood-commander_R1.10.tar.gz}}'' (low-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-lowlike_R1.10.tar.gz | link=COM_Data_Likelihood-lowlike_R1.10.tar.gz}}'' (low-ell TE,EE,BB likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-CAMspec_R1.10.tar.gz | link=COM_Data_Likelihood-CAMspec_R1.10.tar.gz}}'' (high-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-actspt_R1.10.tar | link=COM_Data_Likelihood-actspt_R1.10.tar.gz}}'' (high-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-lensing_R1.10.tar.gz | link=COM_Data_Likelihood-lensing_R1.10.tar.gz}}'' (lensing likelihood)<br />
<br />
Untar and unzip all files to recover the code and likelihood data. Each package comes with a README file; follow the instructions inclosed to<br />
build the code and use it. To compute the CMB likelihood one has to sum the log likelihood of each of the commander_v4.1_lm49.clik, lowlike_v222.clik and CAMspec_v6.2TN_2013_02_26.clik, actspt_2013_01.clik. To compute the CMB+lensing likelihood, one has to sum the log likelihood of all 5 files.<br />
<br />
The CMB and lensing likelihood format are different. The CMB files have the termination .clik, the lensing one .clik_lensing. The lensing data being simpler (due to the less detailled modeling permitted by the lower signal-noise), the file is a simple ascii file containing all the data along with comments describing it, and linking the different quantities to the lensing paper. The CMB file format is more complex and must accommodate different forms of data (maps, power spectrum, distribution samples, covariance matrices...). It consists of a tree structure containing the data. At each level of the tree structure a given directory can contain array data (in the form of FITS files or ascii files for strings) and scalar data (joined in a single ascii file "_mdb"). Those files are not user modifiable and do not contain interesting meta data for the user. Tools to manipulate those files are included in the code package as optional python tools. They are documented in the code package.<br />
<br />
'''Likelihood masks'''<br />
<br />
The masks used in the Likelihood paper {{PlanckPapers|planck2013-p08}} are found in<br />
{{PLASingleFile|fileType=map|name=COM_Mask_Likelihood_2048_R1.10.fits|link=COM_Mask_Likelihood_2048_R1.10.fits}}<br />
<br />
which contains ten masks which are written into a single ''BINTABLE'' extension of 10 columns by 50331648 rows (the number of Healpix pixels in an Nside = 2048 map). The structure is as follows, where the column names are the names of the masks: <br />
<br />
{| border="1" cellpadding="3" cellspacing="0" align="center" style="text-align:left" width=800px<br />
|+ '''Likelihodd masks file data structure'''<br />
|- bgcolor="ffdead" <br />
!colspan="4" | 1. EXTNAME = 'MSK-LIKE' : Data columns<br />
|- bgcolor="ffdead" <br />
! Column Name || Data Type || Units || Description<br />
|-<br />
|CL31 || Real*4 || none || mask<br />
|-<br />
|CL39 || Real*4 || none || mask<br />
|-<br />
|CL49 || Real*4 || none || mask<br />
|-<br />
|G22 || Real*4 || none || mask <br />
|-<br />
|G35 || Real*4 || none || mask<br />
|-<br />
|G45 || Real*4 || none || mask<br />
|-<br />
|G56 || Real*4 || none || mask<br />
|-<br />
|G65 || Real*4 || none || mask<br />
|-<br />
|PS96 || Real*4 || none || mask<br />
|-<br />
|PSA82 || Real*4 || none || mask<br />
|-<br />
|- bgcolor="ffdead" <br />
! Keyword || Data Type || Value || Description<br />
|-<br />
|PIXTYPE || string || HEALPIX ||<br />
|-<br />
|COORDSYS || string || GALACTIC ||Coordinate system <br />
|-<br />
|ORDERING || string || NESTED || Healpix ordering<br />
|-<br />
|NSIDE || Int || 2048 || Healpix Nside <br />
|-<br />
|FIRSTPIX || Int*4 || 0 || First pixel number<br />
|-<br />
|LASTPIX || Int*4 || 50331647 || Last pixel number, for LFI and HFI, respectively<br />
<br />
|}<br />
--><br />
== References ==<br />
<References /><br />
<br />
<br />
<br />
[[Category:Mission products|008]]</div>Sgallihttps://wiki.cosmos.esa.int/planckpla2015/index.php?title=CMB_spectrum_%26_Likelihood_Code&diff=11073CMB spectrum & Likelihood Code2015-02-04T00:30:32Z<p>Sgalli: </p>
<hr />
<div>{{DISPLAYTITLE:CMB spectrum and likelihood code}}<br />
<br />
==CMB spectra==<br />
<br />
===General description===<br />
<br />
<br />
The Planck best-fit CMB temperature power spectrum, shown in figure below, covers the wide range of multipoles <math> \ell </math> = 2-2508. Over the multipole range <math> \ell </math> = 2–29, the power spectrum is derived from a component-separation algorithm, ''Commander'', <span style="color:red"> UPDATE COMMANDER: applied to maps in the frequency range 30–353 GHz over 91% of the sky {{PlanckPapers|planck2013-p06}} . The asymmetric error bars associated to this spectrum are the 68% confidence limits and include the uncertainties due to foreground subtraction </span>. For multipoles equal or greater than <math>\ell=30</math>, instead, the spectrum is derived from the ''Plik'' likelihood {{PlanckPapers|planck2014-a13}} by optimally combining the spectra in the frequency range 100-217 GHz, and correcting them for unresolved foregrounds. Associated 1-sigma errors include beam uncertainties. Both ''Commander'' and ''Plik'' are described in more details in the sections below.<br />
<br />
[[File: Planck2014 TT Dl NORES bin30 w180mm.jpeg|thumb|center|700px|'''CMB spectrum. Logarithmic x-scale up to <math>\ell=30</math>, linear at higher <math>\ell</math>; all points with error bars. The red line is the Planck best-fit primordial power spectrum (cf Planck TT+lowP in Table 3 of {{PlanckPapers|planck2014-a15}}).''']]<br />
===Production process===<br />
<br />
<span style="color:red"> UPDATE COMMANDER<br />
The <math>\ell</math> < 50 part of the Planck power spectrum is derived from the Commander approach, which implements Bayesian component separation in pixel space, fitting a parametric model to the data by sampling the posterior distribution for the model parameters {{PlanckPapers|planck2013-p06}}. The power spectrum at any multipole <math>\ell</math> is given as the maximum probability point for the posterior <math>C_\ell</math> distribution, marginalized over the other multipoles, and the error bars are 68% confidence level {{PlanckPapers|planck2013-p08}}. <br />
</span><br />
The <math>\ell</math> > 30 part of the CMB temperature power spectrum has been derived by the Plik likelihood, a code that implements a pseudo-Cl based technique, extensively described in Sec. 2 and the Appendix of {{PlanckPapers|planck2013-p08}}. Frequency spectra are computed as cross-spectra between half-mission maps. Mask and multipole range choices for each frequency spectrum are summarized in Section 3.3 of {{PlanckPapers|planck2014-p15}} and in {{PlanckPapers|planck2014-p13}}. The final power spectrum is an optimal combination of the 100, 143, 143x217 and 217 GHz spectra, corrected for the best-fit unresolved foregrounds and inter-frequency calibration factors, as derived from the full likelihood analysis (cf Planck+TT+lowP in Table 3 of {{PlanckPapers|planck2014-p15}}). A thorough description of the models of unresolved foregrounds is given in {{PlanckPapers|planck2014-p13}}. The spectrum covariance matrix accounts for cosmic variance and noise contributions, together with beam uncertainties. The <math>\ell</math> > 30 CMB TT spectrum and associated covariance matrix are available in two formats:<br />
#Unbinned, with 2479 bandpowers (<math>\ell=30-2508</math>).<br />
#Binned, in bins of <math> \Delta\ell=30 </math>, with 83 bandpowers in total. We bin the <math> C_\ell </math> power spectrum with a weight proportional to <math> \ell (\ell+1) </math>, so that the <math> C_{\ell_b} </math> binned bandpower centered in <math> \ell_b </math> is: <math> \\ C_{\ell_b}=\Sigma_{\ell \in b} w_{\ell_b\ell} C_\ell \quad \text{with} \quad w_{\ell_b\ell}=\frac{\ell (\ell+1)}{\Sigma_{\ell \in b} \ell (\ell+1)}. \\</math> Equivalently, using the matrix formalism, we can construct the binning matrix B as: <math>\\ B_{\ell \ell_b}=w_{\ell_b\ell} \\ </math> where B is a <math> n_b\times n_\ell</math> matrix, with <math>n_b=83</math> the number of bins and <math>n_\ell=2479</math> the number of unbinned multipoles. Thus: <math> \\ \vec{C_\mathrm{binned}}=B \vec{C} \\ \mathrm{cov_\mathrm{binned}}= B \mathrm{cov} B^T \\ \ell_b=B \ell \\ </math> Here, <math> \vec{C_{binned}} (\vec{C}) </math> is the vector containing all the binned (unbinned) <math>C_\ell</math> bandpowers, <math>\mathcal{C} </math> is the covariance matrix and <math>\ell_b</math> is the weighted multipole average in each bin. The binned <math>D_{\ell_B}</math> power spectrum is then calculated as: <math> \\ D_{\ell_b}=\ell_b (\ell_b+1)/2/\pi C_{\ell_b} </math>.<br />
===Inputs===<br />
<br />
<br />
; Low-l spectrum (<math>\ell < 50</math>):<br />
* frequency maps from 30–353 GHz<br />
* common mask {{PlanckPapers|planck2013-p06}}<br />
* compact sources catalog<br />
<br />
; High-l spectrum (<math>50 < \ell < 2500</math>): <br />
<br />
* 100, 143, 143x217 and 217 GHz spectra and their covariance matrix (Sec. 2 in {{PlanckPapers|planck2013-p08}})<br />
* best-fit foreground templates and inter-frequency calibration factors (Table 5 of {{PlanckPapers|planck2013-p11}})<br />
* Beam transfer function uncertainties {{PlanckPapers|planck2013-p03c}}<br />
=== File names and Meta data ===<br />
<br />
<br />
The CMB spectrum and its covariance matrix are distributed in a single FITS file named <br />
* ''{{PLASingleFile | fileType=cosmo | name=COM_PowerSpect_CMB_R1.10.fits | link=COM_PowerSpect_CMB_R1.10.fits}}'' <br />
<br />
which contains 3 extensions<br />
<br />
; LOW-ELL (BINTABLE)<br />
: with the low ell part of the spectrum, not binned, and for l=2-49. The table columns are<br />
# ''ELL'' (integer): multipole number<br />
# ''D_ELL'' (float): $D_l$ as described below<br />
# ''ERRUP'' (float): the upward uncertainty<br />
# ''ERRDOWN'' (float): the downward uncertainty<br />
<br />
; HIGH-ELL (BINTABLE)<br />
: with the high-ell part of the spectrum, binned into 74 bins covering <math>\langle l \rangle = 47-2419\ </math> in bins of width <math>l=31</math> (with the exception of the last 4 bins that are wider). The table columns are as follows:<br />
# ''ELL'' (integer): mean multipole number of bin<br />
# ''L_MIN'' (integer): lowest multipole of bin<br />
# ''L_MAX'' (integer): highest multipole of bin<br />
# ''D_ELL'' (float): $D_l$ as described below<br />
# ''ERR'' (float): the uncertainty<br />
<br />
; COV-MAT (IMAGE)<br />
: with the covariance matrix of the high-ell part of the spectrum in a 74x74 pixel image, i.e., covering the same bins as the ''HIGH-ELL'' table.<br />
<br />
The spectra give $D_\ell = \ell(\ell+1)C_\ell / 2\pi$ in units of $\mu\, K^2$, and the covariance matrix is in units of $\mu\, K^4$. The spectra are shown in the figure below, in blue and red for the low- and high-<math>\ell</math> parts, respectively, and with the error bars for the high-ell part only in order to avoid confusion.<br />
<br />
[[File: CMBspect.jpg|thumb|center|700px|'''CMB spectrum. Linear x-scale; error bars only at high <math>\ell</math>.''']]<br />
<br />
The CMB spectrum is also given in a simple text comma-separated file:<br />
* ''{{PLASingleFile | fileType=cosmo | name=COM_PowerSpect_CMB_R1.10.txt |link=COM_PowerSpect_CMB_R1.10.txt}}''<br />
<br />
==Likelihood==<br />
TO BE WRITTEN.<br />
<!-- <br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
The likelihood code (and the data that comes with it) used to compute the likelihood of a model that predicts the CMB power spectra, lensing power spectrum, together with some foreground and some instrumental parameters. The data files are built primarily from the Planck mission results, but include also some results from the WMAP-9 data release. The data files are written in a specific format that can only be read by the code. The code consists in a c/f90 library, along with some optional tools in python. The code is used to read the data files, and given model power spectra and nuisance parameters it computes the log likelihood of that model. <br />
<br />
Detailed description of the installation and usage of the likelihood code and data is provided in the package. The package includes five data files: four for the CMB likelihoods and one for the lensing likelihood. All of the likelihoods delivered are described in detail in the {{PlanckPapers|planck2013-p08|1|Power spectrum & Likelihood Paper}} (for the CMB based likelihood) and in the {{PlanckPapers|planck2013-p12|1|Lensing Paper}} (for the lensing likelihood) .<br />
<br />
The CMB full likelihood has been divided into four parts to allow using selectively different ranges of multipoles. It also reflects the fact that the mathematical approximations used for those different parts are very different, as is the underlying data. In detail, we distribute<br />
* one low-<math>\ell</math> temperature only likelihood (commander), <br />
* one low-<math>\ell</math> temperature and polarisation likelihood (lowlike), and <br />
* one higl-<math>\ell</math> likelihood CAMspec. <br />
<br />
The ''Commander'' likelihood covers the multipoles 2 to 49. It uses a semi-analytic method to sample the low-<math>\ell</math> temperature likelihood on an intermediate product of one of the component separated maps. The samples are used along with an analytical approximation of the likelihood posterior to perform the likelihood computation in the code. See {{PlanckPapers|planck2013-p08}} section 8.1 for more details.<br />
<br />
The ''lowlike'' likelihood covers the multipoles 2 to 32 for temperature and polarization data. Since Planck is not releasing polarisation data at this time, the polarization map from WMAP9 is used instead. A temperature map is needed to perform the computation nevertheless, and we use here the same commander map. The likelihood is computed using a map-based approximation at low resolution and a master one at intermediate resolution, as in WMAP. The likelihood code actually calls a very slightly modified version of the WMAP9 code. This piece of the likelihood essentially provides a prior on the optical depth and has almost no other impact on cosmological parameter estimation. As such it could be replaced by a simple prior, and a user can decide to do so, which is one of the motivation to leave the three pieces of the CMB likelihood as different data packages; see {{PlanckPapers|planck2013-p08}} section 8.3 for more details. Note that the version of the WMAP code used here (code version v1.0) does not perform any test on the positive definiteness of the TT, TE, EE covariance matrices, and will return a null log likelihood in the unphysical cases where the absolute value of TE is too large. This will be corrected in a later version.<br />
<br />
The ''CAMspec'' likelihood covers the multipoles 50 to 2500 for temperature only. The likelihood is computed using a quadratic approximation, including mode to mode correlations that have been precomputed on a fiducial model. The likelihood uses data from the 100, 143 and 217 GHz channels. To do so it models the foreground at each frequency using the model described in the likelihood paper. Uncertainties on the relative calibration and on the beam transfer functions are included either as parametric models, or marginalized and integrated in the covariance matrix. Detailed description of the different nuisance parameters is given below. Priors are included in the likelihood on the CIB spectral index, relative calibration factors and beam error eigenmodes. See {{PlanckPapers|planck2013-p08}} section 2.1 for more details.<br />
<br />
The ''act/spt'' likelihood covers the multipoles 1500 to 10000 for temperature. It is described in{{BibCite|dun2013}}{{BibCite|Keis2011}}{{BibCite|Reic2012}}. It uses the code and data that can be retrieved from the [http://lambda.gsfc.nasa.gov/ Lambda archive] for [http://lambda.gsfc.nasa.gov/product/act/act_prod_table.cfm ACT] and [http://lambda.gsfc.nasa.gov/product/spt/spt_prod_table.cfm SPT]. It has been slightly modified to use a thermal and kinetic SZ model that matches the one used in CAMspec. As stated in{{BibCite|dun2013}}, the dust parameters a_ge and a_gs must be explored with the following priors: a_ge = 0.8 ± 0.2 and a_gs = 0.4 ± 0.2. Those priors are not included in the log likelihood computed by the code.<br />
<br />
The ''lensing'' likelihood covers the multipoles 40 to 400 using the result of the [[Specially_processed_maps | lensing reconstruction]]. It uses a quadratic approximation for the likelihood, with a covariance matrix including the marginalized contribution of the beam transfer function uncertainties, the diffuse point source correction uncertainties and the cosmological model uncertainty affecting the first order non-gaussian bias (N1). The correlation between temperature and lensing is not taken into account. Cosmological uncertainty effects on the normalization are dealt with using a first order renormalization procedure. This means that the code will need both the TT and $\phi\phi$ power spectrum up to <math>\ell</math> = 2048 to correctly perform the integrals needed for the renormalization. Nevertheless, the code will only produce an estimate based on the data between <math>\ell</math> = 40 to 400. See {{PlanckPapers|planck2013-p12}} section 6.1 for more details.<br />
</span><br />
<span style="color:red">OUTSTANDING: description of likelihood masks </span><br />
==Production process==<br />
<br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
The code is based on some basic routines from the libpmc library in the [http://arxiv.org/abs/1101.0950 cosmoPMC] code. It also uses some code from the [http://lambda.gsfc.nasa.gov/product/map/dr5/likelihood_get.cfm WMAP9 likelihood] for the lowlike likelihood and{{BibCite|dun2013}}{{BibCite|Keis2011}}{{BibCite|Reic2012}} for the act/spt one. The rest of the code has been specifically written for the Planck data. Each likelihood file has been processed using a different and dedicated pipeline as described in the likelihood paper {{PlanckPapers|planck2013-p08}} (section 2 and 8) and in the lensing paper {{PlanckPapers|planck2013-p12}} (section 6.1). We refer the reader to those papers for full details. The data are then encapsulated into the specific file format.<br />
<br />
Each dataset comes with its own self check. Whenever the code is used to read a data file, a computation will be done against an included test spectrum/nuisance parameter, and the log-likelihood will be displayed along with the expected result. Difference of the order of 10<math>^{-6}</math> or less are expected depending of the architecture.<br />
<br />
==Inputs==<br />
<br />
===Likelihood===<br />
<br />
; ''commander'' :<br />
* all Planck channels maps<br />
* compact source catalogs<br />
* common masks<br />
* beam transfer functions for all channels<br />
<br />
; ''lowlike'' :<br />
* WMAP9 likelihood data<br />
* Low-<math>\ell</math> Commander map<br />
<br />
; ''CAMspec'' :<br />
* 100, 143 and 217 GHz detector and detsets maps<br />
* 857GHz channel map<br />
* compact source catalog<br />
* common masks (0,1 & 3)<br />
* beam transfer function and error eigenmodes and covariance for 100, 143 and 217 GHz detectors & detsets<br />
* theoretical templates for the tSZ and kSZ contributions<br />
* color corrections for the CIB emission for the 143 and 217GHz detectors and detsets<br />
* fiducial CMB model (bootstrapped from WMAP7 best fit spectrum) estimated noise contribution from the half-ring maps for 100, 143 and 217 GHz<br />
<br />
; ''lensing'' :<br />
* the lensing map<br />
* beam error eigenmodes and covariance for the 143 and 217GHz channel maps<br />
* fiducial CMB model (from Planck cosmological parameter best fit)<br />
<br />
; ''act/spt'' :<br />
* data and code from [http://lambda.gsfc.nasa.gov/product/act/act_fulllikelihood_get.cfm here]<br />
* the tSZ andkSZ template are changed to match those of CAMspec<br />
<br />
== File names and Meta data ==<br />
<br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
<br />
'''Likelihood source code'''<br />
<br />
The source code is in the file<br />
: {{PLASingleFile |fileType=cosmo|name=COM_Code_Likelihood-v1.0_R1.10.tar.gz|link=COM_Code_Likelihood-v1.0_R1.10.tar.gz}} (C, f90 and python likelihood library and tools)<br />
<br />
'''Likelihood data packages'''<br />
<br />
The {{PLALikelihood|type=Data|link=data packages}} are<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-commander_R1.10.tar.gz | link=COM_Data_Likelihood-commander_R1.10.tar.gz}}'' (low-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-lowlike_R1.10.tar.gz | link=COM_Data_Likelihood-lowlike_R1.10.tar.gz}}'' (low-ell TE,EE,BB likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-CAMspec_R1.10.tar.gz | link=COM_Data_Likelihood-CAMspec_R1.10.tar.gz}}'' (high-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-actspt_R1.10.tar | link=COM_Data_Likelihood-actspt_R1.10.tar.gz}}'' (high-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-lensing_R1.10.tar.gz | link=COM_Data_Likelihood-lensing_R1.10.tar.gz}}'' (lensing likelihood)<br />
<br />
Untar and unzip all files to recover the code and likelihood data. Each package comes with a README file; follow the instructions inclosed to<br />
build the code and use it. To compute the CMB likelihood one has to sum the log likelihood of each of the commander_v4.1_lm49.clik, lowlike_v222.clik and CAMspec_v6.2TN_2013_02_26.clik, actspt_2013_01.clik. To compute the CMB+lensing likelihood, one has to sum the log likelihood of all 5 files.<br />
<br />
The CMB and lensing likelihood format are different. The CMB files have the termination .clik, the lensing one .clik_lensing. The lensing data being simpler (due to the less detailled modeling permitted by the lower signal-noise), the file is a simple ascii file containing all the data along with comments describing it, and linking the different quantities to the lensing paper. The CMB file format is more complex and must accommodate different forms of data (maps, power spectrum, distribution samples, covariance matrices...). It consists of a tree structure containing the data. At each level of the tree structure a given directory can contain array data (in the form of FITS files or ascii files for strings) and scalar data (joined in a single ascii file "_mdb"). Those files are not user modifiable and do not contain interesting meta data for the user. Tools to manipulate those files are included in the code package as optional python tools. They are documented in the code package.<br />
<br />
'''Likelihood masks'''<br />
<br />
The masks used in the Likelihood paper {{PlanckPapers|planck2013-p08}} are found in<br />
{{PLASingleFile|fileType=map|name=COM_Mask_Likelihood_2048_R1.10.fits|link=COM_Mask_Likelihood_2048_R1.10.fits}}<br />
<br />
which contains ten masks which are written into a single ''BINTABLE'' extension of 10 columns by 50331648 rows (the number of Healpix pixels in an Nside = 2048 map). The structure is as follows, where the column names are the names of the masks: <br />
<br />
{| border="1" cellpadding="3" cellspacing="0" align="center" style="text-align:left" width=800px<br />
|+ '''Likelihodd masks file data structure'''<br />
|- bgcolor="ffdead" <br />
!colspan="4" | 1. EXTNAME = 'MSK-LIKE' : Data columns<br />
|- bgcolor="ffdead" <br />
! Column Name || Data Type || Units || Description<br />
|-<br />
|CL31 || Real*4 || none || mask<br />
|-<br />
|CL39 || Real*4 || none || mask<br />
|-<br />
|CL49 || Real*4 || none || mask<br />
|-<br />
|G22 || Real*4 || none || mask <br />
|-<br />
|G35 || Real*4 || none || mask<br />
|-<br />
|G45 || Real*4 || none || mask<br />
|-<br />
|G56 || Real*4 || none || mask<br />
|-<br />
|G65 || Real*4 || none || mask<br />
|-<br />
|PS96 || Real*4 || none || mask<br />
|-<br />
|PSA82 || Real*4 || none || mask<br />
|-<br />
|- bgcolor="ffdead" <br />
! Keyword || Data Type || Value || Description<br />
|-<br />
|PIXTYPE || string || HEALPIX ||<br />
|-<br />
|COORDSYS || string || GALACTIC ||Coordinate system <br />
|-<br />
|ORDERING || string || NESTED || Healpix ordering<br />
|-<br />
|NSIDE || Int || 2048 || Healpix Nside <br />
|-<br />
|FIRSTPIX || Int*4 || 0 || First pixel number<br />
|-<br />
|LASTPIX || Int*4 || 50331647 || Last pixel number, for LFI and HFI, respectively<br />
<br />
|}<br />
--><br />
== References ==<br />
<References /><br />
<br />
<br />
<br />
[[Category:Mission products|008]]</div>Sgallihttps://wiki.cosmos.esa.int/planckpla2015/index.php?title=CMB_spectrum_%26_Likelihood_Code&diff=11072CMB spectrum & Likelihood Code2015-02-04T00:26:37Z<p>Sgalli: </p>
<hr />
<div>{{DISPLAYTITLE:CMB spectrum and likelihood code}}<br />
<br />
==CMB spectra==<br />
<br />
===General description===<br />
<br />
<br />
The Planck best-fit CMB temperature power spectrum, shown in figure below, covers the wide range of multipoles <math> \ell </math> = 2-2508. Over the multipole range <math> \ell </math> = 2–29, the power spectrum is derived from a component-separation algorithm, ''Commander'', <span style="color:red"> UPDATE COMMANDER: applied to maps in the frequency range 30–353 GHz over 91% of the sky {{PlanckPapers|planck2013-p06}} . The asymmetric error bars associated to this spectrum are the 68% confidence limits and include the uncertainties due to foreground subtraction </span>. For multipoles equal or greater than <math>\ell=30</math>, instead, the spectrum is derived from the ''Plik'' likelihood {{PlanckPapers|planck2014-a13}} by optimally combining the spectra in the frequency range 100-217 GHz, and correcting them for unresolved foregrounds. Associated 1-sigma errors include beam uncertainties. Both ''Commander'' and ''Plik'' are described in more details in the sections below.<br />
<br />
[[File: Planck2014 TT Dl NORES bin30 w180mm.jpeg|thumb|center|700px|'''CMB spectrum. Logarithmic x-scale up to <math>\ell=30</math>, linear at higher <math>\ell</math>; all points with error bars. The red line is the Planck best-fit primordial power spectrum (cf Planck TT+lowP in Table 3 of {{PlanckPapers|planck2014-a15}}).''']]<br />
===Production process===<br />
<br />
<span style="color:red"> UPDATE COMMANDER<br />
The <math>\ell</math> < 50 part of the Planck power spectrum is derived from the Commander approach, which implements Bayesian component separation in pixel space, fitting a parametric model to the data by sampling the posterior distribution for the model parameters {{PlanckPapers|planck2013-p06}}. The power spectrum at any multipole <math>\ell</math> is given as the maximum probability point for the posterior <math>C_\ell</math> distribution, marginalized over the other multipoles, and the error bars are 68% confidence level {{PlanckPapers|planck2013-p08}}. <br />
</span><br />
The <math>\ell</math> > 30 part of the CMB temperature power spectrum has been derived by the Plik likelihood, a code that implements a pseudo-Cl based technique, extensively described in Sec. 2 and the Appendix of {{PlanckPapers|planck2013-p08}}. Frequency spectra are computed as cross-spectra between half-mission maps. Mask and multipole range choices for each frequency spectrum are summarized in Section 3.3 of {{PlanckPapers|planck2014-p15}} and in {{PlanckPapers|planck2014-p13}}. The final power spectrum is an optimal combination of the 100, 143, 143x217 and 217 GHz spectra, corrected for the best-fit unresolved foregrounds and inter-frequency calibration factors, as derived from the full likelihood analysis (cf Planck+TT+lowP in Table 3 of {{PlanckPapers|planck2014-p15}}). A thorough description of the models of unresolved foregrounds is given in {{PlanckPapers|planck2014-p13}}. The spectrum covariance matrix accounts for cosmic variance and noise contributions, together with beam uncertainties. The <math>\ell</math> > 30 CMB TT spectrum and associated covariance matrix are available in two formats:<br />
#Unbinned, with 2479 bandpowers (<math>\ell=30-2508</math>).<br />
#Binned, in bins of <math> \Delta\ell=30 </math>, with 83 bandpowers in total. We bin the <math> C_\ell </math> power spectrum with a weight proportional to <math> \ell (\ell+1) </math>, so that the <math> C_{\ell_b} </math> binned bandpower centered in <math> \ell_b </math> is: <math> \\ C_{\ell_b}=\Sigma_{\ell \in b} w_{\ell_b\ell} C_\ell \quad \text{with} \quad w_{\ell_b\ell}=\frac{\ell (\ell+1)}{\Sigma_{\ell \in b} \ell (\ell+1)}. \\</math> Equivalently, using the matrix formalism, we can construct the binning matrix B as: <math>\\ B_{\ell \ell_b}=w_{\ell_b_\ell} \\ </math> where B is a <math> n_b\times n_\ell</math> matrix, with <math>n_b=83</math> the number of bins and <math>n_\ell=2479</math> the number of unbinned multipoles. Thus: <math> \\ \vec{C}_{\ell_b}=B \vec{C}_\ell \\ \mathrm{cov}= B \mathrm{cov} B^T \\ \ell_b=B \ell \\ </math> Here, <math> \vec{C}^{binned}_{\ell_b} (\vec{C}_{\ell}) </math> indicates the vector containing all the binned (unbinned) bandpowers, <math>\mathcal{C} </math> is the covariance matrix and <math>\ell_b</math> is the weighted multipole average in each bin. The binned <math>D_{\ell_B}</math> power spectrum is then calculated as: <math> \\ D_{\ell_b}=\ell_b (\ell_b+1)/2/\pi C_{\ell_b} </math>.<br />
===Inputs===<br />
<br />
<br />
; Low-l spectrum (<math>\ell < 50</math>):<br />
* frequency maps from 30–353 GHz<br />
* common mask {{PlanckPapers|planck2013-p06}}<br />
* compact sources catalog<br />
<br />
; High-l spectrum (<math>50 < \ell < 2500</math>): <br />
<br />
* 100, 143, 143x217 and 217 GHz spectra and their covariance matrix (Sec. 2 in {{PlanckPapers|planck2013-p08}})<br />
* best-fit foreground templates and inter-frequency calibration factors (Table 5 of {{PlanckPapers|planck2013-p11}})<br />
* Beam transfer function uncertainties {{PlanckPapers|planck2013-p03c}}<br />
=== File names and Meta data ===<br />
<br />
<br />
The CMB spectrum and its covariance matrix are distributed in a single FITS file named <br />
* ''{{PLASingleFile | fileType=cosmo | name=COM_PowerSpect_CMB_R1.10.fits | link=COM_PowerSpect_CMB_R1.10.fits}}'' <br />
<br />
which contains 3 extensions<br />
<br />
; LOW-ELL (BINTABLE)<br />
: with the low ell part of the spectrum, not binned, and for l=2-49. The table columns are<br />
# ''ELL'' (integer): multipole number<br />
# ''D_ELL'' (float): $D_l$ as described below<br />
# ''ERRUP'' (float): the upward uncertainty<br />
# ''ERRDOWN'' (float): the downward uncertainty<br />
<br />
; HIGH-ELL (BINTABLE)<br />
: with the high-ell part of the spectrum, binned into 74 bins covering <math>\langle l \rangle = 47-2419\ </math> in bins of width <math>l=31</math> (with the exception of the last 4 bins that are wider). The table columns are as follows:<br />
# ''ELL'' (integer): mean multipole number of bin<br />
# ''L_MIN'' (integer): lowest multipole of bin<br />
# ''L_MAX'' (integer): highest multipole of bin<br />
# ''D_ELL'' (float): $D_l$ as described below<br />
# ''ERR'' (float): the uncertainty<br />
<br />
; COV-MAT (IMAGE)<br />
: with the covariance matrix of the high-ell part of the spectrum in a 74x74 pixel image, i.e., covering the same bins as the ''HIGH-ELL'' table.<br />
<br />
The spectra give $D_\ell = \ell(\ell+1)C_\ell / 2\pi$ in units of $\mu\, K^2$, and the covariance matrix is in units of $\mu\, K^4$. The spectra are shown in the figure below, in blue and red for the low- and high-<math>\ell</math> parts, respectively, and with the error bars for the high-ell part only in order to avoid confusion.<br />
<br />
[[File: CMBspect.jpg|thumb|center|700px|'''CMB spectrum. Linear x-scale; error bars only at high <math>\ell</math>.''']]<br />
<br />
The CMB spectrum is also given in a simple text comma-separated file:<br />
* ''{{PLASingleFile | fileType=cosmo | name=COM_PowerSpect_CMB_R1.10.txt |link=COM_PowerSpect_CMB_R1.10.txt}}''<br />
<br />
==Likelihood==<br />
TO BE WRITTEN.<br />
<!-- <br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
The likelihood code (and the data that comes with it) used to compute the likelihood of a model that predicts the CMB power spectra, lensing power spectrum, together with some foreground and some instrumental parameters. The data files are built primarily from the Planck mission results, but include also some results from the WMAP-9 data release. The data files are written in a specific format that can only be read by the code. The code consists in a c/f90 library, along with some optional tools in python. The code is used to read the data files, and given model power spectra and nuisance parameters it computes the log likelihood of that model. <br />
<br />
Detailed description of the installation and usage of the likelihood code and data is provided in the package. The package includes five data files: four for the CMB likelihoods and one for the lensing likelihood. All of the likelihoods delivered are described in detail in the {{PlanckPapers|planck2013-p08|1|Power spectrum & Likelihood Paper}} (for the CMB based likelihood) and in the {{PlanckPapers|planck2013-p12|1|Lensing Paper}} (for the lensing likelihood) .<br />
<br />
The CMB full likelihood has been divided into four parts to allow using selectively different ranges of multipoles. It also reflects the fact that the mathematical approximations used for those different parts are very different, as is the underlying data. In detail, we distribute<br />
* one low-<math>\ell</math> temperature only likelihood (commander), <br />
* one low-<math>\ell</math> temperature and polarisation likelihood (lowlike), and <br />
* one higl-<math>\ell</math> likelihood CAMspec. <br />
<br />
The ''Commander'' likelihood covers the multipoles 2 to 49. It uses a semi-analytic method to sample the low-<math>\ell</math> temperature likelihood on an intermediate product of one of the component separated maps. The samples are used along with an analytical approximation of the likelihood posterior to perform the likelihood computation in the code. See {{PlanckPapers|planck2013-p08}} section 8.1 for more details.<br />
<br />
The ''lowlike'' likelihood covers the multipoles 2 to 32 for temperature and polarization data. Since Planck is not releasing polarisation data at this time, the polarization map from WMAP9 is used instead. A temperature map is needed to perform the computation nevertheless, and we use here the same commander map. The likelihood is computed using a map-based approximation at low resolution and a master one at intermediate resolution, as in WMAP. The likelihood code actually calls a very slightly modified version of the WMAP9 code. This piece of the likelihood essentially provides a prior on the optical depth and has almost no other impact on cosmological parameter estimation. As such it could be replaced by a simple prior, and a user can decide to do so, which is one of the motivation to leave the three pieces of the CMB likelihood as different data packages; see {{PlanckPapers|planck2013-p08}} section 8.3 for more details. Note that the version of the WMAP code used here (code version v1.0) does not perform any test on the positive definiteness of the TT, TE, EE covariance matrices, and will return a null log likelihood in the unphysical cases where the absolute value of TE is too large. This will be corrected in a later version.<br />
<br />
The ''CAMspec'' likelihood covers the multipoles 50 to 2500 for temperature only. The likelihood is computed using a quadratic approximation, including mode to mode correlations that have been precomputed on a fiducial model. The likelihood uses data from the 100, 143 and 217 GHz channels. To do so it models the foreground at each frequency using the model described in the likelihood paper. Uncertainties on the relative calibration and on the beam transfer functions are included either as parametric models, or marginalized and integrated in the covariance matrix. Detailed description of the different nuisance parameters is given below. Priors are included in the likelihood on the CIB spectral index, relative calibration factors and beam error eigenmodes. See {{PlanckPapers|planck2013-p08}} section 2.1 for more details.<br />
<br />
The ''act/spt'' likelihood covers the multipoles 1500 to 10000 for temperature. It is described in{{BibCite|dun2013}}{{BibCite|Keis2011}}{{BibCite|Reic2012}}. It uses the code and data that can be retrieved from the [http://lambda.gsfc.nasa.gov/ Lambda archive] for [http://lambda.gsfc.nasa.gov/product/act/act_prod_table.cfm ACT] and [http://lambda.gsfc.nasa.gov/product/spt/spt_prod_table.cfm SPT]. It has been slightly modified to use a thermal and kinetic SZ model that matches the one used in CAMspec. As stated in{{BibCite|dun2013}}, the dust parameters a_ge and a_gs must be explored with the following priors: a_ge = 0.8 ± 0.2 and a_gs = 0.4 ± 0.2. Those priors are not included in the log likelihood computed by the code.<br />
<br />
The ''lensing'' likelihood covers the multipoles 40 to 400 using the result of the [[Specially_processed_maps | lensing reconstruction]]. It uses a quadratic approximation for the likelihood, with a covariance matrix including the marginalized contribution of the beam transfer function uncertainties, the diffuse point source correction uncertainties and the cosmological model uncertainty affecting the first order non-gaussian bias (N1). The correlation between temperature and lensing is not taken into account. Cosmological uncertainty effects on the normalization are dealt with using a first order renormalization procedure. This means that the code will need both the TT and $\phi\phi$ power spectrum up to <math>\ell</math> = 2048 to correctly perform the integrals needed for the renormalization. Nevertheless, the code will only produce an estimate based on the data between <math>\ell</math> = 40 to 400. See {{PlanckPapers|planck2013-p12}} section 6.1 for more details.<br />
</span><br />
<span style="color:red">OUTSTANDING: description of likelihood masks </span><br />
==Production process==<br />
<br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
The code is based on some basic routines from the libpmc library in the [http://arxiv.org/abs/1101.0950 cosmoPMC] code. It also uses some code from the [http://lambda.gsfc.nasa.gov/product/map/dr5/likelihood_get.cfm WMAP9 likelihood] for the lowlike likelihood and{{BibCite|dun2013}}{{BibCite|Keis2011}}{{BibCite|Reic2012}} for the act/spt one. The rest of the code has been specifically written for the Planck data. Each likelihood file has been processed using a different and dedicated pipeline as described in the likelihood paper {{PlanckPapers|planck2013-p08}} (section 2 and 8) and in the lensing paper {{PlanckPapers|planck2013-p12}} (section 6.1). We refer the reader to those papers for full details. The data are then encapsulated into the specific file format.<br />
<br />
Each dataset comes with its own self check. Whenever the code is used to read a data file, a computation will be done against an included test spectrum/nuisance parameter, and the log-likelihood will be displayed along with the expected result. Difference of the order of 10<math>^{-6}</math> or less are expected depending of the architecture.<br />
<br />
==Inputs==<br />
<br />
===Likelihood===<br />
<br />
; ''commander'' :<br />
* all Planck channels maps<br />
* compact source catalogs<br />
* common masks<br />
* beam transfer functions for all channels<br />
<br />
; ''lowlike'' :<br />
* WMAP9 likelihood data<br />
* Low-<math>\ell</math> Commander map<br />
<br />
; ''CAMspec'' :<br />
* 100, 143 and 217 GHz detector and detsets maps<br />
* 857GHz channel map<br />
* compact source catalog<br />
* common masks (0,1 & 3)<br />
* beam transfer function and error eigenmodes and covariance for 100, 143 and 217 GHz detectors & detsets<br />
* theoretical templates for the tSZ and kSZ contributions<br />
* color corrections for the CIB emission for the 143 and 217GHz detectors and detsets<br />
* fiducial CMB model (bootstrapped from WMAP7 best fit spectrum) estimated noise contribution from the half-ring maps for 100, 143 and 217 GHz<br />
<br />
; ''lensing'' :<br />
* the lensing map<br />
* beam error eigenmodes and covariance for the 143 and 217GHz channel maps<br />
* fiducial CMB model (from Planck cosmological parameter best fit)<br />
<br />
; ''act/spt'' :<br />
* data and code from [http://lambda.gsfc.nasa.gov/product/act/act_fulllikelihood_get.cfm here]<br />
* the tSZ andkSZ template are changed to match those of CAMspec<br />
<br />
== File names and Meta data ==<br />
<br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
<br />
'''Likelihood source code'''<br />
<br />
The source code is in the file<br />
: {{PLASingleFile |fileType=cosmo|name=COM_Code_Likelihood-v1.0_R1.10.tar.gz|link=COM_Code_Likelihood-v1.0_R1.10.tar.gz}} (C, f90 and python likelihood library and tools)<br />
<br />
'''Likelihood data packages'''<br />
<br />
The {{PLALikelihood|type=Data|link=data packages}} are<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-commander_R1.10.tar.gz | link=COM_Data_Likelihood-commander_R1.10.tar.gz}}'' (low-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-lowlike_R1.10.tar.gz | link=COM_Data_Likelihood-lowlike_R1.10.tar.gz}}'' (low-ell TE,EE,BB likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-CAMspec_R1.10.tar.gz | link=COM_Data_Likelihood-CAMspec_R1.10.tar.gz}}'' (high-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-actspt_R1.10.tar | link=COM_Data_Likelihood-actspt_R1.10.tar.gz}}'' (high-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-lensing_R1.10.tar.gz | link=COM_Data_Likelihood-lensing_R1.10.tar.gz}}'' (lensing likelihood)<br />
<br />
Untar and unzip all files to recover the code and likelihood data. Each package comes with a README file; follow the instructions inclosed to<br />
build the code and use it. To compute the CMB likelihood one has to sum the log likelihood of each of the commander_v4.1_lm49.clik, lowlike_v222.clik and CAMspec_v6.2TN_2013_02_26.clik, actspt_2013_01.clik. To compute the CMB+lensing likelihood, one has to sum the log likelihood of all 5 files.<br />
<br />
The CMB and lensing likelihood format are different. The CMB files have the termination .clik, the lensing one .clik_lensing. The lensing data being simpler (due to the less detailled modeling permitted by the lower signal-noise), the file is a simple ascii file containing all the data along with comments describing it, and linking the different quantities to the lensing paper. The CMB file format is more complex and must accommodate different forms of data (maps, power spectrum, distribution samples, covariance matrices...). It consists of a tree structure containing the data. At each level of the tree structure a given directory can contain array data (in the form of FITS files or ascii files for strings) and scalar data (joined in a single ascii file "_mdb"). Those files are not user modifiable and do not contain interesting meta data for the user. Tools to manipulate those files are included in the code package as optional python tools. They are documented in the code package.<br />
<br />
'''Likelihood masks'''<br />
<br />
The masks used in the Likelihood paper {{PlanckPapers|planck2013-p08}} are found in<br />
{{PLASingleFile|fileType=map|name=COM_Mask_Likelihood_2048_R1.10.fits|link=COM_Mask_Likelihood_2048_R1.10.fits}}<br />
<br />
which contains ten masks which are written into a single ''BINTABLE'' extension of 10 columns by 50331648 rows (the number of Healpix pixels in an Nside = 2048 map). The structure is as follows, where the column names are the names of the masks: <br />
<br />
{| border="1" cellpadding="3" cellspacing="0" align="center" style="text-align:left" width=800px<br />
|+ '''Likelihodd masks file data structure'''<br />
|- bgcolor="ffdead" <br />
!colspan="4" | 1. EXTNAME = 'MSK-LIKE' : Data columns<br />
|- bgcolor="ffdead" <br />
! Column Name || Data Type || Units || Description<br />
|-<br />
|CL31 || Real*4 || none || mask<br />
|-<br />
|CL39 || Real*4 || none || mask<br />
|-<br />
|CL49 || Real*4 || none || mask<br />
|-<br />
|G22 || Real*4 || none || mask <br />
|-<br />
|G35 || Real*4 || none || mask<br />
|-<br />
|G45 || Real*4 || none || mask<br />
|-<br />
|G56 || Real*4 || none || mask<br />
|-<br />
|G65 || Real*4 || none || mask<br />
|-<br />
|PS96 || Real*4 || none || mask<br />
|-<br />
|PSA82 || Real*4 || none || mask<br />
|-<br />
|- bgcolor="ffdead" <br />
! Keyword || Data Type || Value || Description<br />
|-<br />
|PIXTYPE || string || HEALPIX ||<br />
|-<br />
|COORDSYS || string || GALACTIC ||Coordinate system <br />
|-<br />
|ORDERING || string || NESTED || Healpix ordering<br />
|-<br />
|NSIDE || Int || 2048 || Healpix Nside <br />
|-<br />
|FIRSTPIX || Int*4 || 0 || First pixel number<br />
|-<br />
|LASTPIX || Int*4 || 50331647 || Last pixel number, for LFI and HFI, respectively<br />
<br />
|}<br />
--><br />
== References ==<br />
<References /><br />
<br />
<br />
<br />
[[Category:Mission products|008]]</div>Sgallihttps://wiki.cosmos.esa.int/planckpla2015/index.php?title=CMB_spectrum_%26_Likelihood_Code&diff=11071CMB spectrum & Likelihood Code2015-02-04T00:22:14Z<p>Sgalli: </p>
<hr />
<div>{{DISPLAYTITLE:CMB spectrum and likelihood code}}<br />
<br />
==CMB spectra==<br />
<br />
===General description===<br />
<br />
<br />
The Planck best-fit CMB temperature power spectrum, shown in figure below, covers the wide range of multipoles <math> \ell </math> = 2-2508. Over the multipole range <math> \ell </math> = 2–29, the power spectrum is derived from a component-separation algorithm, ''Commander'', <span style="color:red"> UPDATE COMMANDER: applied to maps in the frequency range 30–353 GHz over 91% of the sky {{PlanckPapers|planck2013-p06}} . The asymmetric error bars associated to this spectrum are the 68% confidence limits and include the uncertainties due to foreground subtraction </span>. For multipoles equal or greater than <math>\ell=30</math>, instead, the spectrum is derived from the ''Plik'' likelihood {{PlanckPapers|planck2014-a13}} by optimally combining the spectra in the frequency range 100-217 GHz, and correcting them for unresolved foregrounds. Associated 1-sigma errors include beam uncertainties. Both ''Commander'' and ''Plik'' are described in more details in the sections below.<br />
<br />
[[File: Planck2014 TT Dl NORES bin30 w180mm.jpeg|thumb|center|700px|'''CMB spectrum. Logarithmic x-scale up to <math>\ell=30</math>, linear at higher <math>\ell</math>; all points with error bars. The red line is the Planck best-fit primordial power spectrum (cf Planck TT+lowP in Table 3 of {{PlanckPapers|planck2014-a15}}).''']]<br />
===Production process===<br />
<br />
<span style="color:red"> UPDATE COMMANDER<br />
The <math>\ell</math> < 50 part of the Planck power spectrum is derived from the Commander approach, which implements Bayesian component separation in pixel space, fitting a parametric model to the data by sampling the posterior distribution for the model parameters {{PlanckPapers|planck2013-p06}}. The power spectrum at any multipole <math>\ell</math> is given as the maximum probability point for the posterior <math>C_\ell</math> distribution, marginalized over the other multipoles, and the error bars are 68% confidence level {{PlanckPapers|planck2013-p08}}. <br />
</span><br />
The <math>\ell</math> > 30 part of the CMB temperature power spectrum has been derived by the Plik likelihood, a code that implements a pseudo-Cl based technique, extensively described in Sec. 2 and the Appendix of {{PlanckPapers|planck2013-p08}}. Frequency spectra are computed as cross-spectra between half-mission maps. Mask and multipole range choices for each frequency spectrum are summarized in Section 3.3 of {{PlanckPapers|planck2014-p15}} and in {{PlanckPapers|planck2014-p13}}. The final power spectrum is an optimal combination of the 100, 143, 143x217 and 217 GHz spectra, corrected for the best-fit unresolved foregrounds and inter-frequency calibration factors, as derived from the full likelihood analysis (cf Planck+TT+lowP in Table 3 of {{PlanckPapers|planck2014-p15}}). A thorough description of the models of unresolved foregrounds is given in {{PlanckPapers|planck2014-p13}}. The spectrum covariance matrix accounts for cosmic variance and noise contributions, together with beam uncertainties. The <math>\ell</math> > 30 CMB TT spectrum and associated covariance matrix are available in two formats:<br />
#Unbinned, with 2479 bandpowers (<math>\ell=30-2508</math>).<br />
#Binned, in bins of <math> \Delta\ell=30 </math>, with 83 bandpowers in total. We bin the <math> C_\ell </math> power spectrum with a weight proportional to <math> \ell (\ell+1) </math>, so that the <math> C_{\ell_b} </math> binned bandpower centered in <math> \ell_b </math> is: <math> \\ C_{\ell_b}=\Sigma_{\ell \in b} w^b_\ell C_\ell \quad \text{with} \quad w^b_\ell=\frac{\ell (\ell+1)}{\Sigma_{\ell \in b} \ell (\ell+1)}. \\</math> Equivalently, using the matrix formalism, we can construct the binning matrix B as: <math>\\ B_{\ell \ell_b}=w^{\ell_b}_\ell \\ </math> where B is a <math> n_b\times n_\ell</math> matrix, with <math>n_b=83</math> the number of bins and <math>n_\ell=2479</math> the number of unbinned multipoles. Thus: <math> \\ \vec{C}_{\ell_b}=B \vec{C}_\ell \\ \mathcal{C}= B \mathcal{C} B^T \\ \ell_b=B \ell \\ </math> Here, <math> \vec{C}^{binned}_{\ell_b} (\vec{C}_{\ell}) </math> indicates the vector containing all the binned (unbinned) bandpowers, <math>\mathcal{C} </math> is the covariance matrix and <math>\ell_b</math> is the weighted multipole average in each bin. The binned <math>D_{\ell_B}</math> power spectrum is then calculated as: <math> \\ D_{\ell_b}=\ell_b (\ell_b+1)/2/\pi C_{\ell_b} </math>.<br />
===Inputs===<br />
<br />
<br />
; Low-l spectrum (<math>\ell < 50</math>):<br />
* frequency maps from 30–353 GHz<br />
* common mask {{PlanckPapers|planck2013-p06}}<br />
* compact sources catalog<br />
<br />
; High-l spectrum (<math>50 < \ell < 2500</math>): <br />
<br />
* 100, 143, 143x217 and 217 GHz spectra and their covariance matrix (Sec. 2 in {{PlanckPapers|planck2013-p08}})<br />
* best-fit foreground templates and inter-frequency calibration factors (Table 5 of {{PlanckPapers|planck2013-p11}})<br />
* Beam transfer function uncertainties {{PlanckPapers|planck2013-p03c}}<br />
=== File names and Meta data ===<br />
<br />
<br />
The CMB spectrum and its covariance matrix are distributed in a single FITS file named <br />
* ''{{PLASingleFile | fileType=cosmo | name=COM_PowerSpect_CMB_R1.10.fits | link=COM_PowerSpect_CMB_R1.10.fits}}'' <br />
<br />
which contains 3 extensions<br />
<br />
; LOW-ELL (BINTABLE)<br />
: with the low ell part of the spectrum, not binned, and for l=2-49. The table columns are<br />
# ''ELL'' (integer): multipole number<br />
# ''D_ELL'' (float): $D_l$ as described below<br />
# ''ERRUP'' (float): the upward uncertainty<br />
# ''ERRDOWN'' (float): the downward uncertainty<br />
<br />
; HIGH-ELL (BINTABLE)<br />
: with the high-ell part of the spectrum, binned into 74 bins covering <math>\langle l \rangle = 47-2419\ </math> in bins of width <math>l=31</math> (with the exception of the last 4 bins that are wider). The table columns are as follows:<br />
# ''ELL'' (integer): mean multipole number of bin<br />
# ''L_MIN'' (integer): lowest multipole of bin<br />
# ''L_MAX'' (integer): highest multipole of bin<br />
# ''D_ELL'' (float): $D_l$ as described below<br />
# ''ERR'' (float): the uncertainty<br />
<br />
; COV-MAT (IMAGE)<br />
: with the covariance matrix of the high-ell part of the spectrum in a 74x74 pixel image, i.e., covering the same bins as the ''HIGH-ELL'' table.<br />
<br />
The spectra give $D_\ell = \ell(\ell+1)C_\ell / 2\pi$ in units of $\mu\, K^2$, and the covariance matrix is in units of $\mu\, K^4$. The spectra are shown in the figure below, in blue and red for the low- and high-<math>\ell</math> parts, respectively, and with the error bars for the high-ell part only in order to avoid confusion.<br />
<br />
[[File: CMBspect.jpg|thumb|center|700px|'''CMB spectrum. Linear x-scale; error bars only at high <math>\ell</math>.''']]<br />
<br />
The CMB spectrum is also given in a simple text comma-separated file:<br />
* ''{{PLASingleFile | fileType=cosmo | name=COM_PowerSpect_CMB_R1.10.txt |link=COM_PowerSpect_CMB_R1.10.txt}}''<br />
<br />
==Likelihood==<br />
TO BE WRITTEN.<br />
<!-- <br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
The likelihood code (and the data that comes with it) used to compute the likelihood of a model that predicts the CMB power spectra, lensing power spectrum, together with some foreground and some instrumental parameters. The data files are built primarily from the Planck mission results, but include also some results from the WMAP-9 data release. The data files are written in a specific format that can only be read by the code. The code consists in a c/f90 library, along with some optional tools in python. The code is used to read the data files, and given model power spectra and nuisance parameters it computes the log likelihood of that model. <br />
<br />
Detailed description of the installation and usage of the likelihood code and data is provided in the package. The package includes five data files: four for the CMB likelihoods and one for the lensing likelihood. All of the likelihoods delivered are described in detail in the {{PlanckPapers|planck2013-p08|1|Power spectrum & Likelihood Paper}} (for the CMB based likelihood) and in the {{PlanckPapers|planck2013-p12|1|Lensing Paper}} (for the lensing likelihood) .<br />
<br />
The CMB full likelihood has been divided into four parts to allow using selectively different ranges of multipoles. It also reflects the fact that the mathematical approximations used for those different parts are very different, as is the underlying data. In detail, we distribute<br />
* one low-<math>\ell</math> temperature only likelihood (commander), <br />
* one low-<math>\ell</math> temperature and polarisation likelihood (lowlike), and <br />
* one higl-<math>\ell</math> likelihood CAMspec. <br />
<br />
The ''Commander'' likelihood covers the multipoles 2 to 49. It uses a semi-analytic method to sample the low-<math>\ell</math> temperature likelihood on an intermediate product of one of the component separated maps. The samples are used along with an analytical approximation of the likelihood posterior to perform the likelihood computation in the code. See {{PlanckPapers|planck2013-p08}} section 8.1 for more details.<br />
<br />
The ''lowlike'' likelihood covers the multipoles 2 to 32 for temperature and polarization data. Since Planck is not releasing polarisation data at this time, the polarization map from WMAP9 is used instead. A temperature map is needed to perform the computation nevertheless, and we use here the same commander map. The likelihood is computed using a map-based approximation at low resolution and a master one at intermediate resolution, as in WMAP. The likelihood code actually calls a very slightly modified version of the WMAP9 code. This piece of the likelihood essentially provides a prior on the optical depth and has almost no other impact on cosmological parameter estimation. As such it could be replaced by a simple prior, and a user can decide to do so, which is one of the motivation to leave the three pieces of the CMB likelihood as different data packages; see {{PlanckPapers|planck2013-p08}} section 8.3 for more details. Note that the version of the WMAP code used here (code version v1.0) does not perform any test on the positive definiteness of the TT, TE, EE covariance matrices, and will return a null log likelihood in the unphysical cases where the absolute value of TE is too large. This will be corrected in a later version.<br />
<br />
The ''CAMspec'' likelihood covers the multipoles 50 to 2500 for temperature only. The likelihood is computed using a quadratic approximation, including mode to mode correlations that have been precomputed on a fiducial model. The likelihood uses data from the 100, 143 and 217 GHz channels. To do so it models the foreground at each frequency using the model described in the likelihood paper. Uncertainties on the relative calibration and on the beam transfer functions are included either as parametric models, or marginalized and integrated in the covariance matrix. Detailed description of the different nuisance parameters is given below. Priors are included in the likelihood on the CIB spectral index, relative calibration factors and beam error eigenmodes. See {{PlanckPapers|planck2013-p08}} section 2.1 for more details.<br />
<br />
The ''act/spt'' likelihood covers the multipoles 1500 to 10000 for temperature. It is described in{{BibCite|dun2013}}{{BibCite|Keis2011}}{{BibCite|Reic2012}}. It uses the code and data that can be retrieved from the [http://lambda.gsfc.nasa.gov/ Lambda archive] for [http://lambda.gsfc.nasa.gov/product/act/act_prod_table.cfm ACT] and [http://lambda.gsfc.nasa.gov/product/spt/spt_prod_table.cfm SPT]. It has been slightly modified to use a thermal and kinetic SZ model that matches the one used in CAMspec. As stated in{{BibCite|dun2013}}, the dust parameters a_ge and a_gs must be explored with the following priors: a_ge = 0.8 ± 0.2 and a_gs = 0.4 ± 0.2. Those priors are not included in the log likelihood computed by the code.<br />
<br />
The ''lensing'' likelihood covers the multipoles 40 to 400 using the result of the [[Specially_processed_maps | lensing reconstruction]]. It uses a quadratic approximation for the likelihood, with a covariance matrix including the marginalized contribution of the beam transfer function uncertainties, the diffuse point source correction uncertainties and the cosmological model uncertainty affecting the first order non-gaussian bias (N1). The correlation between temperature and lensing is not taken into account. Cosmological uncertainty effects on the normalization are dealt with using a first order renormalization procedure. This means that the code will need both the TT and $\phi\phi$ power spectrum up to <math>\ell</math> = 2048 to correctly perform the integrals needed for the renormalization. Nevertheless, the code will only produce an estimate based on the data between <math>\ell</math> = 40 to 400. See {{PlanckPapers|planck2013-p12}} section 6.1 for more details.<br />
</span><br />
<span style="color:red">OUTSTANDING: description of likelihood masks </span><br />
==Production process==<br />
<br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
The code is based on some basic routines from the libpmc library in the [http://arxiv.org/abs/1101.0950 cosmoPMC] code. It also uses some code from the [http://lambda.gsfc.nasa.gov/product/map/dr5/likelihood_get.cfm WMAP9 likelihood] for the lowlike likelihood and{{BibCite|dun2013}}{{BibCite|Keis2011}}{{BibCite|Reic2012}} for the act/spt one. The rest of the code has been specifically written for the Planck data. Each likelihood file has been processed using a different and dedicated pipeline as described in the likelihood paper {{PlanckPapers|planck2013-p08}} (section 2 and 8) and in the lensing paper {{PlanckPapers|planck2013-p12}} (section 6.1). We refer the reader to those papers for full details. The data are then encapsulated into the specific file format.<br />
<br />
Each dataset comes with its own self check. Whenever the code is used to read a data file, a computation will be done against an included test spectrum/nuisance parameter, and the log-likelihood will be displayed along with the expected result. Difference of the order of 10<math>^{-6}</math> or less are expected depending of the architecture.<br />
<br />
==Inputs==<br />
<br />
===Likelihood===<br />
<br />
; ''commander'' :<br />
* all Planck channels maps<br />
* compact source catalogs<br />
* common masks<br />
* beam transfer functions for all channels<br />
<br />
; ''lowlike'' :<br />
* WMAP9 likelihood data<br />
* Low-<math>\ell</math> Commander map<br />
<br />
; ''CAMspec'' :<br />
* 100, 143 and 217 GHz detector and detsets maps<br />
* 857GHz channel map<br />
* compact source catalog<br />
* common masks (0,1 & 3)<br />
* beam transfer function and error eigenmodes and covariance for 100, 143 and 217 GHz detectors & detsets<br />
* theoretical templates for the tSZ and kSZ contributions<br />
* color corrections for the CIB emission for the 143 and 217GHz detectors and detsets<br />
* fiducial CMB model (bootstrapped from WMAP7 best fit spectrum) estimated noise contribution from the half-ring maps for 100, 143 and 217 GHz<br />
<br />
; ''lensing'' :<br />
* the lensing map<br />
* beam error eigenmodes and covariance for the 143 and 217GHz channel maps<br />
* fiducial CMB model (from Planck cosmological parameter best fit)<br />
<br />
; ''act/spt'' :<br />
* data and code from [http://lambda.gsfc.nasa.gov/product/act/act_fulllikelihood_get.cfm here]<br />
* the tSZ andkSZ template are changed to match those of CAMspec<br />
<br />
== File names and Meta data ==<br />
<br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
<br />
'''Likelihood source code'''<br />
<br />
The source code is in the file<br />
: {{PLASingleFile |fileType=cosmo|name=COM_Code_Likelihood-v1.0_R1.10.tar.gz|link=COM_Code_Likelihood-v1.0_R1.10.tar.gz}} (C, f90 and python likelihood library and tools)<br />
<br />
'''Likelihood data packages'''<br />
<br />
The {{PLALikelihood|type=Data|link=data packages}} are<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-commander_R1.10.tar.gz | link=COM_Data_Likelihood-commander_R1.10.tar.gz}}'' (low-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-lowlike_R1.10.tar.gz | link=COM_Data_Likelihood-lowlike_R1.10.tar.gz}}'' (low-ell TE,EE,BB likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-CAMspec_R1.10.tar.gz | link=COM_Data_Likelihood-CAMspec_R1.10.tar.gz}}'' (high-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-actspt_R1.10.tar | link=COM_Data_Likelihood-actspt_R1.10.tar.gz}}'' (high-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-lensing_R1.10.tar.gz | link=COM_Data_Likelihood-lensing_R1.10.tar.gz}}'' (lensing likelihood)<br />
<br />
Untar and unzip all files to recover the code and likelihood data. Each package comes with a README file; follow the instructions inclosed to<br />
build the code and use it. To compute the CMB likelihood one has to sum the log likelihood of each of the commander_v4.1_lm49.clik, lowlike_v222.clik and CAMspec_v6.2TN_2013_02_26.clik, actspt_2013_01.clik. To compute the CMB+lensing likelihood, one has to sum the log likelihood of all 5 files.<br />
<br />
The CMB and lensing likelihood format are different. The CMB files have the termination .clik, the lensing one .clik_lensing. The lensing data being simpler (due to the less detailled modeling permitted by the lower signal-noise), the file is a simple ascii file containing all the data along with comments describing it, and linking the different quantities to the lensing paper. The CMB file format is more complex and must accommodate different forms of data (maps, power spectrum, distribution samples, covariance matrices...). It consists of a tree structure containing the data. At each level of the tree structure a given directory can contain array data (in the form of FITS files or ascii files for strings) and scalar data (joined in a single ascii file "_mdb"). Those files are not user modifiable and do not contain interesting meta data for the user. Tools to manipulate those files are included in the code package as optional python tools. They are documented in the code package.<br />
<br />
'''Likelihood masks'''<br />
<br />
The masks used in the Likelihood paper {{PlanckPapers|planck2013-p08}} are found in<br />
{{PLASingleFile|fileType=map|name=COM_Mask_Likelihood_2048_R1.10.fits|link=COM_Mask_Likelihood_2048_R1.10.fits}}<br />
<br />
which contains ten masks which are written into a single ''BINTABLE'' extension of 10 columns by 50331648 rows (the number of Healpix pixels in an Nside = 2048 map). The structure is as follows, where the column names are the names of the masks: <br />
<br />
{| border="1" cellpadding="3" cellspacing="0" align="center" style="text-align:left" width=800px<br />
|+ '''Likelihodd masks file data structure'''<br />
|- bgcolor="ffdead" <br />
!colspan="4" | 1. EXTNAME = 'MSK-LIKE' : Data columns<br />
|- bgcolor="ffdead" <br />
! Column Name || Data Type || Units || Description<br />
|-<br />
|CL31 || Real*4 || none || mask<br />
|-<br />
|CL39 || Real*4 || none || mask<br />
|-<br />
|CL49 || Real*4 || none || mask<br />
|-<br />
|G22 || Real*4 || none || mask <br />
|-<br />
|G35 || Real*4 || none || mask<br />
|-<br />
|G45 || Real*4 || none || mask<br />
|-<br />
|G56 || Real*4 || none || mask<br />
|-<br />
|G65 || Real*4 || none || mask<br />
|-<br />
|PS96 || Real*4 || none || mask<br />
|-<br />
|PSA82 || Real*4 || none || mask<br />
|-<br />
|- bgcolor="ffdead" <br />
! Keyword || Data Type || Value || Description<br />
|-<br />
|PIXTYPE || string || HEALPIX ||<br />
|-<br />
|COORDSYS || string || GALACTIC ||Coordinate system <br />
|-<br />
|ORDERING || string || NESTED || Healpix ordering<br />
|-<br />
|NSIDE || Int || 2048 || Healpix Nside <br />
|-<br />
|FIRSTPIX || Int*4 || 0 || First pixel number<br />
|-<br />
|LASTPIX || Int*4 || 50331647 || Last pixel number, for LFI and HFI, respectively<br />
<br />
|}<br />
--><br />
== References ==<br />
<References /><br />
<br />
<br />
<br />
[[Category:Mission products|008]]</div>Sgallihttps://wiki.cosmos.esa.int/planckpla2015/index.php?title=CMB_spectrum_%26_Likelihood_Code&diff=11070CMB spectrum & Likelihood Code2015-02-04T00:19:53Z<p>Sgalli: </p>
<hr />
<div>{{DISPLAYTITLE:CMB spectrum and likelihood code}}<br />
<br />
==CMB spectra==<br />
<br />
===General description===<br />
<br />
<br />
The Planck best-fit CMB temperature power spectrum, shown in figure below, covers the wide range of multipoles <math> \ell </math> = 2-2508. Over the multipole range <math> \ell </math> = 2–29, the power spectrum is derived from a component-separation algorithm, ''Commander'', <span style="color:red"> UPDATE COMMANDER: applied to maps in the frequency range 30–353 GHz over 91% of the sky {{PlanckPapers|planck2013-p06}} . The asymmetric error bars associated to this spectrum are the 68% confidence limits and include the uncertainties due to foreground subtraction </span>. For multipoles equal or greater than <math>\ell=30</math>, instead, the spectrum is derived from the ''Plik'' likelihood {{PlanckPapers|planck2014-a13}} by optimally combining the spectra in the frequency range 100-217 GHz, and correcting them for unresolved foregrounds. Associated 1-sigma errors include beam uncertainties. Both ''Commander'' and ''Plik'' are described in more details in the sections below.<br />
<br />
[[File: Planck2014 TT Dl NORES bin30 w180mm.jpeg|thumb|center|700px|'''CMB spectrum. Logarithmic x-scale up to <math>\ell=30</math>, linear at higher <math>\ell</math>; all points with error bars. The red line is the Planck best-fit primordial power spectrum (cf Planck TT+lowP in Table 3 of {{PlanckPapers|planck2014-a15}}).''']]<br />
===Production process===<br />
<br />
<span style="color:red"> UPDATE COMMANDER<br />
The <math>\ell</math> < 50 part of the Planck power spectrum is derived from the Commander approach, which implements Bayesian component separation in pixel space, fitting a parametric model to the data by sampling the posterior distribution for the model parameters {{PlanckPapers|planck2013-p06}}. The power spectrum at any multipole <math>\ell</math> is given as the maximum probability point for the posterior <math>C_\ell</math> distribution, marginalized over the other multipoles, and the error bars are 68% confidence level {{PlanckPapers|planck2013-p08}}. <br />
</span><br />
The <math>\ell</math> > 30 part of the CMB temperature power spectrum has been derived by the Plik likelihood, a code that implements a pseudo-Cl based technique, extensively described in Sec. 2 and the Appendix of {{PlanckPapers|planck2013-p08}}. Frequency spectra are computed as cross-spectra between half-mission maps. Mask and multipole range choices for each frequency spectrum are summarized in Section 3.3 of {{PlanckPapers|planck2014-p15}} and in {{PlanckPapers|planck2014-p13}}. The final power spectrum is an optimal combination of the 100, 143, 143x217 and 217 GHz spectra, corrected for the best-fit unresolved foregrounds and inter-frequency calibration factors, as derived from the full likelihood analysis (cf Planck+TT+lowP in Table 3 of {{PlanckPapers|planck2014-p15}}). A thorough description of the models of unresolved foregrounds is given in {{PlanckPapers|planck2014-p13}}. The spectrum covariance matrix accounts for cosmic variance and noise contributions, together with beam uncertainties. The <math>\ell</math> > 30 CMB TT spectrum and associated covariance matrix are available in two formats:<br />
#Unbinned, with 2479 bandpowers (<math>\ell=30-2508</math>).<br />
#Binned, in bins of <math> \Delta\ell=30 </math>, with 83 bandpowers in total. We bin the <math> C_\ell </math> power spectrum with a weight proportional to <math> \ell (\ell+1) </math>, so that the <math> C_{\ell_b} </math> binned bandpower centered in <math> \ell_b </math> is: <math> \\ C_{\ell_b}=\Sigma_{\ell \in b} w^b_\ell C_\ell \quad \text{with} \quad w^b_\ell=\frac{\ell (\ell+1)}{\Sigma_{\ell \in b} \ell (\ell+1)}. \\</math> Equivalently, using the matrix formalism, we can construct the binning matrix B as: <math>\\ B_{\ell \ell_b}=w^{\ell_b}_\ell \\ </math> where B is a <math> n_b\times n_\ell</math> matrix, with <math>n_b=83</math> the number of bins and <math>n_\ell=2479</math> the number of unbinned multipoles. Thus: <math> \\ \vec{C}_{\ell_b}=B \vec{C}_\ell \\ \mathcal{cov}= B \mathcal{cov} B^T \\ \ell_b=B \ell \\ </math> Here, \vec{C}^{binned}_{\ell_b} (\vec{C}_{\ell}) indicates the vector containing all the binned (unbinned) bandpowers, <math>\mathcal{C} </math> is the covariance matrix and <math>\ell_b</math> is the weighted multipole average in each bin. The binned <math>D_{\ell_B}</math> power spectrum is then calculated as: <math> \\ D_{\ell_b}=\ell_b (\ell_b+1)/2/\pi C_{\ell_b} \newline </math>.<br />
===Inputs===<br />
<br />
<br />
; Low-l spectrum (<math>\ell < 50</math>):<br />
* frequency maps from 30–353 GHz<br />
* common mask {{PlanckPapers|planck2013-p06}}<br />
* compact sources catalog<br />
<br />
; High-l spectrum (<math>50 < \ell < 2500</math>): <br />
<br />
* 100, 143, 143x217 and 217 GHz spectra and their covariance matrix (Sec. 2 in {{PlanckPapers|planck2013-p08}})<br />
* best-fit foreground templates and inter-frequency calibration factors (Table 5 of {{PlanckPapers|planck2013-p11}})<br />
* Beam transfer function uncertainties {{PlanckPapers|planck2013-p03c}}<br />
=== File names and Meta data ===<br />
<br />
<br />
The CMB spectrum and its covariance matrix are distributed in a single FITS file named <br />
* ''{{PLASingleFile | fileType=cosmo | name=COM_PowerSpect_CMB_R1.10.fits | link=COM_PowerSpect_CMB_R1.10.fits}}'' <br />
<br />
which contains 3 extensions<br />
<br />
; LOW-ELL (BINTABLE)<br />
: with the low ell part of the spectrum, not binned, and for l=2-49. The table columns are<br />
# ''ELL'' (integer): multipole number<br />
# ''D_ELL'' (float): $D_l$ as described below<br />
# ''ERRUP'' (float): the upward uncertainty<br />
# ''ERRDOWN'' (float): the downward uncertainty<br />
<br />
; HIGH-ELL (BINTABLE)<br />
: with the high-ell part of the spectrum, binned into 74 bins covering <math>\langle l \rangle = 47-2419\ </math> in bins of width <math>l=31</math> (with the exception of the last 4 bins that are wider). The table columns are as follows:<br />
# ''ELL'' (integer): mean multipole number of bin<br />
# ''L_MIN'' (integer): lowest multipole of bin<br />
# ''L_MAX'' (integer): highest multipole of bin<br />
# ''D_ELL'' (float): $D_l$ as described below<br />
# ''ERR'' (float): the uncertainty<br />
<br />
; COV-MAT (IMAGE)<br />
: with the covariance matrix of the high-ell part of the spectrum in a 74x74 pixel image, i.e., covering the same bins as the ''HIGH-ELL'' table.<br />
<br />
The spectra give $D_\ell = \ell(\ell+1)C_\ell / 2\pi$ in units of $\mu\, K^2$, and the covariance matrix is in units of $\mu\, K^4$. The spectra are shown in the figure below, in blue and red for the low- and high-<math>\ell</math> parts, respectively, and with the error bars for the high-ell part only in order to avoid confusion.<br />
<br />
[[File: CMBspect.jpg|thumb|center|700px|'''CMB spectrum. Linear x-scale; error bars only at high <math>\ell</math>.''']]<br />
<br />
The CMB spectrum is also given in a simple text comma-separated file:<br />
* ''{{PLASingleFile | fileType=cosmo | name=COM_PowerSpect_CMB_R1.10.txt |link=COM_PowerSpect_CMB_R1.10.txt}}''<br />
<br />
==Likelihood==<br />
TO BE WRITTEN.<br />
<!-- <br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
The likelihood code (and the data that comes with it) used to compute the likelihood of a model that predicts the CMB power spectra, lensing power spectrum, together with some foreground and some instrumental parameters. The data files are built primarily from the Planck mission results, but include also some results from the WMAP-9 data release. The data files are written in a specific format that can only be read by the code. The code consists in a c/f90 library, along with some optional tools in python. The code is used to read the data files, and given model power spectra and nuisance parameters it computes the log likelihood of that model. <br />
<br />
Detailed description of the installation and usage of the likelihood code and data is provided in the package. The package includes five data files: four for the CMB likelihoods and one for the lensing likelihood. All of the likelihoods delivered are described in detail in the {{PlanckPapers|planck2013-p08|1|Power spectrum & Likelihood Paper}} (for the CMB based likelihood) and in the {{PlanckPapers|planck2013-p12|1|Lensing Paper}} (for the lensing likelihood) .<br />
<br />
The CMB full likelihood has been divided into four parts to allow using selectively different ranges of multipoles. It also reflects the fact that the mathematical approximations used for those different parts are very different, as is the underlying data. In detail, we distribute<br />
* one low-<math>\ell</math> temperature only likelihood (commander), <br />
* one low-<math>\ell</math> temperature and polarisation likelihood (lowlike), and <br />
* one higl-<math>\ell</math> likelihood CAMspec. <br />
<br />
The ''Commander'' likelihood covers the multipoles 2 to 49. It uses a semi-analytic method to sample the low-<math>\ell</math> temperature likelihood on an intermediate product of one of the component separated maps. The samples are used along with an analytical approximation of the likelihood posterior to perform the likelihood computation in the code. See {{PlanckPapers|planck2013-p08}} section 8.1 for more details.<br />
<br />
The ''lowlike'' likelihood covers the multipoles 2 to 32 for temperature and polarization data. Since Planck is not releasing polarisation data at this time, the polarization map from WMAP9 is used instead. A temperature map is needed to perform the computation nevertheless, and we use here the same commander map. The likelihood is computed using a map-based approximation at low resolution and a master one at intermediate resolution, as in WMAP. The likelihood code actually calls a very slightly modified version of the WMAP9 code. This piece of the likelihood essentially provides a prior on the optical depth and has almost no other impact on cosmological parameter estimation. As such it could be replaced by a simple prior, and a user can decide to do so, which is one of the motivation to leave the three pieces of the CMB likelihood as different data packages; see {{PlanckPapers|planck2013-p08}} section 8.3 for more details. Note that the version of the WMAP code used here (code version v1.0) does not perform any test on the positive definiteness of the TT, TE, EE covariance matrices, and will return a null log likelihood in the unphysical cases where the absolute value of TE is too large. This will be corrected in a later version.<br />
<br />
The ''CAMspec'' likelihood covers the multipoles 50 to 2500 for temperature only. The likelihood is computed using a quadratic approximation, including mode to mode correlations that have been precomputed on a fiducial model. The likelihood uses data from the 100, 143 and 217 GHz channels. To do so it models the foreground at each frequency using the model described in the likelihood paper. Uncertainties on the relative calibration and on the beam transfer functions are included either as parametric models, or marginalized and integrated in the covariance matrix. Detailed description of the different nuisance parameters is given below. Priors are included in the likelihood on the CIB spectral index, relative calibration factors and beam error eigenmodes. See {{PlanckPapers|planck2013-p08}} section 2.1 for more details.<br />
<br />
The ''act/spt'' likelihood covers the multipoles 1500 to 10000 for temperature. It is described in{{BibCite|dun2013}}{{BibCite|Keis2011}}{{BibCite|Reic2012}}. It uses the code and data that can be retrieved from the [http://lambda.gsfc.nasa.gov/ Lambda archive] for [http://lambda.gsfc.nasa.gov/product/act/act_prod_table.cfm ACT] and [http://lambda.gsfc.nasa.gov/product/spt/spt_prod_table.cfm SPT]. It has been slightly modified to use a thermal and kinetic SZ model that matches the one used in CAMspec. As stated in{{BibCite|dun2013}}, the dust parameters a_ge and a_gs must be explored with the following priors: a_ge = 0.8 ± 0.2 and a_gs = 0.4 ± 0.2. Those priors are not included in the log likelihood computed by the code.<br />
<br />
The ''lensing'' likelihood covers the multipoles 40 to 400 using the result of the [[Specially_processed_maps | lensing reconstruction]]. It uses a quadratic approximation for the likelihood, with a covariance matrix including the marginalized contribution of the beam transfer function uncertainties, the diffuse point source correction uncertainties and the cosmological model uncertainty affecting the first order non-gaussian bias (N1). The correlation between temperature and lensing is not taken into account. Cosmological uncertainty effects on the normalization are dealt with using a first order renormalization procedure. This means that the code will need both the TT and $\phi\phi$ power spectrum up to <math>\ell</math> = 2048 to correctly perform the integrals needed for the renormalization. Nevertheless, the code will only produce an estimate based on the data between <math>\ell</math> = 40 to 400. See {{PlanckPapers|planck2013-p12}} section 6.1 for more details.<br />
</span><br />
<span style="color:red">OUTSTANDING: description of likelihood masks </span><br />
==Production process==<br />
<br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
The code is based on some basic routines from the libpmc library in the [http://arxiv.org/abs/1101.0950 cosmoPMC] code. It also uses some code from the [http://lambda.gsfc.nasa.gov/product/map/dr5/likelihood_get.cfm WMAP9 likelihood] for the lowlike likelihood and{{BibCite|dun2013}}{{BibCite|Keis2011}}{{BibCite|Reic2012}} for the act/spt one. The rest of the code has been specifically written for the Planck data. Each likelihood file has been processed using a different and dedicated pipeline as described in the likelihood paper {{PlanckPapers|planck2013-p08}} (section 2 and 8) and in the lensing paper {{PlanckPapers|planck2013-p12}} (section 6.1). We refer the reader to those papers for full details. The data are then encapsulated into the specific file format.<br />
<br />
Each dataset comes with its own self check. Whenever the code is used to read a data file, a computation will be done against an included test spectrum/nuisance parameter, and the log-likelihood will be displayed along with the expected result. Difference of the order of 10<math>^{-6}</math> or less are expected depending of the architecture.<br />
<br />
==Inputs==<br />
<br />
===Likelihood===<br />
<br />
; ''commander'' :<br />
* all Planck channels maps<br />
* compact source catalogs<br />
* common masks<br />
* beam transfer functions for all channels<br />
<br />
; ''lowlike'' :<br />
* WMAP9 likelihood data<br />
* Low-<math>\ell</math> Commander map<br />
<br />
; ''CAMspec'' :<br />
* 100, 143 and 217 GHz detector and detsets maps<br />
* 857GHz channel map<br />
* compact source catalog<br />
* common masks (0,1 & 3)<br />
* beam transfer function and error eigenmodes and covariance for 100, 143 and 217 GHz detectors & detsets<br />
* theoretical templates for the tSZ and kSZ contributions<br />
* color corrections for the CIB emission for the 143 and 217GHz detectors and detsets<br />
* fiducial CMB model (bootstrapped from WMAP7 best fit spectrum) estimated noise contribution from the half-ring maps for 100, 143 and 217 GHz<br />
<br />
; ''lensing'' :<br />
* the lensing map<br />
* beam error eigenmodes and covariance for the 143 and 217GHz channel maps<br />
* fiducial CMB model (from Planck cosmological parameter best fit)<br />
<br />
; ''act/spt'' :<br />
* data and code from [http://lambda.gsfc.nasa.gov/product/act/act_fulllikelihood_get.cfm here]<br />
* the tSZ andkSZ template are changed to match those of CAMspec<br />
<br />
== File names and Meta data ==<br />
<br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
<br />
'''Likelihood source code'''<br />
<br />
The source code is in the file<br />
: {{PLASingleFile |fileType=cosmo|name=COM_Code_Likelihood-v1.0_R1.10.tar.gz|link=COM_Code_Likelihood-v1.0_R1.10.tar.gz}} (C, f90 and python likelihood library and tools)<br />
<br />
'''Likelihood data packages'''<br />
<br />
The {{PLALikelihood|type=Data|link=data packages}} are<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-commander_R1.10.tar.gz | link=COM_Data_Likelihood-commander_R1.10.tar.gz}}'' (low-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-lowlike_R1.10.tar.gz | link=COM_Data_Likelihood-lowlike_R1.10.tar.gz}}'' (low-ell TE,EE,BB likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-CAMspec_R1.10.tar.gz | link=COM_Data_Likelihood-CAMspec_R1.10.tar.gz}}'' (high-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-actspt_R1.10.tar | link=COM_Data_Likelihood-actspt_R1.10.tar.gz}}'' (high-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-lensing_R1.10.tar.gz | link=COM_Data_Likelihood-lensing_R1.10.tar.gz}}'' (lensing likelihood)<br />
<br />
Untar and unzip all files to recover the code and likelihood data. Each package comes with a README file; follow the instructions inclosed to<br />
build the code and use it. To compute the CMB likelihood one has to sum the log likelihood of each of the commander_v4.1_lm49.clik, lowlike_v222.clik and CAMspec_v6.2TN_2013_02_26.clik, actspt_2013_01.clik. To compute the CMB+lensing likelihood, one has to sum the log likelihood of all 5 files.<br />
<br />
The CMB and lensing likelihood format are different. The CMB files have the termination .clik, the lensing one .clik_lensing. The lensing data being simpler (due to the less detailled modeling permitted by the lower signal-noise), the file is a simple ascii file containing all the data along with comments describing it, and linking the different quantities to the lensing paper. The CMB file format is more complex and must accommodate different forms of data (maps, power spectrum, distribution samples, covariance matrices...). It consists of a tree structure containing the data. At each level of the tree structure a given directory can contain array data (in the form of FITS files or ascii files for strings) and scalar data (joined in a single ascii file "_mdb"). Those files are not user modifiable and do not contain interesting meta data for the user. Tools to manipulate those files are included in the code package as optional python tools. They are documented in the code package.<br />
<br />
'''Likelihood masks'''<br />
<br />
The masks used in the Likelihood paper {{PlanckPapers|planck2013-p08}} are found in<br />
{{PLASingleFile|fileType=map|name=COM_Mask_Likelihood_2048_R1.10.fits|link=COM_Mask_Likelihood_2048_R1.10.fits}}<br />
<br />
which contains ten masks which are written into a single ''BINTABLE'' extension of 10 columns by 50331648 rows (the number of Healpix pixels in an Nside = 2048 map). The structure is as follows, where the column names are the names of the masks: <br />
<br />
{| border="1" cellpadding="3" cellspacing="0" align="center" style="text-align:left" width=800px<br />
|+ '''Likelihodd masks file data structure'''<br />
|- bgcolor="ffdead" <br />
!colspan="4" | 1. EXTNAME = 'MSK-LIKE' : Data columns<br />
|- bgcolor="ffdead" <br />
! Column Name || Data Type || Units || Description<br />
|-<br />
|CL31 || Real*4 || none || mask<br />
|-<br />
|CL39 || Real*4 || none || mask<br />
|-<br />
|CL49 || Real*4 || none || mask<br />
|-<br />
|G22 || Real*4 || none || mask <br />
|-<br />
|G35 || Real*4 || none || mask<br />
|-<br />
|G45 || Real*4 || none || mask<br />
|-<br />
|G56 || Real*4 || none || mask<br />
|-<br />
|G65 || Real*4 || none || mask<br />
|-<br />
|PS96 || Real*4 || none || mask<br />
|-<br />
|PSA82 || Real*4 || none || mask<br />
|-<br />
|- bgcolor="ffdead" <br />
! Keyword || Data Type || Value || Description<br />
|-<br />
|PIXTYPE || string || HEALPIX ||<br />
|-<br />
|COORDSYS || string || GALACTIC ||Coordinate system <br />
|-<br />
|ORDERING || string || NESTED || Healpix ordering<br />
|-<br />
|NSIDE || Int || 2048 || Healpix Nside <br />
|-<br />
|FIRSTPIX || Int*4 || 0 || First pixel number<br />
|-<br />
|LASTPIX || Int*4 || 50331647 || Last pixel number, for LFI and HFI, respectively<br />
<br />
|}<br />
--><br />
== References ==<br />
<References /><br />
<br />
<br />
<br />
[[Category:Mission products|008]]</div>Sgallihttps://wiki.cosmos.esa.int/planckpla2015/index.php?title=CMB_spectrum_%26_Likelihood_Code&diff=11069CMB spectrum & Likelihood Code2015-02-04T00:16:59Z<p>Sgalli: </p>
<hr />
<div>{{DISPLAYTITLE:CMB spectrum and likelihood code}}<br />
<br />
==CMB spectra==<br />
<br />
===General description===<br />
<br />
<br />
The Planck best-fit CMB temperature power spectrum, shown in figure below, covers the wide range of multipoles <math> \ell </math> = 2-2508. Over the multipole range <math> \ell </math> = 2–29, the power spectrum is derived from a component-separation algorithm, ''Commander'', <span style="color:red"> UPDATE COMMANDER: applied to maps in the frequency range 30–353 GHz over 91% of the sky {{PlanckPapers|planck2013-p06}} . The asymmetric error bars associated to this spectrum are the 68% confidence limits and include the uncertainties due to foreground subtraction </span>. For multipoles equal or greater than <math>\ell=30</math>, instead, the spectrum is derived from the ''Plik'' likelihood {{PlanckPapers|planck2014-a13}} by optimally combining the spectra in the frequency range 100-217 GHz, and correcting them for unresolved foregrounds. Associated 1-sigma errors include beam uncertainties. Both ''Commander'' and ''Plik'' are described in more details in the sections below.<br />
<br />
[[File: Planck2014 TT Dl NORES bin30 w180mm.jpeg|thumb|center|700px|'''CMB spectrum. Logarithmic x-scale up to <math>\ell=30</math>, linear at higher <math>\ell</math>; all points with error bars. The red line is the Planck best-fit primordial power spectrum (cf Planck TT+lowP in Table 3 of {{PlanckPapers|planck2014-a15}}).''']]<br />
===Production process===<br />
<br />
<span style="color:red"> UPDATE COMMANDER<br />
The <math>\ell</math> < 50 part of the Planck power spectrum is derived from the Commander approach, which implements Bayesian component separation in pixel space, fitting a parametric model to the data by sampling the posterior distribution for the model parameters {{PlanckPapers|planck2013-p06}}. The power spectrum at any multipole <math>\ell</math> is given as the maximum probability point for the posterior <math>C_\ell</math> distribution, marginalized over the other multipoles, and the error bars are 68% confidence level {{PlanckPapers|planck2013-p08}}. <br />
</span><br />
The <math>\ell</math> > 30 part of the CMB temperature power spectrum has been derived by the Plik likelihood, a code that implements a pseudo-Cl based technique, extensively described in Sec. 2 and the Appendix of {{PlanckPapers|planck2013-p08}}. Frequency spectra are computed as cross-spectra between half-mission maps. Mask and multipole range choices for each frequency spectrum are summarized in Section 3.3 of {{PlanckPapers|planck2014-p15}} and in {{PlanckPapers|planck2014-p13}}. The final power spectrum is an optimal combination of the 100, 143, 143x217 and 217 GHz spectra, corrected for the best-fit unresolved foregrounds and inter-frequency calibration factors, as derived from the full likelihood analysis (cf Planck+TT+lowP in Table 3 of {{PlanckPapers|planck2014-p15}}). A thorough description of the models of unresolved foregrounds is given in {{PlanckPapers|planck2014-p13}}. The spectrum covariance matrix accounts for cosmic variance and noise contributions, together with beam uncertainties. The <math>\ell</math> > 30 CMB TT spectrum and associated covariance matrix are available in two formats:<br />
#Unbinned, with 2479 bandpowers (<math>\ell=30-2508</math>).<br />
#Binned, in bins of <math> \Delta\ell=30 </math>, with 83 bandpowers in total. We bin the <math> C_\ell </math> power spectrum with a weight proportional to <math> \ell (\ell+1) </math>, so that the <math> C_{\ell_b} </math> binned bandpower centered in <math> \ell_b </math> is: <math> \\ C_{\ell_b}=\Sigma_{\ell \in b} w^b_\ell C_\ell \quad \text{with} \quad w^b_\ell=\frac{\ell (\ell+1)}{\Sigma_{\ell \in b} \ell (\ell+1)}. \\</math> Equivalently, using the matrix formalism, we can construct the binning matrix B as: <math>\\ B_{\ell \ell_b}=w^{\ell_b}_\ell \\ </math> where B is a <math> n_b\times n_\ell</math> matrix, with <math>n_b=83</math> the number of bins and <math>n_\ell=2479</math> the number of unbinned multipoles. Thus: <math> \\ \vec{C}^{binned}_{\ell_b}=B \vec{C}_\ell \\ cov^{binned}= B cov B^T \\ \ell_b=B \ell \\ </math> Here, \vec{C}^{binned}_{\ell_b} (\vec{C}_{\ell}) indicates the vector containing all the binned (unbinned) bandpowers. Note that we use the binning matrix also to calculate the weighted multipole average in each bin <math>\ell_b</math>. The binned <math>D_{\ell_B}</math> power spectra are then calculated as: <math> \\ D_{\ell_b}=\ell_b (\ell_b+1)/2/\pi C_{\ell_b} \newline </math>.<br />
===Inputs===<br />
<br />
<br />
; Low-l spectrum (<math>\ell < 50</math>):<br />
* frequency maps from 30–353 GHz<br />
* common mask {{PlanckPapers|planck2013-p06}}<br />
* compact sources catalog<br />
<br />
; High-l spectrum (<math>50 < \ell < 2500</math>): <br />
<br />
* 100, 143, 143x217 and 217 GHz spectra and their covariance matrix (Sec. 2 in {{PlanckPapers|planck2013-p08}})<br />
* best-fit foreground templates and inter-frequency calibration factors (Table 5 of {{PlanckPapers|planck2013-p11}})<br />
* Beam transfer function uncertainties {{PlanckPapers|planck2013-p03c}}<br />
=== File names and Meta data ===<br />
<br />
<br />
The CMB spectrum and its covariance matrix are distributed in a single FITS file named <br />
* ''{{PLASingleFile | fileType=cosmo | name=COM_PowerSpect_CMB_R1.10.fits | link=COM_PowerSpect_CMB_R1.10.fits}}'' <br />
<br />
which contains 3 extensions<br />
<br />
; LOW-ELL (BINTABLE)<br />
: with the low ell part of the spectrum, not binned, and for l=2-49. The table columns are<br />
# ''ELL'' (integer): multipole number<br />
# ''D_ELL'' (float): $D_l$ as described below<br />
# ''ERRUP'' (float): the upward uncertainty<br />
# ''ERRDOWN'' (float): the downward uncertainty<br />
<br />
; HIGH-ELL (BINTABLE)<br />
: with the high-ell part of the spectrum, binned into 74 bins covering <math>\langle l \rangle = 47-2419\ </math> in bins of width <math>l=31</math> (with the exception of the last 4 bins that are wider). The table columns are as follows:<br />
# ''ELL'' (integer): mean multipole number of bin<br />
# ''L_MIN'' (integer): lowest multipole of bin<br />
# ''L_MAX'' (integer): highest multipole of bin<br />
# ''D_ELL'' (float): $D_l$ as described below<br />
# ''ERR'' (float): the uncertainty<br />
<br />
; COV-MAT (IMAGE)<br />
: with the covariance matrix of the high-ell part of the spectrum in a 74x74 pixel image, i.e., covering the same bins as the ''HIGH-ELL'' table.<br />
<br />
The spectra give $D_\ell = \ell(\ell+1)C_\ell / 2\pi$ in units of $\mu\, K^2$, and the covariance matrix is in units of $\mu\, K^4$. The spectra are shown in the figure below, in blue and red for the low- and high-<math>\ell</math> parts, respectively, and with the error bars for the high-ell part only in order to avoid confusion.<br />
<br />
[[File: CMBspect.jpg|thumb|center|700px|'''CMB spectrum. Linear x-scale; error bars only at high <math>\ell</math>.''']]<br />
<br />
The CMB spectrum is also given in a simple text comma-separated file:<br />
* ''{{PLASingleFile | fileType=cosmo | name=COM_PowerSpect_CMB_R1.10.txt |link=COM_PowerSpect_CMB_R1.10.txt}}''<br />
<br />
==Likelihood==<br />
TO BE WRITTEN.<br />
<!-- <br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
The likelihood code (and the data that comes with it) used to compute the likelihood of a model that predicts the CMB power spectra, lensing power spectrum, together with some foreground and some instrumental parameters. The data files are built primarily from the Planck mission results, but include also some results from the WMAP-9 data release. The data files are written in a specific format that can only be read by the code. The code consists in a c/f90 library, along with some optional tools in python. The code is used to read the data files, and given model power spectra and nuisance parameters it computes the log likelihood of that model. <br />
<br />
Detailed description of the installation and usage of the likelihood code and data is provided in the package. The package includes five data files: four for the CMB likelihoods and one for the lensing likelihood. All of the likelihoods delivered are described in detail in the {{PlanckPapers|planck2013-p08|1|Power spectrum & Likelihood Paper}} (for the CMB based likelihood) and in the {{PlanckPapers|planck2013-p12|1|Lensing Paper}} (for the lensing likelihood) .<br />
<br />
The CMB full likelihood has been divided into four parts to allow using selectively different ranges of multipoles. It also reflects the fact that the mathematical approximations used for those different parts are very different, as is the underlying data. In detail, we distribute<br />
* one low-<math>\ell</math> temperature only likelihood (commander), <br />
* one low-<math>\ell</math> temperature and polarisation likelihood (lowlike), and <br />
* one higl-<math>\ell</math> likelihood CAMspec. <br />
<br />
The ''Commander'' likelihood covers the multipoles 2 to 49. It uses a semi-analytic method to sample the low-<math>\ell</math> temperature likelihood on an intermediate product of one of the component separated maps. The samples are used along with an analytical approximation of the likelihood posterior to perform the likelihood computation in the code. See {{PlanckPapers|planck2013-p08}} section 8.1 for more details.<br />
<br />
The ''lowlike'' likelihood covers the multipoles 2 to 32 for temperature and polarization data. Since Planck is not releasing polarisation data at this time, the polarization map from WMAP9 is used instead. A temperature map is needed to perform the computation nevertheless, and we use here the same commander map. The likelihood is computed using a map-based approximation at low resolution and a master one at intermediate resolution, as in WMAP. The likelihood code actually calls a very slightly modified version of the WMAP9 code. This piece of the likelihood essentially provides a prior on the optical depth and has almost no other impact on cosmological parameter estimation. As such it could be replaced by a simple prior, and a user can decide to do so, which is one of the motivation to leave the three pieces of the CMB likelihood as different data packages; see {{PlanckPapers|planck2013-p08}} section 8.3 for more details. Note that the version of the WMAP code used here (code version v1.0) does not perform any test on the positive definiteness of the TT, TE, EE covariance matrices, and will return a null log likelihood in the unphysical cases where the absolute value of TE is too large. This will be corrected in a later version.<br />
<br />
The ''CAMspec'' likelihood covers the multipoles 50 to 2500 for temperature only. The likelihood is computed using a quadratic approximation, including mode to mode correlations that have been precomputed on a fiducial model. The likelihood uses data from the 100, 143 and 217 GHz channels. To do so it models the foreground at each frequency using the model described in the likelihood paper. Uncertainties on the relative calibration and on the beam transfer functions are included either as parametric models, or marginalized and integrated in the covariance matrix. Detailed description of the different nuisance parameters is given below. Priors are included in the likelihood on the CIB spectral index, relative calibration factors and beam error eigenmodes. See {{PlanckPapers|planck2013-p08}} section 2.1 for more details.<br />
<br />
The ''act/spt'' likelihood covers the multipoles 1500 to 10000 for temperature. It is described in{{BibCite|dun2013}}{{BibCite|Keis2011}}{{BibCite|Reic2012}}. It uses the code and data that can be retrieved from the [http://lambda.gsfc.nasa.gov/ Lambda archive] for [http://lambda.gsfc.nasa.gov/product/act/act_prod_table.cfm ACT] and [http://lambda.gsfc.nasa.gov/product/spt/spt_prod_table.cfm SPT]. It has been slightly modified to use a thermal and kinetic SZ model that matches the one used in CAMspec. As stated in{{BibCite|dun2013}}, the dust parameters a_ge and a_gs must be explored with the following priors: a_ge = 0.8 ± 0.2 and a_gs = 0.4 ± 0.2. Those priors are not included in the log likelihood computed by the code.<br />
<br />
The ''lensing'' likelihood covers the multipoles 40 to 400 using the result of the [[Specially_processed_maps | lensing reconstruction]]. It uses a quadratic approximation for the likelihood, with a covariance matrix including the marginalized contribution of the beam transfer function uncertainties, the diffuse point source correction uncertainties and the cosmological model uncertainty affecting the first order non-gaussian bias (N1). The correlation between temperature and lensing is not taken into account. Cosmological uncertainty effects on the normalization are dealt with using a first order renormalization procedure. This means that the code will need both the TT and $\phi\phi$ power spectrum up to <math>\ell</math> = 2048 to correctly perform the integrals needed for the renormalization. Nevertheless, the code will only produce an estimate based on the data between <math>\ell</math> = 40 to 400. See {{PlanckPapers|planck2013-p12}} section 6.1 for more details.<br />
</span><br />
<span style="color:red">OUTSTANDING: description of likelihood masks </span><br />
==Production process==<br />
<br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
The code is based on some basic routines from the libpmc library in the [http://arxiv.org/abs/1101.0950 cosmoPMC] code. It also uses some code from the [http://lambda.gsfc.nasa.gov/product/map/dr5/likelihood_get.cfm WMAP9 likelihood] for the lowlike likelihood and{{BibCite|dun2013}}{{BibCite|Keis2011}}{{BibCite|Reic2012}} for the act/spt one. The rest of the code has been specifically written for the Planck data. Each likelihood file has been processed using a different and dedicated pipeline as described in the likelihood paper {{PlanckPapers|planck2013-p08}} (section 2 and 8) and in the lensing paper {{PlanckPapers|planck2013-p12}} (section 6.1). We refer the reader to those papers for full details. The data are then encapsulated into the specific file format.<br />
<br />
Each dataset comes with its own self check. Whenever the code is used to read a data file, a computation will be done against an included test spectrum/nuisance parameter, and the log-likelihood will be displayed along with the expected result. Difference of the order of 10<math>^{-6}</math> or less are expected depending of the architecture.<br />
<br />
==Inputs==<br />
<br />
===Likelihood===<br />
<br />
; ''commander'' :<br />
* all Planck channels maps<br />
* compact source catalogs<br />
* common masks<br />
* beam transfer functions for all channels<br />
<br />
; ''lowlike'' :<br />
* WMAP9 likelihood data<br />
* Low-<math>\ell</math> Commander map<br />
<br />
; ''CAMspec'' :<br />
* 100, 143 and 217 GHz detector and detsets maps<br />
* 857GHz channel map<br />
* compact source catalog<br />
* common masks (0,1 & 3)<br />
* beam transfer function and error eigenmodes and covariance for 100, 143 and 217 GHz detectors & detsets<br />
* theoretical templates for the tSZ and kSZ contributions<br />
* color corrections for the CIB emission for the 143 and 217GHz detectors and detsets<br />
* fiducial CMB model (bootstrapped from WMAP7 best fit spectrum) estimated noise contribution from the half-ring maps for 100, 143 and 217 GHz<br />
<br />
; ''lensing'' :<br />
* the lensing map<br />
* beam error eigenmodes and covariance for the 143 and 217GHz channel maps<br />
* fiducial CMB model (from Planck cosmological parameter best fit)<br />
<br />
; ''act/spt'' :<br />
* data and code from [http://lambda.gsfc.nasa.gov/product/act/act_fulllikelihood_get.cfm here]<br />
* the tSZ andkSZ template are changed to match those of CAMspec<br />
<br />
== File names and Meta data ==<br />
<br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
<br />
'''Likelihood source code'''<br />
<br />
The source code is in the file<br />
: {{PLASingleFile |fileType=cosmo|name=COM_Code_Likelihood-v1.0_R1.10.tar.gz|link=COM_Code_Likelihood-v1.0_R1.10.tar.gz}} (C, f90 and python likelihood library and tools)<br />
<br />
'''Likelihood data packages'''<br />
<br />
The {{PLALikelihood|type=Data|link=data packages}} are<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-commander_R1.10.tar.gz | link=COM_Data_Likelihood-commander_R1.10.tar.gz}}'' (low-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-lowlike_R1.10.tar.gz | link=COM_Data_Likelihood-lowlike_R1.10.tar.gz}}'' (low-ell TE,EE,BB likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-CAMspec_R1.10.tar.gz | link=COM_Data_Likelihood-CAMspec_R1.10.tar.gz}}'' (high-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-actspt_R1.10.tar | link=COM_Data_Likelihood-actspt_R1.10.tar.gz}}'' (high-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-lensing_R1.10.tar.gz | link=COM_Data_Likelihood-lensing_R1.10.tar.gz}}'' (lensing likelihood)<br />
<br />
Untar and unzip all files to recover the code and likelihood data. Each package comes with a README file; follow the instructions inclosed to<br />
build the code and use it. To compute the CMB likelihood one has to sum the log likelihood of each of the commander_v4.1_lm49.clik, lowlike_v222.clik and CAMspec_v6.2TN_2013_02_26.clik, actspt_2013_01.clik. To compute the CMB+lensing likelihood, one has to sum the log likelihood of all 5 files.<br />
<br />
The CMB and lensing likelihood format are different. The CMB files have the termination .clik, the lensing one .clik_lensing. The lensing data being simpler (due to the less detailled modeling permitted by the lower signal-noise), the file is a simple ascii file containing all the data along with comments describing it, and linking the different quantities to the lensing paper. The CMB file format is more complex and must accommodate different forms of data (maps, power spectrum, distribution samples, covariance matrices...). It consists of a tree structure containing the data. At each level of the tree structure a given directory can contain array data (in the form of FITS files or ascii files for strings) and scalar data (joined in a single ascii file "_mdb"). Those files are not user modifiable and do not contain interesting meta data for the user. Tools to manipulate those files are included in the code package as optional python tools. They are documented in the code package.<br />
<br />
'''Likelihood masks'''<br />
<br />
The masks used in the Likelihood paper {{PlanckPapers|planck2013-p08}} are found in<br />
{{PLASingleFile|fileType=map|name=COM_Mask_Likelihood_2048_R1.10.fits|link=COM_Mask_Likelihood_2048_R1.10.fits}}<br />
<br />
which contains ten masks which are written into a single ''BINTABLE'' extension of 10 columns by 50331648 rows (the number of Healpix pixels in an Nside = 2048 map). The structure is as follows, where the column names are the names of the masks: <br />
<br />
{| border="1" cellpadding="3" cellspacing="0" align="center" style="text-align:left" width=800px<br />
|+ '''Likelihodd masks file data structure'''<br />
|- bgcolor="ffdead" <br />
!colspan="4" | 1. EXTNAME = 'MSK-LIKE' : Data columns<br />
|- bgcolor="ffdead" <br />
! Column Name || Data Type || Units || Description<br />
|-<br />
|CL31 || Real*4 || none || mask<br />
|-<br />
|CL39 || Real*4 || none || mask<br />
|-<br />
|CL49 || Real*4 || none || mask<br />
|-<br />
|G22 || Real*4 || none || mask <br />
|-<br />
|G35 || Real*4 || none || mask<br />
|-<br />
|G45 || Real*4 || none || mask<br />
|-<br />
|G56 || Real*4 || none || mask<br />
|-<br />
|G65 || Real*4 || none || mask<br />
|-<br />
|PS96 || Real*4 || none || mask<br />
|-<br />
|PSA82 || Real*4 || none || mask<br />
|-<br />
|- bgcolor="ffdead" <br />
! Keyword || Data Type || Value || Description<br />
|-<br />
|PIXTYPE || string || HEALPIX ||<br />
|-<br />
|COORDSYS || string || GALACTIC ||Coordinate system <br />
|-<br />
|ORDERING || string || NESTED || Healpix ordering<br />
|-<br />
|NSIDE || Int || 2048 || Healpix Nside <br />
|-<br />
|FIRSTPIX || Int*4 || 0 || First pixel number<br />
|-<br />
|LASTPIX || Int*4 || 50331647 || Last pixel number, for LFI and HFI, respectively<br />
<br />
|}<br />
--><br />
== References ==<br />
<References /><br />
<br />
<br />
<br />
[[Category:Mission products|008]]</div>Sgallihttps://wiki.cosmos.esa.int/planckpla2015/index.php?title=CMB_spectrum_%26_Likelihood_Code&diff=11068CMB spectrum & Likelihood Code2015-02-04T00:16:16Z<p>Sgalli: </p>
<hr />
<div>{{DISPLAYTITLE:CMB spectrum and likelihood code}}<br />
<br />
==CMB spectra==<br />
<br />
===General description===<br />
<br />
<br />
The Planck best-fit CMB temperature power spectrum, shown in figure below, covers the wide range of multipoles <math> \ell </math> = 2-2508. Over the multipole range <math> \ell </math> = 2–29, the power spectrum is derived from a component-separation algorithm, ''Commander'', <span style="color:red"> UPDATE COMMANDER: applied to maps in the frequency range 30–353 GHz over 91% of the sky {{PlanckPapers|planck2013-p06}} . The asymmetric error bars associated to this spectrum are the 68% confidence limits and include the uncertainties due to foreground subtraction </span>. For multipoles equal or greater than <math>\ell=30</math>, instead, the spectrum is derived from the ''Plik'' likelihood {{PlanckPapers|planck2014-a13}} by optimally combining the spectra in the frequency range 100-217 GHz, and correcting them for unresolved foregrounds. Associated 1-sigma errors include beam uncertainties. Both ''Commander'' and ''Plik'' are described in more details in the sections below.<br />
<br />
[[File: Planck2014 TT Dl NORES bin30 w180mm.jpeg|thumb|center|700px|'''CMB spectrum. Logarithmic x-scale up to <math>\ell=30</math>, linear at higher <math>\ell</math>; all points with error bars. The red line is the Planck best-fit primordial power spectrum (cf Planck TT+lowP in Table 3 of {{PlanckPapers|planck2014-a15}}).''']]<br />
===Production process===<br />
<br />
<span style="color:red"> UPDATE COMMANDER<br />
The <math>\ell</math> < 50 part of the Planck power spectrum is derived from the Commander approach, which implements Bayesian component separation in pixel space, fitting a parametric model to the data by sampling the posterior distribution for the model parameters {{PlanckPapers|planck2013-p06}}. The power spectrum at any multipole <math>\ell</math> is given as the maximum probability point for the posterior <math>C_\ell</math> distribution, marginalized over the other multipoles, and the error bars are 68% confidence level {{PlanckPapers|planck2013-p08}}. <br />
</span><br />
The <math>\ell</math> > 30 part of the CMB temperature power spectrum has been derived by the Plik likelihood, a code that implements a pseudo-Cl based technique, extensively described in Sec. 2 and the Appendix of {{PlanckPapers|planck2013-p08}}. Frequency spectra are computed as cross-spectra between half-mission maps. Mask and multipole range choices for each frequency spectrum are summarized in Section 3.3 of {{PlanckPapers|planck2014-p15}} and in {{PlanckPapers|planck2014-p13}}. The final power spectrum is an optimal combination of the 100, 143, 143x217 and 217 GHz spectra, corrected for the best-fit unresolved foregrounds and inter-frequency calibration factors, as derived from the full likelihood analysis (cf Planck+TT+lowP in Table 3 of {{PlanckPapers|planck2014-p15}}). A thorough description of the models of unresolved foregrounds is given in {{PlanckPapers|planck2014-p13}}. The spectrum covariance matrix accounts for cosmic variance and noise contributions, together with beam uncertainties. The <math>\ell</math> > 30 CMB TT spectrum and associated covariance matrix are available in two formats:<br />
#Unbinned, with 2479 bandpowers (<math>\ell=30-2508</math>).<br />
#Binned, in bins of <math> \Delta\ell=30 </math>, with 83 bandpowers in total. We bin the <math> C_\ell </math> power spectrum with a weight proportional to <math> \ell (\ell+1) </math>, so that the <math> C_{\ell_b} </math> binned bandpower centered in <math> \ell_b </math> is: <math> \\ C_{\ell_b}=\Sigma_{\ell \in b} w^b_\ell C_\ell \quad \text{with} \quad w^b_\ell=\frac{\ell (\ell+1)}{\Sigma_{\ell \in b} \ell (\ell+1)}. \\</math> Equivalently, using the matrix formalism, we can construct the binning matrix B as: <math>\\ B_{\ell \ell_b}=w^{\ell_b}_\ell \\ </math> where B is a <math> n_b\times n_\ell</math> matrix, with <math>n_b=83</math> the number of bins and <math>n_\ell=2479</math> the number of unbinned multipoles. Thus: <math> \\ \vec{C}^{binned}_{\ell_b}=B \vec{C}_\ell \\ cov^{binned}= B cov B^T \\ \ell_b=B \ell \\ </math> Here, \vec{C}^{binned}_{\ell_b} (\vec{C}_{\ell}) indicates the vector containing all the binned (unbinned) bandpowers. Note that we use the binning matrix also to calculate the weighted multipole average in each bin <math>\ell_b</math>. The binned <math>D_{\ell_B}</math> power spectra are then calculated as: <math> \newline D_{\ell_b}=\ell_b (\ell_b+1)/2/\pi C_{\ell_b} \newline </math>.<br />
===Inputs===<br />
<br />
<br />
; Low-l spectrum (<math>\ell < 50</math>):<br />
* frequency maps from 30–353 GHz<br />
* common mask {{PlanckPapers|planck2013-p06}}<br />
* compact sources catalog<br />
<br />
; High-l spectrum (<math>50 < \ell < 2500</math>): <br />
<br />
* 100, 143, 143x217 and 217 GHz spectra and their covariance matrix (Sec. 2 in {{PlanckPapers|planck2013-p08}})<br />
* best-fit foreground templates and inter-frequency calibration factors (Table 5 of {{PlanckPapers|planck2013-p11}})<br />
* Beam transfer function uncertainties {{PlanckPapers|planck2013-p03c}}<br />
=== File names and Meta data ===<br />
<br />
<br />
The CMB spectrum and its covariance matrix are distributed in a single FITS file named <br />
* ''{{PLASingleFile | fileType=cosmo | name=COM_PowerSpect_CMB_R1.10.fits | link=COM_PowerSpect_CMB_R1.10.fits}}'' <br />
<br />
which contains 3 extensions<br />
<br />
; LOW-ELL (BINTABLE)<br />
: with the low ell part of the spectrum, not binned, and for l=2-49. The table columns are<br />
# ''ELL'' (integer): multipole number<br />
# ''D_ELL'' (float): $D_l$ as described below<br />
# ''ERRUP'' (float): the upward uncertainty<br />
# ''ERRDOWN'' (float): the downward uncertainty<br />
<br />
; HIGH-ELL (BINTABLE)<br />
: with the high-ell part of the spectrum, binned into 74 bins covering <math>\langle l \rangle = 47-2419\ </math> in bins of width <math>l=31</math> (with the exception of the last 4 bins that are wider). The table columns are as follows:<br />
# ''ELL'' (integer): mean multipole number of bin<br />
# ''L_MIN'' (integer): lowest multipole of bin<br />
# ''L_MAX'' (integer): highest multipole of bin<br />
# ''D_ELL'' (float): $D_l$ as described below<br />
# ''ERR'' (float): the uncertainty<br />
<br />
; COV-MAT (IMAGE)<br />
: with the covariance matrix of the high-ell part of the spectrum in a 74x74 pixel image, i.e., covering the same bins as the ''HIGH-ELL'' table.<br />
<br />
The spectra give $D_\ell = \ell(\ell+1)C_\ell / 2\pi$ in units of $\mu\, K^2$, and the covariance matrix is in units of $\mu\, K^4$. The spectra are shown in the figure below, in blue and red for the low- and high-<math>\ell</math> parts, respectively, and with the error bars for the high-ell part only in order to avoid confusion.<br />
<br />
[[File: CMBspect.jpg|thumb|center|700px|'''CMB spectrum. Linear x-scale; error bars only at high <math>\ell</math>.''']]<br />
<br />
The CMB spectrum is also given in a simple text comma-separated file:<br />
* ''{{PLASingleFile | fileType=cosmo | name=COM_PowerSpect_CMB_R1.10.txt |link=COM_PowerSpect_CMB_R1.10.txt}}''<br />
<br />
==Likelihood==<br />
TO BE WRITTEN.<br />
<!-- <br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
The likelihood code (and the data that comes with it) used to compute the likelihood of a model that predicts the CMB power spectra, lensing power spectrum, together with some foreground and some instrumental parameters. The data files are built primarily from the Planck mission results, but include also some results from the WMAP-9 data release. The data files are written in a specific format that can only be read by the code. The code consists in a c/f90 library, along with some optional tools in python. The code is used to read the data files, and given model power spectra and nuisance parameters it computes the log likelihood of that model. <br />
<br />
Detailed description of the installation and usage of the likelihood code and data is provided in the package. The package includes five data files: four for the CMB likelihoods and one for the lensing likelihood. All of the likelihoods delivered are described in detail in the {{PlanckPapers|planck2013-p08|1|Power spectrum & Likelihood Paper}} (for the CMB based likelihood) and in the {{PlanckPapers|planck2013-p12|1|Lensing Paper}} (for the lensing likelihood) .<br />
<br />
The CMB full likelihood has been divided into four parts to allow using selectively different ranges of multipoles. It also reflects the fact that the mathematical approximations used for those different parts are very different, as is the underlying data. In detail, we distribute<br />
* one low-<math>\ell</math> temperature only likelihood (commander), <br />
* one low-<math>\ell</math> temperature and polarisation likelihood (lowlike), and <br />
* one higl-<math>\ell</math> likelihood CAMspec. <br />
<br />
The ''Commander'' likelihood covers the multipoles 2 to 49. It uses a semi-analytic method to sample the low-<math>\ell</math> temperature likelihood on an intermediate product of one of the component separated maps. The samples are used along with an analytical approximation of the likelihood posterior to perform the likelihood computation in the code. See {{PlanckPapers|planck2013-p08}} section 8.1 for more details.<br />
<br />
The ''lowlike'' likelihood covers the multipoles 2 to 32 for temperature and polarization data. Since Planck is not releasing polarisation data at this time, the polarization map from WMAP9 is used instead. A temperature map is needed to perform the computation nevertheless, and we use here the same commander map. The likelihood is computed using a map-based approximation at low resolution and a master one at intermediate resolution, as in WMAP. The likelihood code actually calls a very slightly modified version of the WMAP9 code. This piece of the likelihood essentially provides a prior on the optical depth and has almost no other impact on cosmological parameter estimation. As such it could be replaced by a simple prior, and a user can decide to do so, which is one of the motivation to leave the three pieces of the CMB likelihood as different data packages; see {{PlanckPapers|planck2013-p08}} section 8.3 for more details. Note that the version of the WMAP code used here (code version v1.0) does not perform any test on the positive definiteness of the TT, TE, EE covariance matrices, and will return a null log likelihood in the unphysical cases where the absolute value of TE is too large. This will be corrected in a later version.<br />
<br />
The ''CAMspec'' likelihood covers the multipoles 50 to 2500 for temperature only. The likelihood is computed using a quadratic approximation, including mode to mode correlations that have been precomputed on a fiducial model. The likelihood uses data from the 100, 143 and 217 GHz channels. To do so it models the foreground at each frequency using the model described in the likelihood paper. Uncertainties on the relative calibration and on the beam transfer functions are included either as parametric models, or marginalized and integrated in the covariance matrix. Detailed description of the different nuisance parameters is given below. Priors are included in the likelihood on the CIB spectral index, relative calibration factors and beam error eigenmodes. See {{PlanckPapers|planck2013-p08}} section 2.1 for more details.<br />
<br />
The ''act/spt'' likelihood covers the multipoles 1500 to 10000 for temperature. It is described in{{BibCite|dun2013}}{{BibCite|Keis2011}}{{BibCite|Reic2012}}. It uses the code and data that can be retrieved from the [http://lambda.gsfc.nasa.gov/ Lambda archive] for [http://lambda.gsfc.nasa.gov/product/act/act_prod_table.cfm ACT] and [http://lambda.gsfc.nasa.gov/product/spt/spt_prod_table.cfm SPT]. It has been slightly modified to use a thermal and kinetic SZ model that matches the one used in CAMspec. As stated in{{BibCite|dun2013}}, the dust parameters a_ge and a_gs must be explored with the following priors: a_ge = 0.8 ± 0.2 and a_gs = 0.4 ± 0.2. Those priors are not included in the log likelihood computed by the code.<br />
<br />
The ''lensing'' likelihood covers the multipoles 40 to 400 using the result of the [[Specially_processed_maps | lensing reconstruction]]. It uses a quadratic approximation for the likelihood, with a covariance matrix including the marginalized contribution of the beam transfer function uncertainties, the diffuse point source correction uncertainties and the cosmological model uncertainty affecting the first order non-gaussian bias (N1). The correlation between temperature and lensing is not taken into account. Cosmological uncertainty effects on the normalization are dealt with using a first order renormalization procedure. This means that the code will need both the TT and $\phi\phi$ power spectrum up to <math>\ell</math> = 2048 to correctly perform the integrals needed for the renormalization. Nevertheless, the code will only produce an estimate based on the data between <math>\ell</math> = 40 to 400. See {{PlanckPapers|planck2013-p12}} section 6.1 for more details.<br />
</span><br />
<span style="color:red">OUTSTANDING: description of likelihood masks </span><br />
==Production process==<br />
<br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
The code is based on some basic routines from the libpmc library in the [http://arxiv.org/abs/1101.0950 cosmoPMC] code. It also uses some code from the [http://lambda.gsfc.nasa.gov/product/map/dr5/likelihood_get.cfm WMAP9 likelihood] for the lowlike likelihood and{{BibCite|dun2013}}{{BibCite|Keis2011}}{{BibCite|Reic2012}} for the act/spt one. The rest of the code has been specifically written for the Planck data. Each likelihood file has been processed using a different and dedicated pipeline as described in the likelihood paper {{PlanckPapers|planck2013-p08}} (section 2 and 8) and in the lensing paper {{PlanckPapers|planck2013-p12}} (section 6.1). We refer the reader to those papers for full details. The data are then encapsulated into the specific file format.<br />
<br />
Each dataset comes with its own self check. Whenever the code is used to read a data file, a computation will be done against an included test spectrum/nuisance parameter, and the log-likelihood will be displayed along with the expected result. Difference of the order of 10<math>^{-6}</math> or less are expected depending of the architecture.<br />
<br />
==Inputs==<br />
<br />
===Likelihood===<br />
<br />
; ''commander'' :<br />
* all Planck channels maps<br />
* compact source catalogs<br />
* common masks<br />
* beam transfer functions for all channels<br />
<br />
; ''lowlike'' :<br />
* WMAP9 likelihood data<br />
* Low-<math>\ell</math> Commander map<br />
<br />
; ''CAMspec'' :<br />
* 100, 143 and 217 GHz detector and detsets maps<br />
* 857GHz channel map<br />
* compact source catalog<br />
* common masks (0,1 & 3)<br />
* beam transfer function and error eigenmodes and covariance for 100, 143 and 217 GHz detectors & detsets<br />
* theoretical templates for the tSZ and kSZ contributions<br />
* color corrections for the CIB emission for the 143 and 217GHz detectors and detsets<br />
* fiducial CMB model (bootstrapped from WMAP7 best fit spectrum) estimated noise contribution from the half-ring maps for 100, 143 and 217 GHz<br />
<br />
; ''lensing'' :<br />
* the lensing map<br />
* beam error eigenmodes and covariance for the 143 and 217GHz channel maps<br />
* fiducial CMB model (from Planck cosmological parameter best fit)<br />
<br />
; ''act/spt'' :<br />
* data and code from [http://lambda.gsfc.nasa.gov/product/act/act_fulllikelihood_get.cfm here]<br />
* the tSZ andkSZ template are changed to match those of CAMspec<br />
<br />
== File names and Meta data ==<br />
<br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
<br />
'''Likelihood source code'''<br />
<br />
The source code is in the file<br />
: {{PLASingleFile |fileType=cosmo|name=COM_Code_Likelihood-v1.0_R1.10.tar.gz|link=COM_Code_Likelihood-v1.0_R1.10.tar.gz}} (C, f90 and python likelihood library and tools)<br />
<br />
'''Likelihood data packages'''<br />
<br />
The {{PLALikelihood|type=Data|link=data packages}} are<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-commander_R1.10.tar.gz | link=COM_Data_Likelihood-commander_R1.10.tar.gz}}'' (low-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-lowlike_R1.10.tar.gz | link=COM_Data_Likelihood-lowlike_R1.10.tar.gz}}'' (low-ell TE,EE,BB likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-CAMspec_R1.10.tar.gz | link=COM_Data_Likelihood-CAMspec_R1.10.tar.gz}}'' (high-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-actspt_R1.10.tar | link=COM_Data_Likelihood-actspt_R1.10.tar.gz}}'' (high-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-lensing_R1.10.tar.gz | link=COM_Data_Likelihood-lensing_R1.10.tar.gz}}'' (lensing likelihood)<br />
<br />
Untar and unzip all files to recover the code and likelihood data. Each package comes with a README file; follow the instructions inclosed to<br />
build the code and use it. To compute the CMB likelihood one has to sum the log likelihood of each of the commander_v4.1_lm49.clik, lowlike_v222.clik and CAMspec_v6.2TN_2013_02_26.clik, actspt_2013_01.clik. To compute the CMB+lensing likelihood, one has to sum the log likelihood of all 5 files.<br />
<br />
The CMB and lensing likelihood format are different. The CMB files have the termination .clik, the lensing one .clik_lensing. The lensing data being simpler (due to the less detailled modeling permitted by the lower signal-noise), the file is a simple ascii file containing all the data along with comments describing it, and linking the different quantities to the lensing paper. The CMB file format is more complex and must accommodate different forms of data (maps, power spectrum, distribution samples, covariance matrices...). It consists of a tree structure containing the data. At each level of the tree structure a given directory can contain array data (in the form of FITS files or ascii files for strings) and scalar data (joined in a single ascii file "_mdb"). Those files are not user modifiable and do not contain interesting meta data for the user. Tools to manipulate those files are included in the code package as optional python tools. They are documented in the code package.<br />
<br />
'''Likelihood masks'''<br />
<br />
The masks used in the Likelihood paper {{PlanckPapers|planck2013-p08}} are found in<br />
{{PLASingleFile|fileType=map|name=COM_Mask_Likelihood_2048_R1.10.fits|link=COM_Mask_Likelihood_2048_R1.10.fits}}<br />
<br />
which contains ten masks which are written into a single ''BINTABLE'' extension of 10 columns by 50331648 rows (the number of Healpix pixels in an Nside = 2048 map). The structure is as follows, where the column names are the names of the masks: <br />
<br />
{| border="1" cellpadding="3" cellspacing="0" align="center" style="text-align:left" width=800px<br />
|+ '''Likelihodd masks file data structure'''<br />
|- bgcolor="ffdead" <br />
!colspan="4" | 1. EXTNAME = 'MSK-LIKE' : Data columns<br />
|- bgcolor="ffdead" <br />
! Column Name || Data Type || Units || Description<br />
|-<br />
|CL31 || Real*4 || none || mask<br />
|-<br />
|CL39 || Real*4 || none || mask<br />
|-<br />
|CL49 || Real*4 || none || mask<br />
|-<br />
|G22 || Real*4 || none || mask <br />
|-<br />
|G35 || Real*4 || none || mask<br />
|-<br />
|G45 || Real*4 || none || mask<br />
|-<br />
|G56 || Real*4 || none || mask<br />
|-<br />
|G65 || Real*4 || none || mask<br />
|-<br />
|PS96 || Real*4 || none || mask<br />
|-<br />
|PSA82 || Real*4 || none || mask<br />
|-<br />
|- bgcolor="ffdead" <br />
! Keyword || Data Type || Value || Description<br />
|-<br />
|PIXTYPE || string || HEALPIX ||<br />
|-<br />
|COORDSYS || string || GALACTIC ||Coordinate system <br />
|-<br />
|ORDERING || string || NESTED || Healpix ordering<br />
|-<br />
|NSIDE || Int || 2048 || Healpix Nside <br />
|-<br />
|FIRSTPIX || Int*4 || 0 || First pixel number<br />
|-<br />
|LASTPIX || Int*4 || 50331647 || Last pixel number, for LFI and HFI, respectively<br />
<br />
|}<br />
--><br />
== References ==<br />
<References /><br />
<br />
<br />
<br />
[[Category:Mission products|008]]</div>Sgallihttps://wiki.cosmos.esa.int/planckpla2015/index.php?title=CMB_spectrum_%26_Likelihood_Code&diff=11067CMB spectrum & Likelihood Code2015-02-04T00:14:44Z<p>Sgalli: </p>
<hr />
<div>{{DISPLAYTITLE:CMB spectrum and likelihood code}}<br />
<br />
==CMB spectra==<br />
<br />
===General description===<br />
<br />
<br />
The Planck best-fit CMB temperature power spectrum, shown in figure below, covers the wide range of multipoles <math> \ell </math> = 2-2508. Over the multipole range <math> \ell </math> = 2–29, the power spectrum is derived from a component-separation algorithm, ''Commander'', <span style="color:red"> UPDATE COMMANDER: applied to maps in the frequency range 30–353 GHz over 91% of the sky {{PlanckPapers|planck2013-p06}} . The asymmetric error bars associated to this spectrum are the 68% confidence limits and include the uncertainties due to foreground subtraction </span>. For multipoles equal or greater than <math>\ell=30</math>, instead, the spectrum is derived from the ''Plik'' likelihood {{PlanckPapers|planck2014-a13}} by optimally combining the spectra in the frequency range 100-217 GHz, and correcting them for unresolved foregrounds. Associated 1-sigma errors include beam uncertainties. Both ''Commander'' and ''Plik'' are described in more details in the sections below.<br />
<br />
[[File: Planck2014 TT Dl NORES bin30 w180mm.jpeg|thumb|center|700px|'''CMB spectrum. Logarithmic x-scale up to <math>\ell=30</math>, linear at higher <math>\ell</math>; all points with error bars. The red line is the Planck best-fit primordial power spectrum (cf Planck TT+lowP in Table 3 of {{PlanckPapers|planck2014-a15}}).''']]<br />
===Production process===<br />
<br />
<span style="color:red"> UPDATE COMMANDER<br />
The <math>\ell</math> < 50 part of the Planck power spectrum is derived from the Commander approach, which implements Bayesian component separation in pixel space, fitting a parametric model to the data by sampling the posterior distribution for the model parameters {{PlanckPapers|planck2013-p06}}. The power spectrum at any multipole <math>\ell</math> is given as the maximum probability point for the posterior <math>C_\ell</math> distribution, marginalized over the other multipoles, and the error bars are 68% confidence level {{PlanckPapers|planck2013-p08}}. <br />
</span><br />
The <math>\ell</math> > 30 part of the CMB temperature power spectrum has been derived by the Plik likelihood, a code that implements a pseudo-Cl based technique, extensively described in Sec. 2 and the Appendix of {{PlanckPapers|planck2013-p08}}. Frequency spectra are computed as cross-spectra between half-mission maps. Mask and multipole range choices for each frequency spectrum are summarized in Section 3.3 of {{PlanckPapers|planck2014-p15}} and in {{PlanckPapers|planck2014-p13}}. The final power spectrum is an optimal combination of the 100, 143, 143x217 and 217 GHz spectra, corrected for the best-fit unresolved foregrounds and inter-frequency calibration factors, as derived from the full likelihood analysis (cf Planck+TT+lowP in Table 3 of {{PlanckPapers|planck2014-p15}}). A thorough description of the models of unresolved foregrounds is given in {{PlanckPapers|planck2014-p13}}. The spectrum covariance matrix accounts for cosmic variance and noise contributions, together with beam uncertainties. The <math>\ell</math> > 30 CMB TT spectrum and associated covariance matrix are available in two formats:<br />
#Unbinned, with 2479 bandpowers (<math>\ell=30-2508</math>).<br />
#Binned, in bins of <math>\Delta\ell=30 </math>, with 83 bandpowers in total. We bin the <math>C_\ell</math> power spectrum with a weight proportional to <math> \ell (\ell+1) </math>, so that the <math> C_\ell_b </math> binned bandpower centered in <math> \ell_b </math> is: <math> \\ C_{\ell_b}=\Sigma_{\ell \in b} w^b_\ell C_\ell \quad \text{with} \quad w^b_\ell=\frac{\ell (\ell+1)}{\Sigma_{\ell \in b} \ell (\ell+1)}. \\</math> Equivalently, using the matrix formalism, we can construct the binning matrix B as: <math>\\ B_{\ell \ell_b}=w^{\ell_b}_\ell \\ </math> where B is a <math> n_b\times n_\ell</math> matrix, with <math>n_b=83</math> the number of bins and <math>n_\ell=2479</math> the number of unbinned multipoles. Thus: <math> \\ \vec{C}^{binned}_{\ell_b}=B \vec{C}_\ell \\ cov^{binned}= B cov B^T \\ \ell_b=B \ell \\ </math> Here, \vec{C}^{binned}_{\ell_b} (\vec{C}_{\ell}) indicates the vector containing all the binned (unbinned) bandpowers. Note that we use the binning matrix also to calculate the weighted multipole average in each bin <math>\ell_b</math>. The binned <math>D_{\ell_B}</math> power spectra are then calculated as: <math> \newline D_\ell_b=\ell_b (\ell_b+1)/2/\pi C_{\ell_b} \newline </math>.<br />
===Inputs===<br />
<br />
<br />
; Low-l spectrum (<math>\ell < 50</math>):<br />
* frequency maps from 30–353 GHz<br />
* common mask {{PlanckPapers|planck2013-p06}}<br />
* compact sources catalog<br />
<br />
; High-l spectrum (<math>50 < \ell < 2500</math>): <br />
<br />
* 100, 143, 143x217 and 217 GHz spectra and their covariance matrix (Sec. 2 in {{PlanckPapers|planck2013-p08}})<br />
* best-fit foreground templates and inter-frequency calibration factors (Table 5 of {{PlanckPapers|planck2013-p11}})<br />
* Beam transfer function uncertainties {{PlanckPapers|planck2013-p03c}}<br />
=== File names and Meta data ===<br />
<br />
<br />
The CMB spectrum and its covariance matrix are distributed in a single FITS file named <br />
* ''{{PLASingleFile | fileType=cosmo | name=COM_PowerSpect_CMB_R1.10.fits | link=COM_PowerSpect_CMB_R1.10.fits}}'' <br />
<br />
which contains 3 extensions<br />
<br />
; LOW-ELL (BINTABLE)<br />
: with the low ell part of the spectrum, not binned, and for l=2-49. The table columns are<br />
# ''ELL'' (integer): multipole number<br />
# ''D_ELL'' (float): $D_l$ as described below<br />
# ''ERRUP'' (float): the upward uncertainty<br />
# ''ERRDOWN'' (float): the downward uncertainty<br />
<br />
; HIGH-ELL (BINTABLE)<br />
: with the high-ell part of the spectrum, binned into 74 bins covering <math>\langle l \rangle = 47-2419\ </math> in bins of width <math>l=31</math> (with the exception of the last 4 bins that are wider). The table columns are as follows:<br />
# ''ELL'' (integer): mean multipole number of bin<br />
# ''L_MIN'' (integer): lowest multipole of bin<br />
# ''L_MAX'' (integer): highest multipole of bin<br />
# ''D_ELL'' (float): $D_l$ as described below<br />
# ''ERR'' (float): the uncertainty<br />
<br />
; COV-MAT (IMAGE)<br />
: with the covariance matrix of the high-ell part of the spectrum in a 74x74 pixel image, i.e., covering the same bins as the ''HIGH-ELL'' table.<br />
<br />
The spectra give $D_\ell = \ell(\ell+1)C_\ell / 2\pi$ in units of $\mu\, K^2$, and the covariance matrix is in units of $\mu\, K^4$. The spectra are shown in the figure below, in blue and red for the low- and high-<math>\ell</math> parts, respectively, and with the error bars for the high-ell part only in order to avoid confusion.<br />
<br />
[[File: CMBspect.jpg|thumb|center|700px|'''CMB spectrum. Linear x-scale; error bars only at high <math>\ell</math>.''']]<br />
<br />
The CMB spectrum is also given in a simple text comma-separated file:<br />
* ''{{PLASingleFile | fileType=cosmo | name=COM_PowerSpect_CMB_R1.10.txt |link=COM_PowerSpect_CMB_R1.10.txt}}''<br />
<br />
==Likelihood==<br />
TO BE WRITTEN.<br />
<!-- <br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
The likelihood code (and the data that comes with it) used to compute the likelihood of a model that predicts the CMB power spectra, lensing power spectrum, together with some foreground and some instrumental parameters. The data files are built primarily from the Planck mission results, but include also some results from the WMAP-9 data release. The data files are written in a specific format that can only be read by the code. The code consists in a c/f90 library, along with some optional tools in python. The code is used to read the data files, and given model power spectra and nuisance parameters it computes the log likelihood of that model. <br />
<br />
Detailed description of the installation and usage of the likelihood code and data is provided in the package. The package includes five data files: four for the CMB likelihoods and one for the lensing likelihood. All of the likelihoods delivered are described in detail in the {{PlanckPapers|planck2013-p08|1|Power spectrum & Likelihood Paper}} (for the CMB based likelihood) and in the {{PlanckPapers|planck2013-p12|1|Lensing Paper}} (for the lensing likelihood) .<br />
<br />
The CMB full likelihood has been divided into four parts to allow using selectively different ranges of multipoles. It also reflects the fact that the mathematical approximations used for those different parts are very different, as is the underlying data. In detail, we distribute<br />
* one low-<math>\ell</math> temperature only likelihood (commander), <br />
* one low-<math>\ell</math> temperature and polarisation likelihood (lowlike), and <br />
* one higl-<math>\ell</math> likelihood CAMspec. <br />
<br />
The ''Commander'' likelihood covers the multipoles 2 to 49. It uses a semi-analytic method to sample the low-<math>\ell</math> temperature likelihood on an intermediate product of one of the component separated maps. The samples are used along with an analytical approximation of the likelihood posterior to perform the likelihood computation in the code. See {{PlanckPapers|planck2013-p08}} section 8.1 for more details.<br />
<br />
The ''lowlike'' likelihood covers the multipoles 2 to 32 for temperature and polarization data. Since Planck is not releasing polarisation data at this time, the polarization map from WMAP9 is used instead. A temperature map is needed to perform the computation nevertheless, and we use here the same commander map. The likelihood is computed using a map-based approximation at low resolution and a master one at intermediate resolution, as in WMAP. The likelihood code actually calls a very slightly modified version of the WMAP9 code. This piece of the likelihood essentially provides a prior on the optical depth and has almost no other impact on cosmological parameter estimation. As such it could be replaced by a simple prior, and a user can decide to do so, which is one of the motivation to leave the three pieces of the CMB likelihood as different data packages; see {{PlanckPapers|planck2013-p08}} section 8.3 for more details. Note that the version of the WMAP code used here (code version v1.0) does not perform any test on the positive definiteness of the TT, TE, EE covariance matrices, and will return a null log likelihood in the unphysical cases where the absolute value of TE is too large. This will be corrected in a later version.<br />
<br />
The ''CAMspec'' likelihood covers the multipoles 50 to 2500 for temperature only. The likelihood is computed using a quadratic approximation, including mode to mode correlations that have been precomputed on a fiducial model. The likelihood uses data from the 100, 143 and 217 GHz channels. To do so it models the foreground at each frequency using the model described in the likelihood paper. Uncertainties on the relative calibration and on the beam transfer functions are included either as parametric models, or marginalized and integrated in the covariance matrix. Detailed description of the different nuisance parameters is given below. Priors are included in the likelihood on the CIB spectral index, relative calibration factors and beam error eigenmodes. See {{PlanckPapers|planck2013-p08}} section 2.1 for more details.<br />
<br />
The ''act/spt'' likelihood covers the multipoles 1500 to 10000 for temperature. It is described in{{BibCite|dun2013}}{{BibCite|Keis2011}}{{BibCite|Reic2012}}. It uses the code and data that can be retrieved from the [http://lambda.gsfc.nasa.gov/ Lambda archive] for [http://lambda.gsfc.nasa.gov/product/act/act_prod_table.cfm ACT] and [http://lambda.gsfc.nasa.gov/product/spt/spt_prod_table.cfm SPT]. It has been slightly modified to use a thermal and kinetic SZ model that matches the one used in CAMspec. As stated in{{BibCite|dun2013}}, the dust parameters a_ge and a_gs must be explored with the following priors: a_ge = 0.8 ± 0.2 and a_gs = 0.4 ± 0.2. Those priors are not included in the log likelihood computed by the code.<br />
<br />
The ''lensing'' likelihood covers the multipoles 40 to 400 using the result of the [[Specially_processed_maps | lensing reconstruction]]. It uses a quadratic approximation for the likelihood, with a covariance matrix including the marginalized contribution of the beam transfer function uncertainties, the diffuse point source correction uncertainties and the cosmological model uncertainty affecting the first order non-gaussian bias (N1). The correlation between temperature and lensing is not taken into account. Cosmological uncertainty effects on the normalization are dealt with using a first order renormalization procedure. This means that the code will need both the TT and $\phi\phi$ power spectrum up to <math>\ell</math> = 2048 to correctly perform the integrals needed for the renormalization. Nevertheless, the code will only produce an estimate based on the data between <math>\ell</math> = 40 to 400. See {{PlanckPapers|planck2013-p12}} section 6.1 for more details.<br />
</span><br />
<span style="color:red">OUTSTANDING: description of likelihood masks </span><br />
==Production process==<br />
<br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
The code is based on some basic routines from the libpmc library in the [http://arxiv.org/abs/1101.0950 cosmoPMC] code. It also uses some code from the [http://lambda.gsfc.nasa.gov/product/map/dr5/likelihood_get.cfm WMAP9 likelihood] for the lowlike likelihood and{{BibCite|dun2013}}{{BibCite|Keis2011}}{{BibCite|Reic2012}} for the act/spt one. The rest of the code has been specifically written for the Planck data. Each likelihood file has been processed using a different and dedicated pipeline as described in the likelihood paper {{PlanckPapers|planck2013-p08}} (section 2 and 8) and in the lensing paper {{PlanckPapers|planck2013-p12}} (section 6.1). We refer the reader to those papers for full details. The data are then encapsulated into the specific file format.<br />
<br />
Each dataset comes with its own self check. Whenever the code is used to read a data file, a computation will be done against an included test spectrum/nuisance parameter, and the log-likelihood will be displayed along with the expected result. Difference of the order of 10<math>^{-6}</math> or less are expected depending of the architecture.<br />
<br />
==Inputs==<br />
<br />
===Likelihood===<br />
<br />
; ''commander'' :<br />
* all Planck channels maps<br />
* compact source catalogs<br />
* common masks<br />
* beam transfer functions for all channels<br />
<br />
; ''lowlike'' :<br />
* WMAP9 likelihood data<br />
* Low-<math>\ell</math> Commander map<br />
<br />
; ''CAMspec'' :<br />
* 100, 143 and 217 GHz detector and detsets maps<br />
* 857GHz channel map<br />
* compact source catalog<br />
* common masks (0,1 & 3)<br />
* beam transfer function and error eigenmodes and covariance for 100, 143 and 217 GHz detectors & detsets<br />
* theoretical templates for the tSZ and kSZ contributions<br />
* color corrections for the CIB emission for the 143 and 217GHz detectors and detsets<br />
* fiducial CMB model (bootstrapped from WMAP7 best fit spectrum) estimated noise contribution from the half-ring maps for 100, 143 and 217 GHz<br />
<br />
; ''lensing'' :<br />
* the lensing map<br />
* beam error eigenmodes and covariance for the 143 and 217GHz channel maps<br />
* fiducial CMB model (from Planck cosmological parameter best fit)<br />
<br />
; ''act/spt'' :<br />
* data and code from [http://lambda.gsfc.nasa.gov/product/act/act_fulllikelihood_get.cfm here]<br />
* the tSZ andkSZ template are changed to match those of CAMspec<br />
<br />
== File names and Meta data ==<br />
<br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
<br />
'''Likelihood source code'''<br />
<br />
The source code is in the file<br />
: {{PLASingleFile |fileType=cosmo|name=COM_Code_Likelihood-v1.0_R1.10.tar.gz|link=COM_Code_Likelihood-v1.0_R1.10.tar.gz}} (C, f90 and python likelihood library and tools)<br />
<br />
'''Likelihood data packages'''<br />
<br />
The {{PLALikelihood|type=Data|link=data packages}} are<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-commander_R1.10.tar.gz | link=COM_Data_Likelihood-commander_R1.10.tar.gz}}'' (low-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-lowlike_R1.10.tar.gz | link=COM_Data_Likelihood-lowlike_R1.10.tar.gz}}'' (low-ell TE,EE,BB likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-CAMspec_R1.10.tar.gz | link=COM_Data_Likelihood-CAMspec_R1.10.tar.gz}}'' (high-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-actspt_R1.10.tar | link=COM_Data_Likelihood-actspt_R1.10.tar.gz}}'' (high-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-lensing_R1.10.tar.gz | link=COM_Data_Likelihood-lensing_R1.10.tar.gz}}'' (lensing likelihood)<br />
<br />
Untar and unzip all files to recover the code and likelihood data. Each package comes with a README file; follow the instructions inclosed to<br />
build the code and use it. To compute the CMB likelihood one has to sum the log likelihood of each of the commander_v4.1_lm49.clik, lowlike_v222.clik and CAMspec_v6.2TN_2013_02_26.clik, actspt_2013_01.clik. To compute the CMB+lensing likelihood, one has to sum the log likelihood of all 5 files.<br />
<br />
The CMB and lensing likelihood format are different. The CMB files have the termination .clik, the lensing one .clik_lensing. The lensing data being simpler (due to the less detailled modeling permitted by the lower signal-noise), the file is a simple ascii file containing all the data along with comments describing it, and linking the different quantities to the lensing paper. The CMB file format is more complex and must accommodate different forms of data (maps, power spectrum, distribution samples, covariance matrices...). It consists of a tree structure containing the data. At each level of the tree structure a given directory can contain array data (in the form of FITS files or ascii files for strings) and scalar data (joined in a single ascii file "_mdb"). Those files are not user modifiable and do not contain interesting meta data for the user. Tools to manipulate those files are included in the code package as optional python tools. They are documented in the code package.<br />
<br />
'''Likelihood masks'''<br />
<br />
The masks used in the Likelihood paper {{PlanckPapers|planck2013-p08}} are found in<br />
{{PLASingleFile|fileType=map|name=COM_Mask_Likelihood_2048_R1.10.fits|link=COM_Mask_Likelihood_2048_R1.10.fits}}<br />
<br />
which contains ten masks which are written into a single ''BINTABLE'' extension of 10 columns by 50331648 rows (the number of Healpix pixels in an Nside = 2048 map). The structure is as follows, where the column names are the names of the masks: <br />
<br />
{| border="1" cellpadding="3" cellspacing="0" align="center" style="text-align:left" width=800px<br />
|+ '''Likelihodd masks file data structure'''<br />
|- bgcolor="ffdead" <br />
!colspan="4" | 1. EXTNAME = 'MSK-LIKE' : Data columns<br />
|- bgcolor="ffdead" <br />
! Column Name || Data Type || Units || Description<br />
|-<br />
|CL31 || Real*4 || none || mask<br />
|-<br />
|CL39 || Real*4 || none || mask<br />
|-<br />
|CL49 || Real*4 || none || mask<br />
|-<br />
|G22 || Real*4 || none || mask <br />
|-<br />
|G35 || Real*4 || none || mask<br />
|-<br />
|G45 || Real*4 || none || mask<br />
|-<br />
|G56 || Real*4 || none || mask<br />
|-<br />
|G65 || Real*4 || none || mask<br />
|-<br />
|PS96 || Real*4 || none || mask<br />
|-<br />
|PSA82 || Real*4 || none || mask<br />
|-<br />
|- bgcolor="ffdead" <br />
! Keyword || Data Type || Value || Description<br />
|-<br />
|PIXTYPE || string || HEALPIX ||<br />
|-<br />
|COORDSYS || string || GALACTIC ||Coordinate system <br />
|-<br />
|ORDERING || string || NESTED || Healpix ordering<br />
|-<br />
|NSIDE || Int || 2048 || Healpix Nside <br />
|-<br />
|FIRSTPIX || Int*4 || 0 || First pixel number<br />
|-<br />
|LASTPIX || Int*4 || 50331647 || Last pixel number, for LFI and HFI, respectively<br />
<br />
|}<br />
--><br />
== References ==<br />
<References /><br />
<br />
<br />
<br />
[[Category:Mission products|008]]</div>Sgallihttps://wiki.cosmos.esa.int/planckpla2015/index.php?title=CMB_spectrum_%26_Likelihood_Code&diff=11066CMB spectrum & Likelihood Code2015-02-04T00:12:25Z<p>Sgalli: </p>
<hr />
<div>{{DISPLAYTITLE:CMB spectrum and likelihood code}}<br />
<br />
==CMB spectra==<br />
<br />
===General description===<br />
<br />
<br />
The Planck best-fit CMB temperature power spectrum, shown in figure below, covers the wide range of multipoles <math> \ell </math> = 2-2508. Over the multipole range <math> \ell </math> = 2–29, the power spectrum is derived from a component-separation algorithm, ''Commander'', <span style="color:red"> UPDATE COMMANDER: applied to maps in the frequency range 30–353 GHz over 91% of the sky {{PlanckPapers|planck2013-p06}} . The asymmetric error bars associated to this spectrum are the 68% confidence limits and include the uncertainties due to foreground subtraction </span>. For multipoles equal or greater than <math>\ell=30</math>, instead, the spectrum is derived from the ''Plik'' likelihood {{PlanckPapers|planck2014-a13}} by optimally combining the spectra in the frequency range 100-217 GHz, and correcting them for unresolved foregrounds. Associated 1-sigma errors include beam uncertainties. Both ''Commander'' and ''Plik'' are described in more details in the sections below.<br />
<br />
[[File: Planck2014 TT Dl NORES bin30 w180mm.jpeg|thumb|center|700px|'''CMB spectrum. Logarithmic x-scale up to <math>\ell=30</math>, linear at higher <math>\ell</math>; all points with error bars. The red line is the Planck best-fit primordial power spectrum (cf Planck TT+lowP in Table 3 of {{PlanckPapers|planck2014-a15}}).''']]<br />
===Production process===<br />
<br />
<span style="color:red"> UPDATE COMMANDER<br />
The <math>\ell</math> < 50 part of the Planck power spectrum is derived from the Commander approach, which implements Bayesian component separation in pixel space, fitting a parametric model to the data by sampling the posterior distribution for the model parameters {{PlanckPapers|planck2013-p06}}. The power spectrum at any multipole <math>\ell</math> is given as the maximum probability point for the posterior <math>C_\ell</math> distribution, marginalized over the other multipoles, and the error bars are 68% confidence level {{PlanckPapers|planck2013-p08}}. <br />
</span><br />
The <math>\ell</math> > 30 part of the CMB temperature power spectrum has been derived by the Plik likelihood, a code that implements a pseudo-Cl based technique, extensively described in Sec. 2 and the Appendix of {{PlanckPapers|planck2013-p08}}. Frequency spectra are computed as cross-spectra between half-mission maps. Mask and multipole range choices for each frequency spectrum are summarized in Section 3.3 of {{PlanckPapers|planck2014-p15}} and in {{PlanckPapers|planck2014-p13}}. The final power spectrum is an optimal combination of the 100, 143, 143x217 and 217 GHz spectra, corrected for the best-fit unresolved foregrounds and inter-frequency calibration factors, as derived from the full likelihood analysis (cf Planck+TT+lowP in Table 3 of {{PlanckPapers|planck2014-p15}}). A thorough description of the models of unresolved foregrounds is given in {{PlanckPapers|planck2014-p13}}. The spectrum covariance matrix accounts for cosmic variance and noise contributions, together with beam uncertainties. The <math>\ell</math> > 30 CMB TT spectrum and associated covariance matrix are available in two formats:<br />
#Unbinned, with 2479 bandpowers (<math>\ell=30-2508</math>).<br />
#Binned, in bins of <math>\Delta\ell=30 </math>, with 83 bandpowers in total. We bin the <math>C_\ell</math> power spectrum with a weight proportional to <math> \ell (\ell+1) </math>, so that the <math>C_\ell_b</math> binned bandpower centered in <math>\ell_b</math> is: <math> \\ C_{\ell_b}=\Sigma_{\ell \in b} w^b_\ell C_\ell \quad \text{with} \quad w^b_\ell=\frac{\ell (\ell+1)}{\Sigma_{\ell \in b} \ell (\ell+1)}. \\</math> Equivalently, using the matrix formalism, we can construct the binning matrix B as: <math>\\ B_{\ell \ell_b}=w^{\ell_b}_\ell \\ </math> where B is a <math> n_b\times n_\ell</math> matrix, with <math>n_b=83</math> the number of bins and <math>n_\ell=2479</math> the number of unbinned multipoles. Thus: <math> \\ \vec{C}^{binned}_{\ell_b}=B \vec{C}_\ell \\ cov^{binned}= B cov B^T \\ \ell_b=B \ell \\ </math> Here, \vec{C}^{binned}_{\ell_b} (\vec{C}_{\ell}) indicates the vector containing all the binned (unbinned) bandpowers. Note that we use the binning matrix also to calculate the weighted multipole average in each bin <math>\ell_b</math>. The binned <math>D_{\ell_B}</math> power spectra are then calculated as: <math> \newline D_\ell_b=\ell_b (\ell_b+1)/2/\pi C_{\ell_b} \newline </math>.<br />
===Inputs===<br />
<br />
<br />
; Low-l spectrum (<math>\ell < 50</math>):<br />
* frequency maps from 30–353 GHz<br />
* common mask {{PlanckPapers|planck2013-p06}}<br />
* compact sources catalog<br />
<br />
; High-l spectrum (<math>50 < \ell < 2500</math>): <br />
<br />
* 100, 143, 143x217 and 217 GHz spectra and their covariance matrix (Sec. 2 in {{PlanckPapers|planck2013-p08}})<br />
* best-fit foreground templates and inter-frequency calibration factors (Table 5 of {{PlanckPapers|planck2013-p11}})<br />
* Beam transfer function uncertainties {{PlanckPapers|planck2013-p03c}}<br />
=== File names and Meta data ===<br />
<br />
<br />
The CMB spectrum and its covariance matrix are distributed in a single FITS file named <br />
* ''{{PLASingleFile | fileType=cosmo | name=COM_PowerSpect_CMB_R1.10.fits | link=COM_PowerSpect_CMB_R1.10.fits}}'' <br />
<br />
which contains 3 extensions<br />
<br />
; LOW-ELL (BINTABLE)<br />
: with the low ell part of the spectrum, not binned, and for l=2-49. The table columns are<br />
# ''ELL'' (integer): multipole number<br />
# ''D_ELL'' (float): $D_l$ as described below<br />
# ''ERRUP'' (float): the upward uncertainty<br />
# ''ERRDOWN'' (float): the downward uncertainty<br />
<br />
; HIGH-ELL (BINTABLE)<br />
: with the high-ell part of the spectrum, binned into 74 bins covering <math>\langle l \rangle = 47-2419\ </math> in bins of width <math>l=31</math> (with the exception of the last 4 bins that are wider). The table columns are as follows:<br />
# ''ELL'' (integer): mean multipole number of bin<br />
# ''L_MIN'' (integer): lowest multipole of bin<br />
# ''L_MAX'' (integer): highest multipole of bin<br />
# ''D_ELL'' (float): $D_l$ as described below<br />
# ''ERR'' (float): the uncertainty<br />
<br />
; COV-MAT (IMAGE)<br />
: with the covariance matrix of the high-ell part of the spectrum in a 74x74 pixel image, i.e., covering the same bins as the ''HIGH-ELL'' table.<br />
<br />
The spectra give $D_\ell = \ell(\ell+1)C_\ell / 2\pi$ in units of $\mu\, K^2$, and the covariance matrix is in units of $\mu\, K^4$. The spectra are shown in the figure below, in blue and red for the low- and high-<math>\ell</math> parts, respectively, and with the error bars for the high-ell part only in order to avoid confusion.<br />
<br />
[[File: CMBspect.jpg|thumb|center|700px|'''CMB spectrum. Linear x-scale; error bars only at high <math>\ell</math>.''']]<br />
<br />
The CMB spectrum is also given in a simple text comma-separated file:<br />
* ''{{PLASingleFile | fileType=cosmo | name=COM_PowerSpect_CMB_R1.10.txt |link=COM_PowerSpect_CMB_R1.10.txt}}''<br />
<br />
==Likelihood==<br />
TO BE WRITTEN.<br />
<!-- <br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
The likelihood code (and the data that comes with it) used to compute the likelihood of a model that predicts the CMB power spectra, lensing power spectrum, together with some foreground and some instrumental parameters. The data files are built primarily from the Planck mission results, but include also some results from the WMAP-9 data release. The data files are written in a specific format that can only be read by the code. The code consists in a c/f90 library, along with some optional tools in python. The code is used to read the data files, and given model power spectra and nuisance parameters it computes the log likelihood of that model. <br />
<br />
Detailed description of the installation and usage of the likelihood code and data is provided in the package. The package includes five data files: four for the CMB likelihoods and one for the lensing likelihood. All of the likelihoods delivered are described in detail in the {{PlanckPapers|planck2013-p08|1|Power spectrum & Likelihood Paper}} (for the CMB based likelihood) and in the {{PlanckPapers|planck2013-p12|1|Lensing Paper}} (for the lensing likelihood) .<br />
<br />
The CMB full likelihood has been divided into four parts to allow using selectively different ranges of multipoles. It also reflects the fact that the mathematical approximations used for those different parts are very different, as is the underlying data. In detail, we distribute<br />
* one low-<math>\ell</math> temperature only likelihood (commander), <br />
* one low-<math>\ell</math> temperature and polarisation likelihood (lowlike), and <br />
* one higl-<math>\ell</math> likelihood CAMspec. <br />
<br />
The ''Commander'' likelihood covers the multipoles 2 to 49. It uses a semi-analytic method to sample the low-<math>\ell</math> temperature likelihood on an intermediate product of one of the component separated maps. The samples are used along with an analytical approximation of the likelihood posterior to perform the likelihood computation in the code. See {{PlanckPapers|planck2013-p08}} section 8.1 for more details.<br />
<br />
The ''lowlike'' likelihood covers the multipoles 2 to 32 for temperature and polarization data. Since Planck is not releasing polarisation data at this time, the polarization map from WMAP9 is used instead. A temperature map is needed to perform the computation nevertheless, and we use here the same commander map. The likelihood is computed using a map-based approximation at low resolution and a master one at intermediate resolution, as in WMAP. The likelihood code actually calls a very slightly modified version of the WMAP9 code. This piece of the likelihood essentially provides a prior on the optical depth and has almost no other impact on cosmological parameter estimation. As such it could be replaced by a simple prior, and a user can decide to do so, which is one of the motivation to leave the three pieces of the CMB likelihood as different data packages; see {{PlanckPapers|planck2013-p08}} section 8.3 for more details. Note that the version of the WMAP code used here (code version v1.0) does not perform any test on the positive definiteness of the TT, TE, EE covariance matrices, and will return a null log likelihood in the unphysical cases where the absolute value of TE is too large. This will be corrected in a later version.<br />
<br />
The ''CAMspec'' likelihood covers the multipoles 50 to 2500 for temperature only. The likelihood is computed using a quadratic approximation, including mode to mode correlations that have been precomputed on a fiducial model. The likelihood uses data from the 100, 143 and 217 GHz channels. To do so it models the foreground at each frequency using the model described in the likelihood paper. Uncertainties on the relative calibration and on the beam transfer functions are included either as parametric models, or marginalized and integrated in the covariance matrix. Detailed description of the different nuisance parameters is given below. Priors are included in the likelihood on the CIB spectral index, relative calibration factors and beam error eigenmodes. See {{PlanckPapers|planck2013-p08}} section 2.1 for more details.<br />
<br />
The ''act/spt'' likelihood covers the multipoles 1500 to 10000 for temperature. It is described in{{BibCite|dun2013}}{{BibCite|Keis2011}}{{BibCite|Reic2012}}. It uses the code and data that can be retrieved from the [http://lambda.gsfc.nasa.gov/ Lambda archive] for [http://lambda.gsfc.nasa.gov/product/act/act_prod_table.cfm ACT] and [http://lambda.gsfc.nasa.gov/product/spt/spt_prod_table.cfm SPT]. It has been slightly modified to use a thermal and kinetic SZ model that matches the one used in CAMspec. As stated in{{BibCite|dun2013}}, the dust parameters a_ge and a_gs must be explored with the following priors: a_ge = 0.8 ± 0.2 and a_gs = 0.4 ± 0.2. Those priors are not included in the log likelihood computed by the code.<br />
<br />
The ''lensing'' likelihood covers the multipoles 40 to 400 using the result of the [[Specially_processed_maps | lensing reconstruction]]. It uses a quadratic approximation for the likelihood, with a covariance matrix including the marginalized contribution of the beam transfer function uncertainties, the diffuse point source correction uncertainties and the cosmological model uncertainty affecting the first order non-gaussian bias (N1). The correlation between temperature and lensing is not taken into account. Cosmological uncertainty effects on the normalization are dealt with using a first order renormalization procedure. This means that the code will need both the TT and $\phi\phi$ power spectrum up to <math>\ell</math> = 2048 to correctly perform the integrals needed for the renormalization. Nevertheless, the code will only produce an estimate based on the data between <math>\ell</math> = 40 to 400. See {{PlanckPapers|planck2013-p12}} section 6.1 for more details.<br />
</span><br />
<span style="color:red">OUTSTANDING: description of likelihood masks </span><br />
==Production process==<br />
<br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
The code is based on some basic routines from the libpmc library in the [http://arxiv.org/abs/1101.0950 cosmoPMC] code. It also uses some code from the [http://lambda.gsfc.nasa.gov/product/map/dr5/likelihood_get.cfm WMAP9 likelihood] for the lowlike likelihood and{{BibCite|dun2013}}{{BibCite|Keis2011}}{{BibCite|Reic2012}} for the act/spt one. The rest of the code has been specifically written for the Planck data. Each likelihood file has been processed using a different and dedicated pipeline as described in the likelihood paper {{PlanckPapers|planck2013-p08}} (section 2 and 8) and in the lensing paper {{PlanckPapers|planck2013-p12}} (section 6.1). We refer the reader to those papers for full details. The data are then encapsulated into the specific file format.<br />
<br />
Each dataset comes with its own self check. Whenever the code is used to read a data file, a computation will be done against an included test spectrum/nuisance parameter, and the log-likelihood will be displayed along with the expected result. Difference of the order of 10<math>^{-6}</math> or less are expected depending of the architecture.<br />
<br />
==Inputs==<br />
<br />
===Likelihood===<br />
<br />
; ''commander'' :<br />
* all Planck channels maps<br />
* compact source catalogs<br />
* common masks<br />
* beam transfer functions for all channels<br />
<br />
; ''lowlike'' :<br />
* WMAP9 likelihood data<br />
* Low-<math>\ell</math> Commander map<br />
<br />
; ''CAMspec'' :<br />
* 100, 143 and 217 GHz detector and detsets maps<br />
* 857GHz channel map<br />
* compact source catalog<br />
* common masks (0,1 & 3)<br />
* beam transfer function and error eigenmodes and covariance for 100, 143 and 217 GHz detectors & detsets<br />
* theoretical templates for the tSZ and kSZ contributions<br />
* color corrections for the CIB emission for the 143 and 217GHz detectors and detsets<br />
* fiducial CMB model (bootstrapped from WMAP7 best fit spectrum) estimated noise contribution from the half-ring maps for 100, 143 and 217 GHz<br />
<br />
; ''lensing'' :<br />
* the lensing map<br />
* beam error eigenmodes and covariance for the 143 and 217GHz channel maps<br />
* fiducial CMB model (from Planck cosmological parameter best fit)<br />
<br />
; ''act/spt'' :<br />
* data and code from [http://lambda.gsfc.nasa.gov/product/act/act_fulllikelihood_get.cfm here]<br />
* the tSZ andkSZ template are changed to match those of CAMspec<br />
<br />
== File names and Meta data ==<br />
<br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
<br />
'''Likelihood source code'''<br />
<br />
The source code is in the file<br />
: {{PLASingleFile |fileType=cosmo|name=COM_Code_Likelihood-v1.0_R1.10.tar.gz|link=COM_Code_Likelihood-v1.0_R1.10.tar.gz}} (C, f90 and python likelihood library and tools)<br />
<br />
'''Likelihood data packages'''<br />
<br />
The {{PLALikelihood|type=Data|link=data packages}} are<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-commander_R1.10.tar.gz | link=COM_Data_Likelihood-commander_R1.10.tar.gz}}'' (low-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-lowlike_R1.10.tar.gz | link=COM_Data_Likelihood-lowlike_R1.10.tar.gz}}'' (low-ell TE,EE,BB likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-CAMspec_R1.10.tar.gz | link=COM_Data_Likelihood-CAMspec_R1.10.tar.gz}}'' (high-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-actspt_R1.10.tar | link=COM_Data_Likelihood-actspt_R1.10.tar.gz}}'' (high-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-lensing_R1.10.tar.gz | link=COM_Data_Likelihood-lensing_R1.10.tar.gz}}'' (lensing likelihood)<br />
<br />
Untar and unzip all files to recover the code and likelihood data. Each package comes with a README file; follow the instructions inclosed to<br />
build the code and use it. To compute the CMB likelihood one has to sum the log likelihood of each of the commander_v4.1_lm49.clik, lowlike_v222.clik and CAMspec_v6.2TN_2013_02_26.clik, actspt_2013_01.clik. To compute the CMB+lensing likelihood, one has to sum the log likelihood of all 5 files.<br />
<br />
The CMB and lensing likelihood format are different. The CMB files have the termination .clik, the lensing one .clik_lensing. The lensing data being simpler (due to the less detailled modeling permitted by the lower signal-noise), the file is a simple ascii file containing all the data along with comments describing it, and linking the different quantities to the lensing paper. The CMB file format is more complex and must accommodate different forms of data (maps, power spectrum, distribution samples, covariance matrices...). It consists of a tree structure containing the data. At each level of the tree structure a given directory can contain array data (in the form of FITS files or ascii files for strings) and scalar data (joined in a single ascii file "_mdb"). Those files are not user modifiable and do not contain interesting meta data for the user. Tools to manipulate those files are included in the code package as optional python tools. They are documented in the code package.<br />
<br />
'''Likelihood masks'''<br />
<br />
The masks used in the Likelihood paper {{PlanckPapers|planck2013-p08}} are found in<br />
{{PLASingleFile|fileType=map|name=COM_Mask_Likelihood_2048_R1.10.fits|link=COM_Mask_Likelihood_2048_R1.10.fits}}<br />
<br />
which contains ten masks which are written into a single ''BINTABLE'' extension of 10 columns by 50331648 rows (the number of Healpix pixels in an Nside = 2048 map). The structure is as follows, where the column names are the names of the masks: <br />
<br />
{| border="1" cellpadding="3" cellspacing="0" align="center" style="text-align:left" width=800px<br />
|+ '''Likelihodd masks file data structure'''<br />
|- bgcolor="ffdead" <br />
!colspan="4" | 1. EXTNAME = 'MSK-LIKE' : Data columns<br />
|- bgcolor="ffdead" <br />
! Column Name || Data Type || Units || Description<br />
|-<br />
|CL31 || Real*4 || none || mask<br />
|-<br />
|CL39 || Real*4 || none || mask<br />
|-<br />
|CL49 || Real*4 || none || mask<br />
|-<br />
|G22 || Real*4 || none || mask <br />
|-<br />
|G35 || Real*4 || none || mask<br />
|-<br />
|G45 || Real*4 || none || mask<br />
|-<br />
|G56 || Real*4 || none || mask<br />
|-<br />
|G65 || Real*4 || none || mask<br />
|-<br />
|PS96 || Real*4 || none || mask<br />
|-<br />
|PSA82 || Real*4 || none || mask<br />
|-<br />
|- bgcolor="ffdead" <br />
! Keyword || Data Type || Value || Description<br />
|-<br />
|PIXTYPE || string || HEALPIX ||<br />
|-<br />
|COORDSYS || string || GALACTIC ||Coordinate system <br />
|-<br />
|ORDERING || string || NESTED || Healpix ordering<br />
|-<br />
|NSIDE || Int || 2048 || Healpix Nside <br />
|-<br />
|FIRSTPIX || Int*4 || 0 || First pixel number<br />
|-<br />
|LASTPIX || Int*4 || 50331647 || Last pixel number, for LFI and HFI, respectively<br />
<br />
|}<br />
--><br />
== References ==<br />
<References /><br />
<br />
<br />
<br />
[[Category:Mission products|008]]</div>Sgallihttps://wiki.cosmos.esa.int/planckpla2015/index.php?title=CMB_spectrum_%26_Likelihood_Code&diff=11065CMB spectrum & Likelihood Code2015-02-04T00:10:21Z<p>Sgalli: </p>
<hr />
<div>{{DISPLAYTITLE:CMB spectrum and likelihood code}}<br />
<br />
==CMB spectra==<br />
<br />
===General description===<br />
<br />
<br />
The Planck best-fit CMB temperature power spectrum, shown in figure below, covers the wide range of multipoles <math> \ell </math> = 2-2508. Over the multipole range <math> \ell </math> = 2–29, the power spectrum is derived from a component-separation algorithm, ''Commander'', <span style="color:red"> UPDATE COMMANDER: applied to maps in the frequency range 30–353 GHz over 91% of the sky {{PlanckPapers|planck2013-p06}} . The asymmetric error bars associated to this spectrum are the 68% confidence limits and include the uncertainties due to foreground subtraction </span>. For multipoles equal or greater than <math>\ell=30</math>, instead, the spectrum is derived from the ''Plik'' likelihood {{PlanckPapers|planck2014-a13}} by optimally combining the spectra in the frequency range 100-217 GHz, and correcting them for unresolved foregrounds. Associated 1-sigma errors include beam uncertainties. Both ''Commander'' and ''Plik'' are described in more details in the sections below.<br />
<br />
[[File: Planck2014 TT Dl NORES bin30 w180mm.jpeg|thumb|center|700px|'''CMB spectrum. Logarithmic x-scale up to <math>\ell=30</math>, linear at higher <math>\ell</math>; all points with error bars. The red line is the Planck best-fit primordial power spectrum (cf Planck TT+lowP in Table 3 of {{PlanckPapers|planck2014-a15}}).''']]<br />
===Production process===<br />
<br />
<span style="color:red"> UPDATE COMMANDER<br />
The <math>\ell</math> < 50 part of the Planck power spectrum is derived from the Commander approach, which implements Bayesian component separation in pixel space, fitting a parametric model to the data by sampling the posterior distribution for the model parameters {{PlanckPapers|planck2013-p06}}. The power spectrum at any multipole <math>\ell</math> is given as the maximum probability point for the posterior <math>C_\ell</math> distribution, marginalized over the other multipoles, and the error bars are 68% confidence level {{PlanckPapers|planck2013-p08}}. <br />
</span><br />
The <math>\ell</math> > 30 part of the CMB temperature power spectrum has been derived by the Plik likelihood, a code that implements a pseudo-Cl based technique, extensively described in Sec. 2 and the Appendix of {{PlanckPapers|planck2013-p08}}. Frequency spectra are computed as cross-spectra between half-mission maps. Mask and multipole range choices for each frequency spectrum are summarized in Section 3.3 of {{PlanckPapers|planck2014-p15}} and in {{PlanckPapers|planck2014-p13}}. The final power spectrum is an optimal combination of the 100, 143, 143x217 and 217 GHz spectra, corrected for the best-fit unresolved foregrounds and inter-frequency calibration factors, as derived from the full likelihood analysis (cf Planck+TT+lowP in Table 3 of {{PlanckPapers|planck2014-p15}}). A thorough description of the models of unresolved foregrounds is given in {{PlanckPapers|planck2014-p13}}. The spectrum covariance matrix accounts for cosmic variance and noise contributions, together with beam uncertainties. The <math>\ell</math> > 30 CMB TT spectrum and associated covariance matrix are available in two formats:<br />
#Unbinned, with 2479 bandpowers (<math>\ell=30-2508</math>).<br />
#Binned, in bins of <math>\Delta\ell=30 </math>, with 83 bandpowers in total. We bin the <math>C_\ell</math> power spectrum with a weight proportional to <math> \ell (\ell+1) </math>, so that the <math>C_\ell_b</math> binned bandpower centered in <math>\ell_b</math> is: <math> \\ C_{\ell_b}=\Sigma_{\ell \in b} w^b_\ell C_\ell \quad \text{with} \quad w^b_\ell=\frac{\ell (\ell+1)}{\Sigma_{\ell \in b} \ell (\ell+1)}. \\</math> Equivalently, using the matrix formalism, we can construct the binning matrix B as: <math>\\ B_{\ell \ell_b}=w^{\ell_b}_\ell \\ </math> where B is a <math> n_b\times n_\ell</math> matrix, with <math>n_b=83</math> the number of bins and <math>n_\ell=2479</math> the number of unbinned multipoles. Thus: <math> \\ \vec{C}^{binned}_{\ell_b}=B \vec{C}_\ell \\ cov^{binned}= B cov B^T \\ \ell_b=B \ell \\ </math> Here, \vec{C}^{binned}_{\ell_b} (\vec{C}_{\ell}) indicates the vector containing all the binned (unbinned) bandpowers. Note that we use the binning matrix also to calculate the weighted multipole average in each bin <math>\ell_b<math>. The binned <math>D_{\ell_B}<math> power spectra are then calculated as: <math> \\ D_\ell_b=\ell_b (\ell_b+1)/2/\pi C_{\ell_b} \\ </math>.<br />
===Inputs===<br />
<br />
<br />
; Low-l spectrum (<math>\ell < 50</math>):<br />
* frequency maps from 30–353 GHz<br />
* common mask {{PlanckPapers|planck2013-p06}}<br />
* compact sources catalog<br />
<br />
; High-l spectrum (<math>50 < \ell < 2500</math>): <br />
<br />
* 100, 143, 143x217 and 217 GHz spectra and their covariance matrix (Sec. 2 in {{PlanckPapers|planck2013-p08}})<br />
* best-fit foreground templates and inter-frequency calibration factors (Table 5 of {{PlanckPapers|planck2013-p11}})<br />
* Beam transfer function uncertainties {{PlanckPapers|planck2013-p03c}}<br />
=== File names and Meta data ===<br />
<br />
<br />
The CMB spectrum and its covariance matrix are distributed in a single FITS file named <br />
* ''{{PLASingleFile | fileType=cosmo | name=COM_PowerSpect_CMB_R1.10.fits | link=COM_PowerSpect_CMB_R1.10.fits}}'' <br />
<br />
which contains 3 extensions<br />
<br />
; LOW-ELL (BINTABLE)<br />
: with the low ell part of the spectrum, not binned, and for l=2-49. The table columns are<br />
# ''ELL'' (integer): multipole number<br />
# ''D_ELL'' (float): $D_l$ as described below<br />
# ''ERRUP'' (float): the upward uncertainty<br />
# ''ERRDOWN'' (float): the downward uncertainty<br />
<br />
; HIGH-ELL (BINTABLE)<br />
: with the high-ell part of the spectrum, binned into 74 bins covering <math>\langle l \rangle = 47-2419\ </math> in bins of width <math>l=31</math> (with the exception of the last 4 bins that are wider). The table columns are as follows:<br />
# ''ELL'' (integer): mean multipole number of bin<br />
# ''L_MIN'' (integer): lowest multipole of bin<br />
# ''L_MAX'' (integer): highest multipole of bin<br />
# ''D_ELL'' (float): $D_l$ as described below<br />
# ''ERR'' (float): the uncertainty<br />
<br />
; COV-MAT (IMAGE)<br />
: with the covariance matrix of the high-ell part of the spectrum in a 74x74 pixel image, i.e., covering the same bins as the ''HIGH-ELL'' table.<br />
<br />
The spectra give $D_\ell = \ell(\ell+1)C_\ell / 2\pi$ in units of $\mu\, K^2$, and the covariance matrix is in units of $\mu\, K^4$. The spectra are shown in the figure below, in blue and red for the low- and high-<math>\ell</math> parts, respectively, and with the error bars for the high-ell part only in order to avoid confusion.<br />
<br />
[[File: CMBspect.jpg|thumb|center|700px|'''CMB spectrum. Linear x-scale; error bars only at high <math>\ell</math>.''']]<br />
<br />
The CMB spectrum is also given in a simple text comma-separated file:<br />
* ''{{PLASingleFile | fileType=cosmo | name=COM_PowerSpect_CMB_R1.10.txt |link=COM_PowerSpect_CMB_R1.10.txt}}''<br />
<br />
==Likelihood==<br />
TO BE WRITTEN.<br />
<!-- <br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
The likelihood code (and the data that comes with it) used to compute the likelihood of a model that predicts the CMB power spectra, lensing power spectrum, together with some foreground and some instrumental parameters. The data files are built primarily from the Planck mission results, but include also some results from the WMAP-9 data release. The data files are written in a specific format that can only be read by the code. The code consists in a c/f90 library, along with some optional tools in python. The code is used to read the data files, and given model power spectra and nuisance parameters it computes the log likelihood of that model. <br />
<br />
Detailed description of the installation and usage of the likelihood code and data is provided in the package. The package includes five data files: four for the CMB likelihoods and one for the lensing likelihood. All of the likelihoods delivered are described in detail in the {{PlanckPapers|planck2013-p08|1|Power spectrum & Likelihood Paper}} (for the CMB based likelihood) and in the {{PlanckPapers|planck2013-p12|1|Lensing Paper}} (for the lensing likelihood) .<br />
<br />
The CMB full likelihood has been divided into four parts to allow using selectively different ranges of multipoles. It also reflects the fact that the mathematical approximations used for those different parts are very different, as is the underlying data. In detail, we distribute<br />
* one low-<math>\ell</math> temperature only likelihood (commander), <br />
* one low-<math>\ell</math> temperature and polarisation likelihood (lowlike), and <br />
* one higl-<math>\ell</math> likelihood CAMspec. <br />
<br />
The ''Commander'' likelihood covers the multipoles 2 to 49. It uses a semi-analytic method to sample the low-<math>\ell</math> temperature likelihood on an intermediate product of one of the component separated maps. The samples are used along with an analytical approximation of the likelihood posterior to perform the likelihood computation in the code. See {{PlanckPapers|planck2013-p08}} section 8.1 for more details.<br />
<br />
The ''lowlike'' likelihood covers the multipoles 2 to 32 for temperature and polarization data. Since Planck is not releasing polarisation data at this time, the polarization map from WMAP9 is used instead. A temperature map is needed to perform the computation nevertheless, and we use here the same commander map. The likelihood is computed using a map-based approximation at low resolution and a master one at intermediate resolution, as in WMAP. The likelihood code actually calls a very slightly modified version of the WMAP9 code. This piece of the likelihood essentially provides a prior on the optical depth and has almost no other impact on cosmological parameter estimation. As such it could be replaced by a simple prior, and a user can decide to do so, which is one of the motivation to leave the three pieces of the CMB likelihood as different data packages; see {{PlanckPapers|planck2013-p08}} section 8.3 for more details. Note that the version of the WMAP code used here (code version v1.0) does not perform any test on the positive definiteness of the TT, TE, EE covariance matrices, and will return a null log likelihood in the unphysical cases where the absolute value of TE is too large. This will be corrected in a later version.<br />
<br />
The ''CAMspec'' likelihood covers the multipoles 50 to 2500 for temperature only. The likelihood is computed using a quadratic approximation, including mode to mode correlations that have been precomputed on a fiducial model. The likelihood uses data from the 100, 143 and 217 GHz channels. To do so it models the foreground at each frequency using the model described in the likelihood paper. Uncertainties on the relative calibration and on the beam transfer functions are included either as parametric models, or marginalized and integrated in the covariance matrix. Detailed description of the different nuisance parameters is given below. Priors are included in the likelihood on the CIB spectral index, relative calibration factors and beam error eigenmodes. See {{PlanckPapers|planck2013-p08}} section 2.1 for more details.<br />
<br />
The ''act/spt'' likelihood covers the multipoles 1500 to 10000 for temperature. It is described in{{BibCite|dun2013}}{{BibCite|Keis2011}}{{BibCite|Reic2012}}. It uses the code and data that can be retrieved from the [http://lambda.gsfc.nasa.gov/ Lambda archive] for [http://lambda.gsfc.nasa.gov/product/act/act_prod_table.cfm ACT] and [http://lambda.gsfc.nasa.gov/product/spt/spt_prod_table.cfm SPT]. It has been slightly modified to use a thermal and kinetic SZ model that matches the one used in CAMspec. As stated in{{BibCite|dun2013}}, the dust parameters a_ge and a_gs must be explored with the following priors: a_ge = 0.8 ± 0.2 and a_gs = 0.4 ± 0.2. Those priors are not included in the log likelihood computed by the code.<br />
<br />
The ''lensing'' likelihood covers the multipoles 40 to 400 using the result of the [[Specially_processed_maps | lensing reconstruction]]. It uses a quadratic approximation for the likelihood, with a covariance matrix including the marginalized contribution of the beam transfer function uncertainties, the diffuse point source correction uncertainties and the cosmological model uncertainty affecting the first order non-gaussian bias (N1). The correlation between temperature and lensing is not taken into account. Cosmological uncertainty effects on the normalization are dealt with using a first order renormalization procedure. This means that the code will need both the TT and $\phi\phi$ power spectrum up to <math>\ell</math> = 2048 to correctly perform the integrals needed for the renormalization. Nevertheless, the code will only produce an estimate based on the data between <math>\ell</math> = 40 to 400. See {{PlanckPapers|planck2013-p12}} section 6.1 for more details.<br />
</span><br />
<span style="color:red">OUTSTANDING: description of likelihood masks </span><br />
==Production process==<br />
<br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
The code is based on some basic routines from the libpmc library in the [http://arxiv.org/abs/1101.0950 cosmoPMC] code. It also uses some code from the [http://lambda.gsfc.nasa.gov/product/map/dr5/likelihood_get.cfm WMAP9 likelihood] for the lowlike likelihood and{{BibCite|dun2013}}{{BibCite|Keis2011}}{{BibCite|Reic2012}} for the act/spt one. The rest of the code has been specifically written for the Planck data. Each likelihood file has been processed using a different and dedicated pipeline as described in the likelihood paper {{PlanckPapers|planck2013-p08}} (section 2 and 8) and in the lensing paper {{PlanckPapers|planck2013-p12}} (section 6.1). We refer the reader to those papers for full details. The data are then encapsulated into the specific file format.<br />
<br />
Each dataset comes with its own self check. Whenever the code is used to read a data file, a computation will be done against an included test spectrum/nuisance parameter, and the log-likelihood will be displayed along with the expected result. Difference of the order of 10<math>^{-6}</math> or less are expected depending of the architecture.<br />
<br />
==Inputs==<br />
<br />
===Likelihood===<br />
<br />
; ''commander'' :<br />
* all Planck channels maps<br />
* compact source catalogs<br />
* common masks<br />
* beam transfer functions for all channels<br />
<br />
; ''lowlike'' :<br />
* WMAP9 likelihood data<br />
* Low-<math>\ell</math> Commander map<br />
<br />
; ''CAMspec'' :<br />
* 100, 143 and 217 GHz detector and detsets maps<br />
* 857GHz channel map<br />
* compact source catalog<br />
* common masks (0,1 & 3)<br />
* beam transfer function and error eigenmodes and covariance for 100, 143 and 217 GHz detectors & detsets<br />
* theoretical templates for the tSZ and kSZ contributions<br />
* color corrections for the CIB emission for the 143 and 217GHz detectors and detsets<br />
* fiducial CMB model (bootstrapped from WMAP7 best fit spectrum) estimated noise contribution from the half-ring maps for 100, 143 and 217 GHz<br />
<br />
; ''lensing'' :<br />
* the lensing map<br />
* beam error eigenmodes and covariance for the 143 and 217GHz channel maps<br />
* fiducial CMB model (from Planck cosmological parameter best fit)<br />
<br />
; ''act/spt'' :<br />
* data and code from [http://lambda.gsfc.nasa.gov/product/act/act_fulllikelihood_get.cfm here]<br />
* the tSZ andkSZ template are changed to match those of CAMspec<br />
<br />
== File names and Meta data ==<br />
<br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
<br />
'''Likelihood source code'''<br />
<br />
The source code is in the file<br />
: {{PLASingleFile |fileType=cosmo|name=COM_Code_Likelihood-v1.0_R1.10.tar.gz|link=COM_Code_Likelihood-v1.0_R1.10.tar.gz}} (C, f90 and python likelihood library and tools)<br />
<br />
'''Likelihood data packages'''<br />
<br />
The {{PLALikelihood|type=Data|link=data packages}} are<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-commander_R1.10.tar.gz | link=COM_Data_Likelihood-commander_R1.10.tar.gz}}'' (low-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-lowlike_R1.10.tar.gz | link=COM_Data_Likelihood-lowlike_R1.10.tar.gz}}'' (low-ell TE,EE,BB likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-CAMspec_R1.10.tar.gz | link=COM_Data_Likelihood-CAMspec_R1.10.tar.gz}}'' (high-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-actspt_R1.10.tar | link=COM_Data_Likelihood-actspt_R1.10.tar.gz}}'' (high-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-lensing_R1.10.tar.gz | link=COM_Data_Likelihood-lensing_R1.10.tar.gz}}'' (lensing likelihood)<br />
<br />
Untar and unzip all files to recover the code and likelihood data. Each package comes with a README file; follow the instructions inclosed to<br />
build the code and use it. To compute the CMB likelihood one has to sum the log likelihood of each of the commander_v4.1_lm49.clik, lowlike_v222.clik and CAMspec_v6.2TN_2013_02_26.clik, actspt_2013_01.clik. To compute the CMB+lensing likelihood, one has to sum the log likelihood of all 5 files.<br />
<br />
The CMB and lensing likelihood format are different. The CMB files have the termination .clik, the lensing one .clik_lensing. The lensing data being simpler (due to the less detailled modeling permitted by the lower signal-noise), the file is a simple ascii file containing all the data along with comments describing it, and linking the different quantities to the lensing paper. The CMB file format is more complex and must accommodate different forms of data (maps, power spectrum, distribution samples, covariance matrices...). It consists of a tree structure containing the data. At each level of the tree structure a given directory can contain array data (in the form of FITS files or ascii files for strings) and scalar data (joined in a single ascii file "_mdb"). Those files are not user modifiable and do not contain interesting meta data for the user. Tools to manipulate those files are included in the code package as optional python tools. They are documented in the code package.<br />
<br />
'''Likelihood masks'''<br />
<br />
The masks used in the Likelihood paper {{PlanckPapers|planck2013-p08}} are found in<br />
{{PLASingleFile|fileType=map|name=COM_Mask_Likelihood_2048_R1.10.fits|link=COM_Mask_Likelihood_2048_R1.10.fits}}<br />
<br />
which contains ten masks which are written into a single ''BINTABLE'' extension of 10 columns by 50331648 rows (the number of Healpix pixels in an Nside = 2048 map). The structure is as follows, where the column names are the names of the masks: <br />
<br />
{| border="1" cellpadding="3" cellspacing="0" align="center" style="text-align:left" width=800px<br />
|+ '''Likelihodd masks file data structure'''<br />
|- bgcolor="ffdead" <br />
!colspan="4" | 1. EXTNAME = 'MSK-LIKE' : Data columns<br />
|- bgcolor="ffdead" <br />
! Column Name || Data Type || Units || Description<br />
|-<br />
|CL31 || Real*4 || none || mask<br />
|-<br />
|CL39 || Real*4 || none || mask<br />
|-<br />
|CL49 || Real*4 || none || mask<br />
|-<br />
|G22 || Real*4 || none || mask <br />
|-<br />
|G35 || Real*4 || none || mask<br />
|-<br />
|G45 || Real*4 || none || mask<br />
|-<br />
|G56 || Real*4 || none || mask<br />
|-<br />
|G65 || Real*4 || none || mask<br />
|-<br />
|PS96 || Real*4 || none || mask<br />
|-<br />
|PSA82 || Real*4 || none || mask<br />
|-<br />
|- bgcolor="ffdead" <br />
! Keyword || Data Type || Value || Description<br />
|-<br />
|PIXTYPE || string || HEALPIX ||<br />
|-<br />
|COORDSYS || string || GALACTIC ||Coordinate system <br />
|-<br />
|ORDERING || string || NESTED || Healpix ordering<br />
|-<br />
|NSIDE || Int || 2048 || Healpix Nside <br />
|-<br />
|FIRSTPIX || Int*4 || 0 || First pixel number<br />
|-<br />
|LASTPIX || Int*4 || 50331647 || Last pixel number, for LFI and HFI, respectively<br />
<br />
|}<br />
--><br />
== References ==<br />
<References /><br />
<br />
<br />
<br />
[[Category:Mission products|008]]</div>Sgallihttps://wiki.cosmos.esa.int/planckpla2015/index.php?title=CMB_spectrum_%26_Likelihood_Code&diff=11064CMB spectrum & Likelihood Code2015-02-04T00:00:34Z<p>Sgalli: </p>
<hr />
<div>{{DISPLAYTITLE:CMB spectrum and likelihood code}}<br />
<br />
==CMB spectra==<br />
<br />
===General description===<br />
<br />
<br />
The Planck best-fit CMB temperature power spectrum, shown in figure below, covers the wide range of multipoles <math> \ell </math> = 2-2508. Over the multipole range <math> \ell </math> = 2–29, the power spectrum is derived from a component-separation algorithm, ''Commander'', <span style="color:red"> UPDATE COMMANDER: applied to maps in the frequency range 30–353 GHz over 91% of the sky {{PlanckPapers|planck2013-p06}} . The asymmetric error bars associated to this spectrum are the 68% confidence limits and include the uncertainties due to foreground subtraction </span>. For multipoles equal or greater than <math>\ell=30</math>, instead, the spectrum is derived from the ''Plik'' likelihood {{PlanckPapers|planck2014-a13}} by optimally combining the spectra in the frequency range 100-217 GHz, and correcting them for unresolved foregrounds. Associated 1-sigma errors include beam uncertainties. Both ''Commander'' and ''Plik'' are described in more details in the sections below.<br />
<br />
[[File: Planck2014 TT Dl NORES bin30 w180mm.jpeg|thumb|center|700px|'''CMB spectrum. Logarithmic x-scale up to <math>\ell=30</math>, linear at higher <math>\ell</math>; all points with error bars. The red line is the Planck best-fit primordial power spectrum (cf Planck TT+lowP in Table 3 of {{PlanckPapers|planck2014-a15}}).''']]<br />
===Production process===<br />
<br />
<span style="color:red"> UPDATE COMMANDER<br />
The <math>\ell</math> < 50 part of the Planck power spectrum is derived from the Commander approach, which implements Bayesian component separation in pixel space, fitting a parametric model to the data by sampling the posterior distribution for the model parameters {{PlanckPapers|planck2013-p06}}. The power spectrum at any multipole <math>\ell</math> is given as the maximum probability point for the posterior <math>C_\ell</math> distribution, marginalized over the other multipoles, and the error bars are 68% confidence level {{PlanckPapers|planck2013-p08}}. <br />
</span><br />
The <math>\ell</math> > 30 part of the CMB temperature power spectrum has been derived by the Plik likelihood, a code that implements a pseudo-Cl based technique, extensively described in Sec. 2 and the Appendix of {{PlanckPapers|planck2013-p08}}. Frequency spectra are computed as cross-spectra between half-mission maps. Mask and multipole range choices for each frequency spectrum are summarized in Section 3.3 of {{PlanckPapers|planck2014-p15}} and in {{PlanckPapers|planck2014-p13}}. The final power spectrum is an optimal combination of the 100, 143, 143x217 and 217 GHz spectra, corrected for the best-fit unresolved foregrounds and inter-frequency calibration factors, as derived from the full likelihood analysis (cf Planck+TT+lowP in Table 3 of {{PlanckPapers|planck2014-p15}}). A thorough description of the models of unresolved foregrounds is given in {{PlanckPapers|planck2014-p13}}. The spectrum covariance matrix accounts for cosmic variance and noise contributions, together with beam uncertainties. The <math>\ell</math> > 30 CMB TT spectrum and associated covariance matrix are available in two formats:<br />
#Unbinned, with 2479 bandpowers (<math>\ell=30-2508</math>).<br />
#Binned, in bins of <math>\Delta\ell=30 </math>, with 83 bandpowers in total. We bin the Cl power spectra with a weight proportional to <math> \ell (\ell+1) </math>, so that the binned bandpower centered in <math>\ell_b</math> is: <math> \\ C_{\ell_b}=\Sigma_{\ell \in b} w^b_\ell C_\ell \quad \text{with} \quad w^b_\ell=\frac{\ell (\ell+1)}{\Sigma_{\ell \in b} \ell (\ell+1)}. \\</math> Equivalently, using the matrix formalism, we can construct the binning matrix B as: <math>\\ B_{\ell \ell_b}=w^{\ell_b}_\ell \\ </math> where B is a <math> n_bxn_\ell=83x2479</math> matrix, with <math>n_b<math> the number of bins and <math>n_\ell<math> the number of unbinned multipoles. Thus: <math> \\ \vec{C}^{binned}_{\ell_b}=B \vec{C}_\ell \\ cov^{binned}= B cov B^T \\ \ell_b=B \ell \\ </math> Here, \vec{C}^{binned}_{\ell_b} (\vec{C}_{\ell}) just indicates the vector containing all the binned (unbinned) bandpowers. Note that we use the binning matrix also to calculate the average value of the bin <math>\ell_b<math>. The binned <math>D_{\ell_B}<math> power spectra are then calculated as: <math> \\ D_\ell_b=\ell_b (\ell_b+1)/2/\pi C_{\ell_b} \\ </math>.<br />
===Inputs===<br />
<br />
<br />
; Low-l spectrum (<math>\ell < 50</math>):<br />
* frequency maps from 30–353 GHz<br />
* common mask {{PlanckPapers|planck2013-p06}}<br />
* compact sources catalog<br />
<br />
; High-l spectrum (<math>50 < \ell < 2500</math>): <br />
<br />
* 100, 143, 143x217 and 217 GHz spectra and their covariance matrix (Sec. 2 in {{PlanckPapers|planck2013-p08}})<br />
* best-fit foreground templates and inter-frequency calibration factors (Table 5 of {{PlanckPapers|planck2013-p11}})<br />
* Beam transfer function uncertainties {{PlanckPapers|planck2013-p03c}}<br />
=== File names and Meta data ===<br />
<br />
<br />
The CMB spectrum and its covariance matrix are distributed in a single FITS file named <br />
* ''{{PLASingleFile | fileType=cosmo | name=COM_PowerSpect_CMB_R1.10.fits | link=COM_PowerSpect_CMB_R1.10.fits}}'' <br />
<br />
which contains 3 extensions<br />
<br />
; LOW-ELL (BINTABLE)<br />
: with the low ell part of the spectrum, not binned, and for l=2-49. The table columns are<br />
# ''ELL'' (integer): multipole number<br />
# ''D_ELL'' (float): $D_l$ as described below<br />
# ''ERRUP'' (float): the upward uncertainty<br />
# ''ERRDOWN'' (float): the downward uncertainty<br />
<br />
; HIGH-ELL (BINTABLE)<br />
: with the high-ell part of the spectrum, binned into 74 bins covering <math>\langle l \rangle = 47-2419\ </math> in bins of width <math>l=31</math> (with the exception of the last 4 bins that are wider). The table columns are as follows:<br />
# ''ELL'' (integer): mean multipole number of bin<br />
# ''L_MIN'' (integer): lowest multipole of bin<br />
# ''L_MAX'' (integer): highest multipole of bin<br />
# ''D_ELL'' (float): $D_l$ as described below<br />
# ''ERR'' (float): the uncertainty<br />
<br />
; COV-MAT (IMAGE)<br />
: with the covariance matrix of the high-ell part of the spectrum in a 74x74 pixel image, i.e., covering the same bins as the ''HIGH-ELL'' table.<br />
<br />
The spectra give $D_\ell = \ell(\ell+1)C_\ell / 2\pi$ in units of $\mu\, K^2$, and the covariance matrix is in units of $\mu\, K^4$. The spectra are shown in the figure below, in blue and red for the low- and high-<math>\ell</math> parts, respectively, and with the error bars for the high-ell part only in order to avoid confusion.<br />
<br />
[[File: CMBspect.jpg|thumb|center|700px|'''CMB spectrum. Linear x-scale; error bars only at high <math>\ell</math>.''']]<br />
<br />
The CMB spectrum is also given in a simple text comma-separated file:<br />
* ''{{PLASingleFile | fileType=cosmo | name=COM_PowerSpect_CMB_R1.10.txt |link=COM_PowerSpect_CMB_R1.10.txt}}''<br />
<br />
==Likelihood==<br />
TO BE WRITTEN.<br />
<!-- <br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
The likelihood code (and the data that comes with it) used to compute the likelihood of a model that predicts the CMB power spectra, lensing power spectrum, together with some foreground and some instrumental parameters. The data files are built primarily from the Planck mission results, but include also some results from the WMAP-9 data release. The data files are written in a specific format that can only be read by the code. The code consists in a c/f90 library, along with some optional tools in python. The code is used to read the data files, and given model power spectra and nuisance parameters it computes the log likelihood of that model. <br />
<br />
Detailed description of the installation and usage of the likelihood code and data is provided in the package. The package includes five data files: four for the CMB likelihoods and one for the lensing likelihood. All of the likelihoods delivered are described in detail in the {{PlanckPapers|planck2013-p08|1|Power spectrum & Likelihood Paper}} (for the CMB based likelihood) and in the {{PlanckPapers|planck2013-p12|1|Lensing Paper}} (for the lensing likelihood) .<br />
<br />
The CMB full likelihood has been divided into four parts to allow using selectively different ranges of multipoles. It also reflects the fact that the mathematical approximations used for those different parts are very different, as is the underlying data. In detail, we distribute<br />
* one low-<math>\ell</math> temperature only likelihood (commander), <br />
* one low-<math>\ell</math> temperature and polarisation likelihood (lowlike), and <br />
* one higl-<math>\ell</math> likelihood CAMspec. <br />
<br />
The ''Commander'' likelihood covers the multipoles 2 to 49. It uses a semi-analytic method to sample the low-<math>\ell</math> temperature likelihood on an intermediate product of one of the component separated maps. The samples are used along with an analytical approximation of the likelihood posterior to perform the likelihood computation in the code. See {{PlanckPapers|planck2013-p08}} section 8.1 for more details.<br />
<br />
The ''lowlike'' likelihood covers the multipoles 2 to 32 for temperature and polarization data. Since Planck is not releasing polarisation data at this time, the polarization map from WMAP9 is used instead. A temperature map is needed to perform the computation nevertheless, and we use here the same commander map. The likelihood is computed using a map-based approximation at low resolution and a master one at intermediate resolution, as in WMAP. The likelihood code actually calls a very slightly modified version of the WMAP9 code. This piece of the likelihood essentially provides a prior on the optical depth and has almost no other impact on cosmological parameter estimation. As such it could be replaced by a simple prior, and a user can decide to do so, which is one of the motivation to leave the three pieces of the CMB likelihood as different data packages; see {{PlanckPapers|planck2013-p08}} section 8.3 for more details. Note that the version of the WMAP code used here (code version v1.0) does not perform any test on the positive definiteness of the TT, TE, EE covariance matrices, and will return a null log likelihood in the unphysical cases where the absolute value of TE is too large. This will be corrected in a later version.<br />
<br />
The ''CAMspec'' likelihood covers the multipoles 50 to 2500 for temperature only. The likelihood is computed using a quadratic approximation, including mode to mode correlations that have been precomputed on a fiducial model. The likelihood uses data from the 100, 143 and 217 GHz channels. To do so it models the foreground at each frequency using the model described in the likelihood paper. Uncertainties on the relative calibration and on the beam transfer functions are included either as parametric models, or marginalized and integrated in the covariance matrix. Detailed description of the different nuisance parameters is given below. Priors are included in the likelihood on the CIB spectral index, relative calibration factors and beam error eigenmodes. See {{PlanckPapers|planck2013-p08}} section 2.1 for more details.<br />
<br />
The ''act/spt'' likelihood covers the multipoles 1500 to 10000 for temperature. It is described in{{BibCite|dun2013}}{{BibCite|Keis2011}}{{BibCite|Reic2012}}. It uses the code and data that can be retrieved from the [http://lambda.gsfc.nasa.gov/ Lambda archive] for [http://lambda.gsfc.nasa.gov/product/act/act_prod_table.cfm ACT] and [http://lambda.gsfc.nasa.gov/product/spt/spt_prod_table.cfm SPT]. It has been slightly modified to use a thermal and kinetic SZ model that matches the one used in CAMspec. As stated in{{BibCite|dun2013}}, the dust parameters a_ge and a_gs must be explored with the following priors: a_ge = 0.8 ± 0.2 and a_gs = 0.4 ± 0.2. Those priors are not included in the log likelihood computed by the code.<br />
<br />
The ''lensing'' likelihood covers the multipoles 40 to 400 using the result of the [[Specially_processed_maps | lensing reconstruction]]. It uses a quadratic approximation for the likelihood, with a covariance matrix including the marginalized contribution of the beam transfer function uncertainties, the diffuse point source correction uncertainties and the cosmological model uncertainty affecting the first order non-gaussian bias (N1). The correlation between temperature and lensing is not taken into account. Cosmological uncertainty effects on the normalization are dealt with using a first order renormalization procedure. This means that the code will need both the TT and $\phi\phi$ power spectrum up to <math>\ell</math> = 2048 to correctly perform the integrals needed for the renormalization. Nevertheless, the code will only produce an estimate based on the data between <math>\ell</math> = 40 to 400. See {{PlanckPapers|planck2013-p12}} section 6.1 for more details.<br />
</span><br />
<span style="color:red">OUTSTANDING: description of likelihood masks </span><br />
==Production process==<br />
<br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
The code is based on some basic routines from the libpmc library in the [http://arxiv.org/abs/1101.0950 cosmoPMC] code. It also uses some code from the [http://lambda.gsfc.nasa.gov/product/map/dr5/likelihood_get.cfm WMAP9 likelihood] for the lowlike likelihood and{{BibCite|dun2013}}{{BibCite|Keis2011}}{{BibCite|Reic2012}} for the act/spt one. The rest of the code has been specifically written for the Planck data. Each likelihood file has been processed using a different and dedicated pipeline as described in the likelihood paper {{PlanckPapers|planck2013-p08}} (section 2 and 8) and in the lensing paper {{PlanckPapers|planck2013-p12}} (section 6.1). We refer the reader to those papers for full details. The data are then encapsulated into the specific file format.<br />
<br />
Each dataset comes with its own self check. Whenever the code is used to read a data file, a computation will be done against an included test spectrum/nuisance parameter, and the log-likelihood will be displayed along with the expected result. Difference of the order of 10<math>^{-6}</math> or less are expected depending of the architecture.<br />
<br />
==Inputs==<br />
<br />
===Likelihood===<br />
<br />
; ''commander'' :<br />
* all Planck channels maps<br />
* compact source catalogs<br />
* common masks<br />
* beam transfer functions for all channels<br />
<br />
; ''lowlike'' :<br />
* WMAP9 likelihood data<br />
* Low-<math>\ell</math> Commander map<br />
<br />
; ''CAMspec'' :<br />
* 100, 143 and 217 GHz detector and detsets maps<br />
* 857GHz channel map<br />
* compact source catalog<br />
* common masks (0,1 & 3)<br />
* beam transfer function and error eigenmodes and covariance for 100, 143 and 217 GHz detectors & detsets<br />
* theoretical templates for the tSZ and kSZ contributions<br />
* color corrections for the CIB emission for the 143 and 217GHz detectors and detsets<br />
* fiducial CMB model (bootstrapped from WMAP7 best fit spectrum) estimated noise contribution from the half-ring maps for 100, 143 and 217 GHz<br />
<br />
; ''lensing'' :<br />
* the lensing map<br />
* beam error eigenmodes and covariance for the 143 and 217GHz channel maps<br />
* fiducial CMB model (from Planck cosmological parameter best fit)<br />
<br />
; ''act/spt'' :<br />
* data and code from [http://lambda.gsfc.nasa.gov/product/act/act_fulllikelihood_get.cfm here]<br />
* the tSZ andkSZ template are changed to match those of CAMspec<br />
<br />
== File names and Meta data ==<br />
<br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
<br />
'''Likelihood source code'''<br />
<br />
The source code is in the file<br />
: {{PLASingleFile |fileType=cosmo|name=COM_Code_Likelihood-v1.0_R1.10.tar.gz|link=COM_Code_Likelihood-v1.0_R1.10.tar.gz}} (C, f90 and python likelihood library and tools)<br />
<br />
'''Likelihood data packages'''<br />
<br />
The {{PLALikelihood|type=Data|link=data packages}} are<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-commander_R1.10.tar.gz | link=COM_Data_Likelihood-commander_R1.10.tar.gz}}'' (low-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-lowlike_R1.10.tar.gz | link=COM_Data_Likelihood-lowlike_R1.10.tar.gz}}'' (low-ell TE,EE,BB likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-CAMspec_R1.10.tar.gz | link=COM_Data_Likelihood-CAMspec_R1.10.tar.gz}}'' (high-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-actspt_R1.10.tar | link=COM_Data_Likelihood-actspt_R1.10.tar.gz}}'' (high-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-lensing_R1.10.tar.gz | link=COM_Data_Likelihood-lensing_R1.10.tar.gz}}'' (lensing likelihood)<br />
<br />
Untar and unzip all files to recover the code and likelihood data. Each package comes with a README file; follow the instructions inclosed to<br />
build the code and use it. To compute the CMB likelihood one has to sum the log likelihood of each of the commander_v4.1_lm49.clik, lowlike_v222.clik and CAMspec_v6.2TN_2013_02_26.clik, actspt_2013_01.clik. To compute the CMB+lensing likelihood, one has to sum the log likelihood of all 5 files.<br />
<br />
The CMB and lensing likelihood format are different. The CMB files have the termination .clik, the lensing one .clik_lensing. The lensing data being simpler (due to the less detailled modeling permitted by the lower signal-noise), the file is a simple ascii file containing all the data along with comments describing it, and linking the different quantities to the lensing paper. The CMB file format is more complex and must accommodate different forms of data (maps, power spectrum, distribution samples, covariance matrices...). It consists of a tree structure containing the data. At each level of the tree structure a given directory can contain array data (in the form of FITS files or ascii files for strings) and scalar data (joined in a single ascii file "_mdb"). Those files are not user modifiable and do not contain interesting meta data for the user. Tools to manipulate those files are included in the code package as optional python tools. They are documented in the code package.<br />
<br />
'''Likelihood masks'''<br />
<br />
The masks used in the Likelihood paper {{PlanckPapers|planck2013-p08}} are found in<br />
{{PLASingleFile|fileType=map|name=COM_Mask_Likelihood_2048_R1.10.fits|link=COM_Mask_Likelihood_2048_R1.10.fits}}<br />
<br />
which contains ten masks which are written into a single ''BINTABLE'' extension of 10 columns by 50331648 rows (the number of Healpix pixels in an Nside = 2048 map). The structure is as follows, where the column names are the names of the masks: <br />
<br />
{| border="1" cellpadding="3" cellspacing="0" align="center" style="text-align:left" width=800px<br />
|+ '''Likelihodd masks file data structure'''<br />
|- bgcolor="ffdead" <br />
!colspan="4" | 1. EXTNAME = 'MSK-LIKE' : Data columns<br />
|- bgcolor="ffdead" <br />
! Column Name || Data Type || Units || Description<br />
|-<br />
|CL31 || Real*4 || none || mask<br />
|-<br />
|CL39 || Real*4 || none || mask<br />
|-<br />
|CL49 || Real*4 || none || mask<br />
|-<br />
|G22 || Real*4 || none || mask <br />
|-<br />
|G35 || Real*4 || none || mask<br />
|-<br />
|G45 || Real*4 || none || mask<br />
|-<br />
|G56 || Real*4 || none || mask<br />
|-<br />
|G65 || Real*4 || none || mask<br />
|-<br />
|PS96 || Real*4 || none || mask<br />
|-<br />
|PSA82 || Real*4 || none || mask<br />
|-<br />
|- bgcolor="ffdead" <br />
! Keyword || Data Type || Value || Description<br />
|-<br />
|PIXTYPE || string || HEALPIX ||<br />
|-<br />
|COORDSYS || string || GALACTIC ||Coordinate system <br />
|-<br />
|ORDERING || string || NESTED || Healpix ordering<br />
|-<br />
|NSIDE || Int || 2048 || Healpix Nside <br />
|-<br />
|FIRSTPIX || Int*4 || 0 || First pixel number<br />
|-<br />
|LASTPIX || Int*4 || 50331647 || Last pixel number, for LFI and HFI, respectively<br />
<br />
|}<br />
--><br />
== References ==<br />
<References /><br />
<br />
<br />
<br />
[[Category:Mission products|008]]</div>Sgallihttps://wiki.cosmos.esa.int/planckpla2015/index.php?title=CMB_spectrum_%26_Likelihood_Code&diff=11063CMB spectrum & Likelihood Code2015-02-03T23:57:10Z<p>Sgalli: </p>
<hr />
<div>{{DISPLAYTITLE:CMB spectrum and likelihood code}}<br />
<br />
==CMB spectra==<br />
<br />
===General description===<br />
<br />
<br />
The Planck best-fit CMB temperature power spectrum, shown in figure below, covers the wide range of multipoles <math> \ell </math> = 2-2508. Over the multipole range <math> \ell </math> = 2–29, the power spectrum is derived from a component-separation algorithm, ''Commander'', <span style="color:red"> UPDATE COMMANDER: applied to maps in the frequency range 30–353 GHz over 91% of the sky {{PlanckPapers|planck2013-p06}} . The asymmetric error bars associated to this spectrum are the 68% confidence limits and include the uncertainties due to foreground subtraction </span>. For multipoles equal or greater than <math>\ell=30</math>, instead, the spectrum is derived from the ''Plik'' likelihood {{PlanckPapers|planck2014-a13}} by optimally combining the spectra in the frequency range 100-217 GHz, and correcting them for unresolved foregrounds. Associated 1-sigma errors include beam uncertainties. Both ''Commander'' and ''Plik'' are described in more details in the sections below.<br />
<br />
[[File: Planck2014 TT Dl NORES bin30 w180mm.jpeg|thumb|center|700px|'''CMB spectrum. Logarithmic x-scale up to <math>\ell=30</math>, linear at higher <math>\ell</math>; all points with error bars. The red line is the Planck best-fit primordial power spectrum (cf Planck TT+lowP in Table 3 of {{PlanckPapers|planck2014-a15}}).''']]<br />
===Production process===<br />
<br />
<span style="color:red"> UPDATE COMMANDER<br />
The <math>\ell</math> < 50 part of the Planck power spectrum is derived from the Commander approach, which implements Bayesian component separation in pixel space, fitting a parametric model to the data by sampling the posterior distribution for the model parameters {{PlanckPapers|planck2013-p06}}. The power spectrum at any multipole <math>\ell</math> is given as the maximum probability point for the posterior <math>C_\ell</math> distribution, marginalized over the other multipoles, and the error bars are 68% confidence level {{PlanckPapers|planck2013-p08}}. <br />
</span><br />
The <math>\ell</math> > 30 part of the CMB temperature power spectrum has been derived by the Plik likelihood, a code that implements a pseudo-Cl based technique, extensively described in Sec. 2 and the Appendix of {{PlanckPapers|planck2013-p08}}. Frequency spectra are computed as cross-spectra between half-mission maps. Mask and multipole range choices for each frequency spectrum are summarized in Section 3.3 of {{PlanckPapers|planck2014-p15}} and in {{PlanckPapers|planck2014-p13}}. The final power spectrum is an optimal combination of the 100, 143, 143x217 and 217 GHz spectra, corrected for the best-fit unresolved foregrounds and inter-frequency calibration factors, as derived from the full likelihood analysis (cf Planck+TT+lowP in Table 3 of {{PlanckPapers|planck2014-p15}}). A thorough description of the models of unresolved foregrounds is given in {{PlanckPapers|planck2014-p13}}. The spectrum covariance matrix accounts for cosmic variance and noise contributions, together with beam uncertainties. The <math>\ell</math> > 30 CMB TT spectrum and associated covariance matrix are available in two formats:<br />
#Unbinned, with 2479 bandpowers (\ell=30-2508).<br />
#Binned, in bins of <math>\Delta\ell=30 </math>, with 83 bandpowers in total. We bin the Cl power spectra with a weight proportional to <math> \ell (\ell+1) </math>, so that the binned bandpower centered in \ell_b is: <math> \\ C_{\ell_b}=\Sigma_{\ell \in b} w^b_\ell C_\ell \quad \text{with} \quad w^b_\ell=\frac{\ell (\ell+1)}{\Sigma_{\ell \in b} \ell (\ell+1)}. \\</math> Equivalently, using the matrix formalism, we can construct the binning matrix B as: <math>\\ B_{\ell \ell_b}=w^{\ell_b}_\ell \\ </math> where B is a <math> n_bxn_\ell=83x2479</math> matrix, with n_b the number of bins and n_\ell the number of unbinned multipoles. Thus: <math> \\ \vec{C}^{binned}_{\ell_b}=B \vec{C}_\ell \\ cov^{binned}= B cov B^T \\ \ell_b=B \ell \\ </math> Here, \vec{C}^{binned}_{\ell_b} (\vec{C}_{\ell}) just indicates the vector containing all the binned (unbinned) bandpowers. Note that we use the binning matrix also to calculate the average value of the bin \ell_b. The binned D_{\ell_B} power spectra are then calculated as: <math> \\ D_\ell_b=\ell_b (\ell_b+1)/2/\pi C_{\ell_b} \\ </math>.<br />
===Inputs===<br />
<br />
<br />
; Low-l spectrum (<math>\ell < 50</math>):<br />
* frequency maps from 30–353 GHz<br />
* common mask {{PlanckPapers|planck2013-p06}}<br />
* compact sources catalog<br />
<br />
; High-l spectrum (<math>50 < \ell < 2500</math>): <br />
<br />
* 100, 143, 143x217 and 217 GHz spectra and their covariance matrix (Sec. 2 in {{PlanckPapers|planck2013-p08}})<br />
* best-fit foreground templates and inter-frequency calibration factors (Table 5 of {{PlanckPapers|planck2013-p11}})<br />
* Beam transfer function uncertainties {{PlanckPapers|planck2013-p03c}}<br />
=== File names and Meta data ===<br />
<br />
<br />
The CMB spectrum and its covariance matrix are distributed in a single FITS file named <br />
* ''{{PLASingleFile | fileType=cosmo | name=COM_PowerSpect_CMB_R1.10.fits | link=COM_PowerSpect_CMB_R1.10.fits}}'' <br />
<br />
which contains 3 extensions<br />
<br />
; LOW-ELL (BINTABLE)<br />
: with the low ell part of the spectrum, not binned, and for l=2-49. The table columns are<br />
# ''ELL'' (integer): multipole number<br />
# ''D_ELL'' (float): $D_l$ as described below<br />
# ''ERRUP'' (float): the upward uncertainty<br />
# ''ERRDOWN'' (float): the downward uncertainty<br />
<br />
; HIGH-ELL (BINTABLE)<br />
: with the high-ell part of the spectrum, binned into 74 bins covering <math>\langle l \rangle = 47-2419\ </math> in bins of width <math>l=31</math> (with the exception of the last 4 bins that are wider). The table columns are as follows:<br />
# ''ELL'' (integer): mean multipole number of bin<br />
# ''L_MIN'' (integer): lowest multipole of bin<br />
# ''L_MAX'' (integer): highest multipole of bin<br />
# ''D_ELL'' (float): $D_l$ as described below<br />
# ''ERR'' (float): the uncertainty<br />
<br />
; COV-MAT (IMAGE)<br />
: with the covariance matrix of the high-ell part of the spectrum in a 74x74 pixel image, i.e., covering the same bins as the ''HIGH-ELL'' table.<br />
<br />
The spectra give $D_\ell = \ell(\ell+1)C_\ell / 2\pi$ in units of $\mu\, K^2$, and the covariance matrix is in units of $\mu\, K^4$. The spectra are shown in the figure below, in blue and red for the low- and high-<math>\ell</math> parts, respectively, and with the error bars for the high-ell part only in order to avoid confusion.<br />
<br />
[[File: CMBspect.jpg|thumb|center|700px|'''CMB spectrum. Linear x-scale; error bars only at high <math>\ell</math>.''']]<br />
<br />
The CMB spectrum is also given in a simple text comma-separated file:<br />
* ''{{PLASingleFile | fileType=cosmo | name=COM_PowerSpect_CMB_R1.10.txt |link=COM_PowerSpect_CMB_R1.10.txt}}''<br />
<br />
==Likelihood==<br />
TO BE WRITTEN.<br />
<!-- <br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
The likelihood code (and the data that comes with it) used to compute the likelihood of a model that predicts the CMB power spectra, lensing power spectrum, together with some foreground and some instrumental parameters. The data files are built primarily from the Planck mission results, but include also some results from the WMAP-9 data release. The data files are written in a specific format that can only be read by the code. The code consists in a c/f90 library, along with some optional tools in python. The code is used to read the data files, and given model power spectra and nuisance parameters it computes the log likelihood of that model. <br />
<br />
Detailed description of the installation and usage of the likelihood code and data is provided in the package. The package includes five data files: four for the CMB likelihoods and one for the lensing likelihood. All of the likelihoods delivered are described in detail in the {{PlanckPapers|planck2013-p08|1|Power spectrum & Likelihood Paper}} (for the CMB based likelihood) and in the {{PlanckPapers|planck2013-p12|1|Lensing Paper}} (for the lensing likelihood) .<br />
<br />
The CMB full likelihood has been divided into four parts to allow using selectively different ranges of multipoles. It also reflects the fact that the mathematical approximations used for those different parts are very different, as is the underlying data. In detail, we distribute<br />
* one low-<math>\ell</math> temperature only likelihood (commander), <br />
* one low-<math>\ell</math> temperature and polarisation likelihood (lowlike), and <br />
* one higl-<math>\ell</math> likelihood CAMspec. <br />
<br />
The ''Commander'' likelihood covers the multipoles 2 to 49. It uses a semi-analytic method to sample the low-<math>\ell</math> temperature likelihood on an intermediate product of one of the component separated maps. The samples are used along with an analytical approximation of the likelihood posterior to perform the likelihood computation in the code. See {{PlanckPapers|planck2013-p08}} section 8.1 for more details.<br />
<br />
The ''lowlike'' likelihood covers the multipoles 2 to 32 for temperature and polarization data. Since Planck is not releasing polarisation data at this time, the polarization map from WMAP9 is used instead. A temperature map is needed to perform the computation nevertheless, and we use here the same commander map. The likelihood is computed using a map-based approximation at low resolution and a master one at intermediate resolution, as in WMAP. The likelihood code actually calls a very slightly modified version of the WMAP9 code. This piece of the likelihood essentially provides a prior on the optical depth and has almost no other impact on cosmological parameter estimation. As such it could be replaced by a simple prior, and a user can decide to do so, which is one of the motivation to leave the three pieces of the CMB likelihood as different data packages; see {{PlanckPapers|planck2013-p08}} section 8.3 for more details. Note that the version of the WMAP code used here (code version v1.0) does not perform any test on the positive definiteness of the TT, TE, EE covariance matrices, and will return a null log likelihood in the unphysical cases where the absolute value of TE is too large. This will be corrected in a later version.<br />
<br />
The ''CAMspec'' likelihood covers the multipoles 50 to 2500 for temperature only. The likelihood is computed using a quadratic approximation, including mode to mode correlations that have been precomputed on a fiducial model. The likelihood uses data from the 100, 143 and 217 GHz channels. To do so it models the foreground at each frequency using the model described in the likelihood paper. Uncertainties on the relative calibration and on the beam transfer functions are included either as parametric models, or marginalized and integrated in the covariance matrix. Detailed description of the different nuisance parameters is given below. Priors are included in the likelihood on the CIB spectral index, relative calibration factors and beam error eigenmodes. See {{PlanckPapers|planck2013-p08}} section 2.1 for more details.<br />
<br />
The ''act/spt'' likelihood covers the multipoles 1500 to 10000 for temperature. It is described in{{BibCite|dun2013}}{{BibCite|Keis2011}}{{BibCite|Reic2012}}. It uses the code and data that can be retrieved from the [http://lambda.gsfc.nasa.gov/ Lambda archive] for [http://lambda.gsfc.nasa.gov/product/act/act_prod_table.cfm ACT] and [http://lambda.gsfc.nasa.gov/product/spt/spt_prod_table.cfm SPT]. It has been slightly modified to use a thermal and kinetic SZ model that matches the one used in CAMspec. As stated in{{BibCite|dun2013}}, the dust parameters a_ge and a_gs must be explored with the following priors: a_ge = 0.8 ± 0.2 and a_gs = 0.4 ± 0.2. Those priors are not included in the log likelihood computed by the code.<br />
<br />
The ''lensing'' likelihood covers the multipoles 40 to 400 using the result of the [[Specially_processed_maps | lensing reconstruction]]. It uses a quadratic approximation for the likelihood, with a covariance matrix including the marginalized contribution of the beam transfer function uncertainties, the diffuse point source correction uncertainties and the cosmological model uncertainty affecting the first order non-gaussian bias (N1). The correlation between temperature and lensing is not taken into account. Cosmological uncertainty effects on the normalization are dealt with using a first order renormalization procedure. This means that the code will need both the TT and $\phi\phi$ power spectrum up to <math>\ell</math> = 2048 to correctly perform the integrals needed for the renormalization. Nevertheless, the code will only produce an estimate based on the data between <math>\ell</math> = 40 to 400. See {{PlanckPapers|planck2013-p12}} section 6.1 for more details.<br />
</span><br />
<span style="color:red">OUTSTANDING: description of likelihood masks </span><br />
==Production process==<br />
<br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
The code is based on some basic routines from the libpmc library in the [http://arxiv.org/abs/1101.0950 cosmoPMC] code. It also uses some code from the [http://lambda.gsfc.nasa.gov/product/map/dr5/likelihood_get.cfm WMAP9 likelihood] for the lowlike likelihood and{{BibCite|dun2013}}{{BibCite|Keis2011}}{{BibCite|Reic2012}} for the act/spt one. The rest of the code has been specifically written for the Planck data. Each likelihood file has been processed using a different and dedicated pipeline as described in the likelihood paper {{PlanckPapers|planck2013-p08}} (section 2 and 8) and in the lensing paper {{PlanckPapers|planck2013-p12}} (section 6.1). We refer the reader to those papers for full details. The data are then encapsulated into the specific file format.<br />
<br />
Each dataset comes with its own self check. Whenever the code is used to read a data file, a computation will be done against an included test spectrum/nuisance parameter, and the log-likelihood will be displayed along with the expected result. Difference of the order of 10<math>^{-6}</math> or less are expected depending of the architecture.<br />
<br />
==Inputs==<br />
<br />
===Likelihood===<br />
<br />
; ''commander'' :<br />
* all Planck channels maps<br />
* compact source catalogs<br />
* common masks<br />
* beam transfer functions for all channels<br />
<br />
; ''lowlike'' :<br />
* WMAP9 likelihood data<br />
* Low-<math>\ell</math> Commander map<br />
<br />
; ''CAMspec'' :<br />
* 100, 143 and 217 GHz detector and detsets maps<br />
* 857GHz channel map<br />
* compact source catalog<br />
* common masks (0,1 & 3)<br />
* beam transfer function and error eigenmodes and covariance for 100, 143 and 217 GHz detectors & detsets<br />
* theoretical templates for the tSZ and kSZ contributions<br />
* color corrections for the CIB emission for the 143 and 217GHz detectors and detsets<br />
* fiducial CMB model (bootstrapped from WMAP7 best fit spectrum) estimated noise contribution from the half-ring maps for 100, 143 and 217 GHz<br />
<br />
; ''lensing'' :<br />
* the lensing map<br />
* beam error eigenmodes and covariance for the 143 and 217GHz channel maps<br />
* fiducial CMB model (from Planck cosmological parameter best fit)<br />
<br />
; ''act/spt'' :<br />
* data and code from [http://lambda.gsfc.nasa.gov/product/act/act_fulllikelihood_get.cfm here]<br />
* the tSZ andkSZ template are changed to match those of CAMspec<br />
<br />
== File names and Meta data ==<br />
<br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
<br />
'''Likelihood source code'''<br />
<br />
The source code is in the file<br />
: {{PLASingleFile |fileType=cosmo|name=COM_Code_Likelihood-v1.0_R1.10.tar.gz|link=COM_Code_Likelihood-v1.0_R1.10.tar.gz}} (C, f90 and python likelihood library and tools)<br />
<br />
'''Likelihood data packages'''<br />
<br />
The {{PLALikelihood|type=Data|link=data packages}} are<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-commander_R1.10.tar.gz | link=COM_Data_Likelihood-commander_R1.10.tar.gz}}'' (low-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-lowlike_R1.10.tar.gz | link=COM_Data_Likelihood-lowlike_R1.10.tar.gz}}'' (low-ell TE,EE,BB likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-CAMspec_R1.10.tar.gz | link=COM_Data_Likelihood-CAMspec_R1.10.tar.gz}}'' (high-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-actspt_R1.10.tar | link=COM_Data_Likelihood-actspt_R1.10.tar.gz}}'' (high-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-lensing_R1.10.tar.gz | link=COM_Data_Likelihood-lensing_R1.10.tar.gz}}'' (lensing likelihood)<br />
<br />
Untar and unzip all files to recover the code and likelihood data. Each package comes with a README file; follow the instructions inclosed to<br />
build the code and use it. To compute the CMB likelihood one has to sum the log likelihood of each of the commander_v4.1_lm49.clik, lowlike_v222.clik and CAMspec_v6.2TN_2013_02_26.clik, actspt_2013_01.clik. To compute the CMB+lensing likelihood, one has to sum the log likelihood of all 5 files.<br />
<br />
The CMB and lensing likelihood format are different. The CMB files have the termination .clik, the lensing one .clik_lensing. The lensing data being simpler (due to the less detailled modeling permitted by the lower signal-noise), the file is a simple ascii file containing all the data along with comments describing it, and linking the different quantities to the lensing paper. The CMB file format is more complex and must accommodate different forms of data (maps, power spectrum, distribution samples, covariance matrices...). It consists of a tree structure containing the data. At each level of the tree structure a given directory can contain array data (in the form of FITS files or ascii files for strings) and scalar data (joined in a single ascii file "_mdb"). Those files are not user modifiable and do not contain interesting meta data for the user. Tools to manipulate those files are included in the code package as optional python tools. They are documented in the code package.<br />
<br />
'''Likelihood masks'''<br />
<br />
The masks used in the Likelihood paper {{PlanckPapers|planck2013-p08}} are found in<br />
{{PLASingleFile|fileType=map|name=COM_Mask_Likelihood_2048_R1.10.fits|link=COM_Mask_Likelihood_2048_R1.10.fits}}<br />
<br />
which contains ten masks which are written into a single ''BINTABLE'' extension of 10 columns by 50331648 rows (the number of Healpix pixels in an Nside = 2048 map). The structure is as follows, where the column names are the names of the masks: <br />
<br />
{| border="1" cellpadding="3" cellspacing="0" align="center" style="text-align:left" width=800px<br />
|+ '''Likelihodd masks file data structure'''<br />
|- bgcolor="ffdead" <br />
!colspan="4" | 1. EXTNAME = 'MSK-LIKE' : Data columns<br />
|- bgcolor="ffdead" <br />
! Column Name || Data Type || Units || Description<br />
|-<br />
|CL31 || Real*4 || none || mask<br />
|-<br />
|CL39 || Real*4 || none || mask<br />
|-<br />
|CL49 || Real*4 || none || mask<br />
|-<br />
|G22 || Real*4 || none || mask <br />
|-<br />
|G35 || Real*4 || none || mask<br />
|-<br />
|G45 || Real*4 || none || mask<br />
|-<br />
|G56 || Real*4 || none || mask<br />
|-<br />
|G65 || Real*4 || none || mask<br />
|-<br />
|PS96 || Real*4 || none || mask<br />
|-<br />
|PSA82 || Real*4 || none || mask<br />
|-<br />
|- bgcolor="ffdead" <br />
! Keyword || Data Type || Value || Description<br />
|-<br />
|PIXTYPE || string || HEALPIX ||<br />
|-<br />
|COORDSYS || string || GALACTIC ||Coordinate system <br />
|-<br />
|ORDERING || string || NESTED || Healpix ordering<br />
|-<br />
|NSIDE || Int || 2048 || Healpix Nside <br />
|-<br />
|FIRSTPIX || Int*4 || 0 || First pixel number<br />
|-<br />
|LASTPIX || Int*4 || 50331647 || Last pixel number, for LFI and HFI, respectively<br />
<br />
|}<br />
--><br />
== References ==<br />
<References /><br />
<br />
<br />
<br />
[[Category:Mission products|008]]</div>Sgallihttps://wiki.cosmos.esa.int/planckpla2015/index.php?title=CMB_spectrum_%26_Likelihood_Code&diff=11062CMB spectrum & Likelihood Code2015-02-03T23:54:43Z<p>Sgalli: </p>
<hr />
<div>{{DISPLAYTITLE:CMB spectrum and likelihood code}}<br />
<br />
==CMB spectra==<br />
<br />
===General description===<br />
<br />
<br />
The Planck best-fit CMB temperature power spectrum, shown in figure below, covers the wide range of multipoles <math> \ell </math> = 2-2508. Over the multipole range <math> \ell </math> = 2–29, the power spectrum is derived from a component-separation algorithm, ''Commander'', <span style="color:red"> UPDATE COMMANDER: applied to maps in the frequency range 30–353 GHz over 91% of the sky {{PlanckPapers|planck2013-p06}} . The asymmetric error bars associated to this spectrum are the 68% confidence limits and include the uncertainties due to foreground subtraction </span>. For multipoles equal or greater than <math>\ell=30</math>, instead, the spectrum is derived from the ''Plik'' likelihood {{PlanckPapers|planck2014-a13}} by optimally combining the spectra in the frequency range 100-217 GHz, and correcting them for unresolved foregrounds. Associated 1-sigma errors include beam uncertainties. Both ''Commander'' and ''Plik'' are described in more details in the sections below.<br />
<br />
[[File: Planck2014 TT Dl NORES bin30 w180mm.jpeg|thumb|center|700px|'''CMB spectrum. Logarithmic x-scale up to <math>\ell=30</math>, linear at higher <math>\ell</math>; all points with error bars. The red line is the Planck best-fit primordial power spectrum (cf Planck TT+lowP in Table 3 of {{PlanckPapers|planck2014-a15}}).''']]<br />
===Production process===<br />
<br />
<span style="color:red"> UPDATE COMMANDER<br />
The <math>\ell</math> < 50 part of the Planck power spectrum is derived from the Commander approach, which implements Bayesian component separation in pixel space, fitting a parametric model to the data by sampling the posterior distribution for the model parameters {{PlanckPapers|planck2013-p06}}. The power spectrum at any multipole <math>\ell</math> is given as the maximum probability point for the posterior <math>C_\ell</math> distribution, marginalized over the other multipoles, and the error bars are 68% confidence level {{PlanckPapers|planck2013-p08}}. <br />
</span><br />
The <math>\ell</math> > 30 part of the CMB temperature power spectrum has been derived by the Plik likelihood, a code that implements a pseudo-Cl based technique, extensively described in Sec. 2 and the Appendix of {{PlanckPapers|planck2013-p08}}. Frequency spectra are computed as cross-spectra between half-mission maps. Mask and multipole range choices for each frequency spectrum are summarized in Section 3.3 of {{PlanckPapers|planck2014-p15}} and in {{PlanckPapers|planck2014-p13}}. The final power spectrum is an optimal combination of the 100, 143, 143x217 and 217 GHz spectra, corrected for the best-fit unresolved foregrounds and inter-frequency calibration factors, as derived from the full likelihood analysis (cf Planck+TT+lowP in Table 3 of {{PlanckPapers|planck2014-p15}}). A thorough description of the models of unresolved foregrounds is given in {{PlanckPapers|planck2014-p13}}. The spectrum covariance matrix accounts for cosmic variance and noise contributions, together with beam uncertainties. The <math>\ell</math> > 30 CMB TT spectrum and associated covariance matrix are available in two formats:<br />
#Unbinned, with 2479 bandpowers (\ell=30-2508).<br />
#Binned, in bins of <math>\Delta\ell=30 </math>, with 83 bandpowers in total. We bin the Cl power spectra with a weight proportional to <math> \ell (\ell+1) </math>, so that the binned bandpower centered in \ell_b is: <math> \\ C_{\ell_b}=\Sigma_{\ell \in b} w^b_\ell C_\ell \quad \text{with} \quad w^b_\ell=\frac{\ell (\ell+1)}{\Sigma_{\ell \in b} \ell (\ell+1)} </math> Equivalently, using the matrix formalism, we can construct the binning matrix B as:<br />
<math> B_{\ell \ell_b}=w^{\ell_b}_\ell </math><br />
where B is a <math> n_bxn_\ell=83x2479</math> matrix, with n_b the number of bins and n_\ell the number of unbinned multipoles.<br />
Thus: <br />
<math><br />
\vec{C}^{binned}_{\ell_b}=B \vec{C}_\ell \\<br />
cov^{binned}= B cov B^T \\<br />
\ell_b=B \ell<br />
</math><br />
Here, \vec{C}^{binned}_{\ell_b} (\vec{C}_{\ell}) just indicates the vector containing all the binned (unbinned) bandpowers. Note that we use the binning matrix also to calculate the average value of the bin \ell_b.<br />
The binned D_{\ell_B} power spectra are then calculated as:<br />
<math><br />
D_\ell_b=\ell_b (\ell_b+1)/2/\pi C_{\ell_b}<br />
</math><br />
===Inputs===<br />
<br />
<br />
; Low-l spectrum (<math>\ell < 50</math>):<br />
* frequency maps from 30–353 GHz<br />
* common mask {{PlanckPapers|planck2013-p06}}<br />
* compact sources catalog<br />
<br />
; High-l spectrum (<math>50 < \ell < 2500</math>): <br />
<br />
* 100, 143, 143x217 and 217 GHz spectra and their covariance matrix (Sec. 2 in {{PlanckPapers|planck2013-p08}})<br />
* best-fit foreground templates and inter-frequency calibration factors (Table 5 of {{PlanckPapers|planck2013-p11}})<br />
* Beam transfer function uncertainties {{PlanckPapers|planck2013-p03c}}<br />
=== File names and Meta data ===<br />
<br />
<br />
The CMB spectrum and its covariance matrix are distributed in a single FITS file named <br />
* ''{{PLASingleFile | fileType=cosmo | name=COM_PowerSpect_CMB_R1.10.fits | link=COM_PowerSpect_CMB_R1.10.fits}}'' <br />
<br />
which contains 3 extensions<br />
<br />
; LOW-ELL (BINTABLE)<br />
: with the low ell part of the spectrum, not binned, and for l=2-49. The table columns are<br />
# ''ELL'' (integer): multipole number<br />
# ''D_ELL'' (float): $D_l$ as described below<br />
# ''ERRUP'' (float): the upward uncertainty<br />
# ''ERRDOWN'' (float): the downward uncertainty<br />
<br />
; HIGH-ELL (BINTABLE)<br />
: with the high-ell part of the spectrum, binned into 74 bins covering <math>\langle l \rangle = 47-2419\ </math> in bins of width <math>l=31</math> (with the exception of the last 4 bins that are wider). The table columns are as follows:<br />
# ''ELL'' (integer): mean multipole number of bin<br />
# ''L_MIN'' (integer): lowest multipole of bin<br />
# ''L_MAX'' (integer): highest multipole of bin<br />
# ''D_ELL'' (float): $D_l$ as described below<br />
# ''ERR'' (float): the uncertainty<br />
<br />
; COV-MAT (IMAGE)<br />
: with the covariance matrix of the high-ell part of the spectrum in a 74x74 pixel image, i.e., covering the same bins as the ''HIGH-ELL'' table.<br />
<br />
The spectra give $D_\ell = \ell(\ell+1)C_\ell / 2\pi$ in units of $\mu\, K^2$, and the covariance matrix is in units of $\mu\, K^4$. The spectra are shown in the figure below, in blue and red for the low- and high-<math>\ell</math> parts, respectively, and with the error bars for the high-ell part only in order to avoid confusion.<br />
<br />
[[File: CMBspect.jpg|thumb|center|700px|'''CMB spectrum. Linear x-scale; error bars only at high <math>\ell</math>.''']]<br />
<br />
The CMB spectrum is also given in a simple text comma-separated file:<br />
* ''{{PLASingleFile | fileType=cosmo | name=COM_PowerSpect_CMB_R1.10.txt |link=COM_PowerSpect_CMB_R1.10.txt}}''<br />
<br />
==Likelihood==<br />
TO BE WRITTEN.<br />
<!-- <br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
The likelihood code (and the data that comes with it) used to compute the likelihood of a model that predicts the CMB power spectra, lensing power spectrum, together with some foreground and some instrumental parameters. The data files are built primarily from the Planck mission results, but include also some results from the WMAP-9 data release. The data files are written in a specific format that can only be read by the code. The code consists in a c/f90 library, along with some optional tools in python. The code is used to read the data files, and given model power spectra and nuisance parameters it computes the log likelihood of that model. <br />
<br />
Detailed description of the installation and usage of the likelihood code and data is provided in the package. The package includes five data files: four for the CMB likelihoods and one for the lensing likelihood. All of the likelihoods delivered are described in detail in the {{PlanckPapers|planck2013-p08|1|Power spectrum & Likelihood Paper}} (for the CMB based likelihood) and in the {{PlanckPapers|planck2013-p12|1|Lensing Paper}} (for the lensing likelihood) .<br />
<br />
The CMB full likelihood has been divided into four parts to allow using selectively different ranges of multipoles. It also reflects the fact that the mathematical approximations used for those different parts are very different, as is the underlying data. In detail, we distribute<br />
* one low-<math>\ell</math> temperature only likelihood (commander), <br />
* one low-<math>\ell</math> temperature and polarisation likelihood (lowlike), and <br />
* one higl-<math>\ell</math> likelihood CAMspec. <br />
<br />
The ''Commander'' likelihood covers the multipoles 2 to 49. It uses a semi-analytic method to sample the low-<math>\ell</math> temperature likelihood on an intermediate product of one of the component separated maps. The samples are used along with an analytical approximation of the likelihood posterior to perform the likelihood computation in the code. See {{PlanckPapers|planck2013-p08}} section 8.1 for more details.<br />
<br />
The ''lowlike'' likelihood covers the multipoles 2 to 32 for temperature and polarization data. Since Planck is not releasing polarisation data at this time, the polarization map from WMAP9 is used instead. A temperature map is needed to perform the computation nevertheless, and we use here the same commander map. The likelihood is computed using a map-based approximation at low resolution and a master one at intermediate resolution, as in WMAP. The likelihood code actually calls a very slightly modified version of the WMAP9 code. This piece of the likelihood essentially provides a prior on the optical depth and has almost no other impact on cosmological parameter estimation. As such it could be replaced by a simple prior, and a user can decide to do so, which is one of the motivation to leave the three pieces of the CMB likelihood as different data packages; see {{PlanckPapers|planck2013-p08}} section 8.3 for more details. Note that the version of the WMAP code used here (code version v1.0) does not perform any test on the positive definiteness of the TT, TE, EE covariance matrices, and will return a null log likelihood in the unphysical cases where the absolute value of TE is too large. This will be corrected in a later version.<br />
<br />
The ''CAMspec'' likelihood covers the multipoles 50 to 2500 for temperature only. The likelihood is computed using a quadratic approximation, including mode to mode correlations that have been precomputed on a fiducial model. The likelihood uses data from the 100, 143 and 217 GHz channels. To do so it models the foreground at each frequency using the model described in the likelihood paper. Uncertainties on the relative calibration and on the beam transfer functions are included either as parametric models, or marginalized and integrated in the covariance matrix. Detailed description of the different nuisance parameters is given below. Priors are included in the likelihood on the CIB spectral index, relative calibration factors and beam error eigenmodes. See {{PlanckPapers|planck2013-p08}} section 2.1 for more details.<br />
<br />
The ''act/spt'' likelihood covers the multipoles 1500 to 10000 for temperature. It is described in{{BibCite|dun2013}}{{BibCite|Keis2011}}{{BibCite|Reic2012}}. It uses the code and data that can be retrieved from the [http://lambda.gsfc.nasa.gov/ Lambda archive] for [http://lambda.gsfc.nasa.gov/product/act/act_prod_table.cfm ACT] and [http://lambda.gsfc.nasa.gov/product/spt/spt_prod_table.cfm SPT]. It has been slightly modified to use a thermal and kinetic SZ model that matches the one used in CAMspec. As stated in{{BibCite|dun2013}}, the dust parameters a_ge and a_gs must be explored with the following priors: a_ge = 0.8 ± 0.2 and a_gs = 0.4 ± 0.2. Those priors are not included in the log likelihood computed by the code.<br />
<br />
The ''lensing'' likelihood covers the multipoles 40 to 400 using the result of the [[Specially_processed_maps | lensing reconstruction]]. It uses a quadratic approximation for the likelihood, with a covariance matrix including the marginalized contribution of the beam transfer function uncertainties, the diffuse point source correction uncertainties and the cosmological model uncertainty affecting the first order non-gaussian bias (N1). The correlation between temperature and lensing is not taken into account. Cosmological uncertainty effects on the normalization are dealt with using a first order renormalization procedure. This means that the code will need both the TT and $\phi\phi$ power spectrum up to <math>\ell</math> = 2048 to correctly perform the integrals needed for the renormalization. Nevertheless, the code will only produce an estimate based on the data between <math>\ell</math> = 40 to 400. See {{PlanckPapers|planck2013-p12}} section 6.1 for more details.<br />
</span><br />
<span style="color:red">OUTSTANDING: description of likelihood masks </span><br />
==Production process==<br />
<br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
The code is based on some basic routines from the libpmc library in the [http://arxiv.org/abs/1101.0950 cosmoPMC] code. It also uses some code from the [http://lambda.gsfc.nasa.gov/product/map/dr5/likelihood_get.cfm WMAP9 likelihood] for the lowlike likelihood and{{BibCite|dun2013}}{{BibCite|Keis2011}}{{BibCite|Reic2012}} for the act/spt one. The rest of the code has been specifically written for the Planck data. Each likelihood file has been processed using a different and dedicated pipeline as described in the likelihood paper {{PlanckPapers|planck2013-p08}} (section 2 and 8) and in the lensing paper {{PlanckPapers|planck2013-p12}} (section 6.1). We refer the reader to those papers for full details. The data are then encapsulated into the specific file format.<br />
<br />
Each dataset comes with its own self check. Whenever the code is used to read a data file, a computation will be done against an included test spectrum/nuisance parameter, and the log-likelihood will be displayed along with the expected result. Difference of the order of 10<math>^{-6}</math> or less are expected depending of the architecture.<br />
<br />
==Inputs==<br />
<br />
===Likelihood===<br />
<br />
; ''commander'' :<br />
* all Planck channels maps<br />
* compact source catalogs<br />
* common masks<br />
* beam transfer functions for all channels<br />
<br />
; ''lowlike'' :<br />
* WMAP9 likelihood data<br />
* Low-<math>\ell</math> Commander map<br />
<br />
; ''CAMspec'' :<br />
* 100, 143 and 217 GHz detector and detsets maps<br />
* 857GHz channel map<br />
* compact source catalog<br />
* common masks (0,1 & 3)<br />
* beam transfer function and error eigenmodes and covariance for 100, 143 and 217 GHz detectors & detsets<br />
* theoretical templates for the tSZ and kSZ contributions<br />
* color corrections for the CIB emission for the 143 and 217GHz detectors and detsets<br />
* fiducial CMB model (bootstrapped from WMAP7 best fit spectrum) estimated noise contribution from the half-ring maps for 100, 143 and 217 GHz<br />
<br />
; ''lensing'' :<br />
* the lensing map<br />
* beam error eigenmodes and covariance for the 143 and 217GHz channel maps<br />
* fiducial CMB model (from Planck cosmological parameter best fit)<br />
<br />
; ''act/spt'' :<br />
* data and code from [http://lambda.gsfc.nasa.gov/product/act/act_fulllikelihood_get.cfm here]<br />
* the tSZ andkSZ template are changed to match those of CAMspec<br />
<br />
== File names and Meta data ==<br />
<br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
<br />
'''Likelihood source code'''<br />
<br />
The source code is in the file<br />
: {{PLASingleFile |fileType=cosmo|name=COM_Code_Likelihood-v1.0_R1.10.tar.gz|link=COM_Code_Likelihood-v1.0_R1.10.tar.gz}} (C, f90 and python likelihood library and tools)<br />
<br />
'''Likelihood data packages'''<br />
<br />
The {{PLALikelihood|type=Data|link=data packages}} are<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-commander_R1.10.tar.gz | link=COM_Data_Likelihood-commander_R1.10.tar.gz}}'' (low-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-lowlike_R1.10.tar.gz | link=COM_Data_Likelihood-lowlike_R1.10.tar.gz}}'' (low-ell TE,EE,BB likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-CAMspec_R1.10.tar.gz | link=COM_Data_Likelihood-CAMspec_R1.10.tar.gz}}'' (high-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-actspt_R1.10.tar | link=COM_Data_Likelihood-actspt_R1.10.tar.gz}}'' (high-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-lensing_R1.10.tar.gz | link=COM_Data_Likelihood-lensing_R1.10.tar.gz}}'' (lensing likelihood)<br />
<br />
Untar and unzip all files to recover the code and likelihood data. Each package comes with a README file; follow the instructions inclosed to<br />
build the code and use it. To compute the CMB likelihood one has to sum the log likelihood of each of the commander_v4.1_lm49.clik, lowlike_v222.clik and CAMspec_v6.2TN_2013_02_26.clik, actspt_2013_01.clik. To compute the CMB+lensing likelihood, one has to sum the log likelihood of all 5 files.<br />
<br />
The CMB and lensing likelihood format are different. The CMB files have the termination .clik, the lensing one .clik_lensing. The lensing data being simpler (due to the less detailled modeling permitted by the lower signal-noise), the file is a simple ascii file containing all the data along with comments describing it, and linking the different quantities to the lensing paper. The CMB file format is more complex and must accommodate different forms of data (maps, power spectrum, distribution samples, covariance matrices...). It consists of a tree structure containing the data. At each level of the tree structure a given directory can contain array data (in the form of FITS files or ascii files for strings) and scalar data (joined in a single ascii file "_mdb"). Those files are not user modifiable and do not contain interesting meta data for the user. Tools to manipulate those files are included in the code package as optional python tools. They are documented in the code package.<br />
<br />
'''Likelihood masks'''<br />
<br />
The masks used in the Likelihood paper {{PlanckPapers|planck2013-p08}} are found in<br />
{{PLASingleFile|fileType=map|name=COM_Mask_Likelihood_2048_R1.10.fits|link=COM_Mask_Likelihood_2048_R1.10.fits}}<br />
<br />
which contains ten masks which are written into a single ''BINTABLE'' extension of 10 columns by 50331648 rows (the number of Healpix pixels in an Nside = 2048 map). The structure is as follows, where the column names are the names of the masks: <br />
<br />
{| border="1" cellpadding="3" cellspacing="0" align="center" style="text-align:left" width=800px<br />
|+ '''Likelihodd masks file data structure'''<br />
|- bgcolor="ffdead" <br />
!colspan="4" | 1. EXTNAME = 'MSK-LIKE' : Data columns<br />
|- bgcolor="ffdead" <br />
! Column Name || Data Type || Units || Description<br />
|-<br />
|CL31 || Real*4 || none || mask<br />
|-<br />
|CL39 || Real*4 || none || mask<br />
|-<br />
|CL49 || Real*4 || none || mask<br />
|-<br />
|G22 || Real*4 || none || mask <br />
|-<br />
|G35 || Real*4 || none || mask<br />
|-<br />
|G45 || Real*4 || none || mask<br />
|-<br />
|G56 || Real*4 || none || mask<br />
|-<br />
|G65 || Real*4 || none || mask<br />
|-<br />
|PS96 || Real*4 || none || mask<br />
|-<br />
|PSA82 || Real*4 || none || mask<br />
|-<br />
|- bgcolor="ffdead" <br />
! Keyword || Data Type || Value || Description<br />
|-<br />
|PIXTYPE || string || HEALPIX ||<br />
|-<br />
|COORDSYS || string || GALACTIC ||Coordinate system <br />
|-<br />
|ORDERING || string || NESTED || Healpix ordering<br />
|-<br />
|NSIDE || Int || 2048 || Healpix Nside <br />
|-<br />
|FIRSTPIX || Int*4 || 0 || First pixel number<br />
|-<br />
|LASTPIX || Int*4 || 50331647 || Last pixel number, for LFI and HFI, respectively<br />
<br />
|}<br />
--><br />
== References ==<br />
<References /><br />
<br />
<br />
<br />
[[Category:Mission products|008]]</div>Sgallihttps://wiki.cosmos.esa.int/planckpla2015/index.php?title=CMB_spectrum_%26_Likelihood_Code&diff=11061CMB spectrum & Likelihood Code2015-02-03T23:50:26Z<p>Sgalli: </p>
<hr />
<div>{{DISPLAYTITLE:CMB spectrum and likelihood code}}<br />
<br />
==CMB spectra==<br />
<br />
===General description===<br />
<br />
<br />
The Planck best-fit CMB temperature power spectrum, shown in figure below, covers the wide range of multipoles <math> \ell </math> = 2-2508. Over the multipole range <math> \ell </math> = 2–29, the power spectrum is derived from a component-separation algorithm, ''Commander'', <span style="color:red"> UPDATE COMMANDER: applied to maps in the frequency range 30–353 GHz over 91% of the sky {{PlanckPapers|planck2013-p06}} . The asymmetric error bars associated to this spectrum are the 68% confidence limits and include the uncertainties due to foreground subtraction </span>. For multipoles equal or greater than <math>\ell=30</math>, instead, the spectrum is derived from the ''Plik'' likelihood {{PlanckPapers|planck2014-a13}} by optimally combining the spectra in the frequency range 100-217 GHz, and correcting them for unresolved foregrounds. Associated 1-sigma errors include beam uncertainties. Both ''Commander'' and ''Plik'' are described in more details in the sections below.<br />
<br />
[[File: Planck2014 TT Dl NORES bin30 w180mm.jpeg|thumb|center|700px|'''CMB spectrum. Logarithmic x-scale up to <math>\ell=30</math>, linear at higher <math>\ell</math>; all points with error bars. The red line is the Planck best-fit primordial power spectrum (cf Planck TT+lowP in Table 3 of {{PlanckPapers|planck2014-a15}}).''']]<br />
===Production process===<br />
<br />
<span style="color:red"> UPDATE COMMANDER<br />
The <math>\ell</math> < 50 part of the Planck power spectrum is derived from the Commander approach, which implements Bayesian component separation in pixel space, fitting a parametric model to the data by sampling the posterior distribution for the model parameters {{PlanckPapers|planck2013-p06}}. The power spectrum at any multipole <math>\ell</math> is given as the maximum probability point for the posterior <math>C_\ell</math> distribution, marginalized over the other multipoles, and the error bars are 68% confidence level {{PlanckPapers|planck2013-p08}}. <br />
</span><br />
The <math>\ell</math> > 30 part of the CMB temperature power spectrum has been derived by the Plik likelihood, a code that implements a pseudo-Cl based technique, extensively described in Sec. 2 and the Appendix of {{PlanckPapers|planck2013-p08}}. Frequency spectra are computed as cross-spectra between half-mission maps. Mask and multipole range choices for each frequency spectrum are summarized in Section 3.3 of {{PlanckPapers|planck2014-p15}} and in {{PlanckPapers|planck2014-p13}}. The final power spectrum is an optimal combination of the 100, 143, 143x217 and 217 GHz spectra, corrected for the best-fit unresolved foregrounds and inter-frequency calibration factors, as derived from the full likelihood analysis (cf Planck+TT+lowP in Table 3 of {{PlanckPapers|planck2014-p15}}). A thorough description of the models of unresolved foregrounds is given in {{PlanckPapers|planck2014-p13}}. The spectrum covariance matrix accounts for cosmic variance and noise contributions, together with beam uncertainties. The <math>\ell</math> > 30 CMB TT spectrum and associated covariance matrix are available in two formats:<br />
#Unbinned, with 2479 bandpowers (\ell=30-2508).<br />
#Binned, in bins of <math>\Delta\ell=30 </math>, with 83 bandpowers in total. We bin the Cl power spectra with a weight proportional to <math> \ell (\ell+1) </math>, so that the binned bandpower centered in \ell_b is:<br />
<math><br />
C_{\ell_b}=\Sigma_{\ell \in b} w^b_\ell C_\ell \quad \text{with} \quad w^b_\ell=\frac{\ell (\ell+1)}{\Sigma_{\ell \in b} \ell (\ell+1)} </math><br />
<br />
Equivalently, using the matrix formalism, we can construct the binning matrix B as:<br />
<math> B_{\ell \ell_b}=w^{\ell_b}_\ell </math><br />
where B is a <math> n_bxn_\ell=83x2479</math> matrix, with n_b the number of bins and n_\ell the number of unbinned multipoles.<br />
Thus: <br />
<math><br />
\vec{C}^{binned}_{\ell_b}=B \vec{C}_\ell \\<br />
cov^{binned}= B cov B^T \\<br />
\ell_b=B \ell<br />
</math><br />
Here, \vec{C}^{binned}_{\ell_b} (\vec{C}_{\ell}) just indicates the vector containing all the binned (unbinned) bandpowers. Note that we use the binning matrix also to calculate the average value of the bin \ell_b.<br />
The binned D_{\ell_B} power spectra are then calculated as:<br />
<math><br />
D_\ell_b=\ell_b (\ell_b+1)/2/\pi C_{\ell_b}<br />
</math><br />
===Inputs===<br />
<br />
<br />
; Low-l spectrum (<math>\ell < 50</math>):<br />
* frequency maps from 30–353 GHz<br />
* common mask {{PlanckPapers|planck2013-p06}}<br />
* compact sources catalog<br />
<br />
; High-l spectrum (<math>50 < \ell < 2500</math>): <br />
<br />
* 100, 143, 143x217 and 217 GHz spectra and their covariance matrix (Sec. 2 in {{PlanckPapers|planck2013-p08}})<br />
* best-fit foreground templates and inter-frequency calibration factors (Table 5 of {{PlanckPapers|planck2013-p11}})<br />
* Beam transfer function uncertainties {{PlanckPapers|planck2013-p03c}}<br />
=== File names and Meta data ===<br />
<br />
<br />
The CMB spectrum and its covariance matrix are distributed in a single FITS file named <br />
* ''{{PLASingleFile | fileType=cosmo | name=COM_PowerSpect_CMB_R1.10.fits | link=COM_PowerSpect_CMB_R1.10.fits}}'' <br />
<br />
which contains 3 extensions<br />
<br />
; LOW-ELL (BINTABLE)<br />
: with the low ell part of the spectrum, not binned, and for l=2-49. The table columns are<br />
# ''ELL'' (integer): multipole number<br />
# ''D_ELL'' (float): $D_l$ as described below<br />
# ''ERRUP'' (float): the upward uncertainty<br />
# ''ERRDOWN'' (float): the downward uncertainty<br />
<br />
; HIGH-ELL (BINTABLE)<br />
: with the high-ell part of the spectrum, binned into 74 bins covering <math>\langle l \rangle = 47-2419\ </math> in bins of width <math>l=31</math> (with the exception of the last 4 bins that are wider). The table columns are as follows:<br />
# ''ELL'' (integer): mean multipole number of bin<br />
# ''L_MIN'' (integer): lowest multipole of bin<br />
# ''L_MAX'' (integer): highest multipole of bin<br />
# ''D_ELL'' (float): $D_l$ as described below<br />
# ''ERR'' (float): the uncertainty<br />
<br />
; COV-MAT (IMAGE)<br />
: with the covariance matrix of the high-ell part of the spectrum in a 74x74 pixel image, i.e., covering the same bins as the ''HIGH-ELL'' table.<br />
<br />
The spectra give $D_\ell = \ell(\ell+1)C_\ell / 2\pi$ in units of $\mu\, K^2$, and the covariance matrix is in units of $\mu\, K^4$. The spectra are shown in the figure below, in blue and red for the low- and high-<math>\ell</math> parts, respectively, and with the error bars for the high-ell part only in order to avoid confusion.<br />
<br />
[[File: CMBspect.jpg|thumb|center|700px|'''CMB spectrum. Linear x-scale; error bars only at high <math>\ell</math>.''']]<br />
<br />
The CMB spectrum is also given in a simple text comma-separated file:<br />
* ''{{PLASingleFile | fileType=cosmo | name=COM_PowerSpect_CMB_R1.10.txt |link=COM_PowerSpect_CMB_R1.10.txt}}''<br />
<br />
==Likelihood==<br />
TO BE WRITTEN.<br />
<!-- <br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
The likelihood code (and the data that comes with it) used to compute the likelihood of a model that predicts the CMB power spectra, lensing power spectrum, together with some foreground and some instrumental parameters. The data files are built primarily from the Planck mission results, but include also some results from the WMAP-9 data release. The data files are written in a specific format that can only be read by the code. The code consists in a c/f90 library, along with some optional tools in python. The code is used to read the data files, and given model power spectra and nuisance parameters it computes the log likelihood of that model. <br />
<br />
Detailed description of the installation and usage of the likelihood code and data is provided in the package. The package includes five data files: four for the CMB likelihoods and one for the lensing likelihood. All of the likelihoods delivered are described in detail in the {{PlanckPapers|planck2013-p08|1|Power spectrum & Likelihood Paper}} (for the CMB based likelihood) and in the {{PlanckPapers|planck2013-p12|1|Lensing Paper}} (for the lensing likelihood) .<br />
<br />
The CMB full likelihood has been divided into four parts to allow using selectively different ranges of multipoles. It also reflects the fact that the mathematical approximations used for those different parts are very different, as is the underlying data. In detail, we distribute<br />
* one low-<math>\ell</math> temperature only likelihood (commander), <br />
* one low-<math>\ell</math> temperature and polarisation likelihood (lowlike), and <br />
* one higl-<math>\ell</math> likelihood CAMspec. <br />
<br />
The ''Commander'' likelihood covers the multipoles 2 to 49. It uses a semi-analytic method to sample the low-<math>\ell</math> temperature likelihood on an intermediate product of one of the component separated maps. The samples are used along with an analytical approximation of the likelihood posterior to perform the likelihood computation in the code. See {{PlanckPapers|planck2013-p08}} section 8.1 for more details.<br />
<br />
The ''lowlike'' likelihood covers the multipoles 2 to 32 for temperature and polarization data. Since Planck is not releasing polarisation data at this time, the polarization map from WMAP9 is used instead. A temperature map is needed to perform the computation nevertheless, and we use here the same commander map. The likelihood is computed using a map-based approximation at low resolution and a master one at intermediate resolution, as in WMAP. The likelihood code actually calls a very slightly modified version of the WMAP9 code. This piece of the likelihood essentially provides a prior on the optical depth and has almost no other impact on cosmological parameter estimation. As such it could be replaced by a simple prior, and a user can decide to do so, which is one of the motivation to leave the three pieces of the CMB likelihood as different data packages; see {{PlanckPapers|planck2013-p08}} section 8.3 for more details. Note that the version of the WMAP code used here (code version v1.0) does not perform any test on the positive definiteness of the TT, TE, EE covariance matrices, and will return a null log likelihood in the unphysical cases where the absolute value of TE is too large. This will be corrected in a later version.<br />
<br />
The ''CAMspec'' likelihood covers the multipoles 50 to 2500 for temperature only. The likelihood is computed using a quadratic approximation, including mode to mode correlations that have been precomputed on a fiducial model. The likelihood uses data from the 100, 143 and 217 GHz channels. To do so it models the foreground at each frequency using the model described in the likelihood paper. Uncertainties on the relative calibration and on the beam transfer functions are included either as parametric models, or marginalized and integrated in the covariance matrix. Detailed description of the different nuisance parameters is given below. Priors are included in the likelihood on the CIB spectral index, relative calibration factors and beam error eigenmodes. See {{PlanckPapers|planck2013-p08}} section 2.1 for more details.<br />
<br />
The ''act/spt'' likelihood covers the multipoles 1500 to 10000 for temperature. It is described in{{BibCite|dun2013}}{{BibCite|Keis2011}}{{BibCite|Reic2012}}. It uses the code and data that can be retrieved from the [http://lambda.gsfc.nasa.gov/ Lambda archive] for [http://lambda.gsfc.nasa.gov/product/act/act_prod_table.cfm ACT] and [http://lambda.gsfc.nasa.gov/product/spt/spt_prod_table.cfm SPT]. It has been slightly modified to use a thermal and kinetic SZ model that matches the one used in CAMspec. As stated in{{BibCite|dun2013}}, the dust parameters a_ge and a_gs must be explored with the following priors: a_ge = 0.8 ± 0.2 and a_gs = 0.4 ± 0.2. Those priors are not included in the log likelihood computed by the code.<br />
<br />
The ''lensing'' likelihood covers the multipoles 40 to 400 using the result of the [[Specially_processed_maps | lensing reconstruction]]. It uses a quadratic approximation for the likelihood, with a covariance matrix including the marginalized contribution of the beam transfer function uncertainties, the diffuse point source correction uncertainties and the cosmological model uncertainty affecting the first order non-gaussian bias (N1). The correlation between temperature and lensing is not taken into account. Cosmological uncertainty effects on the normalization are dealt with using a first order renormalization procedure. This means that the code will need both the TT and $\phi\phi$ power spectrum up to <math>\ell</math> = 2048 to correctly perform the integrals needed for the renormalization. Nevertheless, the code will only produce an estimate based on the data between <math>\ell</math> = 40 to 400. See {{PlanckPapers|planck2013-p12}} section 6.1 for more details.<br />
</span><br />
<span style="color:red">OUTSTANDING: description of likelihood masks </span><br />
==Production process==<br />
<br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
The code is based on some basic routines from the libpmc library in the [http://arxiv.org/abs/1101.0950 cosmoPMC] code. It also uses some code from the [http://lambda.gsfc.nasa.gov/product/map/dr5/likelihood_get.cfm WMAP9 likelihood] for the lowlike likelihood and{{BibCite|dun2013}}{{BibCite|Keis2011}}{{BibCite|Reic2012}} for the act/spt one. The rest of the code has been specifically written for the Planck data. Each likelihood file has been processed using a different and dedicated pipeline as described in the likelihood paper {{PlanckPapers|planck2013-p08}} (section 2 and 8) and in the lensing paper {{PlanckPapers|planck2013-p12}} (section 6.1). We refer the reader to those papers for full details. The data are then encapsulated into the specific file format.<br />
<br />
Each dataset comes with its own self check. Whenever the code is used to read a data file, a computation will be done against an included test spectrum/nuisance parameter, and the log-likelihood will be displayed along with the expected result. Difference of the order of 10<math>^{-6}</math> or less are expected depending of the architecture.<br />
<br />
==Inputs==<br />
<br />
===Likelihood===<br />
<br />
; ''commander'' :<br />
* all Planck channels maps<br />
* compact source catalogs<br />
* common masks<br />
* beam transfer functions for all channels<br />
<br />
; ''lowlike'' :<br />
* WMAP9 likelihood data<br />
* Low-<math>\ell</math> Commander map<br />
<br />
; ''CAMspec'' :<br />
* 100, 143 and 217 GHz detector and detsets maps<br />
* 857GHz channel map<br />
* compact source catalog<br />
* common masks (0,1 & 3)<br />
* beam transfer function and error eigenmodes and covariance for 100, 143 and 217 GHz detectors & detsets<br />
* theoretical templates for the tSZ and kSZ contributions<br />
* color corrections for the CIB emission for the 143 and 217GHz detectors and detsets<br />
* fiducial CMB model (bootstrapped from WMAP7 best fit spectrum) estimated noise contribution from the half-ring maps for 100, 143 and 217 GHz<br />
<br />
; ''lensing'' :<br />
* the lensing map<br />
* beam error eigenmodes and covariance for the 143 and 217GHz channel maps<br />
* fiducial CMB model (from Planck cosmological parameter best fit)<br />
<br />
; ''act/spt'' :<br />
* data and code from [http://lambda.gsfc.nasa.gov/product/act/act_fulllikelihood_get.cfm here]<br />
* the tSZ andkSZ template are changed to match those of CAMspec<br />
<br />
== File names and Meta data ==<br />
<br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
<br />
'''Likelihood source code'''<br />
<br />
The source code is in the file<br />
: {{PLASingleFile |fileType=cosmo|name=COM_Code_Likelihood-v1.0_R1.10.tar.gz|link=COM_Code_Likelihood-v1.0_R1.10.tar.gz}} (C, f90 and python likelihood library and tools)<br />
<br />
'''Likelihood data packages'''<br />
<br />
The {{PLALikelihood|type=Data|link=data packages}} are<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-commander_R1.10.tar.gz | link=COM_Data_Likelihood-commander_R1.10.tar.gz}}'' (low-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-lowlike_R1.10.tar.gz | link=COM_Data_Likelihood-lowlike_R1.10.tar.gz}}'' (low-ell TE,EE,BB likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-CAMspec_R1.10.tar.gz | link=COM_Data_Likelihood-CAMspec_R1.10.tar.gz}}'' (high-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-actspt_R1.10.tar | link=COM_Data_Likelihood-actspt_R1.10.tar.gz}}'' (high-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-lensing_R1.10.tar.gz | link=COM_Data_Likelihood-lensing_R1.10.tar.gz}}'' (lensing likelihood)<br />
<br />
Untar and unzip all files to recover the code and likelihood data. Each package comes with a README file; follow the instructions inclosed to<br />
build the code and use it. To compute the CMB likelihood one has to sum the log likelihood of each of the commander_v4.1_lm49.clik, lowlike_v222.clik and CAMspec_v6.2TN_2013_02_26.clik, actspt_2013_01.clik. To compute the CMB+lensing likelihood, one has to sum the log likelihood of all 5 files.<br />
<br />
The CMB and lensing likelihood format are different. The CMB files have the termination .clik, the lensing one .clik_lensing. The lensing data being simpler (due to the less detailled modeling permitted by the lower signal-noise), the file is a simple ascii file containing all the data along with comments describing it, and linking the different quantities to the lensing paper. The CMB file format is more complex and must accommodate different forms of data (maps, power spectrum, distribution samples, covariance matrices...). It consists of a tree structure containing the data. At each level of the tree structure a given directory can contain array data (in the form of FITS files or ascii files for strings) and scalar data (joined in a single ascii file "_mdb"). Those files are not user modifiable and do not contain interesting meta data for the user. Tools to manipulate those files are included in the code package as optional python tools. They are documented in the code package.<br />
<br />
'''Likelihood masks'''<br />
<br />
The masks used in the Likelihood paper {{PlanckPapers|planck2013-p08}} are found in<br />
{{PLASingleFile|fileType=map|name=COM_Mask_Likelihood_2048_R1.10.fits|link=COM_Mask_Likelihood_2048_R1.10.fits}}<br />
<br />
which contains ten masks which are written into a single ''BINTABLE'' extension of 10 columns by 50331648 rows (the number of Healpix pixels in an Nside = 2048 map). The structure is as follows, where the column names are the names of the masks: <br />
<br />
{| border="1" cellpadding="3" cellspacing="0" align="center" style="text-align:left" width=800px<br />
|+ '''Likelihodd masks file data structure'''<br />
|- bgcolor="ffdead" <br />
!colspan="4" | 1. EXTNAME = 'MSK-LIKE' : Data columns<br />
|- bgcolor="ffdead" <br />
! Column Name || Data Type || Units || Description<br />
|-<br />
|CL31 || Real*4 || none || mask<br />
|-<br />
|CL39 || Real*4 || none || mask<br />
|-<br />
|CL49 || Real*4 || none || mask<br />
|-<br />
|G22 || Real*4 || none || mask <br />
|-<br />
|G35 || Real*4 || none || mask<br />
|-<br />
|G45 || Real*4 || none || mask<br />
|-<br />
|G56 || Real*4 || none || mask<br />
|-<br />
|G65 || Real*4 || none || mask<br />
|-<br />
|PS96 || Real*4 || none || mask<br />
|-<br />
|PSA82 || Real*4 || none || mask<br />
|-<br />
|- bgcolor="ffdead" <br />
! Keyword || Data Type || Value || Description<br />
|-<br />
|PIXTYPE || string || HEALPIX ||<br />
|-<br />
|COORDSYS || string || GALACTIC ||Coordinate system <br />
|-<br />
|ORDERING || string || NESTED || Healpix ordering<br />
|-<br />
|NSIDE || Int || 2048 || Healpix Nside <br />
|-<br />
|FIRSTPIX || Int*4 || 0 || First pixel number<br />
|-<br />
|LASTPIX || Int*4 || 50331647 || Last pixel number, for LFI and HFI, respectively<br />
<br />
|}<br />
--><br />
== References ==<br />
<References /><br />
<br />
<br />
<br />
[[Category:Mission products|008]]</div>Sgallihttps://wiki.cosmos.esa.int/planckpla2015/index.php?title=CMB_spectrum_%26_Likelihood_Code&diff=11060CMB spectrum & Likelihood Code2015-02-03T21:33:10Z<p>Sgalli: </p>
<hr />
<div>{{DISPLAYTITLE:CMB spectrum and likelihood code}}<br />
<br />
==CMB spectra==<br />
<br />
===General description===<br />
<br />
<br />
The Planck best-fit CMB temperature power spectrum, shown in figure below, covers the wide range of multipoles <math> \ell </math> = 2-2508. Over the multipole range <math> \ell </math> = 2–29, the power spectrum is derived from a component-separation algorithm, ''Commander'', <span style="color:red"> UPDATE COMMANDER: applied to maps in the frequency range 30–353 GHz over 91% of the sky {{PlanckPapers|planck2013-p06}} . The asymmetric error bars associated to this spectrum are the 68% confidence limits and include the uncertainties due to foreground subtraction </span>. For multipoles equal or greater than <math>\ell=30</math>, instead, the spectrum is derived from the ''Plik'' likelihood {{PlanckPapers|planck2014-a13}} by optimally combining the spectra in the frequency range 100-217 GHz, and correcting them for unresolved foregrounds. Associated 1-sigma errors include beam uncertainties. Both ''Commander'' and ''Plik'' are described in more details in the sections below.<br />
<br />
[[File: Planck2014 TT Dl NORES bin30 w180mm.jpeg|thumb|center|700px|'''CMB spectrum. Logarithmic x-scale up to <math>\ell=30</math>, linear at higher <math>\ell</math>; all points with error bars. The red line is the Planck best-fit primordial power spectrum (cf Planck TT+lowP in Table 3 of {{PlanckPapers|planck2014-a15}}).''']]<br />
===Production process===<br />
<br />
<span style="color:red"> UPDATE COMMANDER<br />
The <math>\ell</math> < 50 part of the Planck power spectrum is derived from the Commander approach, which implements Bayesian component separation in pixel space, fitting a parametric model to the data by sampling the posterior distribution for the model parameters {{PlanckPapers|planck2013-p06}}. The power spectrum at any multipole <math>\ell</math> is given as the maximum probability point for the posterior <math>C_\ell</math> distribution, marginalized over the other multipoles, and the error bars are 68% confidence level {{PlanckPapers|planck2013-p08}}. <br />
</span><br />
The <math>\ell</math> > 30 part of the CMB temperature power spectrum has been derived by the Plik likelihood, a code that implements a pseudo-Cl based technique, extensively described in Sec. 2 and the Appendix of {{PlanckPapers|planck2013-p08}}. Frequency spectra are computed as cross-spectra between half-mission maps. Mask and multipole range choices for each frequency spectrum are summarized in Section 3.3 of {{PlanckPapers|planck2014-p15}} and in {{PlanckPapers|planck2014-p13}}. The final power spectrum is an optimal combination of the 100, 143, 143x217 and 217 GHz spectra, corrected for the best-fit unresolved foregrounds and inter-frequency calibration factors, as derived from the full likelihood analysis (cf Planck+TT+lowP in Table 3 of {{PlanckPapers|planck2014-p15}}). A thorough description of the models of unresolved foregrounds is given in {{PlanckPapers|planck2014-p13}}. The spectrum covariance matrix accounts for cosmic variance and noise contributions, together with beam uncertainties. Both spectrum and associated covariance matrix are available in two formats:<br />
#Unbinned, in 2479 bandpowers.<br />
#Binned, in 83 bandpowers. We bin the Cl power spectra with a weight proportional to <math> \ell (\ell+1) </math>, so that the binned bandpower centered in \ell_b is:<br />
<math><br />
C_{\ell_b}=\Sigma_{\ell \in b} w^b_\ell C_\ell \quad \text{with} \quad w^b_\ell=\frac{\ell (\ell+1)}{\Sigma_{\ell \in b} \ell (\ell+1)} </math><br />
<br />
Equivalently, using the matrix formalism, we can construct the binning matrix B, with:<br />
<math><br />
B_{\ell \ell_b}=w^{\ell_b}_\ell </math><br />
<br />
so that <br />
<math><br />
\vec{C}^{binned}_{\ell_b}=B \vec{C}_\ell \\<br />
cov^{binned}= B cov B^T \\<br />
\ell_b=B \ell<br />
</math><br />
Here, \vec{C}^{binned}_{\ell_b} just indicates the vector containing all the binned bandpowers. The binned D_{\ell_B} power spectra are then :<br />
<math><br />
D_\ell_b=\ell_b (\ell_b+1)/2/\pi C_{\ell_b}<br />
</math><br />
===Inputs===<br />
<br />
<br />
; Low-l spectrum (<math>\ell < 50</math>):<br />
* frequency maps from 30–353 GHz<br />
* common mask {{PlanckPapers|planck2013-p06}}<br />
* compact sources catalog<br />
<br />
; High-l spectrum (<math>50 < \ell < 2500</math>): <br />
<br />
* 100, 143, 143x217 and 217 GHz spectra and their covariance matrix (Sec. 2 in {{PlanckPapers|planck2013-p08}})<br />
* best-fit foreground templates and inter-frequency calibration factors (Table 5 of {{PlanckPapers|planck2013-p11}})<br />
* Beam transfer function uncertainties {{PlanckPapers|planck2013-p03c}}<br />
=== File names and Meta data ===<br />
<br />
<br />
The CMB spectrum and its covariance matrix are distributed in a single FITS file named <br />
* ''{{PLASingleFile | fileType=cosmo | name=COM_PowerSpect_CMB_R1.10.fits | link=COM_PowerSpect_CMB_R1.10.fits}}'' <br />
<br />
which contains 3 extensions<br />
<br />
; LOW-ELL (BINTABLE)<br />
: with the low ell part of the spectrum, not binned, and for l=2-49. The table columns are<br />
# ''ELL'' (integer): multipole number<br />
# ''D_ELL'' (float): $D_l$ as described below<br />
# ''ERRUP'' (float): the upward uncertainty<br />
# ''ERRDOWN'' (float): the downward uncertainty<br />
<br />
; HIGH-ELL (BINTABLE)<br />
: with the high-ell part of the spectrum, binned into 74 bins covering <math>\langle l \rangle = 47-2419\ </math> in bins of width <math>l=31</math> (with the exception of the last 4 bins that are wider). The table columns are as follows:<br />
# ''ELL'' (integer): mean multipole number of bin<br />
# ''L_MIN'' (integer): lowest multipole of bin<br />
# ''L_MAX'' (integer): highest multipole of bin<br />
# ''D_ELL'' (float): $D_l$ as described below<br />
# ''ERR'' (float): the uncertainty<br />
<br />
; COV-MAT (IMAGE)<br />
: with the covariance matrix of the high-ell part of the spectrum in a 74x74 pixel image, i.e., covering the same bins as the ''HIGH-ELL'' table.<br />
<br />
The spectra give $D_\ell = \ell(\ell+1)C_\ell / 2\pi$ in units of $\mu\, K^2$, and the covariance matrix is in units of $\mu\, K^4$. The spectra are shown in the figure below, in blue and red for the low- and high-<math>\ell</math> parts, respectively, and with the error bars for the high-ell part only in order to avoid confusion.<br />
<br />
[[File: CMBspect.jpg|thumb|center|700px|'''CMB spectrum. Linear x-scale; error bars only at high <math>\ell</math>.''']]<br />
<br />
The CMB spectrum is also given in a simple text comma-separated file:<br />
* ''{{PLASingleFile | fileType=cosmo | name=COM_PowerSpect_CMB_R1.10.txt |link=COM_PowerSpect_CMB_R1.10.txt}}''<br />
<br />
==Likelihood==<br />
TO BE WRITTEN.<br />
<!-- <br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
The likelihood code (and the data that comes with it) used to compute the likelihood of a model that predicts the CMB power spectra, lensing power spectrum, together with some foreground and some instrumental parameters. The data files are built primarily from the Planck mission results, but include also some results from the WMAP-9 data release. The data files are written in a specific format that can only be read by the code. The code consists in a c/f90 library, along with some optional tools in python. The code is used to read the data files, and given model power spectra and nuisance parameters it computes the log likelihood of that model. <br />
<br />
Detailed description of the installation and usage of the likelihood code and data is provided in the package. The package includes five data files: four for the CMB likelihoods and one for the lensing likelihood. All of the likelihoods delivered are described in detail in the {{PlanckPapers|planck2013-p08|1|Power spectrum & Likelihood Paper}} (for the CMB based likelihood) and in the {{PlanckPapers|planck2013-p12|1|Lensing Paper}} (for the lensing likelihood) .<br />
<br />
The CMB full likelihood has been divided into four parts to allow using selectively different ranges of multipoles. It also reflects the fact that the mathematical approximations used for those different parts are very different, as is the underlying data. In detail, we distribute<br />
* one low-<math>\ell</math> temperature only likelihood (commander), <br />
* one low-<math>\ell</math> temperature and polarisation likelihood (lowlike), and <br />
* one higl-<math>\ell</math> likelihood CAMspec. <br />
<br />
The ''Commander'' likelihood covers the multipoles 2 to 49. It uses a semi-analytic method to sample the low-<math>\ell</math> temperature likelihood on an intermediate product of one of the component separated maps. The samples are used along with an analytical approximation of the likelihood posterior to perform the likelihood computation in the code. See {{PlanckPapers|planck2013-p08}} section 8.1 for more details.<br />
<br />
The ''lowlike'' likelihood covers the multipoles 2 to 32 for temperature and polarization data. Since Planck is not releasing polarisation data at this time, the polarization map from WMAP9 is used instead. A temperature map is needed to perform the computation nevertheless, and we use here the same commander map. The likelihood is computed using a map-based approximation at low resolution and a master one at intermediate resolution, as in WMAP. The likelihood code actually calls a very slightly modified version of the WMAP9 code. This piece of the likelihood essentially provides a prior on the optical depth and has almost no other impact on cosmological parameter estimation. As such it could be replaced by a simple prior, and a user can decide to do so, which is one of the motivation to leave the three pieces of the CMB likelihood as different data packages; see {{PlanckPapers|planck2013-p08}} section 8.3 for more details. Note that the version of the WMAP code used here (code version v1.0) does not perform any test on the positive definiteness of the TT, TE, EE covariance matrices, and will return a null log likelihood in the unphysical cases where the absolute value of TE is too large. This will be corrected in a later version.<br />
<br />
The ''CAMspec'' likelihood covers the multipoles 50 to 2500 for temperature only. The likelihood is computed using a quadratic approximation, including mode to mode correlations that have been precomputed on a fiducial model. The likelihood uses data from the 100, 143 and 217 GHz channels. To do so it models the foreground at each frequency using the model described in the likelihood paper. Uncertainties on the relative calibration and on the beam transfer functions are included either as parametric models, or marginalized and integrated in the covariance matrix. Detailed description of the different nuisance parameters is given below. Priors are included in the likelihood on the CIB spectral index, relative calibration factors and beam error eigenmodes. See {{PlanckPapers|planck2013-p08}} section 2.1 for more details.<br />
<br />
The ''act/spt'' likelihood covers the multipoles 1500 to 10000 for temperature. It is described in{{BibCite|dun2013}}{{BibCite|Keis2011}}{{BibCite|Reic2012}}. It uses the code and data that can be retrieved from the [http://lambda.gsfc.nasa.gov/ Lambda archive] for [http://lambda.gsfc.nasa.gov/product/act/act_prod_table.cfm ACT] and [http://lambda.gsfc.nasa.gov/product/spt/spt_prod_table.cfm SPT]. It has been slightly modified to use a thermal and kinetic SZ model that matches the one used in CAMspec. As stated in{{BibCite|dun2013}}, the dust parameters a_ge and a_gs must be explored with the following priors: a_ge = 0.8 ± 0.2 and a_gs = 0.4 ± 0.2. Those priors are not included in the log likelihood computed by the code.<br />
<br />
The ''lensing'' likelihood covers the multipoles 40 to 400 using the result of the [[Specially_processed_maps | lensing reconstruction]]. It uses a quadratic approximation for the likelihood, with a covariance matrix including the marginalized contribution of the beam transfer function uncertainties, the diffuse point source correction uncertainties and the cosmological model uncertainty affecting the first order non-gaussian bias (N1). The correlation between temperature and lensing is not taken into account. Cosmological uncertainty effects on the normalization are dealt with using a first order renormalization procedure. This means that the code will need both the TT and $\phi\phi$ power spectrum up to <math>\ell</math> = 2048 to correctly perform the integrals needed for the renormalization. Nevertheless, the code will only produce an estimate based on the data between <math>\ell</math> = 40 to 400. See {{PlanckPapers|planck2013-p12}} section 6.1 for more details.<br />
</span><br />
<span style="color:red">OUTSTANDING: description of likelihood masks </span><br />
==Production process==<br />
<br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
The code is based on some basic routines from the libpmc library in the [http://arxiv.org/abs/1101.0950 cosmoPMC] code. It also uses some code from the [http://lambda.gsfc.nasa.gov/product/map/dr5/likelihood_get.cfm WMAP9 likelihood] for the lowlike likelihood and{{BibCite|dun2013}}{{BibCite|Keis2011}}{{BibCite|Reic2012}} for the act/spt one. The rest of the code has been specifically written for the Planck data. Each likelihood file has been processed using a different and dedicated pipeline as described in the likelihood paper {{PlanckPapers|planck2013-p08}} (section 2 and 8) and in the lensing paper {{PlanckPapers|planck2013-p12}} (section 6.1). We refer the reader to those papers for full details. The data are then encapsulated into the specific file format.<br />
<br />
Each dataset comes with its own self check. Whenever the code is used to read a data file, a computation will be done against an included test spectrum/nuisance parameter, and the log-likelihood will be displayed along with the expected result. Difference of the order of 10<math>^{-6}</math> or less are expected depending of the architecture.<br />
<br />
==Inputs==<br />
<br />
===Likelihood===<br />
<br />
; ''commander'' :<br />
* all Planck channels maps<br />
* compact source catalogs<br />
* common masks<br />
* beam transfer functions for all channels<br />
<br />
; ''lowlike'' :<br />
* WMAP9 likelihood data<br />
* Low-<math>\ell</math> Commander map<br />
<br />
; ''CAMspec'' :<br />
* 100, 143 and 217 GHz detector and detsets maps<br />
* 857GHz channel map<br />
* compact source catalog<br />
* common masks (0,1 & 3)<br />
* beam transfer function and error eigenmodes and covariance for 100, 143 and 217 GHz detectors & detsets<br />
* theoretical templates for the tSZ and kSZ contributions<br />
* color corrections for the CIB emission for the 143 and 217GHz detectors and detsets<br />
* fiducial CMB model (bootstrapped from WMAP7 best fit spectrum) estimated noise contribution from the half-ring maps for 100, 143 and 217 GHz<br />
<br />
; ''lensing'' :<br />
* the lensing map<br />
* beam error eigenmodes and covariance for the 143 and 217GHz channel maps<br />
* fiducial CMB model (from Planck cosmological parameter best fit)<br />
<br />
; ''act/spt'' :<br />
* data and code from [http://lambda.gsfc.nasa.gov/product/act/act_fulllikelihood_get.cfm here]<br />
* the tSZ andkSZ template are changed to match those of CAMspec<br />
<br />
== File names and Meta data ==<br />
<br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
<br />
'''Likelihood source code'''<br />
<br />
The source code is in the file<br />
: {{PLASingleFile |fileType=cosmo|name=COM_Code_Likelihood-v1.0_R1.10.tar.gz|link=COM_Code_Likelihood-v1.0_R1.10.tar.gz}} (C, f90 and python likelihood library and tools)<br />
<br />
'''Likelihood data packages'''<br />
<br />
The {{PLALikelihood|type=Data|link=data packages}} are<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-commander_R1.10.tar.gz | link=COM_Data_Likelihood-commander_R1.10.tar.gz}}'' (low-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-lowlike_R1.10.tar.gz | link=COM_Data_Likelihood-lowlike_R1.10.tar.gz}}'' (low-ell TE,EE,BB likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-CAMspec_R1.10.tar.gz | link=COM_Data_Likelihood-CAMspec_R1.10.tar.gz}}'' (high-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-actspt_R1.10.tar | link=COM_Data_Likelihood-actspt_R1.10.tar.gz}}'' (high-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-lensing_R1.10.tar.gz | link=COM_Data_Likelihood-lensing_R1.10.tar.gz}}'' (lensing likelihood)<br />
<br />
Untar and unzip all files to recover the code and likelihood data. Each package comes with a README file; follow the instructions inclosed to<br />
build the code and use it. To compute the CMB likelihood one has to sum the log likelihood of each of the commander_v4.1_lm49.clik, lowlike_v222.clik and CAMspec_v6.2TN_2013_02_26.clik, actspt_2013_01.clik. To compute the CMB+lensing likelihood, one has to sum the log likelihood of all 5 files.<br />
<br />
The CMB and lensing likelihood format are different. The CMB files have the termination .clik, the lensing one .clik_lensing. The lensing data being simpler (due to the less detailled modeling permitted by the lower signal-noise), the file is a simple ascii file containing all the data along with comments describing it, and linking the different quantities to the lensing paper. The CMB file format is more complex and must accommodate different forms of data (maps, power spectrum, distribution samples, covariance matrices...). It consists of a tree structure containing the data. At each level of the tree structure a given directory can contain array data (in the form of FITS files or ascii files for strings) and scalar data (joined in a single ascii file "_mdb"). Those files are not user modifiable and do not contain interesting meta data for the user. Tools to manipulate those files are included in the code package as optional python tools. They are documented in the code package.<br />
<br />
'''Likelihood masks'''<br />
<br />
The masks used in the Likelihood paper {{PlanckPapers|planck2013-p08}} are found in<br />
{{PLASingleFile|fileType=map|name=COM_Mask_Likelihood_2048_R1.10.fits|link=COM_Mask_Likelihood_2048_R1.10.fits}}<br />
<br />
which contains ten masks which are written into a single ''BINTABLE'' extension of 10 columns by 50331648 rows (the number of Healpix pixels in an Nside = 2048 map). The structure is as follows, where the column names are the names of the masks: <br />
<br />
{| border="1" cellpadding="3" cellspacing="0" align="center" style="text-align:left" width=800px<br />
|+ '''Likelihodd masks file data structure'''<br />
|- bgcolor="ffdead" <br />
!colspan="4" | 1. EXTNAME = 'MSK-LIKE' : Data columns<br />
|- bgcolor="ffdead" <br />
! Column Name || Data Type || Units || Description<br />
|-<br />
|CL31 || Real*4 || none || mask<br />
|-<br />
|CL39 || Real*4 || none || mask<br />
|-<br />
|CL49 || Real*4 || none || mask<br />
|-<br />
|G22 || Real*4 || none || mask <br />
|-<br />
|G35 || Real*4 || none || mask<br />
|-<br />
|G45 || Real*4 || none || mask<br />
|-<br />
|G56 || Real*4 || none || mask<br />
|-<br />
|G65 || Real*4 || none || mask<br />
|-<br />
|PS96 || Real*4 || none || mask<br />
|-<br />
|PSA82 || Real*4 || none || mask<br />
|-<br />
|- bgcolor="ffdead" <br />
! Keyword || Data Type || Value || Description<br />
|-<br />
|PIXTYPE || string || HEALPIX ||<br />
|-<br />
|COORDSYS || string || GALACTIC ||Coordinate system <br />
|-<br />
|ORDERING || string || NESTED || Healpix ordering<br />
|-<br />
|NSIDE || Int || 2048 || Healpix Nside <br />
|-<br />
|FIRSTPIX || Int*4 || 0 || First pixel number<br />
|-<br />
|LASTPIX || Int*4 || 50331647 || Last pixel number, for LFI and HFI, respectively<br />
<br />
|}<br />
--><br />
== References ==<br />
<References /><br />
<br />
<br />
<br />
[[Category:Mission products|008]]</div>Sgallihttps://wiki.cosmos.esa.int/planckpla2015/index.php?title=CMB_spectrum_%26_Likelihood_Code&diff=11059CMB spectrum & Likelihood Code2015-02-03T21:24:30Z<p>Sgalli: </p>
<hr />
<div>{{DISPLAYTITLE:CMB spectrum and likelihood code}}<br />
<br />
==CMB spectra==<br />
<br />
===General description===<br />
<br />
<br />
The Planck best-fit CMB temperature power spectrum, shown in figure below, covers the wide range of multipoles <math> \ell </math> = 2-2508. Over the multipole range <math> \ell </math> = 2–29, the power spectrum is derived from a component-separation algorithm, ''Commander'', <span style="color:red"> UPDATE COMMANDER: applied to maps in the frequency range 30–353 GHz over 91% of the sky {{PlanckPapers|planck2013-p06}} . The asymmetric error bars associated to this spectrum are the 68% confidence limits and include the uncertainties due to foreground subtraction </span>. For multipoles equal or greater than <math>\ell=30</math>, instead, the spectrum is derived from the ''Plik'' likelihood {{PlanckPapers|planck2014-a13}} by optimally combining the spectra in the frequency range 100-217 GHz, and correcting them for unresolved foregrounds. Associated 1-sigma errors include beam uncertainties. Both ''Commander'' and ''Plik'' are described in more details in the sections below.<br />
<br />
[[File: Planck2014 TT Dl NORES bin30 w180mm.jpeg|thumb|center|700px|'''CMB spectrum. Logarithmic x-scale up to <math>\ell=30</math>, linear at higher <math>\ell</math>; all points with error bars. The red line is the Planck best-fit primordial power spectrum (cf Planck TT+lowP in Table 3 of {{PlanckPapers|planck2014-a15}}).''']]<br />
===Production process===<br />
<br />
<span style="color:red"> UPDATE COMMANDER<br />
The <math>\ell</math> < 50 part of the Planck power spectrum is derived from the Commander approach, which implements Bayesian component separation in pixel space, fitting a parametric model to the data by sampling the posterior distribution for the model parameters {{PlanckPapers|planck2013-p06}}. The power spectrum at any multipole <math>\ell</math> is given as the maximum probability point for the posterior <math>C_\ell</math> distribution, marginalized over the other multipoles, and the error bars are 68% confidence level {{PlanckPapers|planck2013-p08}}. <br />
</span><br />
The <math>\ell</math> > 30 part of the CMB temperature power spectrum has been derived by the Plik likelihood, a code that implements a pseudo-Cl based technique, extensively described in Sec. 2 and the Appendix of {{PlanckPapers|planck2013-p08}}. Frequency spectra are computed as cross-spectra between half-mission maps. Mask and multipole range choices for each frequency spectrum are summarized in Section 3.3 of {{PlanckPapers|planck2014-p15}} and in {{PlanckPapers|planck2014-p13}}. The final power spectrum is an optimal combination of the 100, 143, 143x217 and 217 GHz spectra, corrected for the best-fit unresolved foregrounds and inter-frequency calibration factors, as derived from the full likelihood analysis (cf Planck+TT+lowP in Table 3 of {{PlanckPapers|planck2014-p15}}). A thorough description of the models of unresolved foregrounds is given in {{PlanckPapers|planck2014-p13}}. The spectrum covariance matrix accounts for cosmic variance and noise contributions, together with beam uncertainties. Both spectrum and associated covariance matrix are available in two formats:<br />
#Unbinned, in 2479 bandpowers.<br />
#Binned, in 83 bandpowers. We bin the Cl power spectra with a weight proportional to <math> \ell (\ell+1) </math> so that:<br />
<math><br />
C_{\ell_b}=\Sigma_{\ell \in b} w^b_\ell C_\ell \quad \text{with} \quad w^b_\ell=\frac{\ell (\ell+1)}{\Sigma_{\ell \in b} \ell (\ell+1)} </math><br />
<br />
Or alternatevely, using the matrix formalism, we can construct an \ellx\b binning matrix B, with:<br />
<math><br />
B_{\ell \ell_b}=w^{\ell_b}_\ell </math><br />
<br />
so that <br />
<math><br />
\vec{C}^{binned}_{\ell}=B \vec{C}_\ell \\<br />
cov^{binned}= B cov B^T<br />
</math><br />
<br />
===Inputs===<br />
<br />
<br />
; Low-l spectrum (<math>\ell < 50</math>):<br />
* frequency maps from 30–353 GHz<br />
* common mask {{PlanckPapers|planck2013-p06}}<br />
* compact sources catalog<br />
<br />
; High-l spectrum (<math>50 < \ell < 2500</math>): <br />
<br />
* 100, 143, 143x217 and 217 GHz spectra and their covariance matrix (Sec. 2 in {{PlanckPapers|planck2013-p08}})<br />
* best-fit foreground templates and inter-frequency calibration factors (Table 5 of {{PlanckPapers|planck2013-p11}})<br />
* Beam transfer function uncertainties {{PlanckPapers|planck2013-p03c}}<br />
=== File names and Meta data ===<br />
<br />
<br />
The CMB spectrum and its covariance matrix are distributed in a single FITS file named <br />
* ''{{PLASingleFile | fileType=cosmo | name=COM_PowerSpect_CMB_R1.10.fits | link=COM_PowerSpect_CMB_R1.10.fits}}'' <br />
<br />
which contains 3 extensions<br />
<br />
; LOW-ELL (BINTABLE)<br />
: with the low ell part of the spectrum, not binned, and for l=2-49. The table columns are<br />
# ''ELL'' (integer): multipole number<br />
# ''D_ELL'' (float): $D_l$ as described below<br />
# ''ERRUP'' (float): the upward uncertainty<br />
# ''ERRDOWN'' (float): the downward uncertainty<br />
<br />
; HIGH-ELL (BINTABLE)<br />
: with the high-ell part of the spectrum, binned into 74 bins covering <math>\langle l \rangle = 47-2419\ </math> in bins of width <math>l=31</math> (with the exception of the last 4 bins that are wider). The table columns are as follows:<br />
# ''ELL'' (integer): mean multipole number of bin<br />
# ''L_MIN'' (integer): lowest multipole of bin<br />
# ''L_MAX'' (integer): highest multipole of bin<br />
# ''D_ELL'' (float): $D_l$ as described below<br />
# ''ERR'' (float): the uncertainty<br />
<br />
; COV-MAT (IMAGE)<br />
: with the covariance matrix of the high-ell part of the spectrum in a 74x74 pixel image, i.e., covering the same bins as the ''HIGH-ELL'' table.<br />
<br />
The spectra give $D_\ell = \ell(\ell+1)C_\ell / 2\pi$ in units of $\mu\, K^2$, and the covariance matrix is in units of $\mu\, K^4$. The spectra are shown in the figure below, in blue and red for the low- and high-<math>\ell</math> parts, respectively, and with the error bars for the high-ell part only in order to avoid confusion.<br />
<br />
[[File: CMBspect.jpg|thumb|center|700px|'''CMB spectrum. Linear x-scale; error bars only at high <math>\ell</math>.''']]<br />
<br />
The CMB spectrum is also given in a simple text comma-separated file:<br />
* ''{{PLASingleFile | fileType=cosmo | name=COM_PowerSpect_CMB_R1.10.txt |link=COM_PowerSpect_CMB_R1.10.txt}}''<br />
<br />
==Likelihood==<br />
TO BE WRITTEN.<br />
<!-- <br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
The likelihood code (and the data that comes with it) used to compute the likelihood of a model that predicts the CMB power spectra, lensing power spectrum, together with some foreground and some instrumental parameters. The data files are built primarily from the Planck mission results, but include also some results from the WMAP-9 data release. The data files are written in a specific format that can only be read by the code. The code consists in a c/f90 library, along with some optional tools in python. The code is used to read the data files, and given model power spectra and nuisance parameters it computes the log likelihood of that model. <br />
<br />
Detailed description of the installation and usage of the likelihood code and data is provided in the package. The package includes five data files: four for the CMB likelihoods and one for the lensing likelihood. All of the likelihoods delivered are described in detail in the {{PlanckPapers|planck2013-p08|1|Power spectrum & Likelihood Paper}} (for the CMB based likelihood) and in the {{PlanckPapers|planck2013-p12|1|Lensing Paper}} (for the lensing likelihood) .<br />
<br />
The CMB full likelihood has been divided into four parts to allow using selectively different ranges of multipoles. It also reflects the fact that the mathematical approximations used for those different parts are very different, as is the underlying data. In detail, we distribute<br />
* one low-<math>\ell</math> temperature only likelihood (commander), <br />
* one low-<math>\ell</math> temperature and polarisation likelihood (lowlike), and <br />
* one higl-<math>\ell</math> likelihood CAMspec. <br />
<br />
The ''Commander'' likelihood covers the multipoles 2 to 49. It uses a semi-analytic method to sample the low-<math>\ell</math> temperature likelihood on an intermediate product of one of the component separated maps. The samples are used along with an analytical approximation of the likelihood posterior to perform the likelihood computation in the code. See {{PlanckPapers|planck2013-p08}} section 8.1 for more details.<br />
<br />
The ''lowlike'' likelihood covers the multipoles 2 to 32 for temperature and polarization data. Since Planck is not releasing polarisation data at this time, the polarization map from WMAP9 is used instead. A temperature map is needed to perform the computation nevertheless, and we use here the same commander map. The likelihood is computed using a map-based approximation at low resolution and a master one at intermediate resolution, as in WMAP. The likelihood code actually calls a very slightly modified version of the WMAP9 code. This piece of the likelihood essentially provides a prior on the optical depth and has almost no other impact on cosmological parameter estimation. As such it could be replaced by a simple prior, and a user can decide to do so, which is one of the motivation to leave the three pieces of the CMB likelihood as different data packages; see {{PlanckPapers|planck2013-p08}} section 8.3 for more details. Note that the version of the WMAP code used here (code version v1.0) does not perform any test on the positive definiteness of the TT, TE, EE covariance matrices, and will return a null log likelihood in the unphysical cases where the absolute value of TE is too large. This will be corrected in a later version.<br />
<br />
The ''CAMspec'' likelihood covers the multipoles 50 to 2500 for temperature only. The likelihood is computed using a quadratic approximation, including mode to mode correlations that have been precomputed on a fiducial model. The likelihood uses data from the 100, 143 and 217 GHz channels. To do so it models the foreground at each frequency using the model described in the likelihood paper. Uncertainties on the relative calibration and on the beam transfer functions are included either as parametric models, or marginalized and integrated in the covariance matrix. Detailed description of the different nuisance parameters is given below. Priors are included in the likelihood on the CIB spectral index, relative calibration factors and beam error eigenmodes. See {{PlanckPapers|planck2013-p08}} section 2.1 for more details.<br />
<br />
The ''act/spt'' likelihood covers the multipoles 1500 to 10000 for temperature. It is described in{{BibCite|dun2013}}{{BibCite|Keis2011}}{{BibCite|Reic2012}}. It uses the code and data that can be retrieved from the [http://lambda.gsfc.nasa.gov/ Lambda archive] for [http://lambda.gsfc.nasa.gov/product/act/act_prod_table.cfm ACT] and [http://lambda.gsfc.nasa.gov/product/spt/spt_prod_table.cfm SPT]. It has been slightly modified to use a thermal and kinetic SZ model that matches the one used in CAMspec. As stated in{{BibCite|dun2013}}, the dust parameters a_ge and a_gs must be explored with the following priors: a_ge = 0.8 ± 0.2 and a_gs = 0.4 ± 0.2. Those priors are not included in the log likelihood computed by the code.<br />
<br />
The ''lensing'' likelihood covers the multipoles 40 to 400 using the result of the [[Specially_processed_maps | lensing reconstruction]]. It uses a quadratic approximation for the likelihood, with a covariance matrix including the marginalized contribution of the beam transfer function uncertainties, the diffuse point source correction uncertainties and the cosmological model uncertainty affecting the first order non-gaussian bias (N1). The correlation between temperature and lensing is not taken into account. Cosmological uncertainty effects on the normalization are dealt with using a first order renormalization procedure. This means that the code will need both the TT and $\phi\phi$ power spectrum up to <math>\ell</math> = 2048 to correctly perform the integrals needed for the renormalization. Nevertheless, the code will only produce an estimate based on the data between <math>\ell</math> = 40 to 400. See {{PlanckPapers|planck2013-p12}} section 6.1 for more details.<br />
</span><br />
<span style="color:red">OUTSTANDING: description of likelihood masks </span><br />
==Production process==<br />
<br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
The code is based on some basic routines from the libpmc library in the [http://arxiv.org/abs/1101.0950 cosmoPMC] code. It also uses some code from the [http://lambda.gsfc.nasa.gov/product/map/dr5/likelihood_get.cfm WMAP9 likelihood] for the lowlike likelihood and{{BibCite|dun2013}}{{BibCite|Keis2011}}{{BibCite|Reic2012}} for the act/spt one. The rest of the code has been specifically written for the Planck data. Each likelihood file has been processed using a different and dedicated pipeline as described in the likelihood paper {{PlanckPapers|planck2013-p08}} (section 2 and 8) and in the lensing paper {{PlanckPapers|planck2013-p12}} (section 6.1). We refer the reader to those papers for full details. The data are then encapsulated into the specific file format.<br />
<br />
Each dataset comes with its own self check. Whenever the code is used to read a data file, a computation will be done against an included test spectrum/nuisance parameter, and the log-likelihood will be displayed along with the expected result. Difference of the order of 10<math>^{-6}</math> or less are expected depending of the architecture.<br />
<br />
==Inputs==<br />
<br />
===Likelihood===<br />
<br />
; ''commander'' :<br />
* all Planck channels maps<br />
* compact source catalogs<br />
* common masks<br />
* beam transfer functions for all channels<br />
<br />
; ''lowlike'' :<br />
* WMAP9 likelihood data<br />
* Low-<math>\ell</math> Commander map<br />
<br />
; ''CAMspec'' :<br />
* 100, 143 and 217 GHz detector and detsets maps<br />
* 857GHz channel map<br />
* compact source catalog<br />
* common masks (0,1 & 3)<br />
* beam transfer function and error eigenmodes and covariance for 100, 143 and 217 GHz detectors & detsets<br />
* theoretical templates for the tSZ and kSZ contributions<br />
* color corrections for the CIB emission for the 143 and 217GHz detectors and detsets<br />
* fiducial CMB model (bootstrapped from WMAP7 best fit spectrum) estimated noise contribution from the half-ring maps for 100, 143 and 217 GHz<br />
<br />
; ''lensing'' :<br />
* the lensing map<br />
* beam error eigenmodes and covariance for the 143 and 217GHz channel maps<br />
* fiducial CMB model (from Planck cosmological parameter best fit)<br />
<br />
; ''act/spt'' :<br />
* data and code from [http://lambda.gsfc.nasa.gov/product/act/act_fulllikelihood_get.cfm here]<br />
* the tSZ andkSZ template are changed to match those of CAMspec<br />
<br />
== File names and Meta data ==<br />
<br />
===Likelihood===<br />
<span style="color:red"> ALL OF THE FOLLOWING IN THE LIKELIHOOD SECTION IS OLD. </span><br />
<br />
'''Likelihood source code'''<br />
<br />
The source code is in the file<br />
: {{PLASingleFile |fileType=cosmo|name=COM_Code_Likelihood-v1.0_R1.10.tar.gz|link=COM_Code_Likelihood-v1.0_R1.10.tar.gz}} (C, f90 and python likelihood library and tools)<br />
<br />
'''Likelihood data packages'''<br />
<br />
The {{PLALikelihood|type=Data|link=data packages}} are<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-commander_R1.10.tar.gz | link=COM_Data_Likelihood-commander_R1.10.tar.gz}}'' (low-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-lowlike_R1.10.tar.gz | link=COM_Data_Likelihood-lowlike_R1.10.tar.gz}}'' (low-ell TE,EE,BB likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-CAMspec_R1.10.tar.gz | link=COM_Data_Likelihood-CAMspec_R1.10.tar.gz}}'' (high-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-actspt_R1.10.tar | link=COM_Data_Likelihood-actspt_R1.10.tar.gz}}'' (high-ell TT likelihood)<br />
: ''{{PLASingleFile | fileType=cosmo | name=COM_Data_Likelihood-lensing_R1.10.tar.gz | link=COM_Data_Likelihood-lensing_R1.10.tar.gz}}'' (lensing likelihood)<br />
<br />
Untar and unzip all files to recover the code and likelihood data. Each package comes with a README file; follow the instructions inclosed to<br />
build the code and use it. To compute the CMB likelihood one has to sum the log likelihood of each of the commander_v4.1_lm49.clik, lowlike_v222.clik and CAMspec_v6.2TN_2013_02_26.clik, actspt_2013_01.clik. To compute the CMB+lensing likelihood, one has to sum the log likelihood of all 5 files.<br />
<br />
The CMB and lensing likelihood format are different. The CMB files have the termination .clik, the lensing one .clik_lensing. The lensing data being simpler (due to the less detailled modeling permitted by the lower signal-noise), the file is a simple ascii file containing all the data along with comments describing it, and linking the different quantities to the lensing paper. The CMB file format is more complex and must accommodate different forms of data (maps, power spectrum, distribution samples, covariance matrices...). It consists of a tree structure containing the data. At each level of the tree structure a given directory can contain array data (in the form of FITS files or ascii files for strings) and scalar data (joined in a single ascii file "_mdb"). Those files are not user modifiable and do not contain interesting meta data for the user. Tools to manipulate those files are included in the code package as optional python tools. They are documented in the code package.<br />
<br />
'''Likelihood masks'''<br />
<br />
The masks used in the Likelihood paper {{PlanckPapers|planck2013-p08}} are found in<br />
{{PLASingleFile|fileType=map|name=COM_Mask_Likelihood_2048_R1.10.fits|link=COM_Mask_Likelihood_2048_R1.10.fits}}<br />
<br />
which contains ten masks which are written into a single ''BINTABLE'' extension of 10 columns by 50331648 rows (the number of Healpix pixels in an Nside = 2048 map). The structure is as follows, where the column names are the names of the masks: <br />
<br />
{| border="1" cellpadding="3" cellspacing="0" align="center" style="text-align:left" width=800px<br />
|+ '''Likelihodd masks file data structure'''<br />
|- bgcolor="ffdead" <br />
!colspan="4" | 1. EXTNAME = 'MSK-LIKE' : Data columns<br />
|- bgcolor="ffdead" <br />
! Column Name || Data Type || Units || Description<br />
|-<br />
|CL31 || Real*4 || none || mask<br />
|-<br />
|CL39 || Real*4 || none || mask<br />
|-<br />
|CL49 || Real*4 || none || mask<br />
|-<br />
|G22 || Real*4 || none || mask <br />
|-<br />
|G35 || Real*4 || none || mask<br />
|-<br />
|G45 || Real*4 || none || mask<br />
|-<br />