WrightTools.data.Data.prune

Data.prune(keep_channels=True, *, verbose=True)[source]

Remove unused variables and (optionally) channels from the Data object.

Unused variables are those that are not included in either axes or constants. Unused channels are those not specified in keep_channels, or the first channel.

Parameters:
  • keep_channels (boolean or int or str or tuple) – If False, removes all but the first channel. If int or str, removes all but that index/name channel. If tuple, removes all channels except those in the tuple by index or name. Default is True: do not delete channels
  • verbose (boolean) – Toggle talkback. Default is True.