Skip to content

Add telescope axes offsets for calibration runs#2077

Open
tobiaskleiner wants to merge 23 commits intomainfrom
add-axes-offsets-for-illuminator
Open

Add telescope axes offsets for calibration runs#2077
tobiaskleiner wants to merge 23 commits intomainfrom
add-axes-offsets-for-illuminator

Conversation

@tobiaskleiner
Copy link
Copy Markdown
Collaborator

@tobiaskleiner tobiaskleiner commented Mar 17, 2026

This PR inlcudes the telescope axes_offsets (az/alt axis intersection offsets) for the MST calibration runs. Previously the "small" (the path difference is in the order of a few cm for illuminator to telescope distances of a few 100 m) offset was not regarded.

@tobiaskleiner tobiaskleiner marked this pull request as draft March 17, 2026 12:10
@tobiaskleiner tobiaskleiner requested a review from Copilot March 19, 2026 12:14
@tobiaskleiner tobiaskleiner marked this pull request as ready for review March 19, 2026 12:15
Copy link
Copy Markdown
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 updates the sim_telarray light-emission simulation flow to account for telescope axes_offsets (az/alt axis intersection offsets) when deriving calibration/illuminator pointing and when writing the telescope_position.dat file.

Changes:

  • Add _get_telescope_position_ground_with_axis_offset() and use it in calibration pointing and telescope-position-file generation.
  • Pass the illuminator position through command construction to avoid redundant lookups and support Quantity arrays cleanly.
  • Extend unit tests to cover the new axis-offset behavior and Quantity-array inputs; add a changelog fragment.

Reviewed changes

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

File Description
src/simtools/simtel/simulator_light_emission.py Applies axes_offsets when computing telescope ground position for calibrations, and threads illuminator position into telpos-file writing and pointing-vector derivation.
tests/unit_tests/simtel/test_simulator_light_emission.py Updates existing tests and adds new ones for axis-offset rotation/projection and Quantity-array illuminator positions.
docs/changes/2077.feature.md Changelog entry documenting the feature.

You can also share your feedback on Copilot code review. Take the survey.

Copy link
Copy Markdown
Contributor

@GernotMaier GernotMaier left a comment

Choose a reason for hiding this comment

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

Very nice, thank you!

x_tel_m = x_tel.to(u.m).value
y_tel_m = y_tel.to(u.m).value
z_tel_m = z_tel.to(u.m).value
x_cal_m = x_cal.to(u.m).value
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Super minor: x/y/z_cal_m is used only in delta_x/y/z. Maybe no need to assign it to a variable and used e.g. x_cal.to(u.m).value directly in delta_x. Saves 3 lines (I know, super minor).

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Good point, fixed.

@ctao-sonarqube
Copy link
Copy Markdown

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.

Axes_offsets needs to be taken into account for illuminator-telescope pointing

3 participants