Skip to content

Add preconfigured ESS instrument configs#96

Merged
nvaytet merged 7 commits intomainfrom
ess-instrument-configs
Oct 9, 2025
Merged

Add preconfigured ESS instrument configs#96
nvaytet merged 7 commits intomainfrom
ess-instrument-configs

Conversation

@nvaytet
Copy link
Copy Markdown
Member

@nvaytet nvaytet commented Oct 8, 2025

Add pre-configured parameters for the Odin and Dream instruments, so the user does not have to copy-paste the long setup code in the notebooks.

We can now do

odin_params = tof.facilities.ess.odin(pulse_skipping=True)
model = tof.Model(source=source, **odin_params)
results = model.run()

We also move once again the location for the ess pulse profile data.
As this would break essreduce downstream, we also include a fake ess_pulse submodule, which should be phased out at a later stage.

Copy link
Copy Markdown
Member

@jl-wynen jl-wynen left a comment

Choose a reason for hiding this comment

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

Looks good overall, just some minor comments.

Comment thread src/tof/facilities/ess/beamline.py Outdated
Comment on lines +26 to +28
widths=sc.array(dims=["cutout"], values=ch["widths"], unit="deg")
if "widths" in ch
else None,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can you extract this into a function for readability?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I didn't check the numbers. I assume this is a straight copy from the notebook?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yes it is.

@nvaytet nvaytet merged commit e6a846e into main Oct 9, 2025
4 checks passed
@nvaytet nvaytet deleted the ess-instrument-configs branch October 9, 2025 08:01
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