summaryrefslogtreecommitdiff
path: root/src/tcs_ra.py
diff options
context:
space:
mode:
authorPaweł Redman <pawel.redman@gmail.com>2020-02-16 11:14:09 +0100
committerPaweł Redman <pawel.redman@gmail.com>2020-02-16 11:18:55 +0100
commit87eb67408f9230315494a8cf66fe264196a04ad0 (patch)
tree63ee9d8b92b7cffaa38d83b4222ffd1e391eb75b /src/tcs_ra.py
Ostateczna wersja pracy dyplomowejHEADmaster
Diffstat (limited to 'src/tcs_ra.py')
-rw-r--r--src/tcs_ra.py30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/tcs_ra.py b/src/tcs_ra.py
new file mode 100644
index 0000000..e69a177
--- /dev/null
+++ b/src/tcs_ra.py
@@ -0,0 +1,30 @@
+from shared import *
+import crl, crl.tables
+
+bounds = Bounds()
+
+plot_setup(width=0.5, color_plot=True)
+plot_grid()
+crl.chromaticity_diagram(crl.UVstarNormedD65, locus=True, isotherms=True,
+ pures_labels=False)
+
+
+for i in range(14):
+ S = crl.Spectrum(crl.tables.tcs_ra[:, 0], crl.tables.tcs_ra[:, 1 + i])
+ S = crl.CombinedSpectrum(S, crl.Illuminants.D65)
+
+ u, v, _ = crl.UVstarNormedD65(S)
+ label = "%d" % (i + 1)
+
+ plt.plot(u, v, "k+", label="TCS" if not i else None)
+ plt.annotate(label, xy=(u, v), xytext=(10, 0),
+ textcoords="offset points", fontsize=11,
+ verticalalignment="center",
+ horizontalalignment="left",
+ bbox=dict(boxstyle="square,pad=0.2", fc="white"))
+ bounds.point(u, v)
+
+
+plot_sRGB(crl.UVstarNormedD65)
+bounds.set(margin=0.1)
+plot_export()