Skip to content

Conversation

@GernotMaier
Copy link
Contributor

This is a leftover item outlined in issue #1935 - azimuth values provided in the event header by CORSIKA are relative geomagnetic north, while the sim_events format is using geographic north.

Required an updated on pyeventio to 2.1.0 (to include pycorsikaio 0.6.0).

Closes #1935.

@GernotMaier GernotMaier self-assigned this Dec 16, 2025
@GernotMaier GernotMaier added the no-changelog-needed No Changelog entry required for this PR label Dec 16, 2025
@GernotMaier GernotMaier marked this pull request as ready for review December 17, 2025 08:24
Copilot AI review requested due to automatic review settings December 17, 2025 08:24
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 addresses issue #1935 by implementing the rotation of azimuth values from geomagnetic north (CORSIKA convention) to geographic north (sim_events format) when reading CORSIKA IACT files. The change requires pyeventio 2.1.0, which includes pycorsikaio 0.6.0 that provides the angle_array_x_magnetic_north field needed for the coordinate transformation.

Key changes:

  • Applied azimuth rotation by subtracting angle_array_x_magnetic_north from the raw azimuth value when processing CORSIKA IACT file info
  • Updated test to verify the azimuth rotation calculation is performed correctly

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/simtools/sim_events/writer.py Implements azimuth rotation from geomagnetic to geographic north in _process_file_info for CORSIKA IACT files
tests/unit_tests/sim_events/test_writer.py Adds angle_array_x_magnetic_north field to test data and updates expected azimuth assertion to verify the rotation calculation

@ctao-sonarqube
Copy link

ctao-sonarqube bot commented Jan 5, 2026

Copy link
Collaborator

@tobiaskleiner tobiaskleiner left a comment

Choose a reason for hiding this comment

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

Thanks @GernotMaier.

@GernotMaier
Copy link
Contributor Author

Thanks for the quick review @tobiaskleiner !

@GernotMaier GernotMaier merged commit 7bcde37 into main Jan 5, 2026
15 checks passed
@GernotMaier GernotMaier deleted the apply-arrang branch January 5, 2026 10:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-changelog-needed No Changelog entry required for this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update rotation to geomag orientation after ARRANG field is added to pycorsikaio

3 participants