Repository navigation
mcdisplay-webgl(-classic): --simbins for the monitor data binning - #3160
Merged
Merged
Conversation
--simdir data is shown with at most N x N (2D) or 4N (1D) bins, default 256 as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Free-form text area
Please describe what your PR is adding in terms of features or bugfixes:
Follow-up to #3155: the binning of the
--simdirmonitor data in mcdisplay-webgl and mcdisplay-webgl-classic (McStas and McXtrace) is now set with--simbins N: at most N x N (2D) or 4N (1D) bins, by averaging neighbouring bins. The default 256 keeps the earlier behaviour (256 x 256 / 1024); output files are untouched.read_simdir(dirname, nbins=256); mctest keeps the default.--simdiris read inmain, after all options are parsed, so the order of--simdirand--simbinsdoes not matter. Also applies when adding data to an existing display.mcdisplay.md: the display grows as N^2 (~16 bytes/bin), a large N may exceed the browser's texture size.Example:
Declaration of use of AI-tools
Co-Authored-Byline naming the tool, see CONTRIBUTING.mdDevelopment OS / boundary conditions
Please describe what OS you developed and tested your additions on, and if any special dependencies are required:
macOS (arm64), mccode-dev conda env. No new dependencies. With a 2000x1500 PSD + 5000-bin L_monitor:
--simbins 64: 63x63 / 250 (40 kB),--simbins 1000: 750x1000 / 2500 (4.9 MB).--simbins 64(63x63 / 250), and an existing display with the default (250x250 / 1000).--helpin both viewers shows the option.Not tested: the large displays in a browser, Linux, Windows.
PR Checklist for contributing to McStas/McXtrace
My contribution contains something else
🤖 Generated with Claude Code