summaryrefslogtreecommitdiffstats
path: root/src/blackbody.py
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2014-04-05 16:32:52 +0200
committerMattias Andrée <maandree@operamail.com>2014-04-05 16:32:52 +0200
commit3f0a8d9788bea8b99ff09202b8d2d8a3054d6ef2 (patch)
tree572ead5079c3e4013cff8b8daa97b34d7da7e9b8 /src/blackbody.py
parentupdate todo (diff)
downloadblueshift-3f0a8d9788bea8b99ff09202b8d2d8a3054d6ef2.tar.gz
blueshift-3f0a8d9788bea8b99ff09202b8d2d8a3054d6ef2.tar.bz2
blueshift-3f0a8d9788bea8b99ff09202b8d2d8a3054d6ef2.tar.xz
add constants with colour temperatures
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to '')
-rw-r--r--src/blackbody.py72
1 files changed, 72 insertions, 0 deletions
diff --git a/src/blackbody.py b/src/blackbody.py
index ac2e5ed..6e2702a 100644
--- a/src/blackbody.py
+++ b/src/blackbody.py
@@ -32,6 +32,78 @@ DATADIR = 'res'
+# TODO add documentation
+K_F_LUX_W32_EMBER = 1200
+K_MATCH_FLAME = 1700
+K_CANDLE_FLAME = 1850
+K_CANDLELIGHT = K_CANDLE_FLAME
+K_SUNSET = 1850
+K_SUNRISE = SUNSET
+K_F_LUX_W32_CANDLE = 1900
+K_HIGH_PRESSURE_SODIUM = 2100
+K_F_LUX_MAC_CANDLE = 2300
+K_F_LUX_W32_WARM_INCANDESCENT = 2300
+K_STANDARD_INCANDESCENT = 2500
+K_INCANDESCENT = STANDARD_INCANDESCENT
+K_F_LUX_MAC_TUNGSTEN = 2700
+K_F_LUX_W32_INCANDESCENT = 2700
+K_INCANDESCENT_LAMP = (2700 + 3300) / 2
+K_EARLY_SUNRISE = (2800 + 3200) / 2
+K_LATE_SUNSUN = K_EARLY_SUNRISE
+K_WARM_WHITE = 3000
+K_SOFT_WHITE_COMPACT_FLOURESCENT_LAMP = 3000
+K_WARM_WHITE_COMPACT_FLOURESCENT_LAMP = K_SOFT_WHITE_COMPACT_FLOURESCENT_LAMP
+K_HALOGEN_LIGHT = 3000
+K_TUNGSTEN_LIGHT = 3200
+K_HOUSEHOLD_LIGHT_BULB = K_TUNGSTEN_LIGHT
+K_LIGHT_BULB = K_HOUSEHOLD_LIGHT_BULB
+K_STUDIO_LAMPS = K_TUNGSTEN_LIGHT
+K_PHOTOFLOODS = K_STUDIO_LAMPS
+K_STUDIO_CP_LIGHT = 3350
+K_F_LUX_MAC_HALOGEN = 3400
+K_F_LUX_W32_HALOGEN = 3400
+K_SOFT = 3700
+K_PIANO_LUX = K_SOFT
+K_MOONLIGHT = (4100 + 4150) / 2
+K_COOL_WHITE = 4200
+K_F_LUX_MAC_FLOURESCENT = 4200
+K_F_LUX_W32_FLOURESCENT = 4200
+K_ELECTRONIC_FLASH_BULB = 4500
+K_FLASH_BULB = K_ELECTRONIC_FLASH_BULB
+K_D50 = 5000
+K_NOON_DAYLIGHT = 5000
+K_DIRECT_SUN = K_NOON_DAYLIGHT
+K_METAL_HALIDE = 5000
+K_HORIZON_DAYLIGHT = 5000
+K_TUBULAR_FLUORESCENT_LAMP = 5000
+K_COOL_WHITE_COMPACT_FLUORESCENT_LAMPS = 5000
+K_DAYLIGHT_WHITE_COMPACT_FLUORESCENT_LAMPS = K_COOL_WHITE_COMPACT_FLUORESCENT_LAMPS
+K_F_LUX_MAC_DAYLIGHT = 5000
+K_D55 = 5500
+K_F_LUX_W32_DAYLIGHT = 5500
+K_CRYSTAL_VERTICAL = 5600
+K_CLEAR_MID_DAY = 5600
+K_VERTICAL_DAYLIGHT = (5500 + 6000) / 2
+K_ELECTRONIC_FLASH = (5500 + 6000) / 2
+K_XENON_SHORT_ARC_LAMP = 6200
+K_DAYLIGHT = 6500
+K_OVERCAST_DAY = 6500
+K_D65 = 6500
+K_NEUTRAL = K_D65
+K_WHITE = K_NEUTRAL
+K_MEZZO_LUX = K_NEUTRAL
+K_SHARP = 7000
+K_FORTE_LUX = K_SHARP
+K_D75 = 7500
+K_BLUE_FILTER = 8000
+K_NORTH_LIGHT = 10000
+K_BLUE_SKY = K_NORTH_LIGHT
+K_SKYLIGHT = (9000 + 15000) / 2
+K_OUTDOOR_SHADE = K_SKYLIGHT
+K_CLEAR_BLUE_POLEWARD_SKY = (15000 + 27000) / 2
+
+
+
def series_d(temperature):
'''
Calculate the colour for a blackbody temperature