class gala.dynamics.mockstream.FardalStreamDF(gala_modified=None, lead=True, trail=True, random_state=None)#

Bases: BaseStreamDF

A class for representing the Fardal+2015 distribution function for generating stellar streams based on Fardal et al. 2015 https://ui.adsabs.harvard.edu/abs/2015MNRAS.452..301F/abstract

gala_modifiedbool (optional)

If True, use the modified version of the Fardal method parameters used in Gala. If you would like to use the exact parameters from Fardal+2015, set this to False. Default: True.

leadbool (optional)

Generate a leading tail. Default: True.

trailbool (optional)

Generate a trailing tail. Default: True.

random_stateRandomState (optional)

To control random number generation.

Attributes Summary



random_state: object


Methods Summary


Generate stream particle initial conditions and initial times.

Attributes Documentation


random_state: object


Methods Documentation

sample(self, prog_orbit, prog_mass, hamiltonian=None, release_every=1, n_particles=1) sample(prog_orbit, prog_mass, hamiltonian=None, release_every=1, n_particles=1)#
sample(prog_orbit, prog_mass, hamiltonian=None, release_every=1, n_particles=1) None

Generate stream particle initial conditions and initial times.

This method is primarily meant to be used within the MockStreamGenerator.


The orbit of the progenitor system.

prog_massQuantity [mass]

The mass of the progenitor system, either a scalar quantity, or as an array with the same shape as the number of timesteps in the orbit to account for mass evolution.


The external potential and reference frame to numerically integrate orbits in.

release_everyint (optional)

Controls how often to release stream particles from each tail. Default: 1, meaning release particles at each timestep.

n_particlesint, array_like (optional)

If an integer, this controls the number of particles to release in each tail at each release timestep. Alternatively, you can pass in an array with the same shape as the number of timesteps to release bursts of particles at certain times (e.g., pericenter).

xyzQuantity [length]

The initial positions for stream star particles.

v_xyzQuantity [speed]

The initial velocities for stream star particles.

t1Quantity [time]

The initial times (i.e. times to start integrating from) for stream star particles.