astromodels.sources.particle_source module

class astromodels.sources.particle_source.ParticleSource(name, distribution_shape=None, components=None)[source]

Bases: Source, Node

A source of particles with a certain distribution. This source does not produce any electromagnetic signal, but it is useful if used in conjuction with spectral shapes which need a particle distribution as input, like for example a Synchrotron kernel.

Parameters:
  • name – name for the source

  • distribution_shape – a function describing the energy distribution of the particles

  • components – a list of SpectralComponents instances

Returns:

property free_parameters

Returns a dictionary of free parameters for this source. We use the parameter path as the key because it’s guaranteed to be unique, unlike the parameter name.

Returns:

get_flux(energies)[source]

Get the total flux of this particle source at the given energies (summed over the components)

property parameters

Returns a dictionary of all parameters for this source. We use the parameter path as the key because it’s guaranteed to be unique, unlike the parameter name.

Returns: