dfmodel: Analytical distribution functions

Description Usage Arguments Author(s) See Also Examples

View source: R/dfmodel.R

Description

This function allows the user to call several pre-defined distribution functions (DFs). In the current implementation, they are all galaxy mass functions (i.e. a type of one-dimensional DFs), such as the Schechter function.

Usage

1
dfmodel(x = NULL, p = NULL, output = "density", type = "Schechter")

Arguments

x

Vector of log-masses, typically x = log10(M/Msun).

p

Parameters of the analytical function. See argument type.

output

Specifies what the function is doing. 'density' evaluates the MF at x, 'npara' returns the number of parameters of the analytical function, 'initial' returns a vector of typical parameters p that are used as default initial values when fitting the MF, 'equation' returns a string with the equation of the MF.

type

Kind of MF: 'Schechter' for Schechter function or 'PL' for a simple power law.

Author(s)

Danail Obreschkow

See Also

fit.df

Examples

1
2
3
4
5
6
# Evaluate and plot a Schechter function
x = seq(7,11,length=100)
mass = 10^x
parameters = c(-2,10,-1.5)
phi = dfmodel(x, parameters, type = 'Schechter')
plot(mass, phi, type='l', log='xy')

obreschkow/gdftools documentation built on June 10, 2017, 12:40 a.m.