ess.nmx.mcstas.load.raw_event_data_chunk_generator#
- ess.nmx.mcstas.load.raw_event_data_chunk_generator(file_path, *, detector_name, bank_prefix=None, chunk_size=0)[source]#
Chunk events from the nexus file.
- Parameters:
file_path (
mcstas.types.FilePath(str)) – Path to the nexus filedetector_name (
mcstas.types.DetectorName(str)) – Name of the detector to loadpixel_ids – Pixel ids to generate the data array with the events
chunk_size (
int, default:0) – Number of rows to read at a time. If 0, chunk slice is determined automatically by theiter_chunks. Note that it only works if the dataset is already chunked.
- Yields:
RawEventProbability– Data array containing the events of the detector.- Raises:
ValueError: – If the chunk size is not valid. (>= -1)
TypeError: – If the chunk size is not an integer.
Warning – If the chunk size is too small (< 10_000_000).
- Return type:
Generator[mcstas.types.RawEventProbability(scipp.DataArray),None,None]