chi2CMB: Chi-squared statistic for two 'CMBWindow's

Description Usage Arguments Value References Examples

View source: R/Statistics.R

Description

This function returns the empirical chi-squared statistic for intensities observations from two CMBWindows of the specified CMBDataFrame. The functions employs the function chi2.empirical and uses histogram counts of intensities for computations.

Usage

1
chi2CMB(cmbdf, win1, win2, intensities = "I")

Arguments

cmbdf

A CMBDataFrame.

win1

A CMBWindow

win2

A CMBWindow

intensities

A CMBDataFrame column with measured values.

Value

Estimated Chi-squared statistic for observations in two CMBWindows. For small sample sizes and many zero counts Chi-squared statistic is inefficient.

References

chi2.empirical

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Download the map first
# downloadCMBMap(foreground = "smica", nside = 1024)
# df <- CMBDataFrame("CMB_map_smica1024.fits")
# cmbdf <- sampleCMB(df, sample.size = 1000)
#
# win1 <- CMBWindow(theta = c(0,pi/2,pi/2), phi = c(0,0,pi/2))
# win2 <- CMBWindow(theta = c(pi/2,pi,pi/2),  phi = c(0,0,pi/2))
# plot(win1)
# plot(win2,col="green")
#
# chi2CMB(cmbdf, win1, win2)

rcosmo documentation built on Dec. 11, 2021, 9:29 a.m.