Skip to main content

artistools

DOI PyPI - Version License

Supported Python versions Installation and pytest codecov

Artistools is collection of plotting, analysis, and file format conversion tools for the ARTIS radiative transfer code.

Installation

Requires Python >= 3.13

The artistools command can be invoked with uvx artistools (after installing uv), installed globally with uv tool install artistools, or installed into your environment with pip install artistools.

Development (editable installation)

For development, you will need a rust compiler and a clone of the repository:

git clone https://github.com/artis-mcrt/artistools.git
cd artistools

To make the artistools command available using an isolated uv virtual environment, run:

uv tool install --editable .[extras]
prek install

Alternatively, to avoid uv and install into the system environment with pip:

pip install --group dev --editable .[extras]
prek install

To enable tab completion, run artistools completions. The command detects your shell and gives the steps for it.

Citing artistools

If you artistools for a paper or presentation, please cite it. For details, see https://zenodo.org/badge/latestdoi/53433932.

Usage

Run "artistools" (or the short alias "at") at the command-line to get a full list of subcommands, and "artistools --version" to check the installed version. Some common commands are:

  • artistools plotspectra (alias: at spec)
  • artistools plotlightcurve (alias: at lc)
  • artistools plotestimators (alias: at estimators)
  • artistools plotnltepops
  • artistools inputmodel describe

Use the -h option to get a list of command-line arguments for each subcommand. Set ARTISTOOLS_TRACEBACK=1 to get the full traceback of an error. Most of these commands should be run either within an ARTIS simulation folder or by passing the folder path as the last argument.

Use from Python

artistools is mainly a set of commands, but a script or a notebook can call the same functions. import artistools as at gives a small set of names at the top level. Each package holds the other names, e.g. at.spectra and at.inputmodel.

from pathlib import Path

import artistools as at
import polars as pl

modelpath = Path("mymodel")
dfmodel, modelmeta = at.get_modeldata(modelpath)
times_days = at.get_timestep_times(modelpath, loc="mid")
dftemperature = at.scan_estimators(modelpath).filter(pl.col("timestep") == 40).select("modelgridindex", "Te").collect()
dfspectrum = at.spectra.get_spectra(modelpath, timestepmin=40, timestepmax=45)[-1].collect()

A function with the prefix scan_ returns a polars LazyFrame, or one LazyFrame for each direction bin, and reads nothing until .collect(). A function with the prefix read_ reads at once. A function with the prefix get_ can do either, and the tables below say which one returns a LazyFrame. The direction bin -1 is the average over all directions.

Names at the top level

Name Purpose
at.get_modeldata Read model.txt. Return the cells as a LazyFrame, and the model parameters as a dictionary.
at.add_derived_cols_to_modeldata Add columns that follow from the model file, e.g. the volume and the mass of each cell.
at.get_inputparams Return the parameters of input.txt.
at.get_model_name Return the name of the model that holds a path.
at.get_nprocs Return the number of MPI processes of the run.
at.get_timestep_times Return the time in days of each timestep (loc is "start", "mid", "end", or "delta").
at.get_timestep_of_timedays Return the timestep that holds a time in days.
at.scan_estimators Read the estimators of a full run as a LazyFrame, with a row for each timestep and cell.
at.get_deposition Return deposition.out as a LazyFrame.
at.get_ionstring Return a text such as Fe II for an atomic number and an ion stage.
at.get_ion_tuple Return (26, 2) for a text such as FeII, Fe II, or 26_2.
at.get_elsymbol Return the element symbol of an atomic number.
at.get_atomic_number Return the atomic number of an element symbol.
at.get_z_a_nucname Return the atomic number and the mass number of a text such as Pb208.
at.decode_roman_numeral Return the integer of a Roman numeral.
at.get_path Return a known path by name, e.g. the package folder.
at.firstexisting Return the first file of a list that exists, with a compressed copy as an alternative.
at.zopen Open a file, or its .zst, .gz, or .xz copy.

Main readers in the packages

Name Purpose
at.estimators.read_estimators Read the estimators of a few cells into a dictionary. This is slow for many cells, thus prefer at.scan_estimators.
at.spectra.get_spectra Return the spectrum of each direction bin, as an average over a range of timesteps.
at.spectra.get_from_packets Return a spectrum from the packets files, for a range of arrival times.
at.lightcurve.scan_lightcurve Read a light curve file. Return one LazyFrame for each direction bin.
at.lightcurve.get_from_packets Return the luminosity against time from the packets files.
at.packets.get_packets Return the number of ranks and a LazyFrame of the packets of a run.
at.nltepops.read_nltepops Read the NLTE populations of a timestep and of one or more cells.
at.atomic.get_levels Return the energy levels of each ion, with the transitions as an option.
at.inputmodel.save_modeldata Write model.txt from a dataframe of the cells.
at.plottools.set_mpl_style Apply the matplotlib style of artistools.

