Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to create choppers from centers and widths of cutouts #54

Merged
merged 4 commits into from
Oct 3, 2024

Conversation

nvaytet
Copy link
Member

@nvaytet nvaytet commented Oct 2, 2024

Allow to create choppers from centers and widths of cutouts in addition to open and close angles.
Choppers are defined in terms of slit centers and widths in McStas.

Example:

tof.Chopper(
        frequency=14*Hz,
        direction=tof.AntiClockwise,
        width=sc.array(
            dims=['cutout'],
            values=[2.46, 3.02, 3.27, 3.27, 5.02, 3.93, 3.93, 2.46],
            unit='deg',
        ),
        center=sc.array(
            dims=['cutout'],
            values=[0, 72, 86.4, 115.2, 172.8, 273.6, 288.0, 302.4],
            unit='deg',
        ),
        phase=(286-180)*deg,
        distance= 6.145*meter, 
        name="PSC1",
    )

@nvaytet nvaytet merged commit 5c855ef into main Oct 3, 2024
3 checks passed
@nvaytet nvaytet deleted the define-chopper-widths-centers branch October 3, 2024 10:58
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