Skip to content

Support select-entries and select-xtdf operations

Philipp Schmidt requested to merge feat/select-rows into master

Adds the implementations for the select-entries and select-xtdf operations.

select-entries <source_glob> <index_group> <train_sel> <entry_sel> is the generic form and allows slicing the individual entries (intentionally not called pulses or frames as they may represent something else, e.g. for Timepix) on a train by train basis. As entry selector, it supports slices, iterable of indices and boolean masks.

select-xtdf <source_glob> <train_sel> <entry_sel> is a special version of select-entries specifically for XTDF detectors roughly equivalent to using select-entries on the image index group. In addition to that though, it also verifies XTDF structure and adjusts the header.pulseCount key to the number of pulses after slicing.

Both operations document their changes additionally in a new group under INDEX/<source>/<index_group>/original with the original first, count datasets as well as the original indices within the train of the kept entries in positions.

@esobolev

Edited by Philipp Schmidt

Merge request reports