Skip to content

Commit

Permalink
Code formatting.
Browse files Browse the repository at this point in the history
  • Loading branch information
KelSolaar committed Oct 27, 2014
1 parent ab77db6 commit a50fe85
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 13 deletions.
2 changes: 1 addition & 1 deletion colour/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
- notation: Colour notation systems.
- optimal: Optimal colour stimuli computation.
- phenomenons: Computation of various optical phenomenons.
- plotting: Diagrams, plots, etc...
- plotting: Diagrams, figures, etc...
- quality: Colour quality computation.
- recovery: Reflectance recovery.
- temperature: Colour temperature and correlated colour temperature
Expand Down
2 changes: 1 addition & 1 deletion colour/colorimetry/dataset/cmfs.py
Original file line number Diff line number Diff line change
Expand Up @@ -3497,7 +3497,7 @@
{'Wright & Guild 1931 2 Degree RGB CMFs': RGB_ColourMatchingFunctions(
'Wright & Guild 1931 2 Degree RGB CMFs',
RGB_CMFS_DATA.get('Wright & Guild 1931 2 Degree RGB CMFs'),
'Wright & Guild 1931 2$^\\circ$ RGB CMFs',),
'Wright & Guild 1931 2$^\\circ$ RGB CMFs', ),
'Stiles & Burch 1955 2 Degree RGB CMFs': RGB_ColourMatchingFunctions(
'Stiles & Burch 1955 2 Degree RGB CMFs',
RGB_CMFS_DATA.get('Stiles & Burch 1955 2 Degree RGB CMFs'),
Expand Down
2 changes: 1 addition & 1 deletion colour/difference/delta_e.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ def delta_E_CIE2000(lab1, lab2, **kwargs):
sH = 1 + 0.015 * c_bar_prime * t

delta_theta = (30 * np.exp(-((h_bar_prime - 275) / 25) *
((h_bar_prime - 275) / 25)))
((h_bar_prime - 275) / 25)))

c_bar_prime7 = c_bar_prime ** 7

Expand Down
6 changes: 3 additions & 3 deletions colour/examples/colorimetry/examples_blackbody.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@
message_box('Blackbody / Planckian Radiator Computations')

message_box(('Computing the spectral radiance of a blackbody at wavelength '
'500 nm and temperature 5500 kelvin degrees.'))
'500 nm and temperature 5500 kelvin degrees.'))
print(colour.planck_law(500 * 1e-9, 5500))

print('\n')

message_box(('Computing the spectral power distribution of a blackbody at '
'temperature 5500 kelvin degrees and converting to "CIE XYZ" '
'tristimulus values.'))
'temperature 5500 kelvin degrees and converting to "CIE XYZ" '
'tristimulus values.'))
cmfs = colour.STANDARD_OBSERVERS_CMFS.get(
'CIE 1931 2 Degree Standard Observer')
blackbody_spd = colour.blackbody_spd(5500, cmfs.shape)
Expand Down
4 changes: 2 additions & 2 deletions colour/io/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@

__all__ = ['IES_TM2714_Spd']
__all__ += ['read_spectral_data_from_csv_file',
'read_spds_from_csv_file',
'write_spds_to_csv_file']
'read_spds_from_csv_file',
'write_spds_to_csv_file']
__all__ += ['read_spds_from_xrite_file']
8 changes: 4 additions & 4 deletions colour/models/rgb.py
Original file line number Diff line number Diff line change
Expand Up @@ -388,12 +388,12 @@ def XYZ_to_RGB(XYZ,
... chromatic_adaptation_transform) # doctest: +ELLIPSIS
array([ 0.0110360..., 0.1273446..., 0.1163103...])
"""

XYZ = np.ravel(XYZ)

cat = chromatic_adaptation_matrix_VonKries(xy_to_XYZ(illuminant_XYZ),
xy_to_XYZ(illuminant_RGB),
transform=chromatic_adaptation_transform)
xy_to_XYZ(illuminant_RGB),
transform=chromatic_adaptation_transform)

XYZ_a = np.dot(cat, XYZ)

Expand Down Expand Up @@ -526,7 +526,7 @@ def RGB_to_RGB(RGB,
"""

RGB = np.ravel(RGB)

cat = chromatic_adaptation_matrix_VonKries(
xy_to_XYZ(input_colourspace.whitepoint),
xy_to_XYZ(output_colourspace.whitepoint),
Expand Down
3 changes: 2 additions & 1 deletion colour/models/tests/tests_derivation.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,8 @@ def test_RGB_luminance_equation(self):

self.assertTrue(re.match(
# TODO: Simplify that monster.
'Y\s?=\s?[-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?.\(R\)\s?[\+-]\s?[-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?.\(G\)\s?[\+-]\s?[-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?.\(B\)', # noqa
'Y\s?=\s?[-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?.\(R\)\s?[\+-]\s?[-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?.\(G\)\s?[\+-]\s?[-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?.\(B\)',
# noqa
RGB_luminance_equation(
np.array([0.73470, 0.26530,
0.00000, 1.00000,
Expand Down

0 comments on commit a50fe85

Please sign in to comment.