Learn R Programming

rcosmo (version 1.1.6)

areCompatibleCMBDFs: Check compatibleness of CMBDataFrames

Description

Compare attributes to decide if two CMBDataFrames are compatible

Usage

areCompatibleCMBDFs(cmbdf1, cmbdf2, compare.pix = FALSE)

Value

A single logical value, TRUE if both objects have the same nside and ordering, and also the same pixel indices when compare.pix = TRUE; otherwise FALSE. Incompatibilities are reported with a suppressible message.

Arguments

cmbdf1

a CMBDataFrame

cmbdf2

a CMBDataFrame

compare.pix

A boolean. If TRUE then cmbdf1 and cmbdf2 must share the same pixel indices to be considered compatible

Details

If the CMBDataFrames do not have compatible attributes then a message is printed indicating the attributes that do not match. To suppress this use the suppressMessages function

Examples

Run this code
a <- CMBDataFrame(nside = 2, ordering = "ring", coords = "cartesian")
b <- CMBDataFrame(nside = 1, ordering = "nested", coords = "spherical")
areCompatibleCMBDFs(a,b)

suppressMessages(areCompatibleCMBDFs(a,b))

Run the code above in your browser using DataLab