# CleanCMB
This package contains functions to enable extraction of clean maps of the cosmic microwave background (CMB). Some functions can be used to extract non-CMB astrophysical components as well.
If you came here to reproduce the results in Section 6 of the [science forecast paper](https://arxiv.org/abs/2107.10364) for CCAT-prime's Prime-Cam on the [Fred Young Submillimeter Telescope (FYST)](https://www.ccatobservatory.org/index.cfm), please go to [ccatprime/sciencepaper/](https://github.com/komatsu5147/CleanCMB.jl/tree/master/ccatprime/sciencepaper).
Different algorithms exist for extraction of clean maps of the CMB (as well as of astrophysical components). The package currently supports:
- Internal Linear Combination (ILC) Method
- Parametric Maximum Likelihood Method
See [this note](https://github.com/komatsu5147/CleanCMB.jl/tree/master/note_on_ilc_vs_ml.pdf) for the relationship between them.
## Installation
From the Julia REPL, run
```Julia
using Pkg
Pkg.add(url="https://github.com/komatsu5147/CleanCMB.jl")
```
## Internal Linear Combination (ILC) Method
- `ilc_weights(cij[, e, ℓid=3])`: return weights for the internal linear combination (ILC) method, following Equation (12) of [Tegmark et al., PRD, 68, 123523 (2003)](https://journals.aps.org/prd/abstract/10.1103/PhysRevD.68.123523).
- `cilc_weights(cij, a, b[, ℓid=3])`: return weights for the constrained internal linear combination (CILC) method for two components, following Equation (20) of [Remazeilles, et al., MNRAS, 410, 2481 (2011)](https://academic.oup.com/mnras/article/410/4/2481/1007333).
- `milca_weights(cij, a, B[, ℓid=3])`: return weights for the modified internal linear combination algorithm (MILCA) method (CILC for N components), following Equation (15) of [Hurier, et al., A&A, 558, A118 (2013)](https://www.aanda.org/articles/aa/abs/2013/10/aa21891-13/aa21891-13.html).
- Note: These papers define weights in various domain, including harmonic, wavelet, and pixel domain. You can choose to work in any domain by supplying a covariance matrix `cij` in the appropriate domain.
- `ilc_clean_cij(cij, w)`: return a covariance matrix multiplied by weights, `w' * cij * w`, with `w` returned by any of the above functions, e.g., `w = cilc_weights(cij, a, b)`.
- This would be a variance of the extracted component if `cij` were the same as that used in `ilc_weights()`, `cilc_weights()` or `milca_weights()`.
- If `cij` is a noise covariance matrix, this function returns the noise variance of the cleaned map for each multipole, band-power bin, pixel, etc.
### Arguments
- `cij::Array{<:AbstractFloat,2}`: `nν`-by-`nν` symmetric covariance matrix, where `nν` is the number of frequency bands.
- or, `cij::Array{<:AbstractFloat,3}`:symmetric covariance matrix with the dimention of `(nℓ, nν, nν)`, `(nν, nℓ, nν)` or `(nν, nν, nℓ)` (default). Here, `nℓ` is the number of elements in the relevant domain, e.g., multipoles, band-power bins, pixels, etc.
- The functions `ilc_weights()`, `cilc_weights()` and `milca_weights()` are *multiple dispatch*, which detect the dimension of the input `cij` automatically.
- `a::Array{<:AbstractFloat,1}`: vector of the frequency response, for the component to be extracted. E.g., `a=[1,...,1]` for CMB. The number of elements is `nν`.
- `b::Array{<:AbstractFloat,1}`: vector of the frequency response, for the component to be nulled. The number of elements is `nν`.
- `B::Array{<:AbstractFloat,2}`: `nν`-by-`nrc` matrix of the frequency response, for `nrc` components to be nulled.
### Optional arguments
- `e::Array{<:AbstractFloat,1}`: vector of the frequency response, for the component to be extracted. The default value is `e=[1,...,1]`, i.e., CMB. The number of elements is `nν`.
- `ℓid::Integer=3`: location of the index for the `nℓ` domain, if the dimension of the input `cij` is `(nℓ, nν, nν)`, `(nν, nℓ, nν)` or `(nν, nν, nℓ)`.
`ℓid=1` if `cij[nℓ,nν,nν]`, `ℓid=2` if `cij[nν,nℓ,nν]`, and `ℓid=3` (the default value) if `cij[nν,nν,nℓ]`.
## Parametric Maximum Likelihood Method
- `loglike_beta(nij, A, d)` or `loglike_beta(nij, A, cij)`:: return log(likelihood) for frequency response vectors `A` given a data vector `d` or data covariance matrix `cij`, based on Equation (9) of [Stompor et al., MNRAS, 392, 216 (2009)](https://academic.oup.com/mnras/article/392/1/216/1071929).
<!--
- `loglike_beta_deriv(nij, A, dAdβ, d)` and `loglike_beta_hessian(nij, A, dAdβI, dAdβJ, d)`: return the gradient and hessian of log(likelihood) with respect to foreground parameters, using Equation (A1) and (5) of [Errard et al., PRD, 84, 063005 (2011)](https://journals.aps.org/prd/abstract/10.1103/PhysRevD.84.063005), respectively. These functions may be used to make the maximisation of `loglike_beta(nij, A, d)` more efficient.
-->
### Arguments
- `nij::Array{<:AbstractFloat,2}`: `nν`-by-`nν` symmetric noise covariance matrix, where `nν` is the number of frequency bands.
- `A::Array{<:AbstractFloat,2}`: `nν`-by-`nc` matrix of the frequency response, for `nc` components in sky.
- E.g., ``A = [a B]`` where `a = ones(nν)` for CMB and `B` is a `nν`-by-`nc-1` matrix for the frequency response of foreground components.
- `d::Array{<:AbstractFloat,1}`: data vector for a given pixel, (ℓ,m), or any other appropriate domain. The number of elements is `nν`.
- `cij::Array{<:AbstractFloat,2}`: `nν`-by-`nν` symmetric covariance matrix for a given multipole, pixel, or any other appropriate domain.
<!--
- `dAdβ::Array{<:AbstractFloat,2}`, `dAdβI::Array{<:AbstractFloat,2}` and `dAdβJ::Array{<:AbstractFloat,2}`: `nν`-by-`nc` matrix of the derivative of the frequency response with respect to a foreground parameter.
- E.g., ``dAdβ = [zeros(nν) dsynch/dβs zeros(nν)]`` where `zeros(nν)` for CMB and dust because they do not depend on the synchrotron index `βs`.
-->
## Foreground models
The package contains the following functions to return frequency dependence of foreground components:
- `tsz(νGHz; units="cmb", Tcmb=2.7255)`: Spectrum of the thermal Sunyaev-Zeldovich effect given in Equation (V) in Appendix of [Zeldovich, Sunyaev, Astrophys. Space Sci. 4, 301 (1969)](http://articles.adsabs.harvard.edu/pdf/1969Ap%26SS...4..301Z).
- `dust1(νGHz; Td=19.6, βd=1.6, νd=353, units="cmb", Tcmb=2.7255)`: Spectrum of 1-component modified black-body thermal dust emission. The output is normalized to unity at `νGHz = νd`.
- `synch(νGHz; βs=-3, νs=23, Cs=0, νC=40, units="cmb", Tcmb=2.7255)`: Spectrum of synchrotron emission. The output is normalized to unity at `νGHz = νs`.
### Arguments
- `νGHz::Real`: frequency in units of GHz.
### Optional keyword arguments
- `units::String`: units of the spectrum. For Rayleigh-Jeans temperature (brightness temperature) units, set `units = "rj"`. The default is the CMB units.
- `Tcmb::Real`: present-day temperature of the CMB in units of Kelvin. The default value is `2.7255`.
- `Td::Real`: dust temperature. The default value is `19.6` (Kelvin).
- `βd::Real`: dust emissivity index. The default value is `1.6`.
- `νd::Real`: frequency at which the output dust spectrum is normalized to unity. The default value is `353` (GHz).
- `βs::Real`: synchrotron power-law index. The default is `-3`.
- `νs::Real`: frequency at which the output synchrotron spectrum is normalized to unity. The default is `23` (GHz).
- `Cs::Real`: curvature of the synchrotron spectrum. The default value is `0`.
- `νC::Real`: pivot frequency for curvature of the synchrotron spectrum. The default value is `40` (GHz).
## Example Julia Codes
- [examples/CleanWMAP.jl](https://github.com/komatsu5147/CleanCMB.jl/tree/master/examples/CleanWMAP.jl)
- This code applies `ilc_weights()` in pixel domain to produce a clean map of CMB from the temperature maps of Wilkinson Microwave Anisotropy Probe (WMAP) at five frequency bands.
- The code requires [Healpix.jl](https://github.com/ziotom78/Healpix.jl).
### Pipeli
没有合适的资源?快使用搜索试试~ 我知道了~
去除前景发射并获得宇宙微波背景的干净地图的.zip
共90个文件
jl:33个
fits:30个
csv:12个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 172 浏览量
2023-04-09
13:39:06
上传
评论
收藏 30.19MB ZIP 举报
温馨提示
去除前景发射并获得宇宙微波背景的干净地图的.zip
资源推荐
资源详情
资源评论
收起资源包目录
去除前景发射并获得宇宙微波背景的干净地图的.zip (90个子文件)
CleanCMB.jl-master
note_on_ilc_vs_ml.pdf 173KB
.github
workflows
CompatHelper.yml 370B
TagBot.yml 204B
src
ilc.jl 8KB
CleanCMB.jl 275B
cilc.jl 4KB
milca.jl 3KB
libspectra.jl 3KB
profile_likelihood.jl 6KB
LICENSE 1KB
examples
compute_cl_class.jl 2KB
data
map_d1s1_equ_027ghz_r7_uKcmb_qu.fits 1.51MB
map_d1s1_equ_145ghz_r7_uKcmb_qu.fits 1.51MB
wmap_band_smth_imap_r7_9yr_Q_v5.fits 776KB
ccat_uniform_coverage_nside128_201021.png 12KB
nhits_SAT_r7.FITS 776KB
map_d1s1_equ_280ghz_r7_uKcmb_qu.fits 1.51MB
wmap_band_smth_imap_r7_9yr_V_v5.fits 776KB
map_d1s1_equ_225ghz_r7_uKcmb_qu.fits 1.51MB
DegradeFGMaps.jl 1KB
gen_pysm_maps.py 685B
map_d1s1_equ_350ghz_r7_uKcmb_qu.fits 1.51MB
mask_apodized_r7.fits 776KB
DegradeWMAPMaps.jl 2KB
map_d1s1_equ_850ghz_r7_uKcmb_qu.fits 1.51MB
ccat_uniform_coverage_nside128_201021.fits 776KB
make_ccat_uniform_coverage_201021.py 569B
wmap_band_smth_imap_r7_9yr_Ka_v5.fits 776KB
ccat_uniform_coverage_nside256_201021.fits 3.01MB
wmap_band_smth_imap_r7_9yr_K_v5.fits 776KB
map_d1s1_equ_093ghz_r7_uKcmb_qu.fits 1.51MB
ccat_uniform_coverage_nside256_201021.png 12KB
map_d1s1_equ_410ghz_r7_uKcmb_qu.fits 1.51MB
wmap_band_smth_imap_r7_9yr_W_v5.fits 776KB
map_d1s1_equ_039ghz_r7_uKcmb_qu.fits 1.51MB
wmap_ilc_rgn_defn_r7_9yr_v5.fits 1.51MB
MILCAPipelineSOSATCCATp.jl 21KB
CleanWMAP.jl 2KB
MILCAPipelineSOSAT.jl 16KB
GenerateCovMatrices.jl 9KB
ILCPipelineSOSATCCATp.jl 14KB
ILCPipelineSOSAT.jl 12KB
setup_namaster.jl 1KB
results
milca_results_sosat_300sims_seed5147.csv 15KB
ccatp_inhomonoise
ilc_results_sosatccatp_300sims_seed5147.csv 28KB
milca_results_sosatccatp_300sims_seed5147.csv 27KB
CompareSOSATCCATp.jl 4KB
ilc_results_sosatccatp_300sims_seed5147.csv 28KB
scatterplot_so_vs_soccatp_milca.pdf 50KB
scatterplot_so_vs_soccatp_ilc.pdf 50KB
milca_results_sosatccatp_300sims_seed5147.csv 28KB
ilc_results_sosat_300sims_seed5147.csv 15KB
scatterplot_ilc_vs_milca.pdf 40KB
PerformMILCA.jl 7KB
PerformILC.jl 3KB
ccatprime
sciencepaper
sosat
ComputeBeta.jl 4KB
milca_results.csv 74KB
ilc_results.csv 74KB
beta_results.csv 92KB
PerformMILCA.jl 7KB
PerformILC.jl 3KB
data
compute_cl_class.jl 2KB
map_d1s1_equ_027ghz_r7_uKcmb_qu.fits 1.51MB
map_d1s1_equ_145ghz_r7_uKcmb_qu.fits 1.51MB
nhits_SAT_r7.FITS 776KB
map_d1s1_equ_280ghz_r7_uKcmb_qu.fits 1.51MB
map_d1s1_equ_225ghz_r7_uKcmb_qu.fits 1.51MB
map_d1s1_equ_350ghz_r7_uKcmb_qu.fits 1.51MB
mask_apodized_r7.fits 776KB
map_d1s1_equ_850ghz_r7_uKcmb_qu.fits 1.51MB
GenerateCovMatrices.jl 9KB
map_d1s1_equ_093ghz_r7_uKcmb_qu.fits 1.51MB
map_d1s1_equ_410ghz_r7_uKcmb_qu.fits 1.51MB
map_d1s1_equ_039ghz_r7_uKcmb_qu.fits 1.51MB
setup_namaster.jl 1KB
PlotFigure6.jl 1KB
PlotFigure7.jl 2KB
README.md 3KB
sosatfyst
ComputeBetaKO.jl 5KB
ComputeBeta.jl 4KB
PerformMILCAKO.jl 7KB
milca_results.csv 74KB
ilc_results.csv 74KB
beta_results.csv 92KB
PerformMILCA.jl 7KB
PerformILC.jl 3KB
test
runtests.jl 89B
.gitignore 14B
README.md 16KB
Project.toml 323B
共 90 条
- 1
资源评论
快撑死的鱼
- 粉丝: 1w+
- 资源: 9154
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功