Repository navigation
Replace printRunParameter by a python tool - #88
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
🟡 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-infoconsole-script entry point. - Documents the command, output format, and
--updatedbehavior.
| 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
| 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 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: |
Contributor
There was a problem hiding this comment.
🟡 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
Map elevations by telescope ID before averaging · New Derive major epoch from the stored instrument epoch · New Preserve empty run-type values in run-info output · New Support runparameterDST and anasum fallback paths · New Keep run-info output to the documented five-field layout · New Registered script entry point targets a missing module Documented command points to a missing module
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"]), |
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.



No description provided.