Skip to main content

model spectral line profiles for astrophysical winds, bubbles, and outflows

Project description

OutLines Logo

OutLines models spectral line profiles from winds, bubbles, and outflows following the formalism in Flury 2025 (see also Flury, Moran, & Eleazer 2023 for an earlier version). A primary goal of OutLines is to remain agnostic to the underlying physics while also drawing on physical motivations for the geometry, velocity, and gas density distributions. A cartoon of the model illustrating the observation of spherical outflows is shown below, depecting the Doppler shift (colored arrows) of light emitted (yellow and orange) and absorbed (orange) by gas in the outflow.

image of a model outflow

Physically justifiable assumptions include the density profile, including a variety of continuous or shell-like gas density distributions, and the velocity field, including the so-called beta law from approximations to CAK theory (e.g., Castor et al. 1975, Barlow et al. 1977) and other power law solutions, under the Sobolev approximation that small-scale ("local") gas velcities contribute negligibly to the net velocity field.

Emission and absorption profiles are computed in velocity space for the specified wavelength(s). Following the equation of radiative transfer, emission line profiles should be added in flux space while absorption line profiles should be added in optical depth space. One or multiple lines can be computed for each set of outflow properties, which is highly recommended in the case of multiple features from the same species such as the [O III] doublet or Si II UV absorption features. However, simultaneous fitting of lines from different phases of the interstellar medium or even different ionization zones is cautioned as different phases may not share the same wind, bubble, or outflow properties.

OutLines currently supports line profile models for absorption lines and nebular, resonant, and fluorescent emission lines.

Installation

While it is possible to download this repository, OutLines is readily accessible via pip install, which will automatically ensure the appropriate dependencies are also installed. An example call in the terminal command line is shown below.

$ pip3 install OutLines

Line Profile Classes

CLASS LINE FEATURE
Absorption resonant absorption
Nebular nebular emission
Resonant resonant emission
Fluorescent fluorescent emission

Example Usage -- [O III] 4959,5007 Profiles

import OutLines as OL
from numpy import linspace
import matplotlib.pyplot as plt
model = OL.Nebular([4958.911,5006.843],Geometry='HollowCones',AddStatic=True,Disk=True)
model.update_params(['TerminalVelocity'],[500,30,15,45])
model.update_params(['OpeningAngle','CavityAngle','Inclination'],[500,30,15,45])
model.update_params(['FluxOutflow1','FluxStatic1'],[1/2.98,1/2.98])
wave = linspace(4950,5015,651)wave = linspace(4950,5015,651)
plt.plot(wave,model.get_profile(wave),lw=2,color='C3')
plt.plot(wave,model.get_outflow(wave),dashes=[3,3],lw=2,color='C3')
plt.plot(wave,model.get_static(wave),':',lw=2,color='C3')
plt.show()
model.print_settings()
model.print_params()
props = OL.Properties(model)
props.print_props()
image of predicted \[O III\] doublet profile
----------------------------------
|          MODEL SETTINGS          |
----------------------------------
|     Line   1     : 4958.911      |
|     Line   2     : 5006.843      |
|          Profile : Nebular       |
|    VelocityField : BetaCAK       |
|   DensityProfile : PowerLaw      |
|         Geometry : HollowCones   |
|  StaticComponent : Yes           |
|         Aperture : No            |
|             Disk : Yes           |
----------------------------------
 ----------------------------------
|         MODEL PARAMETERS         |
 ----------------------------------
|     DopplerWidth :    8.994 km/s |
| TerminalVelocity :  500.000 km/s |
|    VelocityIndex :    1.000      |
|      FluxStatic1 :    0.336      |
|      FluxStatic2 :    1.000      |
|     FluxOutflow1 :    0.336      |
|     FluxOutflow2 :    1.000      |
|      Inclination :   45.000°     |
|     OpeningAngle :   30.000°     |
|      CavityAngle :   15.000°     |
|       DiskRadius :    2.000      |
|    PowerLawIndex :    2.000      |
 ----------------------------------
 -------------------------------------------
