Commit 65dabd7c authored by Maxime Rey's avatar Maxime Rey
Browse files

Aethetics.

parent 615ef457
......@@ -2990,7 +2990,10 @@ def o_fraction(genpath, folders, timesteps, r200min=0.3, r200max=2, factor=2, er
import numpy as np
import h5py, os
str_ions=['OI','OII','OIII','OIV','OV','OVI','OVII','OVIII','OIX'] #, # Input all ions you have computed +1.
str_ions = ['OI','OII','OIII','OIV','OV','OVI','OVII','OVIII','OIX'] # List of all ions you computed +1.
Z_sun = 0.0134 # 1-0.7381-0.2485
o_frac_sun = 4.90e-4 # oxygen fraction in the sun
if isinstance(timesteps,float) or isinstance(timesteps,int):
timesteps = [timesteps]
......@@ -3023,7 +3026,7 @@ def o_fraction(genpath, folders, timesteps, r200min=0.3, r200max=2, factor=2, er
print(f'\t Computing... \t {fold}: timestep {timestep}')
_, cells, cell_pos, _ = ras.extract_cells(RamsesDir,timestep,factor=factor,saveinfile=False,verbose=False)
cell_dx, _, nH, _, _, _, _, _, _, _, _, _, _, Z = cells
tot_ox_cell = 4.90e-4/0.0134*Z*nH*cell_dx**3 # nO,sun = 4.90e-4/Z_sun*Z*nH = 4.90e-4/0.0134 * nH,sun
tot_ox_cell = o_frac_sun*Z/Z_sun*nH*cell_dx**3
# Compute norm to select CGM cells and not have OI overtaking all other fractions
info = ras.extract_info(timestep, RamsesDir, saveinfile=True)
cu2cm = info['unit_l'] * info['boxlen']
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment