pynbody.analysis.morphology.decomp#
- pynbody.analysis.morphology.decomp(h, aligned=False, j_disk_min=0.8, j_disk_max=1.1, E_cut=None, j_circ_from_r=False, angmom_size='3 kpc', particles_per_bin=500)[source]#
Creates an array ‘decomp’ for star particles in the simulation, with an integer specifying components.
The possible values of the components are:
thin disk
halo
bulge
thick disk
pseudo bulge
First, the simulation is aligned so that the disk is in the xy plane. Then, the maximum angular momentum of stars as a function of energy is estimated, by default using the routine
estimate_jcirc_from_energy()
. The stars are then classified into the components based on their energy and disk-aligned angular momentum component.The thin disk is defined as stars with angular momentum between j_disk_min and j_disk_max.
From the remaining stars, a critical angular momentum j_crit is then calculated that separates rotating from non-rotating components. By definition, this is chosen such that the mean rotaiton velocity of the non-rotating part is zero
The most tightly bound rotating component is labelled as the pseudo bulge, while less tightly bound rotating stars are labelled as the thick disk, based on E_cut.
The non-rotating stars are then separated into bulge and halo components based on their binding energy, again based on E_cut.
This routine is based on an original IDL procedure by Chris Brook.
Changed in version 2.0: The routine now defaults to using a new method to estimate the circular angular momentum as a function of energy; see
estimate_jcirc_from_energy()
.The critical angular momentum for the spheroid is now determined by insisting the mean angular momentum of the spheroid should be zero.
The above changes lead to different, but probably better, classifications compared with pynbody version 1.
Additionally, this routine is now inside the
pynbody.analysis.morphology
module.- Parameters:
h (SimSnap) – The simulation snapshot to analyze
aligned (bool) – If True, the simulation is assumed to be already aligned so that the disk is in the xy plane. Otherwise, the simulation is recentered and aligned into the xy plane.
j_disk_min (float) – The minimum angular momentum as a proportion of the circular angular momentum which a particle must have to be part of the ‘disk’.
j_disk_max (float) – The maximum angular momentum as a proportion of the circular angular momentum which a particle can have to be part of the ‘disk’.
E_cut (float) – The energy boundary between bulge and halo. If None, this is taken to be the median energy of the stars. Note that the distinction between bulge and halo is somewhat arbitrary and may not be physically meaningful.
j_circ_from_r (bool) – If True, the maximum angular momentum is determined as a function of disc radius, rather than as a function of energy. Default False (determine as function of energy). This option is only valid for simulations where all the stars are anyway in quite a narrow disc.
angmom_size (str) – The size of the disk to use for calculating the angular momentum vector. Default is “3 kpc”.
particles_per_bin (int) – The approximate number of particles per bin in the profile. Default is 500.