Fix sim_telarray single-seed handling with instrument seed#2131
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes sim_telarray seed initialization to correctly handle the common CLI/config case where sim_telarray_seed is provided as a single value (parsed as a 1-item list) while sim_telarray_instrument_seed is provided separately, addressing issue #2125.
Changes:
- Update
SimtelSeeds.initialize_seeds()to treat a 1-itemsim_telarray_seedlist as a single simulation seed and to raise a clearValueErrorfor invalid list lengths. - Add unit coverage for single-item
sim_telarray_seedlists and for invalid fixed-seed list lengths. - Update an integration test configuration to exercise the single-item
sim_telarray_seed+sim_telarray_instrument_seedpath, and add a changelog fragment.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
src/simtools/simtel/simtel_seeds.py |
Fixes routing/validation for list-form sim_telarray_seed, supporting 1-item lists and rejecting invalid lengths. |
tests/unit_tests/simtel/test_simtel_seeds.py |
Adds unit tests for the new single-item-list handling and invalid list length error path. |
tests/integration_tests/config/simulate_prod_gamma_40_deg_south_sim_telarray_only.yml |
Exercises the bugfix path by splitting instrument seed and single simulation seed across the two config keys. |
docs/changes/2131.bugfix.md |
Documents the bugfix and added coverage. |
|
orelgueta
approved these changes
Apr 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




Fixes #2125.
Handle a single-value sim_telarray_seed correctly when sim_telarray_instrument_seed is provided, add unit coverage, and update one integration config to exercise this path.
Two different ways of settings the instrument seeds are now working (as documented before):
--sim_telarray_seed 5,6(instrument and simulation seed given at once)--sim_telarray_seed 6 --sim_telarray_instrument_seed 5(separate instrument and simulation seed)