winType: Get/change winType

Description Usage Arguments Value Examples

View source: R/CMBWindowHelpers.R

Description

Get/change the winType (polygon or disk) of a CMBWindow. If new.type is missing then the winType of win is returned. Otherwise, a new window is returned with winType equal to new.type. If you want to change the winType of win directly, then use winType<-, see the examples below.

Usage

1
winType(win, new.type)

Arguments

win

a CMBWindow object or a list of such

new.type

optionally specify a new type. Use this to change between "polygon" and "minus.polygon" or to change between "disc" and "minus.disc"

Value

If new.type is missing then the winType of win is returned. Otherwise a new window is returned with winType equal to new.type

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
win <- CMBWindow(theta = c(pi/2,pi/2,pi/3, pi/3), phi = c(0,pi/3,pi/3,0))
winType(win)

win1 <- CMBWindow(x=0,y=3/5,z=4/5,r=0.8)
winType(win1)
cmbdf <- CMBDataFrame(nside = 64, coords = "cartesian",
                      ordering = "nested")
cmbdf.win1 <- window(cmbdf, new.window = win1)
plot(cmbdf.win1)


winType(win1) <- "minus.disc"
winType(win1)
cmbdf <- CMBDataFrame(nside = 64, coords = "cartesian",
                      ordering = "nested")
cmbdf.win1 <- window(cmbdf, new.window = win1)
plot(cmbdf.win1)

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