We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ee52aeb commit a8c9693Copy full SHA for a8c9693
3 files changed
PyGamer_Improved_Thermal_Camera/code.py
@@ -26,8 +26,6 @@
26
from thermalcamera_converters import celsius_to_fahrenheit, fahrenheit_to_celsius
27
from thermalcamera_config import ALARM_F, MIN_RANGE_F, MAX_RANGE_F, SELFIE
28
29
-__version__ = "0.0.0+auto.0"
30
-__repo__ = "https://github.com/CedarGroveStudios/ThermalCamera.git"
31
32
# Instantiate the integral display and define its size
33
display = board.DISPLAY
PyGamer_Improved_Thermal_Camera/index_to_rgb/iron.py
@@ -72,22 +72,18 @@ def index_to_rgb(index=0, gamma=0.5):
72
red = 0.1
73
grn = 0.1
74
blu = (0.2 + (0.8 * map_range(band, 0, 70, 0.0, 1.0))) ** gamma
75
- # if band >= 70 and band < 200: # blue to violet
76
if 70 <= band < 200: # blue to violet
77
red = map_range(band, 70, 200, 0.0, 0.6) ** gamma
78
grn = 0.0
79
blu = 1.0**gamma
80
- # if band >= 200 and band < 300: # violet to red
81
if 200 <= band < 300: # violet to red
82
red = map_range(band, 200, 300, 0.6, 1.0) ** gamma
83
84
blu = map_range(band, 200, 300, 1.0, 0.0) ** gamma
85
- # if band >= 300 and band < 400: # red to orange
86
if 300 <= band < 400: # red to orange
87
red = 1.0**gamma
88
grn = map_range(band, 300, 400, 0.0, 0.5) ** gamma
89
blu = 0.0
90
- # if band >= 400 and band < 500: # orange to yellow
91
if 400 <= band < 500: # orange to yellow
92
93
grn = map_range(band, 400, 500, 0.5, 1.0) ** gamma
PyGamer_Improved_Thermal_Camera/index_to_rgb/visible.py
@@ -48,22 +48,18 @@ def index_to_rgb(index=0, gamma=0.5):
48
red = ((-1.0 * (wavelength - 440) / (440 - 380)) * intensity) ** gamma
49
50
blu = (1.0 * intensity) ** gamma
51
- # if wavelength >= 440 and wavelength < 490:
52
if 440 <= wavelength < 490:
53
red = 0.0
54
grn = (1.0 * (wavelength - 440) / (490 - 440)) ** gamma
55
56
- # if wavelength >= 490 and wavelength < 510:
57
if 490 <= wavelength < 510:
58
59
grn = 1.0**gamma
60
blu = (-1.0 * (wavelength - 510) / (510 - 490)) ** gamma
61
- # if wavelength >= 510 and wavelength < 580:
62
if 510 <= wavelength < 580:
63
red = (1.0 * (wavelength - 510) / (580 - 510)) ** gamma
64
65
66
- # if wavelength >= 580 and wavelength < 645:
67
if 580 <= wavelength < 645:
68
69
grn = (-1.0 * (wavelength - 645) / (645 - 580)) ** gamma
0 commit comments