Skip to content

Generate overwrite parameter grid (generalized)#2298

Merged
GernotMaier merged 95 commits into
mainfrom
generate-overwrite-parameter-grid-minor
Jul 13, 2026
Merged

Generate overwrite parameter grid (generalized)#2298
GernotMaier merged 95 commits into
mainfrom
generate-overwrite-parameter-grid-minor

Conversation

@GernotMaier

@GernotMaier GernotMaier commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

This is based on #2248 with the following changes are applied:

  • call python modules directly instead of using workflow approach using run-application
  • remove hardwired threshold and energy ranges and allow to set it on the command line
  • streamline code to minimize dublications
  • remove simtools-generate-parameter-scan-grid (not needed anymore, as we call modules directly)

GernotMaier and others added 3 commits July 1, 2026 12:29
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@GernotMaier

Copy link
Copy Markdown
Contributor Author

@EshitaJoshi - I am trying to understand the default of 1. here. We need to be better what nsb_rate means - sometimes it is used as multiplier to dark, but we also have a simulation model parameter which gives the NSB rate per pixel. I am not sure what this one is.

job_grid_io.py:

def _deserialize_job_row(serialized_row):
    """Deserialize one stored row to the in-memory job-row schema."""
    job_row = {
        "primary": serialized_row["primary"],
        "cores_per_shower": int(serialized_row["cores_per_shower"]),
        "showers_per_run": int(serialized_row["showers_per_run"]),
        "nsb_rate": float(serialized_row.get("nsb_rate", 1.0)),
        "model_version": serialized_row["model_version"],
        "array_layout_name": serialized_row["array_layout_name"],
        "corsika_le_interaction": serialized_row["corsika_le_interaction"],
        "corsika_he_interaction": serialized_row["corsika_he_interaction"],
        "run_number": int(serialized_row["run_number"]),
    }

@GernotMaier GernotMaier removed the no-changelog-needed No Changelog entry required for this PR label Jul 1, 2026
@GernotMaier
GernotMaier marked this pull request as ready for review July 1, 2026 12:51
@GernotMaier
GernotMaier requested a review from EshitaJoshi July 1, 2026 12:55
@GernotMaier

GernotMaier commented Jul 1, 2026

Copy link
Copy Markdown
Contributor Author

@EshitaJoshi - this is a copy of your branch with some simplifications applied. Feel free to change the base branch for this merge request to see the changes.

I've checked the output grid, but didn't text the submission with HT Condor etc. Please do this testing.

Comment thread src/simtools/production_configuration/job_grid_io.py Fixed

Copilot AI left a comment

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.

Pull request overview

Copilot reviewed 24 out of 24 changed files in this pull request and generated 7 comments.

Comment thread tests/unit_tests/production_configuration/test_job_grid_io.py Outdated
Comment thread tests/unit_tests/production_configuration/test_simulation_jobs.py Outdated
Comment thread src/simtools/production_configuration/observation_grid.py Outdated
Comment thread src/simtools/production_configuration/simulation_jobs.py Outdated
Comment thread src/simtools/job_execution/htcondor_script_generator.py Outdated
Comment thread src/simtools/job_execution/htcondor_script_generator.py Outdated
@GernotMaier GernotMaier changed the title Generate overwrite parameter grid (simplification) Generate overwrite parameter grid (generalized) Jul 8, 2026
command_parts.extend(
[
"--output_path /tmp/simtools-output",
f'--grid_output_path "{bash_indices["grid_output_path"]}"',

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I think the flag needs to change to --pack_for_grid_register and then it works for htcondor

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

pack_for_grid_register changed to grid_output_path (is clearer). Is there still somewhere pack_for_grid_register used?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Seems to be used still in simulate-prod as I get this error when I try to submit the .condor file: simulate_prod: error: unrecognized arguments: --grid_output_path ./simtools-output/default

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

No wait, i guess i need a new apptainer image?

@EshitaJoshi EshitaJoshi left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks a lot for the generalisation! This looks good to me - I also tested it on htcondor and it all works as expected.

Comment thread src/simtools/job_execution/bias_curve_submissions.py Outdated
Comment thread src/simtools/job_execution/parameter_scan_generator.py Outdated
@ctao-sonarqube

Copy link
Copy Markdown

@GernotMaier
GernotMaier merged commit affd157 into main Jul 13, 2026
20 checks passed
@GernotMaier
GernotMaier deleted the generate-overwrite-parameter-grid-minor branch July 13, 2026 13:20
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.

3 participants