Skip to content

arikallis-j/ns-atmospheres

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ns-atmospheres

Simple python library to work with neutron star's atmospheres.

Set-up library

  1. Install the library
pip install git+https://github.com/arikallis-j/ns-atmospheres.git#egg=atmons
  1. 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

Crash Tutorial: make own neutron star

  1. Import this library
from atmons import *
  1. 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")
  1. Create your neutron star and generator of burst
ns = NeutronStar(config,grid)
burst = ns.burst()
  1. Model burst in neutron star's atmosphere!
for shot in burst:
    print(shot.lum)

Explore neutron star: touch its parameters

ns = NeutronStar(config,grid)
burst = ns.burst()
  1. Neutron star parameters
param = ns.param()
for key, val in param.items():
    print(f"{key} | {val.unit}")
  1. Neutron star's surface parameters
surf = ns.surface()
for key, val in surf.items():
    print(f"{key} | {val.unit}")
  1. Neutron star's shot parameters
shot = ns.shot()
for key, val in shot.items():
    print(f"{key} | {val.unit}")

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages