Plotting Tests: This notebook is a sandbox in which we will showcase the plotting capabilites of our raytracing code as they evolve.


In [1]:
%matplotlib inline 
import evillens as evil
import numpy as np
import matplotlib.pyplot as plt

Create a test lens object which imports its kappa map from a fits file. Then make a plot of the kappa map.


In [2]:
test_lens = evil.GravitationalLens(0.4,1.5)
test_lens.read_kappa_from("examples/test_kappa.fits")
test_lens.plot("kappa")


Out[2]:

Here, we deflect numerically using the kappa map, and plot the result. The two plots show the magnitudes of the x and y components of the deflection angle in arcseconds.


In [3]:
test_lens.deflect()
test_lens.plot("alpha_x")
test_lens.plot("alpha_y")



In [3]:
src = np.loadtxt('/Users/wmorning/research/Ripples/data/test_mod_ModelImg_0.txt').reshape([30,30])
plt.imshow(src,interpolation='nearest',cmap='viridis')


Out[3]:
<matplotlib.image.AxesImage at 0x107c72b10>

In [17]:
PE = np.loadtxt('/Users/wmorning/research/Ripples/data/Phase_Errs.txt')

In [26]:
10**2+39


Out[26]:
139

In [34]:
plt.imshow(PE[:100].reshape([10,10]))


Out[34]:
<matplotlib.image.AxesImage at 0x1096c6e50>

In [31]:



Out[31]:
-0.0076414819999999998

In [ ]: