import numpy as np
import matplotlib.pyplot as plt

# Set seed, so random number is reproduceable
np.random.seed(0)

# True value of parameters
true_norm = 1.3e22
true_temp = 5770.

# Generate x and y for BB
# x is lambda in angstrom, y is BB flux in arbitrary unit
x = 1000.*(np.arange(15) + 1)
y = true_norm / x**5 / (np.exp(1.435e8 / (x * true_temp)) - 1)

# Print out data
for i in xrange(len(x)):
	print "{0:5.0f}  {1:5.2f}".format(x[i], y[i])

# Plot the data
plt.plot(x, y, 'ob')
plt.xlabel("Lambda (Angstrom)")
plt.ylabel("Flux (Arbitrary)")
plt.show()
