get_snapshot_potential#
- cogsworth.hydro.potential.get_snapshot_potential(snap, components=[{'label': 'star', 'attr': 's', 'r_s': 3}, {'label': 'dark matter', 'attr': 'dm', 'r_s': 10}, {'label': 'gas', 'attr': 'g', 'r_s': 3}], out_path=None, nmax=15, lmax=5, verbose=False)[source]#
Compute the potential of a snapshot of a hydrodynamical zoom-in simulation
- Parameters:
- snap
pynbody.snapshot.SimSnap The snapshot
- componentslist, optional
List of components to add to the potential, each component specifies the label to use, attribute in the pynbody snap and scale radius to use, by default includes stars, dark matter and gas with scale radii of 3, 10 and 3 kpc respectively
- out_pathstr, optional
Path to save the potential (should be a .yml file), by default None
- nmaxint, optional
Maximum value of $n$ for the radial expansion, by default 15
- lmaxint, optional
Maximum value of $ell$ for the spherical harmonics, by default 5
- verbosebool, optional
Whether to report on progress, by default False
- snap
- Returns:
- pot
gala.potential.potential.CompositePotential Potential of the snapshot
- pot