Skip to content

Conversation

@SimonHeybrock
Copy link
Member

This adds a Nexus-file-based workflow. I needed this for being able to run stream processing for live data reduction.


def convert_monitor_to_wavelength(
monitor: MonitorTofData[RunType, MonitorType],
monitor: MonitorTofData[RunType, MonitorType], wavelength: WavelengthBins
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
monitor: MonitorTofData[RunType, MonitorType], wavelength: WavelengthBins
monitor: MonitorTofData[RunType, MonitorType], wavelength_bins: WavelengthBins

Monitor data with time-of-flight coordinate.
wavelength:
Bins for the wavelength coordinate. This will be used ONLY if the monitor is
recorded in event mode. For histogrammed monitors no rebinning is performed.
Copy link
Member

Choose a reason for hiding this comment

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

Why do you histogram in this function? It seems surprising to me that the conversion function / provider does this. If this is because of the streaming workflow, could you move the histogramming into the accumulator?

Copy link
Member Author

Choose a reason for hiding this comment

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

Hmmm, good idea, we could make a custom accumulator that uses given wavelength bins. I'll try that.

Copy link
Member Author

Choose a reason for hiding this comment

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

Reverted this now.

Base automatically changed from restructure-workflow-for-streaming to main June 10, 2025 08:55
Add WavelengthBins for event mode monitor binning

Add docstring
@SimonHeybrock SimonHeybrock enabled auto-merge June 19, 2025 09:17
@SimonHeybrock SimonHeybrock requested a review from jl-wynen June 19, 2025 09:17
@SimonHeybrock SimonHeybrock merged commit 3415c96 into main Jun 19, 2025
4 checks passed
@SimonHeybrock SimonHeybrock deleted the nexus-workflow branch June 19, 2025 11:45
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.

3 participants