Adding time resolved effects to nToF - #66
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
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 overt_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.
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
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>
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.
Also change normalisation of nToF to integrate to input spectrum area in time rather than normalised time.