arsenal_gear.dist_funcs.imf.IMF

class arsenal_gear.dist_funcs.imf.IMF(min_mass: Annotated[Quantity, PhysicalType('mass')], max_mass: Annotated[Quantity, PhysicalType('mass')], name='')[source]

Bases: rv_continuous

This class is the superclass of all Initial Mass Functions (IMFs)

Parameters:
  • min_mass (astropy mass unit) – Least massive star in the IMF

  • max_mass (astropy mass unit) – Most massive star in the IMF

  • name (str) – Name for the scipy.stats rv_continuous instance

sample(N: int) Annotated[Quantity, PhysicalType('mass')][source]

Draw a sample from the IMF with a specific number of stars

Parameters:

N (int) – Number of stars to draw

Returns:

List of masses of stars

Return type:

Quantity[“mass”]

sample_mass(mtot: Annotated[Quantity, PhysicalType('mass')]) Annotated[Quantity, PhysicalType('mass')][source]

Draw a sample from the IMF with target total mass

Parameters:

mtot (Quantity["mass"]) – Targer total mass of the sample

Returns:

List of masses of stars

Return type:

Quantity[“mass”]