deprojected_sersic_models

The deprojected_sersic_models package contains code to calculate various profiles for deprojected, flattened (and also elongated) Sérsic mass distributions. These calculations follow and extend the derivation of rotation curves for flattened Sérsic profiles presented by Noordermeer, 2008, MNRAS, 385, 1359. Full details about the calculations in this package and in the precomputed tables are given in Price et al., 2022, A&A 665 A159.

As these calculations require numerical integration, it is also possible to reload pre-computed profiles from tables and interpolate as needed.

Tables for a wide range of Sérsic index \(n\) and intrinsic axis ratio \(q_0\) are available for download.

Quickstart

import os
import numpy as np
import matplotlib.pyplot as plt
import deprojected_sersic_models as deproj_sersic

# Environment variable containing path to location of pre-computed tables
table_dir = os.getenv('DEPROJECTED_SERSIC_MODELS_DATADIR')

# Sérsic profile properties
total_mass = 1.e11
Reff = 5.0
n = 1.0
R = np.arange(0., 30.1, 0.1)

# Flattening/elongation array (invq = 1/q; q = c/a)
invq_arr = [1., 2.5, 3.33, 5., 10.]

# Calculate & plot interpolated circular velocity profiles at r for each invq
plt.figure(figsize=(4,3.5))
for invq in invq_arr:
    vc = deproj_sersic.interpolate_sersic_profile_VC(R=R, total_mass=total_mass, Reff=Reff,
                                                     n=n, invq=invq, path=table_dir)
    plt.plot(R, vc, '-', label=r'$q_0$={:0.2f}'.format(1./invq))

plt.xlabel('Radius [kpc]')
plt.ylabel('Circular velocity [km/s]')
plt.legend(title='Intrinsic axis ratio')

plt.tight_layout()
plt.show()

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

_images/index-1.svg

Indices and tables