neutronpy.data.Data.bin

Data.bin(to_bin, build_hkl=True)[source]

Rebin the data into the specified shape.

Parameters:
to_bin : dict

A dictionary containing information about which data_column should be binned in the following format:

‘key’: [lower_bound, upper_bound, num_points]

Any key in data_column is a valid key. Those keys from data_column not included in to_bin are averaged.

build_hkl : bool, optional

Toggle to build hkle. Must already have hkle built in object you are binning. Default: True

Returns:
binned_data : Data object

The resulting data object with values binned to the specified bounds