Skip to content

Refactor visualization of flasher events to a more generic module.#2023

Open
GernotMaier wants to merge 16 commits intomainfrom
plot-simtel-events-native
Open

Refactor visualization of flasher events to a more generic module.#2023
GernotMaier wants to merge 16 commits intomainfrom
plot-simtel-events-native

Conversation

@GernotMaier
Copy link
Contributor

@GernotMaier GernotMaier commented Feb 5, 2026

Relatively large refactoring - also preparation for additional functionality for long integration tests:

  • uses plot_camera for camera plots
  • introduce minimal signal handling

The test file for flasher events has outdated metadata - these are the two TODOs in the code.

@GernotMaier GernotMaier self-assigned this Feb 5, 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 PR refactors the visualization of flasher events into a more generic module, removing the ctapipe dependency and introducing new trace analysis functionality. The refactoring moves from function-based plotting to a class-based approach (PlotSimtelEvent) and introduces new modules for event reading and trace analysis.

Changes:

  • Removed ctapipe dependency, introducing custom event reader (simtel_event_reader.py) and trace analysis (trace_analysis.py)
  • Refactored plot_simtel_events.py from function-based to class-based architecture
  • Renamed Camera parameter from telescope_model_name to telescope_name for consistency
  • Added new camera plotting utilities (plot_pixel_layout_with_image) for displaying per-pixel values
  • Updated tests with comprehensive coverage for new modules

Reviewed changes

Copilot reviewed 20 out of 20 changed files in this pull request and generated 11 comments.

Show a summary per file
File Description
src/simtools/simtel/simtel_event_reader.py New event reader to replace ctapipe EventSource
src/simtools/camera/trace_analysis.py New trace analysis functions (pedestals, integration, peak finding)
src/simtools/visualization/plot_simtel_events.py Complete rewrite with PlotSimtelEvent class
src/simtools/visualization/plot_camera.py Added plot_pixel_layout_with_image and helper functions
src/simtools/model/camera.py Added read_pixel_list_from_dict for eventio integration
src/simtools/applications/plot_simtel_events.py Updated CLI to use telescope parameter
pyproject.toml, environment.yml Removed ctapipe dependency
tests/unit_tests/visualization/test_plot_simtel_events.py Complete test rewrite
tests/unit_tests/visualization/test_plot_camera.py New comprehensive test file
tests/unit_tests/simtel/test_simtel_event_reader.py New test file
tests/unit_tests/camera/test_trace_analysis.py New test file
tests/unit_tests/model/test_camera.py Expanded tests for new functionality

@ctao-sonarqube
Copy link

ctao-sonarqube bot commented Feb 5, 2026

@GernotMaier GernotMaier marked this pull request as ready for review February 5, 2026 15:38
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