Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • M McTal
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 7
    • Issues 7
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Paul Zakalek
  • McTal
  • Merge requests
  • !30

Correct the wavelength distributions

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Norberto Schmidt requested to merge wavelength into master Nov 15, 2022
  • Overview 1
  • Commits 7
  • Pipelines 0
  • Changes 5

After some discussions with @jingli and @schwab, we realized that the peak of the wavelength distribution \phi(\lambda) was not at the same position as the energy distribution \phi(E). This was because, after the change of variables, the corresponding jacobian was missing. This was properly implemented for the angular distribution.

Consider that |\phi(E) dE| = |\phi(\lambda) d\lambda|, and \lambda [\textup{~\AA}] = \sqrt{81.82/E [\mathrm{meV}]}, it is possible to see that dE = |81.82 \cdot (-2) \cdot \lambda^{-3}| d\lambda.

So, for each bin between \lambda_{\mathrm{min}} and \lambda_{\mathrm{max}}, it would be necessary to divide by the integral of the jacobian, i.e. |81.82\cdot(\lambda^{-2}_{\mathrm{min}}-\lambda^{-2}_{\mathrm{max}})|.

For doing this, a new WavelengthAxis class was implemented to plot the distributions with the proper normalization (same idea as AngleAxis). Also, the tracks-vs-tallies.inp example was changed to see the new shape of the wavelength distributions (see attached).

And, with these implementations, now the peak of both distributions is at the same position 😃

tracks-vs-tallies

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: wavelength