Skip to content

Conversation

@GernotMaier
Copy link
Contributor

@GernotMaier GernotMaier commented Feb 6, 2026

Direct-injection type flasher simulations did not generate any calibration events (although integration tests passed).

Reason was a recent refactoring of the simulation runners where the setting of is_calibration_run was messed up.

Second bug fix (appeared only after above was fixed): bug in pedestal calculation setting: sim_telarray requires none (and not None) for the stars option.

@GernotMaier GernotMaier self-assigned this Feb 6, 2026
@GernotMaier GernotMaier changed the title Minor flasher sims updates (mostly output) Bug fix in direct-injection type flasher simulations. Feb 6, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request fixes a critical bug where direct-injection type flasher simulations were not generating any calibration events due to improper handling of the is_calibration_run flag after a recent refactoring. The fix removes the is_calibration_run parameter from runner classes and instead relies on the corsika_config.is_calibration_run() method to determine if a simulation is a calibration run. Additionally, the PR fixes a bug in pedestal calculation where sim_telarray requires the string "none" instead of Python's None for the stars parameter.

Changes:

  • Removed is_calibration_run parameter from SimulatorArray, SimtelRunner, and CorsikaSimtelRunner classes and updated all call sites to use corsika_config.is_calibration_run() method instead
  • Added conversion of Python None to string "none" for sim_telarray's stars parameter in calibration simulations
  • Fixed incorrect light source specification in MST FlashCam integration test (was using NectarCam)
  • Updated model versions in LST integration tests from 6.0.2 to 7.0.0
  • Improved logging in simulate_flasher.py to handle both telescope and array layout modes

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/simtools/simtel/simulator_array.py Removed is_calibration_run parameter, now uses corsika_config.is_calibration_run() method; added None to "none" conversion for stars parameter
src/simtools/runners/simtel_runner.py Removed is_calibration_run parameter from constructor
src/simtools/runners/corsika_simtel_runner.py Removed is_calibration_run parameter from constructor and SimulatorArray instantiation
src/simtools/applications/simulate_flasher.py Improved logging to properly handle telescope vs array layout modes
tests/unit_tests/simtel/test_simulator_array.py Removed test for is_calibration_run parameter, updated calibration test to mock the method call
tests/unit_tests/runners/test_corsika_simtel_runner.py Removed is_calibration_run parameter from fixture
tests/integration_tests/config/simulate_flasher_direct_injection_mst_flashcam.yml Fixed light source from MSFx-NectarCam to MSFx-FlashCam and updated test name
tests/integration_tests/config/simulate_flasher_direct_injection_lst_south.yml Updated model version from 6.0.2 to 7.0.0
tests/integration_tests/config/simulate_flasher_direct_injection_lst_north.yml Updated model version from 6.0.2 to 7.0.0
docs/changes/2029.bugfix.md Added changelog entry documenting the bug fix

@GernotMaier GernotMaier marked this pull request as ready for review February 6, 2026 15:28
Base automatically changed from debug-messages to main February 10, 2026 08:32
@ctao-sonarqube
Copy link

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