aspcore.lowrank.decompose_ir

aspcore.lowrank.decompose_ir(ir, dims, rank)

Decomposes an IR into a Kronecker / Tensor product decomposition of rank rank.

Parameters:
  • ir (ndarray of shape (..., ir_len)) – The IR is assumed to be of shape (…, ir_len), where the product of dims must equal ir_len.

  • dims (tuple of ints) – the product of these values must equal ir_len

  • rank (int)

Returns:

  • ir_decomp (tuple of ndarrays which are shorter IRs, the i:th entry has shape (…, rank, dims[i]))

  • len(decomposed_ir) == len(dims)