kroupa

artpop.stars.kroupa(m, **kwargs)[source]

Wrapper function to calculate weights for the Kroupa stellar initial mass function (Kroupa 2001).

Parameters
mass_gridndarray

Stellar mass grid.

norm_typestr, optional

How to normalize the weights: by ‘number’, ‘mass’, or the ‘sum’.

num_norm_binsint, optional

Number of mass bins to use for integration (if needed to normalize).

norm_mass_minint or None, optional

Minimum mass to use for normalization. If None, use minimum of mass_grid will be used.

norm_mass_maxint or None, optional

Maximum mass to use for normalization. If None, use maximum of mass_grid will be used.

Returns
weightsndarray

The weights associated with each mass in the input mass_grid.