def test_sd_to_XYZ_ASTME308_mi_10nm(self): """ Test :func:`colour.colorimetry.tristimulus_values.sd_to_XYZ_ASTME308` definition for 10 nm measurement intervals. """ np.testing.assert_almost_equal( sd_to_XYZ_ASTME308( reshape_sd(self._sd, SpectralShape(360, 830, 10)), self._cmfs, self._A, ), np.array([14.47779980, 10.86358645, 2.04751388]), decimal=7, ) np.testing.assert_almost_equal( sd_to_XYZ_ASTME308( reshape_sd(self._sd, SpectralShape(360, 830, 10)), self._cmfs, self._A, use_practice_range=False, ), np.array([14.47773312, 10.86353641, 2.04750445]), decimal=7, ) np.testing.assert_almost_equal( sd_to_XYZ_ASTME308( reshape_sd(self._sd, SpectralShape(400, 700, 10)), self._cmfs, self._A, ), np.array([14.54137532, 10.88641727, 2.04931318]), decimal=7, ) np.testing.assert_almost_equal( sd_to_XYZ_ASTME308( reshape_sd(self._sd, SpectralShape(400, 700, 10)), self._cmfs, self._A, use_practice_range=False, ), np.array([14.54167211, 10.88649849, 2.04930374]), decimal=7, ) np.testing.assert_almost_equal( sd_to_XYZ_ASTME308( reshape_sd(self._sd, SpectralShape(400, 700, 10)), self._cmfs, self._A, k=1, ), np.array([1568.94283333, 1174.59084705, 221.11080639]), decimal=7, )
def test_sd_to_XYZ_ASTME308_mi_1nm(self): """ Test :func:`colour.colorimetry.tristimulus_values.sd_to_XYZ_ASTME308` definition for 1 nm measurement intervals. """ np.testing.assert_almost_equal( sd_to_XYZ_ASTME308(reshape_sd(self._sd, self._cmfs.shape), self._cmfs, self._A), np.array([14.46372680, 10.85832950, 2.04663200]), decimal=7, ) np.testing.assert_almost_equal( sd_to_XYZ_ASTME308( reshape_sd(self._sd, self._cmfs.shape), self._cmfs, self._A, use_practice_range=False, ), np.array([14.46366018, 10.85827949, 2.04662258]), decimal=7, ) np.testing.assert_almost_equal( sd_to_XYZ_ASTME308( reshape_sd(self._sd, SpectralShape(400, 700, 1)), self._cmfs, self._A, ), np.array([14.54173397, 10.88628632, 2.04965822]), decimal=7, ) np.testing.assert_almost_equal( sd_to_XYZ_ASTME308( reshape_sd(self._sd, SpectralShape(400, 700, 1)), self._cmfs, self._A, use_practice_range=False, ), np.array([14.54203076, 10.88636754, 2.04964877]), decimal=7, ) np.testing.assert_almost_equal( sd_to_XYZ_ASTME308( reshape_sd(self._sd, SpectralShape(400, 700, 1)), self._cmfs, self._A, k=1, ), np.array([1568.98152997, 1174.57671769, 221.14803420]), decimal=7, )
def test_sd_to_XYZ_ASTME308_mi_5nm(self): """ Test :func:`colour.colorimetry.tristimulus_values.sd_to_XYZ_ASTME308` definition for 5 nm measurement intervals. """ np.testing.assert_almost_equal( sd_to_XYZ_ASTME308( reshape_sd(self._sd, SpectralShape(360, 830, 5)), self._cmfs, self._A, ), np.array([14.46372173, 10.85832502, 2.04664734]), decimal=7, ) np.testing.assert_almost_equal( sd_to_XYZ_ASTME308( reshape_sd(self._sd, SpectralShape(360, 830, 5)), self._cmfs, self._A, use_practice_range=False, ), np.array([14.46366388, 10.85828159, 2.04663915]), decimal=7, ) np.testing.assert_almost_equal( sd_to_XYZ_ASTME308( reshape_sd(self._sd, SpectralShape(360, 830, 5)), self._cmfs, self._A, mi_5nm_omission_method=False, ), np.array([14.46373399, 10.85833553, 2.0466465]), decimal=7, ) np.testing.assert_almost_equal( sd_to_XYZ_ASTME308( reshape_sd(self._sd, SpectralShape(400, 700, 5)), self._cmfs, self._A, ), np.array([14.54025742, 10.88576251, 2.04950226]), decimal=7, ) np.testing.assert_almost_equal( sd_to_XYZ_ASTME308( reshape_sd(self._sd, SpectralShape(400, 700, 5)), self._cmfs, self._A, use_practice_range=False, ), np.array([14.54051517, 10.88583304, 2.04949406]), decimal=7, ) np.testing.assert_almost_equal( sd_to_XYZ_ASTME308( reshape_sd(self._sd, SpectralShape(400, 700, 5)), self._cmfs, self._A, mi_5nm_omission_method=False, ), np.array([14.54022093, 10.88575468, 2.04951057]), decimal=7, ) np.testing.assert_almost_equal( sd_to_XYZ_ASTME308( reshape_sd(self._sd, SpectralShape(360, 830, 5)), self._cmfs, self._A, use_practice_range=False, mi_5nm_omission_method=False, ), np.array([14.46366737, 10.85828552, 2.04663707]), decimal=7, ) np.testing.assert_almost_equal( sd_to_XYZ_ASTME308( reshape_sd(self._sd, SpectralShape(400, 700, 5)), self._cmfs, self._A, use_practice_range=False, mi_5nm_omission_method=False, ), np.array([14.54051772, 10.88583590, 2.04950113]), decimal=7, ) np.testing.assert_almost_equal( sd_to_XYZ_ASTME308( reshape_sd(self._sd, SpectralShape(400, 700, 5)), self._cmfs, self._A, k=1, ), np.array([1568.82479013, 1174.52212708, 221.13156963]), decimal=7, )
def test_sd_to_XYZ_ASTME308_mi_20nm(self): """ Test :func:`colour.colorimetry.tristimulus_values.sd_to_XYZ_ASTME308` definition for 20 nm measurement intervals. """ np.testing.assert_almost_equal( sd_to_XYZ_ASTME308( reshape_sd(self._sd, SpectralShape(360, 820, 20)), self._cmfs, self._A, ), np.array([14.50187464, 10.87217124, 2.04918305]), decimal=7, ) np.testing.assert_almost_equal( sd_to_XYZ_ASTME308( reshape_sd(self._sd, SpectralShape(360, 820, 20)), self._cmfs, self._A, use_practice_range=False, ), np.array([14.50180785, 10.87212116, 2.04917361]), decimal=7, ) np.testing.assert_almost_equal( sd_to_XYZ_ASTME308( reshape_sd(self._sd, SpectralShape(360, 820, 20)), self._cmfs, self._A, mi_20nm_interpolation_method=False, ), np.array([14.50216194, 10.87236873, 2.04977256]), decimal=7, ) np.testing.assert_almost_equal( sd_to_XYZ_ASTME308( reshape_sd(self._sd, SpectralShape(400, 700, 20)), self._cmfs, self._A, ), np.array([14.54114025, 10.88634755, 2.04916445]), decimal=7, ) np.testing.assert_almost_equal( sd_to_XYZ_ASTME308( reshape_sd(self._sd, SpectralShape(400, 700, 20)), self._cmfs, self._A, use_practice_range=False, ), np.array([14.54143704, 10.88642877, 2.04915501]), decimal=7, ) np.testing.assert_almost_equal( sd_to_XYZ_ASTME308( reshape_sd(self._sd, SpectralShape(400, 700, 20)), self._cmfs, self._A, mi_20nm_interpolation_method=False, ), np.array([14.54242562, 10.88694088, 2.04919645]), decimal=7, ) np.testing.assert_almost_equal( sd_to_XYZ_ASTME308( reshape_sd(self._sd, SpectralShape(360, 820, 20)), self._cmfs, self._A, use_practice_range=False, mi_20nm_interpolation_method=False, ), np.array([14.50209515, 10.87231865, 2.04976312]), decimal=7, ) np.testing.assert_almost_equal( sd_to_XYZ_ASTME308( reshape_sd(self._sd, SpectralShape(400, 700, 20)), self._cmfs, self._A, use_practice_range=False, mi_20nm_interpolation_method=False, ), np.array([14.54272240, 10.88702210, 2.04918701]), decimal=7, ) np.testing.assert_almost_equal( sd_to_XYZ_ASTME308( reshape_sd(self._sd, SpectralShape(400, 700, 20)), self._cmfs, self._A, k=1, ), np.array([1568.91747040, 1174.58332427, 221.09475945]), decimal=7, )