ExponentialDiskDensityProfile#

class profiles.density.ExponentialDiskDensityProfile(**kwargs)[source]#

Exponential Disk Density Profile.

Commonly used for stellar and gas disks in spiral galaxies, this profile declines exponentially with radius and height.

\[\rho(r, z) = \rho_0 \, \exp\left( -\frac{r}{r_s} \right) \, \exp\left( -\frac{|z|}{z_s} \right)\]

where:

  • \(\\rho_0\) is the central midplane density.

  • \(r_s\) is the radial scale length.

  • \(z_s\) is the vertical scale height.

Parameters
Parameters for ExponentialDiskDensityProfile#

Name

Symbol

Description

rho_0

\(\\rho_0\)

Central midplane density

r_s

\(r_s\)

Radial scale length

z_s

\(z_s\)

Vertical scale height

Example

>>> import matplotlib.pyplot as plt
>>> from pisces.profiles.density import (
...     ExponentialDiskDensityProfile,
... )
>>> r = np.linspace(0, 15, 200)
>>> z = 0.0  # Midplane
>>> profile = ExponentialDiskDensityProfile(
...     rho_0=1.0, r_s=3.0, z_s=0.3
... )
>>> rho = profile(r, z)
>>> plt.semilogy(
...     r, rho, label="Exponential Disk (z=0)"
... )
>>> plt.xlabel("Radius (r)")
>>> plt.ylabel("Density (rho)")
>>> plt.legend()
>>> plt.show()

(Source code, png, hires.png, pdf)

../_images/profiles-density-ExponentialDiskDensityProfile-1.png

See also

BaseDiskDensityProfile, DoubleExponentialDiskDensityProfile

Methods

__init__(**kwargs)

Initialize a profile instance with specific parameter values.

from_dict(data)

Reconstruct a profile instance from a dictionary.

from_hdf5(h5obj[, name])

Reconstruct a profile from HDF5 attributes.

from_json(filepath)

Reconstruct a profile from a JSON file.

from_yaml(filepath)

Reconstruct a profile from a YAML file.

get_derived_profile(profile_name, **kwargs)

Access and instantiate a derived profile by name.

get_expression_latex([substitute])

Return the LaTeX representation of the profile's symbolic expression.

get_output_units(*argu)

Determine the output units of the operation given some set of input units.

get_parameters_latex()

Return a LaTeX table of the profile parameters.

lambdify_expression(expression)

Convert a symbolic expression into a callable function.

list_derived_profiles()

List all available derived profiles for this instance.

substitute_expression(expression)

Replace symbolic parameters with numerical values in an expression.

to_dict()

Serialize this profile to a minimal dictionary representation.

to_hdf5(h5obj[, name])

Store profile metadata into an HDF5 object as attributes.

to_json(filepath, **kwargs)

Serialize the profile to a JSON file.

to_yaml(filepath, **kwargs)

Serialize the profile to a YAML file.

Attributes

derived_profile_classes

Get the available derived profile classes for this instance.

parameter_symbols

Get the symbolic representations of the coordinate system parameters.

parameters

The parameters of this coordinate system.

variable_symbols

The symbols representing each of the coordinate axes in this coordinate system.

variables

The axes names present in this coordinate system.