R/thetas.R

## MIT License
##
## Copyright (c) 2018 Oliver Dechant
##
## Permission is hereby granted, free of charge, to any person obtaining a copy
## of this software and associated documentation files (the "Software"), to deal
## in the Software without restriction, including without limitation the rights
## to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
## copies of the Software, and to permit persons to whom the Software is
## furnished to do so, subject to the following conditions
##
## The above copyright notice and this permission notice shall be included in all
## copies or substantial portions of the Software.
##
## THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
## IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
## FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
## AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
## LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
## OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
## SOFTWARE.

nGauss <- 11
theta <- weight <- vector("numeric", nGauss)
cosTheta <- matrix(0.0, nGauss, 2)

weight[1] <- 0.1460811336496904
theta[1] <- 0.0000000000000000  # disk centre
weight[2] <- 0.1445244039899700
theta[2] <- 0.1455618541608951
weight[3] <- 0.1398873947910731
theta[3] <- 0.2880213168024011
weight[4] <- 0.1322689386333375
theta[4] <- 0.4243421202074388
weight[5] <- 0.1218314160537285
theta[5] <- 0.5516188358872198
weight[6] <- 0.1087972991671484
theta[6] <- 0.6671388041974123
weight[7] <- 0.0934444234560339
theta[7] <- 0.7684399634756779
weight[8] <- 0.0761001136283793
theta[8] <- 0.8533633645833173
weight[9] <- 0.0571344254268572
theta[9] <- 0.9200993341504008
weight[10] <- 0.0369537897708525
theta[10] <- 0.9672268385663063
weight[11] <- 0.0160172282577743
theta[11] <- 0.9937521706203895 # limb

for (it in 1:nGauss) {
  cosTheta[it,1] <- weight[it]
  theta[it] <- theta[it]*pi/2.0
  cosTheta[it,2] <- cos(theta[it])
}

cosTheta
increasechief/chromastar documentation built on May 14, 2019, 5:14 a.m.