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 SpecOutLines

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 for the Flury (2025) paper which presents the models and code is below; however, a GitHub CCF is also provided for convenience.

@ARTICLE{Flury2025,
       author = {{Flury}, Sophia R.},
        title = "{OutLines: Modeling Astrophysical Winds, Bubbles, and Outflows}",
      eprint={2512.10650},
      archivePrefix={arXiv},
      primaryClass={astro-ph.GA},
      url={https://arxiv.org/abs/2512.10650}, 
         year = {2025},
        month = {dec} }

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{Flury2023,
       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.1.0.tar.gz (46.8 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.1.0-py3-none-any.whl (48.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for specoutlines-1.1.0.tar.gz
Algorithm Hash digest
SHA256 c4a2b36433efacabff47447ba6b540a43a451a0b669edbeacdc5595091f89b1d
MD5 b3d114839a28306a2f5c9f9654716024
BLAKE2b-256 8566a9db86d6924a28a65c865f7e25ecf56f7e881fea1b47c7dd451d14da6c71

See more details on using hashes here.

File details

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

File metadata

  • Download URL: specoutlines-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 48.0 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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 eb6bb33c211d91cd8e3a71848339596e4c89d923fc84596d52543392672ab4aa
MD5 39bf36447a4f6a071ad71c3bdfa1d917
BLAKE2b-256 62be5462c0f7602474730f335d8028cae5ce762ea4b94e622bb4ba3055adffe8

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