Simple python library to work with neutron star's atmospheres.
- Install the library
pip install git+https://github.com/arikallis-j/ns-atmospheres.git#egg=atmons
- Copy in your directory model spectra and configs
$spectra = "https://raw.githubusercontent.com/arikallis-j/ns-atmospheres/refs/heads/main/spectra"
$configs = "https://raw.githubusercontent.com/arikallis-j/ns-atmospheres/refs/heads/main/configs"
wget --directory-prefix="spectra" -N $spectra/spec_ph.yml $spectra/fcol_He.dat $spectra/fcol_S1.dat $spectra/fcol_S001.dat
wget --directory-prefix="configs" -N $configs/__config__.yml $configs/__grid__.yml
- Import this library
from atmons import *
- Setup your neutron star parameters
config, grid = loader()
config['spec_key'] = 'wfc'
config['chem'] = 'he'
grid['n_nu'] = 500
grid['n_theta'] = 10
grid['n_phi'] = 10
dumper('my_neutron_star', config, grid)
config, grid = loader("my_neutron_star")
- Create your neutron star and generator of burst
ns = NeutronStar(config,grid)
burst = ns.burst()
- Model burst in neutron star's atmosphere!
for shot in burst:
print(shot.lum)
ns = NeutronStar(config,grid)
burst = ns.burst()
- Neutron star parameters
param = ns.param()
for key, val in param.items():
print(f"{key} | {val.unit}")
- Neutron star's surface parameters
surf = ns.surface()
for key, val in surf.items():
print(f"{key} | {val.unit}")
- Neutron star's shot parameters
shot = ns.shot()
for key, val in shot.items():
print(f"{key} | {val.unit}")