Anthony Smith's IDL routines

Galaxies etc.

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

gals/

ajs_double_schechter_fit.pro

This function finds the best-fitting double Schechter function for a given array of absolute magnitudes, phi and phi_err (alpha_2 > alpha_1)

Routines

result = ajs_double_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 double Schechter function for a given array of absolute magnitudes, phi and phi_err (alpha_2 > alpha_1)

ajs_double_schechter_fit_test

Test ajs_schechter_fit

Routine details

topajs_double_schechter_fit

result = ajs_double_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 double Schechter function for a given array of absolute magnitudes, phi and phi_err (alpha_2 > alpha_1)

Return value

[mstar, alpha_1, phistar_1, alpha_2, phistar_2]

Parameters

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

Initial guess for [mstar, alpha_1, phistar_1, alpha_2, phistar_2] (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

17 Jul 2008 lum_dens now gives correct result for loglum

Other attributes

Uses:

mpfit (idlutils)

ajs_schechter

topajs_double_schechter_fit_test

ajs_double_schechter_fit_test

Test ajs_schechter_fit

File attributes

Modifcation date: Thu Jul 17 09:17:56 2008
Lines: 180
Docformat: rst rst