Skip to main content

SLAM logo

Documentation Status DOI

SLAM (Spectral Line Analysis/Modeling) is a Python library for analyzing and modeling spectral line data at (sub)millimeter wavelengths, with a particular focus on rotational motions of disks around (proto)stellar objects. The current release (v2) includes several packages for deriving rotation curves and estimating the dynamical mass of the central object. Details of the methods are presented Aso & Sai (2024) and Aso, Sai et al. (2026 in prep).

Documentation is available on Read the Docs.

Features

  • pvanalysis extracts rotational curves from position-velocity (PV) diagrams and fits them with a power-law (or double-power-law) function. The detail of the method is presented in Aso et al. 2015, Sai et al. 2020, Aso & Sai (2024), and references therein.
  • velgrad extracts rotation curves using the velocity gradient method, which derives two dimensional mean positions as a function of velocity.
  • pvfitting fits observed PV diagrams (taken along the disk major and/or minor axes) with model PV diagrams of a protostellar system that consists of a Keplerian disk and a UCM envelope (Ulrich 1976; Cassen & Moosman 1981). This package enables simultaneous estimation of rotational and infalling velocities, from which the dynamical mass of the central object and deceleration factor for infall motion can be derived.
  • channelfit fits the velocity channel maps with a Keplerian disk model to estimate the dynamical mass of the central object.

For basic usages, please see example_xxx.py in this library, where xxx is the name of each package.

Requirement

  • python>=3.12
  • astropy>=7.2
  • corner
  • dynesty
  • emcee>=3.1.5
  • matplotlib
  • numba
  • numpy>=2.0
  • scipy
  • tqdm

Installation

Stable versions

You can install stable versions of SLAM with pip

pip install slam-astro

or conda install through conda-forge.

conda install slam-astro

git clone

You can also install SLAM with git clone.

git clone https://github.com/jinshisai/SLAM

To keep the library updated, type the command below in the directory SLAM, always before you use.

git pull

Also, if you install it with git clone, setting the path in .bashrc (or .zshrc etc.) will be useful.

export PYTHONPATH=${PYTHONPATH}:/YOUR_PATH_TO/SLAM

Authors

Citation

If you use SLAM for publications, please cite Aso, Sai et al. (2026 in prep) after it comes out, as well as the latest release in Zenodo:

@software{aso_2026_23953714,
  author       = {Aso, Yusuke and
                  Sai, Jinshi},
  title        = {SLAM v2.1.3},
  month        = nov,
  year         = 2026,
  publisher    = {Zenodo},
  version      = {v2.1.3},
  doi          = {10.5281/zenodo.23953714},
  url          = {https://doi.org/10.5281/zenodo.23953714},
}

For details of the methodology of pvanalysis, the manual paper Aso & Sai (2024) can be also referred:

@article{2024PKAS...39...2A,
    author      = {{Aso}, Yusuke and {Sai}, Jinshi},
    title       = {{SPECTRAL LINE ANALYSIS/MODELING (SLAM) I: PVANALYSIS}},
    booltitle   = {{Vol.39 No.2}},
    journal     = {{PKAS}},
    volume      = {{39}},
    issue       = {{2}},
    publisher   = {Korean Astronomical Society},
    year        = {2024},
    pages       = {27-38},
    doi         = {10.5303/PKAS.2024.39.2.027},
    URL         = {http://pkas.kas.org/journal/article.php?code=91201}
}

License

SLAM is under GNU General Public License Version 3.

Metadata

Release files for slam-astro 2.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for slam-astro 2.1.3
File Size Uploaded Provenance Actions
slam_astro-2.1.3.tar.gz 111.7 kB Without provenance Details for slam_astro-2.1.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for slam-astro 2.1.3
File Interpreter ABI Platform Actions
slam_astro-2.1.3-py3-none-any.whl Python 3 none any Details for slam_astro-2.1.3-py3-none-any.whl

Total release size: 228.8 kB

Release files / slam_astro-2.1.3.tar.gz

Download URL slam_astro-2.1.3.tar.gz
Size 111.7 kB
Tags Source
SHA-256 checksum
How to use checksums
130d099672d8d2215a90e586e1bbf4f7f305be698b56bdc08ae81e062f10f235
BLAKE2b-256 checksum
How to use checksums
c472e4e2405c7821451c79b93d014db6c56f7836a695b6073fd48d9855ab22b8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.10

Release files / slam_astro-2.1.3-py3-none-any.whl

Download URL slam_astro-2.1.3-py3-none-any.whl
Size 117.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5dc3ae58e0a4449488d838790fbddbdf7529563ab2792688dc60854f85fd08bb
BLAKE2b-256 checksum
How to use checksums
49af550287937bd1077cce1a479cd723dc69ec76d1e4257ebdcd94e51284ba55
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.10

Security for slam-astro 2.1.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page