Skip to content

Sans spheres intensity fix - #2600

Open
Lomholy wants to merge 10 commits into
mainfrom
Sans_spheres_intensity_fix
Open

Sans spheres intensity fix#2600
Lomholy wants to merge 10 commits into
mainfrom
Sans_spheres_intensity_fix

Conversation

@Lomholy

@Lomholy Lomholy commented Aug 18, 2026

Copy link
Copy Markdown
Collaborator

Free-form text area

Please describe what your PR is adding in terms of features or bugfixes:
The Sans_spheres comp was not matching the otherwise validated SANS_spheres2.comp in intensity, when simulated under similar circumstances. Likewise it was not matching an analytical calculation completely.

This PR adds a Sigma to the attenuation factor of the Sans_spheres component that brings it in line with the SANS_spheres2 component and the analytical calculation. This PR also adds a missing attenuation the SANS_spheres2 component, in the case that it only simulates 1 scattering event inside the sample.

Furthermore the Sans_spheres component was missing a conversion from deg to rad in its angular focusing option. This has been added with this PR.


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:
    I used an AI to rewrite the header into a readme file.

Development OS / boundary conditions

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


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 includes patches to an existing component file

    • I have used the mcdoc utility and rendered a reasonable documentation page for the component (please attach as screenshot in comments!)
    • I have ensured that basic use of the component is OK (e.g. an instrument using it compiles?)
    • I have used the mctest utility to test one or more instruments making use of the component (please attach mcviewtest report as screenshot in comments)
    • I have used the mccode-clangformat tool to apply the standard McCode component indentation scheme
    • I have used the mcrun --c-lint "linter" and followed advice to remove most / all warnings that are raised
  • My contribution includes a new instrument file

    • I have used the mcdoc utility and rendered a reasonable documentation page for the instrument (please attach as screenshot in comments!)
    • I have ensured that basic use of the instrument is OK (e.g. it compiles?)
    • ... and provided reasonable default parameters in that instrument that produce reasonable output
    • ... and maybe even added a %Example: line to describe expected behaviour
    • I have used the mcrun --c-lint "linter" and followed advice to remove most / all warnings that are raised
    • My new instrument is added within the examples hierarchy in a folder in the style of examples/ESS/New_stuff/New_stuff.instr
    • My new instrument has a new, unique filename, not clashing with existing example instruments

@Lomholy

Lomholy commented Aug 18, 2026

Copy link
Copy Markdown
Collaborator Author

Sans_spheres mcdoc:

billede

SANS_spheres mcdoc:
billede

Test_sans_spheres mcdoc:
billede

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.

1 participant