Skip to content

Start the light paths of a camera behind a window pane at the pane - #184

Merged
kriboe90 merged 2 commits into
masterfrom
claude/camera-window-pane
Nov 10, 2026
Merged

kriboe90 merged 2 commits into
masterfrom
claude/camera-window-pane

Conversation

@kriboe90

@kriboe90 kriboe90 commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

A camera that looks into the smoke through a window pane, for example from outside the test room, sees every LED along a line of sight whose part between the camera and the pane is free of smoke. LEDSA counted the whole line of sight from the camera, so the light paths were too long and the extinction coefficients too low, by half where the pane lies halfway between the camera and the LEDs.

What changes

  • config_analysis.ini, [experiment_geometry]: the new option pane_distance, the distance in m between the camera and the pane. The template writes it as None.
  • config_stacked.ini: every [simulation_N] section takes a pane_distance of its own; the template has it commented out.
  • The pane is taken as normal to the line of sight, so the light path of every LED starts pane_distance away from the camera (Experiment.calc_smoke_path_start), and only the part behind the pane is distributed over the layers. The camera itself may then stand outside domain_bounds, as long as the light paths behind the pane lie inside.
  • An LED that is not farther away from the camera than the pane stops the analysis and is named with its distance. A pane_distance that is not a number of at least 0 is reported with its section.
  • The header of the result files names the distance, Camera: (…), pane_distance: 0.5, and the stacked header every camera behind a pane, pane_distance: sim0 0.5 | .

Backward compatibility. The option is optional. A config without it, or with None, gives the light paths of before, and the result files stay the same, header included (see the test plan). Camera(x, y, z) and the methods of Experiment keep working as they are called now; the start of the light path is an optional argument that defaults to the camera.

Approximation. A flat pane normal to the optical axis is crossed by a line of sight at an angle θ to the axis pane_distance / cos θ away from the camera, not pane_distance: at 15°, 3.5 % farther. With the pane 0.5 m in front of the camera, the light path in the smoke of such an LED is taken 1.8 cm too long, which is negligible against light paths of several metres. In exchange, the pane needs no orientation, only its distance.

Not corrected: the transmission of the pane itself. It cancels in I/I0 as long as it does not change, but a pane that gets sooted or fogged during the test dims the LEDs like smoke. Refraction in a pane with parallel faces only shifts the line of sight by less than the thickness of the pane.

Commits. The first commit described the pane by a point and a normal; the second replaces both by pane_distance.

Test plan

  • Unit tests: 399 passed. The 34 new ones in test_camera_pane.py cover the light paths behind a pane (shortened by the distance, a level line of sight, a pane at the camera, an LED nearer than the pane or on it, a camera above the layers, a crossing above the layers), the option in both config files and the pane of every camera of the stacked analysis. With the pane ignored, 9 of the 11 tests of the light paths fail; the other two have no pane or one at the camera.
  • Acceptance tests: 28 passed (locally, with PYTHONPATH set to the branch), among them the new suite 12_test_camera_pane.robot. Its synthetic images have smoke only behind a pane 2 m in front of the camera, about halfway to the LEDs 4 m away. With pane_distance = 2 in config_analysis.ini, the RMSE of k is 0.009 to 0.011 (limit 0.05, as in the other suites); without it, k of the constant extinction comes out at 0.52 of the input.
  • Without a pane, master and this branch give the same results on the synthetic acceptance images: the step 3 results of 16 images and the extinction coefficients of 9 analyses (linear for sum_col_val, mean_col_val and max_col_val with -s3_fast and with -s3, average_images, nonlinear and stacked) are identical, headers included.
  • The encoding check of the CI passes; the first version of this PR failed it with a write_text( whose encoding was on the next line.
  • Docs build without warnings (locally without sphinx_copybutton, which isn't installed here).

🤖 Generated with Claude Code

kriboe90 and others added 2 commits November 10, 2026 01:01
A camera that looks into the smoke through a window pane sees the LEDs along lines of sight whose
part between the camera and the pane is free of smoke. Counted from the camera, the light paths
were too long and the extinction coefficients too low, by half where the pane lies halfway.

The pane is the plane through pane_point with the normal pane_normal. Both are optional options
of [experiment_geometry] in config_analysis.ini and of every [simulation_N] in config_stacked.ini.
With a pane, the light path of an LED starts where its line of sight crosses the pane, and the
camera may stand outside domain_bounds as long as the light paths behind the pane lie inside. A
pane that does not separate the camera from an LED is reported with the LED. The result headers
name the pane. Without the options, or with None, the light paths and the result files stay as
they were.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
pane_point and pane_normal give way to a single option, pane_distance: the distance in m between
the camera and the pane, in [experiment_geometry] of config_analysis.ini and in every
[simulation_N] of config_stacked.ini. The pane is taken as normal to the line of sight, so the
light path of every LED starts pane_distance away from the camera. A flat pane normal to the
optical axis is crossed by a line of sight at 15 degrees to the axis 3.5 % farther away, which is
negligible as long as the pane is close to the camera compared to the LEDs.

An LED that is not farther away from the camera than the pane is reported, and the result headers
name the distance. Without the option, or with None, the light paths and the result files stay as
they were. The unit test that writes a config file names the encoding on the line of write_text,
where the encoding check of the CI looks for it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kriboe90
kriboe90 merged commit a0787ec into master Nov 10, 2026
5 checks passed
kriboe90 added a commit that referenced this pull request Nov 10, 2026
Brings the window pane (#184) to develop: pane_distance in config_analysis.ini and in every
[simulation_N] of config_stacked.ini starts the light paths of a camera behind a pane at the
pane. develop keeps its version 0.14.0.dev0. The conflicts were additions on both sides, the
README sections and the arguments of ConfigDataAnalysis and of the keyword Create Test Data,
and keep both.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant