Skip to content

Allow 0 frequency choppers#141

Merged
nvaytet merged 4 commits into
mainfrom
zero-frequency-choppers
May 5, 2026
Merged

Allow 0 frequency choppers#141
nvaytet merged 4 commits into
mainfrom
zero-frequency-choppers

Conversation

@nvaytet
Copy link
Copy Markdown
Member

@nvaytet nvaytet commented May 4, 2026

Before these changes, creating a chopper which is parked with 0 frequency

tof.Chopper(
    frequency=0 * Hz,
    open=sc.array(dims=['cutout'], values=[30.0], unit='deg'),
    close=sc.array(dims=['cutout'], values=[140.0], unit='deg'),
    phase=0 * deg,
    distance=22 * meter,
    name="Pulse-overlap",
)

raised Chopper frequency must be positive.

Now, this is allowed. The chopper.open_close_times() returns and infinite range [-np.inf, np.inf], and the chopper blocks no neutrons.

Copy link
Copy Markdown
Member

@SimonHeybrock SimonHeybrock left a comment

Choose a reason for hiding this comment

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

I think this is fine, if we assume that stopped choppers are parked on "open" position? If they are not, no neutrons would pass through. Thus doing a simulation would not be useful... except for diagnostics, but maybe that is secondary?

Comment thread src/tof/chopper.py Outdated
nvaytet and others added 2 commits May 5, 2026 08:40
Co-authored-by: Simon Heybrock <12912489+SimonHeybrock@users.noreply.github.com>
@nvaytet
Copy link
Copy Markdown
Member Author

nvaytet commented May 5, 2026

If they are not, no neutrons would pass through. Thus doing a simulation would not be useful.

Yes. They would just be removed from the simulation.
I believe choppers are almost always parked in the open position.

If someone really wants to park a chopper in closed position, they can give it a frequency of 1.0e-30 Hz or something like that.

@nvaytet nvaytet merged commit 44b6858 into main May 5, 2026
4 checks passed
@nvaytet nvaytet deleted the zero-frequency-choppers branch May 5, 2026 06:59
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