diff options
| author | Carl Hetherington <cth@carlh.net> | 2015-06-30 09:52:15 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2015-06-30 09:52:15 +0100 |
| commit | af38609fdce431f43073406bafb48e8a9d6f558b (patch) | |
| tree | 96a74c8a3742b34b8ec44adff112776885571e51 /hacks | |
| parent | c3bb1c6614c98f8c548e6e9ab4eac28b3a771f16 (diff) | |
Tweak.
Diffstat (limited to 'hacks')
| -rw-r--r-- | hacks/gamma_graphs.py | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/hacks/gamma_graphs.py b/hacks/gamma_graphs.py index 166a03828..ad75ba908 100644 --- a/hacks/gamma_graphs.py +++ b/hacks/gamma_graphs.py @@ -6,14 +6,24 @@ import numpy as np x = np.logspace(-3, 0, 100) plt.loglog(x, pow(x, 2.2)) -plt.loglog(x, pow(x, 2.4)) +# plt.loglog(x, pow(x, 2.4)) -linearised = [] +srgb_linearised = [] for xx in x: if xx > 0.04045: - linearised.append(pow((xx + 0.055) / 1.055, 2.4)) + srgb_linearised.append(pow((xx + 0.055) / 1.055, 2.4)) else: - linearised.append(xx / 12.92) + srgb_linearised.append(xx / 12.92) + +# plt.loglog(x, srgb_linearised) + +rec_linearised = [] +for xx in x: + if xx > 0.081: + rec_linearised.append(pow((xx + 0.099) / 1.099, 1 / 0.45)) + else: + rec_linearised.append(xx / 4.5) + +plt.loglog(x, rec_linearised) -plt.loglog(x, linearised) plt.show() |
