In [1]:
import datetime
import pymc
import numpy as np
import spacepy.plot as spp # for the style
import matplotlib.pyplot as plt
import spacepy.toolbox as tb
import spacepy.plot as spp
%matplotlib inline
datetime.datetime.now()
Out[1]:
In [6]:
# setup data from y=x~{-1.4}
x_real = tb.logspace(1, 100, 20) # think of as energy
y_real = x_real**(-1.4)
plt.loglog(x_real, y_real, '.-')
Out[6]:
In [7]:
#setup data
x = np.random.random_sample?
In [14]:
x = np.sort(np.random.random_sample(size=30)*(x_real.max()-x_real.min()) + x_real.min())
y = np.random.normal(loc=0, scale=0.1, size=len(x)) * x**(-1.4 + np.random.normal(loc=0, scale=0.001, size=len(x)) )
plt.loglog(x, y, '.-')
Out[14]:
In [ ]:
In [ ]: