PowerSpectrum Files
Let’s read a powerspectrum file for the LC cosmology, mass bin “0”, in RSD “irsd3”, and run 1
[ ]:
import numpy as np
cosmo = 'LC300'
space='irsd3'
massbin_tag = 'mbin0'
run = 1
ps_path = f'psbs/LH_{cosmo}/powerspectrum_hh_pmwd_{space}_{cosmo}_{massbin_tag}_run{run}_grid144_z0p503.dat'
k, avgk, P0PSN, P2, P4, Nmodes, PSN = np.loadtxt(ps_path, unpack=True)
P0 = P0PSN - PSN # PS monopole
[7]:
import matplotlib.pyplot as plt
plt.loglog(avgk, P0, linestyle='-' , linewidth=2, label = 'PS0')
plt.loglog(avgk, P2, linestyle='--', linewidth=2, label = 'PS2')
plt.loglog(avgk, P4, linestyle=':' , linewidth=2, label = 'PS4')
plt.legend()
plt.xlabel('k(h/Mpc)', fontsize=18)
plt.ylabel('P(k)[Mpc/h]^3', fontsize=18)
plt.show()