subWindow: subWindow

Description Usage Arguments Details Value

View source: R/SubWindow.R

Description

Restricts a CMBDataFrame, CMBDat object, or data.frame to a CMBWindow region. A single CMBWindow or a list of CMBWindows can be passed to the win argument.

Usage

1
subWindow(cmbdf, win, intersect = TRUE, in.pixels, in.pixels.res = 0)

Arguments

cmbdf

a CMBDataFrame, a data.frame, a HPDataFrame or CMBDat object. If this is a data.frame then it must have columns labelled x,y,z specifying cartesian coordinates, or columns labelled theta, phi specifying colatitude and longitude respectively.

win

a CMBWindow or a list of CMBWindows

intersect

a boolean that determines the behaviour when win is a list containing BOTH regular type and "minus" type windows together (see details).

in.pixels

a vector of pixels at resolution in.pixels.res whose union contains the window(s) win entirely. This will only be used if cmbdf is a CMBDataFrame

in.pixels.res

a resolution (i.e., j such that nside = 2^j) at which the in.pixels parameter is specified

Details

Windows that are tagged with set.minus (see CMBWindow) are treated differently from other windows.

If the argument is a list of CMBWindows, then interiors of all windows whose winType does not include "minus" are united (let A be their union) and exteriors of all windows whose winType does include "minus" are intersected, (let B be their intersection). Then, provided that intersect = TRUE (the default), the returned CMBDataFrame will be the points of cmbdf in the the intersection of A and B. Otherwise, if intersect = FALSE, the returned CMBDataFrame consists of the points of cmbdf in the union of A and B.

Note that if A (resp. B) is empty then the returned CMBDataFrame will be the points of cmbdf in B (resp. A).

Value

a CMBDataFrame, HPDataFrame, or just a data.frame, which is restricted to the region of the sky specified by win


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