pynbody.analysis.profile

pynbody.analysis.profile#

Support for creating profiles of various quantities, normally as a function of 2d or 3d radius.

The functions defined in the module represent profiles that can be access from a Profile object.

For more information and example usage, see the Profiles tutorial and the documentation for the Profile class.

Functions

E_circ(pro)

Calculates the energy of particles on circular orbits in the z=0 plane.

Q(pro)

Toomre Q parameter

X(pro)

X parameter defined as kappa^2*R/(2*pi*G*sigma*m), using the rotation curve from the z=0 plane

beta(pro)

3D Anisotropy parameter as defined in Binney and Tremaine

density(pro)

Generate a radial density profile for the current type of profile

density_enc(pro)

Generate the mean enclosed density profile

dyntime(pro)

The dynamical time of the bin, sqrt(R^3/2GM).

fourier(pro[, delta_t, phi_bins])

Generate a profile of fourier coefficients, amplitudes and phases

g_spherical(pro)

The naive gravitational acceleration assuming spherical symmetry = GM_enc/r^2

j_circ(pro)

Angular momentum of particles on circular orbits.

j_phi(pro)

Angle that the angular momentum vector of the bin makes with the x-axis in the xy plane.

j_theta(pro)

Angle that the angular momentum vector of the bin makes with respect to the xy-plane.

jtot(pro)

Magnitude of the total angular momentum

kappa(pro)

Radial frequency kappa = sqrt(R dOmega^2/dR + 4 Omega^2) (see Binney & Tremaine Sect.

magnitudes(pro[, band])

Calculate magnitudes in each bin

mass(pro)

mass_enc(pro)

Generate the enclosed mass profile

omega(pro)

Circular frequency Omega = v_circ/radius (see Binney & Tremaine Sect.

pattern_frequency(pro)

Estimate the pattern speed from the m=2 Fourier mode

pot(pro)

Calculates the potential in the z=0 plane

rotation_curve_spherical(pro)

The naive rotation curve assuming spherical symmetry: vc = sqrt(G M_enc/r)

sb(pro[, band])

Calculate surface brightness in each bin

v_circ(pro[, grav_sim])

Circular velocity, i.e. rotation curve.

v_circ_total(pro)

Circular velocity using all particles, not just those in the profile, to source gravity.

weight_fn(pro[, weight_by])

Calculate mass in each bin

Classes

InclinedProfile(sim, angle[, ...])

A profile object to be used with a snapshot inclined by some known angle to the xy plane.

Profile(sim[, load_from_file, ndim, type, ...])

Generates profiles of specified quantities as a function of radius or other binning quantity.

QuantileProfile(sim[, q, weights, ...])

A profile object that returns requested quantiles instead of means in each bin.

VerticalProfile(sim, rmin, rmax, zmax[, ...])

A profile class that uses the absolute value of the z coordinate for binning instead of a radial coordinate.