Skip to content

Instantly share code, notes, and snippets.

View KelSolaar's full-sized avatar
🔅
Bending Light

Thomas Mansencal KelSolaar

🔅
Bending Light
View GitHub Profile
@KelSolaar
KelSolaar / hue_change.py
Created March 8, 2015 00:32
Hue - Change
from pprint import pprint
from colour import XYZ_to_CIECAM02, CIECAM02_VIEWING_CONDITIONS, sRGB_to_XYZ
from colour.models.deprecated import RGB_to_HSV
XYZ = np.array([19.01, 20.00, 21.78])
XYZ_w = np.array([95.05, 100.00, 108.88])
L_A = 318.31
Y_b = 20.0
surround = CIECAM02_VIEWING_CONDITIONS['Average']
@KelSolaar
KelSolaar / M_i\cdot M = M_o.py
Created February 18, 2015 15:21
M_i . M = M_o
import numpy as np
np.random.seed(64)
M_i = np.random.random((3, 3))
M_o = np.random.random((3, 3))
# M . M_i = M_o
# M . M_i . M_i^{-1} = M_o . M_i^{-1}
@KelSolaar
KelSolaar / colour_-_computing_adapted_colourspace_primaries.py
Created February 13, 2015 09:38
Colour - Computing Adapted Colourspace Primaries
import numpy as np
import colour
P_R = np.array([0.64, 0.33])
P_G = np.array([0.30, 0.60])
P_B = np.array([0.15, 0.06])
D65 = colour.xy_to_XYZ(colour.ILLUMINANTS['cie_2_1931']['D65'])
D50 = colour.xy_to_XYZ(colour.ILLUMINANTS['cie_2_1931']['D50'])
CAT = 'Bradford'
@KelSolaar
KelSolaar / Sony_F35_IDT_ramblings.nkp
Created February 11, 2015 08:58
Sony F35 IDT Ramblings
set cut_paste_input [stack 0]
version 8.0 v1
Read {
inputs 0
file /Users/kelsolaar/Downloads/Pictures/SonyF35.StillLife.dpx
format "1920 1080 0 0 1920 1080 1 HD"
origset true
version 2
colorspace linear
raw true
@KelSolaar
KelSolaar / about_python_cython_numpy.ipynb
Last active August 29, 2015 14:07
About Python, Cython & Numpy
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@KelSolaar
KelSolaar / about_linear_workflow.ipynb
Created October 16, 2014 11:31
About Linear Workflow
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@KelSolaar
KelSolaar / Sony_F35_IDT_ramblings.nkp
Last active August 29, 2015 14:07
Sony F35 IDT Ramblings
set cut_paste_input [stack 0]
version 8.0 v1
Read {
inputs 0
file /Users/kelsolaar/Downloads/SonyF35.StillLife.dpx
format "1920 1080 0 0 1920 1080 1 HD"
origset true
colorspace linear
raw true
timecode 02:14:20:19
@KelSolaar
KelSolaar / temperature_ramblings.ipynb
Created September 30, 2014 20:49
Colour Temperature Ramblings
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@KelSolaar
KelSolaar / oecf_check.py
Created September 25, 2014 08:17
Colour - OECF - Check
import numpy as np
import colour
for c in sorted(colour.RGB_COLOURSPACES.values()):
samples = np.linspace(0, 1, 1000)
samples_tf = [c.transfer_function(sample) for sample in samples]
samples_itf = [c.inverse_transfer_function(sample) for sample in samples_tf]
try:
np.testing.assert_almost_equal(samples, samples_itf, decimal=4)
except:
@KelSolaar
KelSolaar / cqs_tests.ipynb
Created September 22, 2014 15:03
colour - CQS Tests
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.