projects
/
dcpomatic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b4b7d14
)
Add script to plot gamma graphs>
author
Carl Hetherington
<cth@carlh.net>
Sun, 21 Jun 2015 15:22:57 +0000
(16:22 +0100)
committer
Carl Hetherington
<cth@carlh.net>
Sun, 21 Jun 2015 15:22:57 +0000
(16:22 +0100)
hacks/gamma_graphs.py
[new file with mode: 0644]
patch
|
blob
diff --git a/hacks/gamma_graphs.py
b/hacks/gamma_graphs.py
new file mode 100644
(file)
index 0000000..
166a038
--- /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()