def test_planckian_table_minimal_distance_index(self): """ Tests :func:`colour.temperature.cct.\ planckian_table_minimal_distance_index` definition. """ cmfs = STANDARD_OBSERVERS_CMFS['CIE 1931 2 Degree Standard Observer'] self.assertEqual( planckian_table_minimal_distance_index( planckian_table( np.array([0.1978, 0.3122]), cmfs, 1000, 1010, 10)), 9)
def test_planckian_table(self): """ Tests :func:`colour.temperature.cct.planckian_table` definition. """ cmfs = STANDARD_OBSERVERS_CMFS['CIE 1931 2 Degree Standard Observer'] np.testing.assert_almost_equal( [(x.Ti, x.ui, x.vi, x.di) for x in planckian_table( np.array([0.1978, 0.3122]), cmfs, 1000, 1010, 10)], PLANCKIAN_TABLE)
def test_planckian_table_minimal_distance_index(self): """ Tests :func:`colour.temperature.cct.\ planckian_table_minimal_distance_index` definition. """ cmfs = STANDARD_OBSERVERS_CMFS['CIE 1931 2 Degree Standard Observer'] self.assertEqual( planckian_table_minimal_distance_index( planckian_table(np.array([0.1978, 0.3122]), cmfs, 1000, 1010, 10)), 9)
def test_planckian_table(self): """ Tests :func:`colour.temperature.cct.planckian_table` definition. """ cmfs = STANDARD_OBSERVERS_CMFS['CIE 1931 2 Degree Standard Observer'] np.testing.assert_almost_equal( [(x.Ti, x.ui, x.vi, x.di) for x in planckian_table(np.array([0.1978, 0.3122]), cmfs, 1000, 1010, 10)], PLANCKIAN_TABLE)
def test_planckian_table(self): """ Tests :func:`colour.temperature.cct.planckian_table` definition. """ cmfs = STANDARD_OBSERVERS_CMFS.get( 'CIE 1931 2 Degree Standard Observer') to_tuple = lambda x: (x.Ti, x.ui, x.vi, x.di) np.testing.assert_almost_equal([ to_tuple(x) for x in planckian_table((0.1978, 0.3122), cmfs, 1000, 1010, 10) ], [to_tuple(x) for x in PLANCKIAN_TABLE])
def test_planckian_table(self): """ Tests :func:`colour.temperature.cct.planckian_table` definition. """ cmfs = STANDARD_OBSERVERS_CMFS.get( 'CIE 1931 2 Degree Standard Observer') to_tuple = lambda x: (x.Ti, x.ui, x.vi, x.di) np.testing.assert_almost_equal( [to_tuple(x) for x in planckian_table((0.1978, 0.3122), cmfs, 1000, 1010, 10)], [to_tuple(x) for x in PLANCKIAN_TABLE])