Skip to main content

An emulator for the APEC model

Project description

nnapec

CI PyPI PyPI - Downloads

alt text

An emulator for the APEC model

Installation

pip install nnapec

How to

The APEC model is incredibly slow. This is not fun.

Here we provide an neural net emulator that can be used with astromodels and 3ML which is much faster than using pyatomdb.

import numpy as np

from nnapec import get_apec_model

# get an instance of the apec model
# multiple instances can be used

nn_apec = get_apec_model()


nn_apec.redshift = 1.
nn_apec.redshift.fix = True
nn_apec.kT = 3.
nn_apec.abund = 0.3

energies = np.geomspace(0.1, 10., 1000)

photon_flux = nn_apec(energies)
  • TODO
    • Currently the model is trained with the AG89 abundances
    • Will train more models if needed

Credits

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

nnapec-0.1.1.tar.gz (12.5 MB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page