summaryrefslogtreecommitdiff
path: root/src/pasek_tecza.py
blob: f831503639ee25b35bacedd0fe81becbac9d35a2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
from shared import *
import crl, numpy as np, matplotlib.pyplot as plt

wvls = np.linspace(380, 780, 200)
colors = []
for wvl in wvls:
	x, y, Y = crl.xyY(crl.PointSpectrum(wvl))
	colors.append([*crl.sRGB(crl.xyY(x, y, Y / 2))])
colors = np.array(colors)

plot_setup()
plot_colorbar(wvls, colors)
plt.xlabel("$\\lambda~[\\mathrm{nm}]$")
plot_export()