hyperspy.misc.slicing module

class hyperspy.misc.slicing.FancySlicing

Bases: object

class hyperspy.misc.slicing.SpecialSlicers(obj, isNavigation)

Bases: object

hyperspy.misc.slicing.copy_slice_from_whitelist(_from, _to, dims, both_slices, isNav, order=None)

Copies things from one object to another, according to whitelist, slicing where required.

Parameters
  • _from (object) – Original object

  • _to (object) – Target object

  • dims (tuple) – (navigation_dimensions, signal_dimensions) of the original object that is sliced

  • both_slices (tuple) – (original_slices, array_slices) of the operation that is performed

  • isNav (bool) – if the slicing operation is performed on navigation dimensions of the object

  • order (tuple, None) – if given, performs the copying in the order given. If not all attributes given, the rest is random (the order a whitelist.keys() returns them). If given in the object, _slicing_order is looked up.