Skip to main content

No project description provided

Project description

NebulaPy

PyPI version License Python version

NebulaPy is a Python library for post-processing PION simulations.

Features

  • Spectral Energy Distribution (SED) Binning: Energy binning of stellar atmosphere models, including ATLAS, Potsdam, and CMFGEN, and Blackbody across a wide range of metal abundances.
  • Line Luminosity Calculations:
    • Computes line luminosities for spherical geometry (1D nested and uniform grid).
    • Computes line luminosities for cylindrical geometry (2D nested and uniform grid).
    • Computes line luminosities for cylindrical geometry via MultiProcessing.
  • Cooling Function Maps for 2D simulations
  • Identifies the dominant spectral lines for ions in 1D and 2D simulation snapshots by calculating the line luminosity for all lines based on grid-level data. It then outputs the dominant lines for a specified list of ions.
  • Emissivity Map Generator for 2D simulation snapshot:
    • Generates emissivity maps for single ion multi-line emissions from a 2D simulation snapshot.
    • Generates emissivity maps for multiple ions, multi-line emissions from a 2D simulation snapshot.

Installation

pip install nebulapy

# Install dependencies
pip install -r requirements.txt

# Download and set up the CHIANTI database (require ~1 GB disk space)
wget https://download.chiantidatabase.org/CHIANTI_10.1_database.tar.gz

# Extract it to a directory (~5 GB disk space required)
tar -xzf CHIANTI_10.1_database.tar.gz -C ~/MY_CHIANTI_DIRECTORY

# Add the following environmental variable to your .bashrc
echo "export XUVTOP=\$HOME/MY_CHIANTI_DIRECTORY" >> ~/.bashrc

# Reload your .bashrc
source ~/.bashrc

# Install the Python-SILO interface:
bash install_silo.sh

# Fix the SILO library path in your local distribution:
# Open the file:
#   ${HOME}/.local/venv/lib/python3.11/site-packages/pypion/SiloHeader_data.py
# Modify line 18 to append /lib to the path

# To download the NebulaPy database:
# Execute the following command from the NebulaPy root directory.
# If a destination path is not specified, the download will default to the
# root directory. This requires approximately 270 MB of additional space.
download-database [destination_path]

# This requires ~270 MB of additional space

# Add environmental variable for NebulaPy Database
echo "export NEBULAPYDB=\$HOME/MY_NEBULAPY_DATABASE_DIRECTORY" >> ~/.bashrc

# Reload your .bashrc
source ~/.bashrc

Requirements

  • numpy
  • scipy
  • requests
  • matplotlib
  • ipyparallel
  • ChiantiPy
  • pypion
  • pandas
  • h5py
  • astropy

Usage

For detailed usage instructions, examples, and features, please visit NebulaPy Wiki. Sample scripts demonstrating NebulaPy functionalities can be found in the NebulaPy/problems directory.

Documentation

Check the full documentation at NebulaPy GitHub.

Support

For bug reports and feature requests, visit the issues section of the repository:

Changelog

  • Version 1.0.0-beta – March 5, 2025: Beta release

Author

Arun Mathew
Astronomy & Astrophysics
Computational and High Energy Astrophysics
Dublin Institute for Advanced Studies (DIAS), Ireland

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

NebulaPy-1.0.1b0.tar.gz (23.3 MB view details)

Uploaded Source

Built Distribution

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

NebulaPy-1.0.1b0-py3-none-any.whl (23.3 MB view details)

Uploaded Python 3

File details

Details for the file NebulaPy-1.0.1b0.tar.gz.

File metadata

  • Download URL: NebulaPy-1.0.1b0.tar.gz
  • Upload date:
  • Size: 23.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.8.10

File hashes

Hashes for NebulaPy-1.0.1b0.tar.gz
Algorithm Hash digest
SHA256 8bf54ecf7ddf942d57f55f4decb187f0121bd3156c55829f74c6d65acee716ea
MD5 8434fbc217033be993fad0c83b69e51a
BLAKE2b-256 ebb5ea1c3ef2dc0af9fe0afaebe122049344ff554472a09629f2d75df02a2b11

See more details on using hashes here.

File details

Details for the file NebulaPy-1.0.1b0-py3-none-any.whl.

File metadata

  • Download URL: NebulaPy-1.0.1b0-py3-none-any.whl
  • Upload date:
  • Size: 23.3 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.8.10

File hashes

Hashes for NebulaPy-1.0.1b0-py3-none-any.whl
Algorithm Hash digest
SHA256 bd31e8f435523f242dc4135e644a19432b7d23c515a9b92bd9730f87aae64f4e
MD5 19c83aabd66dad3c7c19aa7146bc881b
BLAKE2b-256 c7f27a40cf02a56af8f542966007d97d5a68c2b86da20d7a21509746093c893a

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