1) Generate a white noise field with variance \(\sigma^2=1\).
2) Calculate its power spectrum: show numerically that the power spectrum is constant and equal to \(P(k)=\sigma^2\)
# Solution to Exercise 1 should go here...
#=====================================================
#=====================================================
1) Starting from the previous generated white noise field, modify the Fourier components of the field to produce a new Gaussian field with variance \(\sigma^2=4\).
2) Calculate the inverse Fourier transform of this field and verify that the distribution of values in real space follows the desired Gaussian distribution.
# Solution to Exercise 2 should go here...
#=====================================================
#=====================================================
1) Generalize the previous exercise by impossing a power spectrum \(1/k^3\).
2) Plot the resulting field in real space.
3) Plot the histogram of the field values in real space. Does the histrogram corresponds to a Gaussian distribution? Why not?
4) Average several realization of the same field and check if you recover a Guassian distribution.
# Solution to Exercise 3 should go here...
#=====================================================
#=====================================================
1) Generalize the exercises and create a simple function that returns a Gaussian Random Field given an arbitrary power spectrum index
# Solution to Exercise 4 should go here...
#=====================================================
#=====================================================