View source: R/CMBWindowGenerics.R
coords.CMBWindow | R Documentation |
CMBWindow
This function returns the coordinate system used in a
CMBWindow
. The coordinate system is either
"cartesian" or "spherical"
## S3 method for class 'CMBWindow' coords(x, new.coords, ...)
x |
a CMBWindow, |
new.coords |
specifies the new coordinate system ("spherical" or "cartesian") if a change of coordinate system is desired |
... |
Unused arguments. |
If a new coordinate system is specified, using e.g. new.coords = "spherical", the coordinate system of the CMBWindow will be converted
If new.coords is unspecified, then the name of the coordinate system
of win
is returned. Otherwise a new CMBWindow is returned
equivalent to win
but having the desired change of coordinates
## Create win with sperical coords, then change it to win1 with cartesian coords win <- CMBWindow(theta = c(0,pi/2,pi/2), phi = c(0,0,pi/2)) coords(win) win1 <- coords(win, new.coords = "cartesian") coords(win1) ## Change back to spherical coordinates coords(win1) <- "spherical" coords(win1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.