Skip to content

Bugfixes of final and intermediate madspace output - #188

Closed
theoheimel wants to merge 2 commits into
mainfrom
fix-output-formats
Closed

theoheimel wants to merge 2 commits into
mainfrom
fix-output-formats

Conversation

@theoheimel

Copy link
Copy Markdown
Contributor
  • Do not activate analysis tool by default when launching mg7 runs.
  • Do not automatically revert from numpy to LHE format if postprocessing steps were selected. Instead raise an error to signal to the user that they selected a nonsensical combination of settings.
  • Ensure correct clean-up of intermediate per-channel npy files.
  • In numpy output mode, write a file header.lhe with no events but the LHE header/init information.

@oliviermattelaer

Copy link
Copy Markdown
Contributor

For the first point, I would agree if we offer smart plot by default (So I'm working to update the histogram mode to be more automatic --and check if it can handle scale/pdf uncertainty--).

I also think that we should offer a simple way for the user to decide if those are ON/OFF by default (different use case/user might not like the default in the same way, will be in the same update)

For the second point, I just do not agree on it, I do not see the point for a crash, If the user ask for a shower/... we should make it work (how we make it work we can discuss, but it is pointless to make it crash).

@oliviermattelaer oliviermattelaer 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.

The main point is to put back (in one way or another) an automatic switch to lhe when asking for shower or MadAnalysis5, (MadSpin?), ...

@oliviermattelaer

Copy link
Copy Markdown
Contributor

Heads-up: #190 is stacked on this branch (fix-output-formats is its base), so it should go in after this one.

It touches two things from here:

  • the LHE auto-revert is put back — check_lhe_output_required raising becomes force_lhe_output_if_needed rewriting output_format again, on the grounds that asking for a shower in the launch question should be enough without knowing it constrains the output format;
  • the analysis switch stays off by default, but the ExRoot behaviour this PR removed gets a proper home: input/default_switch.txt, shared by the LO, NLO and mg7 launch questions, so a user who wants MadAnalysis5 by default can say so once.

The rest of #190 is the mg7 [histograms] defaults, the per-run plots with scale/PDF bands, and an opt-in MADatLO.HwU.

@theoheimel

theoheimel commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor Author

My issue with the old system with just a warning is that the user will probably overlook it and then be surprised the output format is wrong. That's what happened for me and why I changed it. Since the numpy output only turns on when the user explicitly requests it (which means they want numpy and not LHE), I don't think it should be quietly changed back. So at least in non-interactive mode it should be a crash.

@oliviermattelaer

Copy link
Copy Markdown
Contributor

Should not we put npy as the default output (if not shower/...)

@theoheimel

Copy link
Copy Markdown
Contributor Author

Yes, we could consider that. I find it much nicer to use to make plots, inspect the data, etc.

oliviermattelaer added a commit that referenced this pull request Sep 23, 2026
Take #188's header.lhe (LHE <header>/<init> written next to npy events),
ExRoot-off-by-default and prompt cleanup of the per-channel npy files.

Conflicts:
- keep the automatic switch to LHE (force_lhe_output_if_needed) instead of
  #188's check_lhe_output_required error: with npy the default, raising
  would stop every run that turns a shower on;
- drop lhe_meta.json: npy_to_lhe now copies header.lhe verbatim (it carries
  the cards, beams, cross section, MG7Seed and <initrwgt>) and takes the
  rwgt columns from the npy dtype; lhe_completer.json is kept for
  compact_npy (save_lhe_completer);
- output_format default stays lhe_npy, with #188's comment.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@oliviermattelaer

Copy link
Copy Markdown
Contributor

Superseded by #195, which merges this branch in (header.lhe, ExRoot off by default, per-channel npy cleanup). One deliberate change: the automatic switch to LHE output is kept instead of raising an error, since npy is now the default. header.lhe also replaced the lhe_meta.json #195 had added, and the gridpack header is now complete.

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