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

Make facility information for accessible #68

Merged
merged 3 commits into from
Jan 8, 2025
Merged

Conversation

nvaytet
Copy link
Member

@nvaytet nvaytet commented Jan 8, 2025

With this, we can now access the properties of the facility pulse (time and wavelength profiles) without creating a source with neutrons (which can be expensive).

import tof
tof.facilities['ess']
FacilityPulse(time=<scipp.DataArray>
Dimensions: Sizes[time:201, ]
Coordinates:
* time                      float64              [s]  (time)  [1.24378e-05, 3.73134e-05, ..., 0.00496269, 0.00498756]
Data:
                            float64  [dimensionless]  (time)  [0.000335837, 0.000711463, ..., 1.1283e-05, 1.05061e-05]

, wavelength=<scipp.DataArray>
Dimensions: Sizes[wavelength:101, ]
Coordinates:
* wavelength                float64             [Å]  (wavelength)  [0.198515, 0.395545, ..., 19.7045, 19.9015]
Data:
                            float64  [dimensionless]  (wavelength)  [0.0247911, 0.0315395, ..., 2.57594e-05, 2.41536e-05]

, frequency=<scipp.Variable> ()    float64             [Hz]  14)

@@ -208,7 +208,7 @@ def __init__(
self.data = None

if facility is not None:
facility_params = getattr(facilities, self.facility)
facility_params = facilities[self.facility]
Copy link
Member

Choose a reason for hiding this comment

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

👍

@nvaytet nvaytet merged commit 83feba7 into main Jan 8, 2025
3 checks passed
@nvaytet nvaytet deleted the make-facilities-accessible branch January 8, 2025 13:36
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