The command of a package

A package that has a plot command gives it as plot, e.g. at.spectra.plot, at.lightcurve.plot, at.estimators.plot, at.nltepops.plot, at.packets.plot, at.nonthermal.plot, and at.gsinetwork.plot. This function is the command itself. Each keyword is one command-line argument:

at.spectra.plot(argsraw=[], specpath=[modelpath], timedays="300", outputfile="spectrum.pdf")

Example output

Emission plot NLTE plot Estimator plot

License

Distributed under the MIT license. See LICENSE for more information.

https://github.com/artis-mcrt/artistools

Metadata

Release files for artistools 2026.9.28

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

Source distribution (sdist)

Source distribution for artistools 2026.9.28
File Size Uploaded
artistools-2026.9.28.tar.gz 8.7 MB Details

Built distributions (wheels)

Table of built distributions (wheels) for artistools 2026.9.28
File
artistools-2026.9.28-cp315-abi3.abi3t-manylinux_2_28_x86_64.whl CPython 3.15 abi3, abi3t Linux glibc 2.28+ x86-64 Details
artistools-2026.9.28-cp315-abi3.abi3t-manylinux_2_28_aarch64.whl CPython 3.15 abi3, abi3t Linux glibc 2.28+ ARM64 Details
artistools-2026.9.28-cp315-abi3.abi3t-macosx_13_0_arm64.whl CPython 3.15 abi3t, abi3 macOS 13.0+ ARM64 Details
artistools-2026.9.28-cp314-cp314t-manylinux_2_28_x86_64.whl CPython 3.14 CPython 3.14 free-threading Linux glibc 2.28+ x86-64 Details
artistools-2026.9.28-cp314-cp314t-manylinux_2_28_aarch64.whl CPython 3.14 CPython 3.14 free-threading Linux glibc 2.28+ ARM64 Details
artistools-2026.9.28-cp314-cp314t-macosx_13_0_arm64.whl CPython 3.14 CPython 3.14 free-threading macOS 13.0+ ARM64 Details
artistools-2026.9.28-cp313-abi3-manylinux_2_28_x86_64.whl CPython 3.13 abi3 Linux glibc 2.28+ x86-64 Details
artistools-2026.9.28-cp313-abi3-manylinux_2_28_aarch64.whl CPython 3.13 abi3 Linux glibc 2.28+ ARM64 Details
artistools-2026.9.28-cp313-abi3-macosx_13_0_arm64.whl CPython 3.13 abi3 macOS 13.0+ ARM64 Details

Total release size: 143.5 MB

Release files / artistools-2026.9.28.tar.gz

Download URL artistools-2026.9.28.tar.gz
Size 8.7 MB
Tags Source
SHA-256 checksum
How to use checksums
09e9eae3be67c35ceee203e5e9297db4e83ef3ec49d700a2ff7529900824c43b
BLAKE2b-256 checksum
How to use checksums
24d1cf3a6c502f93b9dea8033efc86bc2775c3f90ef1ad8d528c9744c188aa4a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 28, 2026.

Transparency log

Release files / artistools-2026.9.28-cp315-abi3.abi3t-manylinux_2_28_x86_64.whl

Download URL artistools-2026.9.28-cp315-abi3.abi3t-manylinux_2_28_x86_64.whl
Size 15.7 MB
Tags CPython 3.15 Linux glibc 2.28+ x86-64 abi3 abi3t
SHA-256 checksum
How to use checksums
0705f8c68cb6a667570cb57437fa342af2529c07fb7380b78df79329deb05393
BLAKE2b-256 checksum
How to use checksums
8dddd39e4491f5cbc7adcbd9aa7f90997f4090b53f924b2223eacb320de47635
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 28, 2026.

Transparency log

Release files / artistools-2026.9.28-cp315-abi3.abi3t-manylinux_2_28_aarch64.whl

Download URL artistools-2026.9.28-cp315-abi3.abi3t-manylinux_2_28_aarch64.whl
Size 15.7 MB
Tags CPython 3.15 Linux glibc 2.28+ ARM64 abi3 abi3t
SHA-256 checksum
How to use checksums
3295a6ff589167dcbc4704954f0009144a599846d2d0465aab9ba169efa37035
BLAKE2b-256 checksum
How to use checksums
8061ffb6dcdcaedc24a5d19d5965c6ed76bee90219572c7dd1eb101734a07799
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 28, 2026.

