Skip to content

Separate production grid generation from HT Condor backend. Allow nshow to follow powerlaw.#2188

Open
GernotMaier wants to merge 11 commits into
mainfrom
power-law-events
Open

Separate production grid generation from HT Condor backend. Allow nshow to follow powerlaw.#2188
GernotMaier wants to merge 11 commits into
mainfrom
power-law-events

Conversation

@GernotMaier
Copy link
Copy Markdown
Contributor

@GernotMaier GernotMaier commented May 18, 2026

Two updates to simulate_prod_htcondor_generator.py and the possibility of defining a full Grid of simulations configurations:

Functional

Allow NSHOW to follow a pre-defined power law (until now, the number of simulated showers was the same for all energies).

Example:

    nshow: 1000
    nshow_power_index: -1
    nshow_reference_energy: 3000 GeV
    energy_range:
    - 30 GeV 30 GeV
    - 300 GeV 300 GeV
    - 3000 GeV 3000 GeV

Will give you 1000 showers at 3 TeV, 100000 at 30 GeV and 10000 300 GeV.

Maintenance

Separate grid generation from the HTCondor module to make sure it can be used with other backends in futures (new module job_spec_builder.py).

@GernotMaier GernotMaier self-assigned this May 18, 2026
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 refactors production job grid construction into a backend-facing builder module and adds energy-dependent nshow scaling for simulation production generation.

Changes:

  • Adds job_spec_builder for generating job specs and resolving grid axes.
  • Adds nshow_power_index and nshow_reference_energy support.
  • Updates HTCondor generation/tests/docs/changelog and adds a unit-testing Copilot skill.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
src/simtools/production_configuration/job_spec_builder.py New production job spec builder and nshow scaling helpers.
src/simtools/job_execution/htcondor_script_generator.py Uses the new builder and adapts job-spec label fields.
src/simtools/applications/simulate_prod_htcondor_generator.py Adds CLI arguments for power-law nshow scaling.
tests/unit_tests/production_configuration/test_job_spec_builder.py Adds unit tests for the new builder module.
tests/unit_tests/job_execution/test_htcondor_script_generator.py Updates HTCondor tests for the refactor and multi-label files.
tests/unit_tests/applications/test_simulate_prod_htcondor_generator.py Tests registration of new CLI options.
docs/source/api-reference/production_configuration.md Adds API reference entry for job_spec_builder.
docs/changes/2188.feature.md Adds feature changelog fragment.
docs/changes/2187.maintenance.md Adds maintenance changelog fragment.
.github/skills/unit-testing/SKILL.md Adds Copilot unit-testing skill guidance.

Comment thread tests/unit_tests/production_configuration/test_job_spec_builder.py Outdated
Comment thread tests/unit_tests/production_configuration/test_job_spec_builder.py Outdated
Comment thread src/simtools/production_configuration/job_spec_builder.py
Comment thread docs/changes/2187.maintenance.md
Comment thread .github/skills/unit-testing/SKILL.md
Comment thread docs/changes/2188.feature.md Outdated
GernotMaier and others added 2 commits May 18, 2026 14:13
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@GernotMaier GernotMaier marked this pull request as ready for review May 18, 2026 12:15
@GernotMaier GernotMaier requested a review from EshitaJoshi May 18, 2026 12:54
@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.

2 participants