func (h *Halo) EWTemperature(xct XRayCorrectionType, ppt PressureProfileType, rMax float64) float64 { rMin := h.MinR() scale := math.Log10(rMin) - math.Log10(rMin) numFunc := createNumFunc(h, xct, ppt) numInt := num.Integral(numFunc, rMin, scale, num.Log, num.Spherical) denFunc := createDenFunc(h, xct, ppt) denInt := num.Integral(denFunc, rMin, scale, num.Log, num.Spherical) return numInt(rMax) / denInt(rMax) }
func (h *Halo) GasEnclosed(xct XRayCorrectionType, ppt PressureProfileType, r float64) float64 { rho := func(r float64) float64 { return h.RhoGas(xct, ppt, r) } return num.Integral(rho, h.MinR(), 0.1, num.Log, num.Spherical)(r) }