Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/ess/reduce/time_of_flight/fakes.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def __init__(
else tof_pkg.Clockwise,
open=ch.slit_begin,
close=ch.slit_end,
phase=abs(ch.phase),
phase=ch.phase if ch.frequency.value > 0.0 else -ch.phase,
Copy link
Member

@nvaytet nvaytet Nov 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you change the order of operations in tof, does this go away?
(first add phase, and then mirror)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No I could not make it go away by changing anything in tof.
I lean towards the implementation in tof being correct.

distance=sc.norm(ch.axle_position - source_position),
name=name,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should add properly maintained methods in tof to construct chopper from DiskChopper and NeXus.
I suspect this code exists in multiple places (packages, notebooks etc...)

See scipp/tof#6.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah that sounds like a good idea. Do you want to see that in this PR?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you want to see that in this PR?

No, I will do that separately.

)
Expand Down
2 changes: 1 addition & 1 deletion src/ess/reduce/time_of_flight/lut.py
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ def simulate_chopper_cascade_using_tof(
else tof.Clockwise,
open=ch.slit_begin,
close=ch.slit_end,
phase=abs(ch.phase),
phase=ch.phase if ch.frequency.value > 0.0 else -ch.phase,
distance=sc.norm(
ch.axle_position - source_position.to(unit=ch.axle_position.unit)
),
Expand Down
Loading