Skip to content

Replace printRunParameter by a python tool - #88

Merged
GernotMaier merged 3 commits into
mainfrom
print-run-parameters
Nov 11, 2026
Merged

GernotMaier merged 3 commits into
mainfrom
print-run-parameters

Conversation

@GernotMaier

Copy link
Copy Markdown
Member

No description provided.

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.

🟡 Changes recommended

The change registers and documents a print_run_info command whose target module is missing, so installation and invocation will fail until the implementation and tests are added.

2 open issues
What changed in this PR

This PR begins replacing Eventdisplay’s printRunParameter utility with a Python-based run-information command, but the referenced implementation is missing, so the registered command cannot currently run.

Changes:

  • Registers the eventdisplay-ml-print-run-info console-script entry point.
  • Documents the command, output format, and --updated behavior.
File Description
pyproject.toml Registers the eventdisplay-ml-print-run-info console-script entry point.
docs/​usage.md Documents invocation, output format, and updated run-information behavior for the proposed command.

Review effort: Lite

Comment thread pyproject.toml
scripts.eventdisplay-ml-plot-classification-performance-metrics = "eventdisplay_ml.scripts.plot_classification_performance_metrics:main"
scripts.eventdisplay-ml-plot-classification-gamma-efficiency = "eventdisplay_ml.scripts.plot_classification_gamma_efficiency:main"
scripts.eventdisplay-ml-plot-training-evaluation = "eventdisplay_ml.scripts.plot_training_evaluation:main"
scripts.eventdisplay-ml-print-run-info = "eventdisplay_ml.scripts.print_run_info:main"
Comment thread docs/usage.md
Comment on lines +129 to +132
**Run information:** `eventdisplay-ml-print-run-info` prints the run information needed to
select the model directory (epoch, atmosphere, run type, telescopes, duration, target,
zenith angle, wobble offset) in one tab-separated line, in the layout of
`printRunParameter -runinfo`. It needs no compiled Eventdisplay:

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.

🟡 Changes recommended

Critical and moderate compatibility issues remain in run-info parsing and formatting, including incorrect sparse-telescope elevation handling, missing supported lookup fallbacks, and output fields that diverge from the established contract.

7 open issues

Review effort: Lite

Comment on lines +170 to +176
n_tel = root_file["telconfig"].num_entries
tree = root_file["data"]
n_events = tree.num_entries
if n_events == 0:
return -999.0
first = np.asarray(tree["TelElevation"].array(entry_start=0, entry_stop=1, library="np")[0])
elevations = [first[:n_tel]]
wobble = math.hypot(parameters["fWobbleNorth"], parameters["fWobbleEast"])
return {
"epoch": epoch,
"major_epoch": epoch.split("_", maxsplit=1)[0],
"epoch": epoch,
"major_epoch": epoch.split("_", maxsplit=1)[0],
"atmosphere": atmosphere,
"run_type": parameters["fDBRunType"] or "no_db_runtype",
Comment on lines +86 to +87
if RUN_PARAMETER_KEY not in root_file:
raise KeyError(f"{RUN_PARAMETER_KEY} not found in {root_file.file_path}")
Comment on lines +260 to +264
f"{info['duration']:g}",
info["target"],
f"{info['zenith']:g}",
f"{info['wobble']:g}",
str(info["wobble_int"]),
@GernotMaier
GernotMaier merged commit 21d21f9 into main Nov 11, 2026
@GernotMaier
GernotMaier deleted the print-run-parameters branch November 11, 2026 15:46
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