#NEWLINE# def test_aces_proxy( self ) : #NEWLINE# #INDENT# 'Test ACES proxy (matrix + encoding)\n\n        ' #NEWLINE# ref_colors = [ [ 0.001184464 , 64.0 , 0.001185417 ] , [ 222.875 , 940.0 , 222.860944204 ] ] #NEWLINE# ACES_to_proxy_matrix = get_RGB_to_RGB_matrix ( 'ACES' , 'ACESproxy_10' ) #NEWLINE# proxy_to_ACES_matrix = get_RGB_to_RGB_matrix ( 'ACESproxy_10' , 'ACES' ) #NEWLINE# for color in ref_colors : #NEWLINE# #INDENT# aces_proxy_lin = apply_matrix ( ACES_to_proxy_matrix , ( [ color [ 0 ] ] * 3 ) ) [ 2 ] #NEWLINE# aces_proxy = ACESPROXY_10i . _encode_gradation ( aces_proxy_lin ) #NEWLINE# self . assertEqual ( aces_proxy , color [ 1 ] ) #NEWLINE# aces_proxy_lin = ACESPROXY_10i . _decode_gradation ( aces_proxy ) #NEWLINE# aces = apply_matrix ( proxy_to_ACES_matrix , ( [ aces_proxy_lin ] * 3 ) ) [ 0 ] #NEWLINE# message = 'ACESproxy not valid ! in: {0} out: {1}' . format ( aces , color [ 2 ] ) #NEWLINE# self . assertTrue ( numpy . isclose ( aces , color [ 2 ] , atol = 1e-06 ) , message )