Skip to content

Fermi_chop2a / Vertical_T0a: blade checks to the slit-package exit; StatisticalChopper autocorrelation - #3173

Open
willend wants to merge 3 commits into
mainfrom
chopper-splen-autocorrelation
Open

willend wants to merge 3 commits into
mainfrom
chopper-splen-autocorrelation

Conversation

@willend

@willend willend commented Nov 22, 2026

Copy link
Copy Markdown
Contributor

Free-form text area

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

Fermi_chop2a and Vertical_T0a (fixes #3006, fixes #3007). In TRACE, phivec[0] and phivec[1] are reset so the blade-absorption checks cover the slit package. In the rotating frame the neutron path is z = c0 + nrad cos(phi). The entry reset solves z = -splen; the exit reset used (-c[0] + splen / 2.0), i.e. z = splen/2, although splen = len/2 is already the half-length. The cylinder radius exceeds splen, so the reset applies to nearly every neutron, and blade hits in the last quarter of the package were never checked. The exit now uses (-c[0] + splen).

This changes results. SNS_ARCS (-y -n 1e6 -s 5), Full_cyl_I:

Full_cyl_I
main 2.249e5
this PR 1.418e5 (-37%)
Fermi_chop2a fix only -29%
Vertical_T0a fix only -12%

The %Test: -y Detector: Full_cyl_I=235445 line in SNS_ARCS.instr is not updated here.

@granrothge, could you review? In particular: was splen / 2.0 intended for some reason, and has the ARCS model been compared with measured flux using these components?

StatisticalChopper (point 2 of #3005). Both branches of the autocorrelation check ended in break, so only A_0 was tested. The loop now stops at the first lag that fails, and the warning names the lag. Warnings only; Test_StatisticalChopper gives identical output to main. Point 1 (sign of delay for isfirst=1) is not addressed; it is tied to the DiskChopper discussion in #2347.


Declaration of use of AI-tools

  • Please add a checkmark here if you used AI-tools during the work for this contribution
  • Further, please describe how / where and for what the tools were used: Claude Code (Claude Opus 5.5) checked the geometry, made the edits and ran the comparisons, reviewed by the author.
  • AI-assisted commits must carry a Co-Authored-By line naming the tool, see CONTRIBUTING.md

Development 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. Not tested on Linux, Windows or GPU.


PR Checklist for contributing to McStas/McXtrace


🤖 Generated with Claude Code

willend and others added 2 commits November 22, 2026 19:05
The exit-side reset used z = splen/2 instead of z = splen (splen is
already the half-length), so blade absorption was only checked over the
first three quarters of the slit package. Transmission drops: SNS_ARCS
Full_cyl -37% (Fermi_chop2a -29%, Vertical_T0a -12%).
Fixes #3006, fixes #3007.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Both branches of the check ended in break, so only A_0 was tested. Now
the loop stops at the first lag that fails and the warning names it.
Warnings only, no change in results. Refs #3005 (point 2).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Full_cyl_I from 1e7 rays, 8 MPI ranks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

Vertical_T0a: exit-side slit-package reset uses splen/2 instead of splen Fermi_chop2a: exit-side slit-package reset uses splen/2 instead of splen

1 participant

⌂ Proxy