Description Usage Arguments Value Examples
The function CMBDataFrame
creates objects of class CMBDataFrame
.
These are a special type of data.frame
that carry metadata
about, e.g., the HEALPix ordering scheme, coordinate system, and nside parameter.
1 2 3 4 5 6 7 8 9 10 11 12 13 |
CMBData |
Can be a string location of FITS file,
another |
coords |
Can be "spherical," "cartesian", or unspecified (HEALPix only). |
win |
optional |
include.polar |
TRUE if polarisation data is required, otherwise FALSE. |
include.masks |
TRUE if TMASK and PMASK are required, otherwise FALSE. |
spix |
Optional vector of sample pixel indices, or a path to a file
containing comma delimited sample pixel indices. The ordering scheme is
given by |
sample.size |
If a positive integer is given, a simple random
sample of size equal to sample.size will be taken from CMBData. If
spix is specified then |
nside |
Optionally specify the nside parameter manually nside=2^k (usually 1024 or 2048). |
ordering |
Specifies the desired HEALPix ordering scheme
("ring" or "nested") for the output CMBDataFrame.
If |
I |
A vector of intensities to be included
if |
... |
Optional names data columns of length nrow(CMBData) to add to the CMBDataFrame. |
A CMBDataFrame
whose row.names
attribute contains
HEALPix indices.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | ## Method 1: Read the data while constructing the CMBDataFrame
## download a FITS file and use real data
# downloadCMBMap()
# df <- CMBDataFrame("CMB_map_smica1024.fits")
df <- CMBDataFrame(nside = 16, I = rnorm(12 * 16 ^ 2),
ordering = "nested")
# Specify a sample size for a random sample
df.sample <- CMBDataFrame(df, sample.size = 80)
plot(df.sample)
# Specify a vector of pixel indices using spix
df.subset <- CMBDataFrame(df, spix = c(2,4,6))
# Take a look at the summary
summary(df)
# Access HEALPix pixel indices using pix function
# (these are stored in the row.names attribute)
pix(df.subset)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.