Chandra X-Ray Observatory
	(CXC)
Skip to the navigation links
Last modified: December 2013

URL: http://cxc.harvard.edu/sherpa/ahelp/igam.html
Jump to: Description · Examples · Bugs · See Also


AHELP for CIAO 4.6 Sherpa v2

igam

Context: utilities

Synopsis

Calculate the regularized incomplete Gamma function (lower)

Syntax

igam(a,x)

Description

Calculate the CEPHES function, igam, in the range [a > 0; x > 0]. The function is defined by

igam(a,x) = 1/gamma(a) Int_(0)^(x) e^(-t) t^(a-1) dt

where "gamma(a)" represents the complete Gamma function.

In this implementation, both arguments must be positive. The integral is evaluated by either a power series or continued fraction expansion, depending on the relative values of a and x. Arguments can be in scalar or array form.

Relative error:

arithmetic domain # trials peak rms
IEEE 0,30 200000 3.6e-14 2.9e-15
IEEE 0,100 300000 9.9e-14 1.5e-14

Reference

Cephes Math Library Release 2.0: April, 1987. Copyright 1985, 1987 by Stephen L. Moshier. Direct inquiries to 30 Frost Street, Cambridge, MA 02140.

Example 1

sherpa> igam(1,2)

Calculate the igam of a=1, x=2 .

Example 2

sherpa> igam([1,2],[2,3])

Calculate the igam of a=[1,2], x=[2,3] .

Bugs

See the bugs pages on the Sherpa website for an up-to-date listing of known bugs.

See Also

tools
aprates, modelflux
utilities
calc_chisqr, calc_energy_flux, calc_model_sum, calc_photon_flux, calc_source_sum, calc_stat, gamma, igamc, incbet, lgam

Last modified: December 2013
Smithsonian Institute Smithsonian Institute

The Chandra X-Ray Center (CXC) is operated for NASA by the Smithsonian Astrophysical Observatory. 60 Garden Street, Cambridge, MA 02138 USA.   Email:   cxcweb@head.cfa.harvard.edu Smithsonian Institution, Copyright © 1998-2014. All rights reserved.