Esempio n. 1
0
#plt.xticks((3.5,4.0,4.5,5.0))
#plt.xlabel(r"$\log_{10}\, T \,(10^4 K)$")
#plt.ylabel(r"$\log_{10} \left(\rho /\rho_\mathrm{c}\right)$")
#plt.tight_layout()
#plt.savefig(outdir+"phase_ar_256.pdf")
#plt.figure()
#plt.imshow(gad.map-ar.map,origin='lower',extent=gad.get_lims(),aspect='auto',vmin=-30,vmax=30)
#bar=plt.colorbar(use_gridspec=True)
#bar.set_label(bar_label)
#plt.xticks((3.5,4.0,4.5,5.0))
#plt.xlabel(r"$\log_{10}\, T \,(10^4 K)$")
#plt.ylabel(r"$\log_{10} \left(\rho /\rho_\mathrm{c}\right)$")
#plt.tight_layout()
#plt.savefig(outdir+"phase_gad_ar_256.pdf")
### 512**3 particles
ar_512=phase_plot.get_mass_map(124,"/home/spb/data/ComparisonProject/512_20Mpc/Arepo_ENERGY")
gad_512=phase_plot.get_mass_map(124,"/home/spb/data/ComparisonProject/512_20Mpc/Gadget")

fig=plt.figure()

grid = AxesGrid(fig, 111, # similar to subplot(132)
                    nrows_ncols = (1, 2),
                    axes_pad = 0.2,
                    share_all=True,
                    label_mode = "L",
                    cbar_location = "right",
                    cbar_mode="single",
                    )

im=grid[0].imshow(gad_512.map,origin='lower',extent=gad_512.get_lims(),aspect='auto',vmin=0,vmax=30, cmap="gist_heat")
grid[1].imshow(ar_512.map,origin='lower',extent=ar_512.get_lims(),aspect='auto',vmin=0,vmax=30,cmap="gist_heat")
Esempio n. 2
0
# -*- coding: utf-8 -*-
"""Script for making Lyman-alpha forest temperature-density plots using the phase_plot module"""

import matplotlib
matplotlib.use('PDF')

import phase_plot
import matplotlib.pyplot as plt
outdir="/home/spb/scratch/finals/"
bar_label="Mass ($10^{6} M_\odot$ h$^{-1}$)"
ar=phase_plot.get_mass_map(13,"/home/spb/data/finals/FINAL_E_NC/output")

fig=plt.figure()

plt.imshow(ar.map,origin='lower',extent=ar.get_lims(),aspect='auto',vmin=0,vmax=100,cmap="gist_heat_r")
plt.colorbar()
plt.xlabel(r"$\log_{10}\, Z/ Z_sun$",size=15)
plt.ylabel(r"$\log_{10} \left(\rho /\rho_\mathrm{c}\right)$",size=15)
# plt.tight_layout()
plt.savefig(outdir+"met_phase.pdf")


Esempio n. 3
0
#plt.xticks((3.5,4.0,4.5,5.0))
#plt.xlabel(r"$\log_{10}\, T \,(10^4 K)$")
#plt.ylabel(r"$\log_{10} \left(\rho /\rho_\mathrm{c}\right)$")
#plt.tight_layout()
#plt.savefig(outdir+"phase_ar_256.pdf")
#plt.figure()
#plt.imshow(gad.map-ar.map,origin='lower',extent=gad.get_lims(),aspect='auto',vmin=-30,vmax=30)
#bar=plt.colorbar(use_gridspec=True)
#bar.set_label(bar_label)
#plt.xticks((3.5,4.0,4.5,5.0))
#plt.xlabel(r"$\log_{10}\, T \,(10^4 K)$")
#plt.ylabel(r"$\log_{10} \left(\rho /\rho_\mathrm{c}\right)$")
#plt.tight_layout()
#plt.savefig(outdir+"phase_gad_ar_256.pdf")
### 512**3 particles
ar_512 = phase_plot.get_mass_map(
    124, "/home/spb/data/ComparisonProject/512_20Mpc/Arepo_ENERGY")
gad_512 = phase_plot.get_mass_map(
    124, "/home/spb/data/ComparisonProject/512_20Mpc/Gadget")

fig = plt.figure()

grid = AxesGrid(
    fig,
    111,  # similar to subplot(132)
    nrows_ncols=(1, 2),
    axes_pad=0.2,
    share_all=True,
    label_mode="L",
    cbar_location="right",
    cbar_mode="single",
)
Esempio n. 4
0
# -*- coding: utf-8 -*-
"""Script for making Lyman-alpha forest temperature-density plots using the phase_plot module"""

import matplotlib
matplotlib.use('PDF')

import phase_plot
import matplotlib.pyplot as plt
outdir = "/home/spb/scratch/finals/"
bar_label = "Mass ($10^{6} M_\odot$ h$^{-1}$)"
ar = phase_plot.get_mass_map(13, "/home/spb/data/finals/FINAL_E_NC/output")

fig = plt.figure()

plt.imshow(ar.map,
           origin='lower',
           extent=ar.get_lims(),
           aspect='auto',
           vmin=0,
           vmax=100,
           cmap="gist_heat_r")
plt.colorbar()
plt.xlabel(r"$\log_{10}\, Z/ Z_sun$", size=15)
plt.ylabel(r"$\log_{10} \left(\rho /\rho_\mathrm{c}\right)$", size=15)
# plt.tight_layout()
plt.savefig(outdir + "met_phase.pdf")