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 emrissivity 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
# This will also install dependencies

# 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 CHIANTI-DATABASE-DIRECTORY

# Add the following environmental variable to your .bashrc
echo "export XUVTOP=CHIANTI-DATABASE-DIRECTORY" >> ~/.bashrc

# Reload your .bashrc
source ~/.bashrc

# Install the Python-SILO interface:
# Execute the following command from the NebulaPy root directory.
install-silo

# 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]

# Add environmental variable for NebulaPy Database
echo "export NEBULAPYDB=NEBULAPY-DATABASE-DIRECTORY" >> ~/.bashrc

# Reload your .bashrc
source ~/.bashrc

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
  • Version 1.0.1-beta – March 6, 2025: Minor bug fixes
  • Version 1.0.2-beta – March 6, 2025: Include silo installation script
  • Version 1.0.3-beta – March 6, 2025: Fixed bugs in spectral line emissivity map script

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.3b0.tar.gz (23.3 MB view details)

Uploaded Source

File details

Details for the file nebulapy-1.0.3b0.tar.gz.

File metadata

  • Download URL: nebulapy-1.0.3b0.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.3b0.tar.gz
Algorithm Hash digest
SHA256 df5fd8c30cc40ea59adc290cee7f7a5081044f8e2e4d0784f9579e2a192b6daa
MD5 39d71670c1cb4a2967e932be309ea11c
BLAKE2b-256 6a37923727ed1a3f8390a0e8f70734d9d7a31511dd2f248818ccf8c1d58b57c8

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