Skip to content

Adding time resolved effects to nToF - #66

Merged
aidancrilly merged 8 commits into
ac/CraunSmithfrom
ac/time_resolved
May 13, 2026
Merged

Adding time resolved effects to nToF#66
aidancrilly merged 8 commits into
ac/CraunSmithfrom
ac/time_resolved

Conversation

@aidancrilly

Copy link
Copy Markdown
Owner

Also change normalisation of nToF to integrate to input spectrum area in time rather than normalised time.

Copilot AI 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.

Pull request overview

This PR extends the nToF time-of-flight forward model to support emission-time (time-resolved) neutron spectra, and updates the nToF normalization so the detector-domain signal integrates correctly over physical time (rather than normalized time).

Changes:

  • Updated nToF.get_signal* normalization so outputs integrate over t_det (seconds).
  • Added time-resolved forward-model methods (get_time_resolved_*) including emission-time shifting/spreading logic.
  • Added a Monte Carlo regression test comparing the new time-resolved model (no IRF) against sampled arrival times.

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 5 comments.

File Description
src/NeSST/time_of_flight.py Adjusts signal normalization and adds time-resolved forward-model APIs and utilities.
tests/test_time_of_flight.py Updates normalization assertions and adds an MC-based test for time-resolved behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/NeSST/time_of_flight.py
Comment thread src/NeSST/time_of_flight.py Outdated
Comment thread src/NeSST/time_of_flight.py Outdated
Comment thread tests/test_time_of_flight.py
Comment thread tests/test_time_of_flight.py
aidancrilly and others added 4 commits May 13, 2026 11:16
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@aidancrilly
aidancrilly merged commit 991fa0b into ac/CraunSmith May 13, 2026
1 check passed
aidancrilly added a commit that referenced this pull request May 13, 2026
* better S(E)

* Adding time resolved effects to nToF (#66)

* time resolved start

* time resolved mc test

* TR changes

* Lint

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Better exceptions

* Small fixes

---------

Co-authored-by: aidancrilly <a.crilly16@imperial.ac.uk>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* bump version

---------

Co-authored-by: aidancrilly <a.crilly16@imperial.ac.uk>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.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.

2 participants