|             MODEL PROPERTIES              |
 -------------------------------------------
|        x.out :    1.500                   |
|        v.out :  166.667  km s^-1          |
|         Mdot :    1.057  Msun yr^-1       |
|         pdot :    0.111  10^34 dyne       |
|         Edot :    0.009  10^42 erg s^-1   |
|        v.esc :    1.667                   |
|     pdot.esc :    0.093                   |
|     Edot.esc :    0.154                   |
 -------------------------------------------
| Mdot, pdot, Edot / R0^2 n0 [kpc^2 cm^-3]  |
|  pdot.est, Edot.esc / v0 [100 km s^-1]    |
 -------------------------------------------

Example Usage -- Si II 1260 Profile

import OutLines as OL
from numpy import linspace
import matplotlib.pyplot as plt
kwargs = dict(Geometry='FilledCones',DensityProfile='LogNormal',AddStatic=True)
model = OL.Absorption(1260.4221,1.18,**kwargs)
wave = linspace(1259.25,1260.75,1001)
plt.plot(wave,model.get_profile(wave),lw=2,color='C3')
plt.plot(wave,model.get_outflow(wave),dashes=[3,3],lw=2,color='C3')
plt.plot(wave,model.get_static(wave),':',lw=2,color='C3')
plt.show()
image of predicted Si II 1260 absorption profile

Referencing OutLines

While this code is provided publicly, it did require substantial effort to develop and document. Any use thereof must be cited in any publications in which this code is used. The BibTeX reference is below; however, a GitHub CCF is also provided for convenience.

@ARTICLE{,
       author = {{Flury}, Sophia R.},
        title = "{OutLines: Modeling Astrophysical Winds, Bubbles, and Outflows}",
      journal = {\mnras},
         year = 2025,
        month = jun,
       volume = {},
       number = {},
        pages = {},
          doi = {} }

I developed and implemented the spherical geometry, power law density, CAK approximation model for analysis of broad [O III] lines observed in Mrk 462. That model was presented in Flury, Moran, & Eleazer (2023) MNRAS 525, 4231 The BibTeX reference is below.

@ARTICLE{2023MNRAS.525.4231F,
       author = {{Flury}, Sophia R. and {Moran}, Edward C. and {Eleazer}, Miriam},
        title = "{Galactic outflow emission line profiles: evidence for dusty, radiatively driven ionized winds in Mrk 462}",
      journal = {\mnras},
         year = 2023,
        month = nov,
       volume = {525},
       number = {3},
        pages = {4231-4242},
          doi = {10.1093/mnras/stad2421} }

Licensing

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

specoutlines-1.0.0.tar.gz (44.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

specoutlines-1.0.0-py3-none-any.whl (45.7 kB view details)

Uploaded Python 3

File details

Details for the file specoutlines-1.0.0.tar.gz.

File metadata

  • Download URL: specoutlines-1.0.0.tar.gz
  • Upload date:
  • Size: 44.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for specoutlines-1.0.0.tar.gz
Algorithm Hash digest
SHA256 f20011784191875ee5fe557579a6b8457ef5888d69fcab7fe41aed7b2fc4c450
MD5 55a94e685078f70cb0afe676c1d207b9
BLAKE2b-256 e2c0585ae6fcf903a822d317da5986daae12ccc0f70c939f97e362e8f314a6a8

See more details on using hashes here.

File details

Details for the file specoutlines-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: specoutlines-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 45.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for specoutlines-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 deb93ec091cfaa265be50633f2839e8a0e6ebc85479f19e724a0f41e06349037
MD5 413e5b574db1fc491d457eeac82f385f
BLAKE2b-256 a930dbba1cce09014b9adbfcd9dd73af2e9b33a00ae94d9980795de1c2d2bc4f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page