Commit 2a6b7920 authored by Maxime Rey's avatar Maxime Rey
Browse files

Bugfix: 'Load_region_ param replacing factor wasn't accepting 'fullbox'...

Bugfix: 'Load_region_ param replacing factor wasn't accepting 'fullbox' anymore in maps. Still have to make something cleaner for future purpose.
parent db26ca0e
......@@ -91,7 +91,11 @@ def starmap(RamsesDir, timestep, zoom=1/0.7, load_region=1, var1='x', var2='y',b
cm2kpc = 1. / (3.086e18 * 1.e3)
cu2cm = info['unit_l'] * info['boxlen']
cu2kpc = cu2cm * cm2kpc
center, rad_plot = [cen*cu2kpc for cen in center_cu], radius_cu*load_region*cu2kpc/zoom
center = [cen*cu2kpc for cen in center_cu]
if load_region=='fullbox':
rad_plot = 1.1*cu2kpc/zoom
else:
rad_plot = radius_cu*load_region*cu2kpc/zoom
star_mass,star_x,star_y,star_z,_,star_age,_,_,_,_,_ = ras.extract_stars(RamsesDir, timestep, factor=load_region, rmsat=False, saveinfile=True)
if not imsave:
......@@ -191,7 +195,11 @@ def levelmap(RamsesDir, timestep, zoom=1/0.7, load_region=1, in_pc=False, style=
center, radius = ras.get_r200_cen(RamsesDir, timestep)
cu2cm = info['unit_l'] * info['boxlen']
cu2kpc = cu2cm / 3.086e21
center_plot, rad_plot = [cen*cu2kpc for cen in center], radius*load_region*cu2kpc/zoom
center_plot = [cen*cu2kpc for cen in center]
if load_region=='fullbox':
rad_plot = 1.1*cu2kpc/zoom
else:
rad_plot = radius*load_region*cu2kpc/zoom
if not imsave:
print(RamsesDir.partition('/')[2][2:-1], ' ', timestep, 'z = ', 1/info['aexp']-1)
print('\t r200 =', radius*cu2kpc, 'kpc')
......@@ -299,7 +307,11 @@ def qtymap(RamsesDir, timestep, zoom=1, load_region=1/0.7, var_str='nH', wei_str
center, radius = ras.get_r200_cen(RamsesDir, timestep)
cu2cm = info['unit_l'] * info['boxlen']
cu2kpc = cu2cm / 3.086e21
center_plot, rad_plot = [cen*cu2kpc for cen in center], radius*load_region*cu2kpc/zoom
center_plot = [cen*cu2kpc for cen in center]
if load_region=='fullbox':
rad_plot = 1.1*cu2kpc/zoom
else:
rad_plot = radius*load_region*cu2kpc/zoom
if not imsave:
print(RamsesDir.partition('/')[2][2:-1], ' ', timestep, 'z = ', 1/info['aexp']-1)
print('\t r200 =', radius*cu2kpc, 'kpc')
......
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