csiborgtools/scripts/mass_enclosed_8600.ipynb
Richard Stiskalek 1c736aaede
Density field tests (#110)
* Add imports

* Remove file

* Add boxsize argument

* Add script

* Update script

* Edit script

* Add nbs
2024-02-26 12:36:29 +00:00

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]:
3.765003070876428e+19
In [55]:
3.749e19
Out[55]:
3.749e+19
In [57]:
box.solarmass2box(3.749e19)
Out[57]:
0.9957495198343349
In [ ]:

In [ ]:

In [ ]:

In [49]:
box.kpc2box(677.7 / 0.705 * 1000)
Out[49]:
0.9988759675724455
In [43]:
box.box2kpc(1) / 1000 * 0.705
Out[43]:
678.4626139789958
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 [ ]: