Skip to content

New tool: mcplotdiff-html, render difference plots between two datasets#2560

Merged
willend merged 5 commits into
mainfrom
mcplotdiff-html
Jul 9, 2026
Merged

New tool: mcplotdiff-html, render difference plots between two datasets#2560
willend merged 5 commits into
mainfrom
mcplotdiff-html

Conversation

@willend

@willend willend commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Free-form text area

Please describe what your PR is adding in terms of features or bugfixes:


Declaration of use of AI-tools

  • Please add a checkmark here if you used AI-tools during the work for this contribution
  • Furter, please describe how / where and for what the tools were used:

As also stated in the commit-log I used Claude to initiate the work on this tool:
"Based on the McCode repo checkout that I have made available, please make an alternative variant of the tools/Python/mcplot/html plotter that takes two simulation folders (a,b) as input and subtracts identical monitor outputs from each other (i.e. something like diff.mon1 = a.mon1 - b.mon1) and make a corresponding set of plots.

The existing plot tool uses the mccodelib library present in tools/Python/mccodelib”

I have then reviewed the code and tested locally, adapting details in the implementation.


Development OS / boundary conditions

Please describe what OS you developed and tested your additions on, and if any special dependencies are required:


PR Checklist for contributing to McStas/McXtrace

For a coherent and useful contribution to McStas/McXtrace, please fill in relevant parts of the checklist:

  • My contribution contains something else

    • Explanation is added in free form text above or below the checklist

willend added 4 commits July 9, 2026 09:15
"Based on the McCode repo checkout that I have made available, please make an alternative variant of the tools/Python/mcplot/html plotter that takes two simulation folders (a,b) as input and subtracts identical monitor outputs from each other (i.e. something like diff.mon1 = a.mon1 - b.mon1) and make a corresponding set of plots.

The existing plot tool uses the mccodelib library present in tools/Python/mccodelib"
@willend willend requested review from farhi and mads-bertelsen July 9, 2026 07:59
@willend

willend commented Jul 9, 2026

Copy link
Copy Markdown
Contributor Author

A set of demo outputs can be browsed at https://tmp.mcstas.org/diffplots/

Datasets A2 and A3 are identical, differ from A only by seed.

@mads-bertelsen mads-bertelsen 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.

Looks good, no expert in the html part. Well commented and a nice feature to have!

@willend willend merged commit 10ad9ae into main Jul 9, 2026
20 checks passed
willend added a commit that referenced this pull request Jul 9, 2026
New tool: mcplotdiff-pyqtgraph, render difference plots between two datasets (follow-up for #2560)
@willend willend deleted the mcplotdiff-html branch July 9, 2026 18:21
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