From 87eb67408f9230315494a8cf66fe264196a04ad0 Mon Sep 17 00:00:00 2001 From: Paweł Redman Date: Sun, 16 Feb 2020 11:14:09 +0100 Subject: Ostateczna wersja pracy dyplomowej --- src/tcs_ra.py | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 src/tcs_ra.py (limited to 'src/tcs_ra.py') 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() -- cgit