In [5]:
%matplotlib inline
import numpy as np
import matplotlib.pyplot as plt
import mockgallib as mock
ps = mock.PowerSpectrum('../data/planck1_matterpower.dat')
ps
Out[5]:
In [8]:
print(len(ps)) # number of data points
print(ps[0]) # first element of ps
print(ps.sigma(8.0)) # rms fluctuation smoothed on scale R; sigma(8.0) = sigma_8
In [7]:
plt.plot(ps.k, ps.P, 'r-') # ps.k and ps.P return arrays
plt.xscale('log')
plt.yscale('log')
plt.xlabel('$k$')
plt.ylabel('$P$')
plt.show();
In [1]:
%%html
<style>
table {float:left}
</style>