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

Load histogram monitors #104

Closed
wants to merge 2 commits into from
Closed

Load histogram monitors #104

wants to merge 2 commits into from

Conversation

jl-wynen
Copy link
Member

This adds the option to load histogram data for monitors instead of event data. While we may not need this in production, simulated data may use histogram monitors instead of event monitors.

In particular, ESSspectroscopy needs this feature. I tested it locally with that pacakge. Note #103 about testing.


def assemble_monitor_histogram_data(
monitor: AnyRunAnyCalibratedMonitor,
hist_data: AnyRunAnyNeXusMonitorEventData,
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
hist_data: AnyRunAnyNeXusMonitorEventData,
hist_data: AnyRunAnyNeXusMonitorHistData,

@@ -147,6 +147,49 @@ def _select_unique_array(
return next(iter(arrays.values()))


def load_hist_data(
file_path: AnyRunFilename,
selection=(),
Copy link
Member

Choose a reason for hiding this comment

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

selection isn't documented or type hinted.

@jl-wynen jl-wynen mentioned this pull request Sep 24, 2024
@nvaytet
Copy link
Member

nvaytet commented Sep 26, 2024

@jl-wynen should we close this one?

@jl-wynen
Copy link
Member Author

Yes

@jl-wynen jl-wynen closed this Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants