## syntax
$ /usr/bin/python3 -m compileall -q src tests

exit=0

## acceptance
$ /usr/bin/python3 -m lumina.tests
test                               result   detail
E56 kernels normalised             PASS     halation 1.0000, bokeh 1.0000   [0.0s]
E56 neutral axis                   PASS     max chroma on the wedge 0.14 codes   [0.1s]
E56 tone monotone                  PASS     min dD 5.53e-03 over 8 stops   [0.0s]
A13 scan keeps polarity            PASS     Y 0.031 -> 0.889 (x29), monotone=True   [0.0s]
E56 HDR before curve               PASS     max scene-linear after reconstruction 5.56 (white = 5.56)   [0.0s]
E53 no NaN                         PASS     0 bad pixels   [0.5s]
A11 LUT vs analytic                PASS     max LUT error 0.47 codes   [0.1s]
B26 grain sigma(D)                 PASS     monotone=True, rendered sigma ratio 1.92 vs model 1.92   [0.0s]
C32 grain decorrelated             PASS     frame-to-frame grain correlation -0.008   [0.0s]
E52 stage order                    PASS     ok=True, missing=[], not in CANONICAL=[]   [0.1s]
B13 halation keeps colour          PASS     halo R/B 3.86 (core R/B 2.63)   [0.1s]
A10 skin not bleached              PASS     blown 0.00% of skin, form spread 19.7 codes   [0.1s]
E47 bypass isolation               PASS     halation 0.07, grain 0.17, bloom 0.20, weave 0.29, dust 0.08, vignette 0.27, interimage 0.08   [1.1s]
C42 temporal stability             PASS     empty sky std 0.21 codes, frame step 0.19 over 17254 px   [1.6s]
A0.5 baked look per shot           PASS     corner 122.3 -> 122.3 (linear x1e3), 0.0% drift   [0.0s]
C41 flicker phase seeded           PASS     phase across processes 0.999831466 / 0.999831466   [0.2s]
B32 resample energy                PASS     2x up/down mean error 0.0054   [0.0s]
A0.6b degrid removes a lattice     PASS     fired True, period 15.02/14.98 (injected 15.0), snr 6.9, removed 97.0% of the lattice, leftover 0.56 codes, detail kept 99.9%, shift 0.033 lsb   [0.4s]
A0.6b degrid spares scene texture  PASS     fired False (the pattern is no taller than the content noise), snr 1.75, max change 0.0 codes   [0.1s]
A0.6b degrid identity when clean   PASS     off identical True, clean identical True, snr 2.25   [0.1s]
A0.6b template fit agrees with itself PASS     worst relative difference between the two forms 6.37e-08   [0.1s]
A0.6b oklab round trip             PASS     max round-trip error 5.64e-07   [0.0s]
A0.6c retexture removes rows       PASS     rows in band removed 72.3%, band energy kept 94% (1.13 -> 1.06 codes), relief kept 91%   [0.1s]
A0.6c retexture spares structure   PASS     lash moved 0.0 codes, hair moved 0.0 codes   [0.1s]
A0.6c retexture spares a hair mass PASS     near the strands 0.00 codes against 1.96 codes on open skin   [0.1s]
A0.6c retexture identity at zero   PASS     off identical True, mix 0 identical True, same shot stable True   [0.2s]
B25 weave drifts, no jitter        PASS     worst gate move 0.051 px a frame, worst jump 0.018 px, response 0.98   [0.0s]
B27 dust holds still (C42)         PASS     0 single-frame pops, 1747 speck-pixel-frames over 12   [0.1s]
B27 dust is a smudge               PASS     deepest speck dip 45% of its surroundings (a hole would be 100%)   [0.1s]
B27 no full-height line            PASS     worst column offset 0.44 codes over 8 frames of S069   [1.0s]
C28 shutter grows with motion      PASS     blend vs motion 0.0e+00, 1.1e-05, 7.8e-05, 2.8e-04, 2.6e-04, 1.5e-03, 1.5e-03   [0.0s]
C28 shutter window ends at the frame PASS     exposure sits 0.25 px back of the frame; the midpoint of the two frames sits 4.00 px back   [0.0s]
C0 source breathes, does not strobe PASS     worst frame step 1.52 %, span 9.98 %   [0.0s]
C0 stars are not lamps             PASS     stars [(120.0, 80.0, 4.068428945128219)]   [0.0s]
C0 scintillate has no square       PASS     rim 0, centre 3   [0.0s]
C0 stars stand alone               PASS     stars [(120.0, 80.0, 4.068428945128219)]   [0.0s]
B18 65mm lens keeps the field      PASS     corner gain 16mm 0.862  65mm 0.862   [0.0s]
A13 scan grade is a picture        PASS     monotone True, ends True, spread 0.87, neutral True, no-grade True   [0.0s]
A13c look is data                  PASS     identity 0.00000, mix0 0.0, anchored black 0.0, no-look 0.0, cube 16^3   [0.0s]
A0.4 exposure is timed back        PASS     mean code 125.71, +0.5 stop 125.13, +1 stop 125.16, +2 stop 125.65 (worst 0.58)   [0.4s]
B21 coc is a thin lens             PASS     coc at focus 0.0e+00 mm, 1 m 0.433, 5 m 0.029 (f/1.4 0.058), 20 m 0.115 of 0.143 mm at infinity   [0.0s]
B21 defocus is the coc diameter    PASS     coc 5.5 px, rendered width 6 px   [0.0s]
B21 defocus runs at a small coc    PASS     frame std 63.9 codes, shape (120, 192, 3)   [0.1s]
B22 anamorphic bokeh is oval       PASS     2x ellipse 2.10:1 tall, spherical 0.94:1   [0.0s]
B22 anamorphic reaches the film    PASS     source ellipse 14.6x28.8 px, signal 12 (ratio 0.51)   [0.9s]
B14 anamorphic MTF is wide         PASS     2x 0.9 px across, 0.4 down; round 0.4x0.4   [0.0s]
B19 anamorphic streak is flat      PASS     lit run 29 px across, 1 px down   [0.0s]
E59 anamorphic lens is data        PASS     Cooke Anamorphic /i 40mm, 2x: squeeze 2.0x, streak 0.5, curvature 0.35, T2.3   [0.0s]
B22 photon PSF is a histogram      PASS     (41, 23) kernel, sum 1.000000, identical True   [0.0s]
B22 photon PSF is oval             PASS     photon ellipse 4.2x8.5 (ratio 0.50)   [0.0s]
B22 photon PSF sees the stop       PASS     edge kernel (47, 25), centre (53, 29)   [0.0s]
B22c baked bokeh becomes oval      PASS     replaced blob 4.4x7.4 px (ratio 0.59)   [0.0s]
B22c small lights in a window      PASS     small light 2.5x4.6 px (ratio 0.55)   [0.0s]
A3c interimage has a switch        PASS     mean |code| on colour-boundary support 0.53   [0.1s]
A0.4 timing stops at the cut       PASS     0-stop shot 125.71 -> 125.72 after a +1 stop shot (d 0.01), shift 0.0e+00   [0.1s]
E52 grade and look in the order    PASS     order ok=True, grade ran=True, look ran=True, not in CANONICAL=[]   [0.1s]
C35 material motion runs on water  PASS     water and vegetation moved the frame by 0.0178   [0.0s]
B27 dust leaves the caller alone   PASS     input untouched True, specks went to a copy True   [0.0s]
E61 a folder of pictures is a film PASS     Stills: 3 pictures, depth depth   [0.0s]
E61 a project says what it needs   PASS     stills hold 0.5s -> utest.mp4 crf 22   [0.0s]
E61 a filmed cut is not filmed twice PASS     engine 4 filmed True, engine 0 filmed False   [0.0s]
E61 the film flags reach the cut   PASS     Cut 65mm 65mm scan | Cinema {'width': 1280, 'fps': 24}   [0.7s]
E61 the extension says what to write PASS     a.mp4->video a.mov->video a.png->image a.png->sequence a->video a->image   [0.0s]
E61 the encoder is the master      PASS     level 4.1, web -g 50   [0.0s]
E61 the workers split the film     PASS     0-250 250-500 500-750 750-1000   [0.0s]
E61 the shutter stops at the cut   PASS     [('A', False), ('A', True), ('B', False), ('B', True)] | seeded [('A', False), ('B', False), ('B', True)]   [0.0s]
C30 catalogs carry the physics     PASS        [0.1s]
C30 blackbody stays on the locus   PASS        [0.0s]
C30 gels land on the locus and cost light PASS        [0.0s]
C30 mains hides behind a 180 shutter PASS        [0.0s]
C30 the candle breathes slowly     PASS        [0.0s]
C36 the inverse square is the law  PASS        [0.2s]
C36 the cosine law, judged by the reference PASS        [0.3s]
C30 the proxy reads normals        PASS        [0.0s]
C30 the anchor is the scale        PASS        [0.0s]
C36 the penumbra widens with lamp distance PASS        [0.4s]
C36 a net takes its stop           PASS        [0.2s]
C36 a floppy blocks                PASS        [0.2s]
C36 diffusion softens and costs    PASS        [0.2s]
C36 a gobo projects geometry       PASS        [0.2s]
C36 the meter confirms the ratio   PASS        [0.2s]
C36 the black flag damps           PASS        [0.0s]
C36 a bounce fills, not keys       PASS        [0.3s]
C36 nothing rigged is nothing changed PASS        [0.0s]
C36 a plan without light is the old film PASS        [0.5s]
C36 the beam needs the air         PASS        [11.0s]
C36 the practical is a lamp        PASS        [0.1s]
C36 the transport stands next to the reference PASS        [6.2s]
C36 the book of presets renders    PASS        [0.3s]
C36 a split splits the head        PASS        [0.4s]
E52 the relight sits in the order  PASS        [0.3s]
C36 over-mode hangs to the plate   PASS        [0.1s]
C36 the probe reports the probe    PASS        [0.0s]
A0.7b the proxy finds the subject  PASS     face 0.79, lights 0.31, subject found True   [0.0s]
B22c 2x oval bokeh without depth   PASS     light width/height: 2x anamorphic 0.47, spherical 1.00   [0.4s]
B22 Petzval swirl is tangential    PASS     plain 4.8x4.8 px, swirl 4.0x7.2 px   [0.0s]
B28 Black Pro-Mist keeps blacks    PASS     shade moved black 0.0e+00 / white 0.025, halo 0.283, energy x1.000   [0.0s]
A2 a B&W stock films grey          PASS     mean chroma Tri-X 0.00 codes, 5219 67.8 codes   [0.1s]
A13 reversal is a positive         PASS     grey 0.180, contrast slide 1.76 vs negative+print 1.00 stops/stop   [0.0s]
B13 CineStill halates more         PASS     red halo beside the lamp: 5219 0.0741, CineStill 0.5656   [0.0s]
B13 the halo is centred on the lamp PASS     halo centre (639.5, 359.5) vs lamp (639.5, 359.5)   [0.1s]
A13 bleach bypass steepens         PASS     0.04->0.024 0.18->0.180 0.60->0.893, colour ratio 5.0->3.1   [0.0s]
A3a spectral crosstalk runs        PASS     mean |code| on vs off 2.52, grey moved 6.0e-08   [0.1s]
A0.6c vinyl highlight breaks up    PASS     micro-relief in the highlight 0.63 -> 0.78 codes   [0.0s]
C36 light without a depth map      PASS     mean |code| lit vs unlit 5.69, face 135 codes   [0.7s]
A13 the print is timed to grey     PASS     grey card 118 -> 118.0 codes (untimed print: 97)   [0.0s]
A0.6c natural relief is kept       PASS     band energy x0.94, kurtosis 3.5 -> 3.3   [0.1s]
B26 grain is quieter than skin     PASS     grain sigma 0.0035 density at 640 px (was 0.0079)   [0.2s]
E59 the whole catalog films        PASS     28 profiles filmed, 0 bad   [1.5s]

109/109 passed in 33.1s

exit=0

## regressions
$ /usr/bin/python3 -m unittest discover -s tests -v
test_beam_has_no_back_hemisphere (test_regressions.ColourContracts.test_beam_has_no_back_hemisphere) ... ok
test_blackbody_2000k_against_reference (test_regressions.ColourContracts.test_blackbody_2000k_against_reference) ... ok
test_cct_roundtrip_warm_and_cool (test_regressions.ColourContracts.test_cct_roundtrip_warm_and_cool) ... ok
test_cube_comments_and_declared_domain (test_regressions.ColourContracts.test_cube_comments_and_declared_domain) ... ok
test_default_print_has_no_baked_highlight_plateaus (test_regressions.ColourContracts.test_default_print_has_no_baked_highlight_plateaus) ... ok
test_interimage_radius_changes_spatial_response (test_regressions.ColourContracts.test_interimage_radius_changes_spatial_response) ... ok
test_linear_look_input_is_not_treated_as_srgb (test_regressions.ColourContracts.test_linear_look_input_is_not_treated_as_srgb) ... ok
test_negative_density_has_smooth_midtone_slope (test_regressions.ColourContracts.test_negative_density_has_smooth_midtone_slope) ... ok
test_output_quantizer_has_no_negative_half_code_bias (test_regressions.ColourContracts.test_output_quantizer_has_no_negative_half_code_bias) ... ok
test_printer_lights_are_not_cancelled_by_calibration (test_regressions.ColourContracts.test_printer_lights_are_not_cancelled_by_calibration) ... ok
test_retention_of_neutral_axis_in_local_interimage (test_regressions.ColourContracts.test_retention_of_neutral_axis_in_local_interimage) ... ok
test_scan_timing_uses_density_units_and_correct_sign (test_regressions.ColourContracts.test_scan_timing_uses_density_units_and_correct_sign) ... ok
test_srgb_roundtrip (test_regressions.ColourContracts.test_srgb_roundtrip) ... ok
test_tone_cache_tracks_profile_mutation (test_regressions.ColourContracts.test_tone_cache_tracks_profile_mutation) ... ok
test_zero_look_mix_does_not_quantize_float_input (test_regressions.ColourContracts.test_zero_look_mix_does_not_quantize_float_input) ... ok
test_asymmetric_psf_is_convolved_not_mirrored (test_regressions.OpticsContracts.test_asymmetric_psf_is_convolved_not_mirrored) ... ok
test_bloom_preserves_constant_exposure (test_regressions.OpticsContracts.test_bloom_preserves_constant_exposure) ... ok
test_bokeh_resynthesis_preserves_integrated_light (test_regressions.OpticsContracts.test_bokeh_resynthesis_preserves_integrated_light) ... ok
test_coc_matches_thin_lens_at_macro_distance (test_regressions.OpticsContracts.test_coc_matches_thin_lens_at_macro_distance) ... ok
test_dof_does_not_brighten_constant_field_at_depth_edge (test_regressions.OpticsContracts.test_dof_does_not_brighten_constant_field_at_depth_edge) ... ok
test_ghost_is_on_opposite_side_of_optical_centre (test_regressions.OpticsContracts.test_ghost_is_on_opposite_side_of_optical_centre) ... ok
test_in_focus_foreground_is_not_painted_by_background (test_regressions.OpticsContracts.test_in_focus_foreground_is_not_painted_by_background) ... ok
test_irradiation_redistributes_without_exposure_gain (test_regressions.OpticsContracts.test_irradiation_redistributes_without_exposure_gain) ... ok
test_lanczos_remap_never_introduces_negative_exposure (test_regressions.OpticsContracts.test_lanczos_remap_never_introduces_negative_exposure) ... ok
test_veiling_does_not_create_light_on_uniform_colour (test_regressions.OpticsContracts.test_veiling_does_not_create_light_on_uniform_colour) ... ok
test_autofocus_uses_the_requested_metric_depth_mapping (test_regressions.PipelineContracts.test_autofocus_uses_the_requested_metric_depth_mapping) ... ok
test_backlight_only_does_not_disappear (test_regressions.PipelineContracts.test_backlight_only_does_not_disappear) ... ok
test_cached_depth_does_not_ignore_replaced_image (test_regressions.PipelineContracts.test_cached_depth_does_not_ignore_replaced_image) ... ok
test_constructor_default_profiles_are_usable (test_regressions.PipelineContracts.test_constructor_default_profiles_are_usable) ... ok
test_flat_field_is_detected_without_brightness_bias (test_regressions.PipelineContracts.test_flat_field_is_detected_without_brightness_bias) ... ok
test_focus_response_starts_continuously_after_delay (test_regressions.PipelineContracts.test_focus_response_starts_continuously_after_delay) ... ok
test_fractional_fps_is_preserved (test_regressions.PipelineContracts.test_fractional_fps_is_preserved) ... ok
test_gel_transmission_is_not_removed_by_colour_normalization (test_regressions.PipelineContracts.test_gel_transmission_is_not_removed_by_colour_normalization) ... ok
test_grain_scale_zero_really_disables_grain (test_regressions.PipelineContracts.test_grain_scale_zero_really_disables_grain) ... ok
test_invalid_depth_rejected_not_silently_rendered (test_regressions.PipelineContracts.test_invalid_depth_rejected_not_silently_rendered) ... ok
test_lighting_exposure_controls_survive_validation (test_regressions.PipelineContracts.test_lighting_exposure_controls_survive_validation) ... ok
test_negative_fill_zero_has_no_effect (test_regressions.PipelineContracts.test_negative_fill_zero_has_no_effect) ... ok
test_physical_lighting_preserves_rgb_temperature_order (test_regressions.PipelineContracts.test_physical_lighting_preserves_rgb_temperature_order) ... ok
test_rgba_is_not_silently_treated_as_bgr (test_regressions.PipelineContracts.test_rgba_is_not_silently_treated_as_bgr) ... ok
test_rotation_is_not_lost_when_depth_is_present (test_regressions.PipelineContracts.test_rotation_is_not_lost_when_depth_is_present) ... ok
test_stage_order_includes_dof_and_distortion (test_regressions.PipelineContracts.test_stage_order_includes_dof_and_distortion) ... ok
test_sun_is_on_illuminating_side_and_not_duplicated (test_regressions.PipelineContracts.test_sun_is_on_illuminating_side_and_not_duplicated) ... ok
test_supersampling_keeps_all_auxiliary_maps_aligned (test_regressions.PipelineContracts.test_supersampling_keeps_all_auxiliary_maps_aligned) ... ok
test_supersampling_with_physical_light_remains_finite (test_regressions.PipelineContracts.test_supersampling_with_physical_light_remains_finite) ... ok
test_tiny_frames_do_not_raise_runtime_warnings (test_regressions.PipelineContracts.test_tiny_frames_do_not_raise_runtime_warnings) ... ok
test_bright_target_compresses_gamut_without_clipping_hue (test_surface_colour.ColourRetention.test_bright_target_compresses_gamut_without_clipping_hue) ... ok
test_display_print_does_not_wash_out_colour_chart (test_surface_colour.ColourRetention.test_display_print_does_not_wash_out_colour_chart) ... ok
test_gamut_pass_does_not_apply_hidden_dye_matrix (test_surface_colour.ColourRetention.test_gamut_pass_does_not_apply_hidden_dye_matrix) ... ok
test_neutral_axis_stays_neutral (test_surface_colour.ColourRetention.test_neutral_axis_stays_neutral) ... ok
test_retention_preserves_source_saturation_at_new_luminance (test_surface_colour.ColourRetention.test_retention_preserves_source_saturation_at_new_luminance) ... ok
test_actual_generator_profile_uses_surface_pass (test_surface_colour.StandaloneSurface.test_actual_generator_profile_uses_surface_pass) ... ok
test_bad_mask_fails_loudly (test_surface_colour.StandaloneSurface.test_bad_mask_fails_loudly) ... ok
test_protection_and_determinism (test_surface_colour.StandaloneSurface.test_protection_and_determinism) ... ok
test_visible_change_with_no_film_and_no_exposure_shift (test_surface_colour.StandaloneSurface.test_visible_change_with_no_film_and_no_exposure_shift) ... ok
test_zero_controls_are_exact_identity (test_surface_colour.StandaloneSurface.test_zero_controls_are_exact_identity) ... ok

----------------------------------------------------------------------
Ran 55 tests in 0.652s

OK

exit=0
