mirror of
https://github.com/Richard-Sti/csiborgtools.git
synced 2024-12-22 17:08:03 +00:00
1c736aaede
* Add imports * Remove file * Add boxsize argument * Add script * Update script * Edit script * Add nbs
724 KiB
724 KiB
In [2]:
import numpy as np
try:
import csiborgtools
except ModuleNotFoundError:
import sys
sys.path.append("../")
import csiborgtools
%load_ext autoreload
%autoreload 2
In [23]:
simpath = csiborgtools.io.get_sim_path(9844)
Nsnap = 1016
# csiborgtools.io.read_info(1016, simpath)
In [59]:
box = csiborgtools.units.BoxUnits(Nsnap, simpath)
In [61]:
box.box2solarmass(1)
Out[61]:
In [55]:
3.749e19
Out[55]:
In [57]:
box.solarmass2box(3.749e19)
Out[57]:
In [ ]:
In [ ]:
In [ ]:
In [49]:
box.kpc2box(677.7 / 0.705 * 1000)
Out[49]:
In [43]:
box.box2kpc(1) / 1000 * 0.705
Out[43]:
In [ ]:
In [ ]:
filename = "/mnt/extraspace/hdesmond/ramses_out_9844/output_01016/info_01016.txt"
In [ ]:
In [ ]:
results_filepath = '/mnt/extraspace/deaglan/H-AGN/'
sugata_filepath = '/mnt/extraspace/jeg/greenwhale/Sugata/'
def info_dir():
return sugata_filepath + 'INFO/'
def info_file(nout):
return info_dir() + 'info_' + str(nout).zfill(5) + '.txt'
def h_agn_particle_directory(nout):
return sugata_filepath + 'H-AGN/output_' + str(nout).zfill(5) + '/'
def cosmo_dir():
return './data/'
def cosmo_file(nout):
return cosmo_dir() + 'cosmo_table_' + str(nout).zfill(5) + '.txt'
In [ ]:
info_dir()
In [ ]:
filename = "/mnt/extraspace/hdesmond/ramses_out_9844/output_01016/info_01016.txt"
In [ ]:
e
In [ ]: