def are_signals_aligned(*args): if len(args) < 2: raise ValueError( "This function requires at least two signal instances") args = list(args) am = args.pop().axes_manager while args: amo = args.pop().axes_manager if not (are_aligned(am.signal_shape[::-1], amo.signal_shape[::-1]) and are_aligned(am.navigation_shape[::-1], amo.navigation_shape[::-1])): return False return True
def are_signals_aligned(*args, ignore_axis=None): if len(args) < 2: raise ValueError( "This function requires at least two signal instances") args = list(args) am = args.pop().axes_manager sigsh, navsh = _get_shapes(am, ignore_axis) while args: amo = args.pop().axes_manager sigsho, navsho = _get_shapes(amo, ignore_axis) if not (are_aligned(sigsh[::-1], sigsho[::-1]) and are_aligned(navsh[::-1], navsho[::-1])): return False return True