rcosmo (version 1.1.2)

winType: Get/change winType

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

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

Run this code
# NOT RUN {
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)


# }

Run the code above in your browser using DataLab