R/petroindex.R

Defines functions petroindex

Documented in petroindex

petroindex = function(r, n, re = 1){
    # petrosian index
    bn = qgamma(0.5,2*n)
    x = bn*((r/re)^(1/n))
    i = (2*n*igamma(x,2*n))/((exp(1)^(-x))*(x^(2*n)))
    return(i)
}

Try the astro package in your browser

Any scripts or data that you put into this service are public.

astro documentation built on May 2, 2019, 2:14 a.m.