summaryrefslogtreecommitdiff
path: root/hacks/gamma_graphs.py
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2015-06-21 16:22:57 +0100
committerCarl Hetherington <cth@carlh.net>2015-06-21 16:22:57 +0100
commit6ec7654b77b22d32cb1ca0dd35c8d66e16ca36d6 (patch)
tree5239a20d511f7b8266271eadf279695cdabe32bd /hacks/gamma_graphs.py
parentb4b7d1428f09846f411df410613a5781e75bb33b (diff)
Add script to plot gamma graphs>
Diffstat (limited to 'hacks/gamma_graphs.py')
-rw-r--r--hacks/gamma_graphs.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/hacks/gamma_graphs.py b/hacks/gamma_graphs.py
new file mode 100644
index 000000000..166a03828
--- /dev/null
+++ b/hacks/gamma_graphs.py
@@ -0,0 +1,19 @@
+#!/usr/bin/python
+
+import matplotlib.pyplot as plt
+import numpy as np
+
+x = np.logspace(-3, 0, 100)
+
+plt.loglog(x, pow(x, 2.2))
+plt.loglog(x, pow(x, 2.4))
+
+linearised = []
+for xx in x:
+ if xx > 0.04045:
+ linearised.append(pow((xx + 0.055) / 1.055, 2.4))
+ else:
+ linearised.append(xx / 12.92)
+
+plt.loglog(x, linearised)
+plt.show()