summaryrefslogtreecommitdiff
path: root/src/demo_gai.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/demo_gai.py')
-rw-r--r--src/demo_gai.py29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/demo_gai.py b/src/demo_gai.py
new file mode 100644
index 0000000..5de4f5b
--- /dev/null
+++ b/src/demo_gai.py
@@ -0,0 +1,29 @@
+import numpy as np
+import matplotlib.pyplot as plt
+import crl, crl.tables, crl.data
+from shared import *
+
+
+
+plot_setup(width=0.65)
+plot_grid(minor=False)
+
+spec = crl.data.load("lab/2 grudnia/E27/Jarzeniówka 2700/Z korekcją.txt")
+J27 = crl.Spectrum(spec[:, 0], spec[:, 1])
+spec = crl.data.load("lab/2 grudnia/E27/Jarzeniówka 6500/Z korekcją.txt")
+J65 = crl.Spectrum(spec[:, 0], spec[:, 1])
+
+crl.chromaticity_diagram(crl.uvY76, locus=False)
+for i, (label, spec) in enumerate([
+ ["CDC 2700 K", crl.BlackBodySpectrum(2700)],
+ ["JA27", J27],
+ ["$\\mathrm{D}_{65}$", crl.CIEDaylightSpectrum(6500)],
+ ["JA65", J65]]):
+ GAI, points = crl.cri_GAI(spec)
+ plot_GAI(points, pattern=["v--", "v-", "o--", "o-"][i],
+ label=label, alpha=(0.3 if "JA" in label else 0))
+
+plt.xlim(0.14, 0.33)
+plt.ylim(0.39, 0.56)
+plt.legend()
+plot_export()