Transparency log

Release files / artistools-2026.9.28-cp315-abi3.abi3t-macosx_13_0_arm64.whl

Download URL artistools-2026.9.28-cp315-abi3.abi3t-macosx_13_0_arm64.whl
Size 13.5 MB
Tags CPython 3.15 abi3 abi3t macOS 13.0+ ARM64
SHA-256 checksum
How to use checksums
21b1cf01874caa5b536222a646407ec7e830cfcd798a35a371626f977647416f
BLAKE2b-256 checksum
How to use checksums
29c31074bfd30f52d5dfdbe1e06c1780a6d8b6186d96832c2d03734758f9b21c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 28, 2026.

Transparency log

Release files / artistools-2026.9.28-cp314-cp314t-manylinux_2_28_x86_64.whl

Download URL artistools-2026.9.28-cp314-cp314t-manylinux_2_28_x86_64.whl
Size 15.6 MB
Tags CPython 3.14 CPython 3.14 free-threading Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
79934d213a53af00dc4ea1486bcf060eb6118a0dc7e1f24da246067427fe6fc5
BLAKE2b-256 checksum
How to use checksums
650f86db0f3fc1d94d9b7a62ccb699fcd2c639e6a628139731cec12b4cf88b14
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 28, 2026.

Transparency log

Release files / artistools-2026.9.28-cp314-cp314t-manylinux_2_28_aarch64.whl

Download URL artistools-2026.9.28-cp314-cp314t-manylinux_2_28_aarch64.whl
Size 15.7 MB
Tags CPython 3.14 CPython 3.14 free-threading Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
24844b5288225b51744d8bda97d953c4b6b206d0a174e2dbcb277039d637f0c3
BLAKE2b-256 checksum
How to use checksums
7ded661ca1ce3ca4a5836d83ff253924b4b4ced0666a0febc8e456386187b846
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 28, 2026.

Transparency log

Release files / artistools-2026.9.28-cp314-cp314t-macosx_13_0_arm64.whl

Download URL artistools-2026.9.28-cp314-cp314t-macosx_13_0_arm64.whl
Size 13.5 MB
Tags CPython 3.14 CPython 3.14 free-threading macOS 13.0+ ARM64
SHA-256 checksum
How to use checksums
3c720d67d3c1e959ed282f32ed49c717a0d738e3950d67e8dbe8047c32d6cbc4
BLAKE2b-256 checksum
How to use checksums
047c31873e1f8d5d00e1c7436999f5b4275e4ab8dac53b1a9e5c70d2f7062200
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 28, 2026.

Transparency log

Release files / artistools-2026.9.28-cp313-abi3-manylinux_2_28_x86_64.whl

Download URL artistools-2026.9.28-cp313-abi3-manylinux_2_28_x86_64.whl
Size 15.7 MB
Tags CPython 3.13 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
0677380d070b61542be2e5c9bbdba9bd4d52b08a35ff30301446f1a8d7c7c1e4
BLAKE2b-256 checksum
How to use checksums
8f31fa12a7c9060bf8f3dc014e643a54eede17cabb7077555eb0d873a60f459c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 28, 2026.

Transparency log

Release files / artistools-2026.9.28-cp313-abi3-manylinux_2_28_aarch64.whl

Download URL artistools-2026.9.28-cp313-abi3-manylinux_2_28_aarch64.whl
Size 15.7 MB
Tags CPython 3.13 Linux glibc 2.28+ ARM64 abi3
SHA-256 checksum
How to use checksums
d37a1693889562a0a9f73c87169591a9926649c31f491716d8a3a85dff4db978
BLAKE2b-256 checksum
How to use checksums
af2d4cf8f0ff777b96a23fb4b124b59ab5ad468929fd7c6d2fab106b331867ba
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 28, 2026.

Transparency log

Release files / artistools-2026.9.28-cp313-abi3-macosx_13_0_arm64.whl

Download URL artistools-2026.9.28-cp313-abi3-macosx_13_0_arm64.whl
Size 13.5 MB
Tags CPython 3.13 abi3 macOS 13.0+ ARM64
SHA-256 checksum
How to use checksums
49d70b274d6ebefe627f3d5dcd7fe4e06875f3c50bd4ff7bbdd12a73f01b563a
BLAKE2b-256 checksum
How to use checksums
5ea31f0e3210937cf4f2f4b0ac5dbb80baed81435773e751ae26ce188d6a007c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 28, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

2026.9.28 This release

10 release files

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