SphericalParticleGenerationHook#
- class pisces.models.core.hooks.SphericalParticleGenerationHook[source]#
Template hook for sampling particles from spherically symmetric models.
This hook provides built-in methods for performing the following 3 operations:
Sampling the radial positions of particles from a cumulative distribution function (CDF) defined by the model. These are then converted into 3D Cartesian coordinates.
Interpolating model fields onto the particles based on their radial positions.
Generating velocities for collisionless components (dark matter and stars) using Eddington inversion.
Each of these steps is encapsulated into a tool method in the namespace of this template hook.
Methods
__init__
()generate_particles
(filename, num_particles, ...)Convert this model into a particle-based representation.