Anthony Smith's IDL routines

Galaxies etc.

single page | use frames     summary     class     fields     routine details     file attributes

gals/

ajs_schechter_fit.pro

This function finds the best-fitting Schechter function for a given array of absolute magnitudes, phi and phi_err

Routines

result = ajs_schechter_fit(absmag, phi, phierr [, params_init] [, txtfile=txtfile] [, loglum=loglum] [, cov_mat=cov_mat] [, range=fltarr(2)] [, lum_dens=lum_dens] [, err_lum_dens=err_lum_dens] [, _REF_EXTRA=_REF_EXTRA])

This function finds the best-fitting Schechter function for a given array of absolute magnitudes, phi and phi_err

ajs_schechter_fit_test

Test ajs_schechter_fit

Routine details

topajs_schechter_fit

result = ajs_schechter_fit(absmag, phi, phierr [, params_init] [, txtfile=txtfile] [, loglum=loglum] [, cov_mat=cov_mat] [, range=fltarr(2)] [, lum_dens=lum_dens] [, err_lum_dens=err_lum_dens] [, _REF_EXTRA=_REF_EXTRA])

This function finds the best-fitting Schechter function for a given array of absolute magnitudes, phi and phi_err

Return value

[mstar, alpha, phistar]

Parameters

absmag in required
phi in required
phierr in required
params_init in optional

Initial guess for [mstar,alpha,phistar] (or default)

Keywords

txtfile in optional

Output text file for Schechter parameters

loglum in optional

Set to input log10 luminosity instead of absolute magnitudes

cov_mat out optional

Covariance matrix

range in optional type=fltarr(2)

[min, max] absmag for fitting

lum_dens out optional

Luminosity density. Return value is j = ... x 10^(0.4 M_sun) h L_sun Mpc^-3

err_lum_dens out optional

Error in luminosity density

_REF_EXTRA in optional

Extra keywords for mpfitfun

Author information

History:

5 Sep 2007 Created, Anthony Smith

17 Jan 2008 Added loglum keyword and text file output, AJS

4 Apr 2008 Added range keyword

15 Apr 2008 Added lum_dens

Other attributes

Uses:

mpfit (idlutils)

ajs_schechter

topajs_schechter_fit_test

ajs_schechter_fit_test

Test ajs_schechter_fit

File attributes

Modifcation date: Fri Jun 6 08:19:26 2008
Lines: 137
Docformat: rst rst