Helper functions

Helper functions#

shift_freq(x: Array, offsets: Dict[str, float], /) Array[source]#

Cyclically shift the Array by a frequency offset via multiplication with a phase factor in position space: \(f \mapsto f - \text{offsets}\).

This operation does not change the domain, it only shifts the values.

Parameters:
  • x (Array) – The initial Array.

  • offsets (Dict[str, float]) – The frequency shift for each shifted dimension by name.

Returns:

The Array with its contents shifted in frequency space.

Return type:

Array

shift_pos(x: Array, offsets: Dict[str, float]) Array[source]#

Cyclically shift the Array by a position offset via multiplication with a phase factor in frequency space: \(x \mapsto x - \text{offsets}\).

This operation does not change the domain, it only shifts the values.

Parameters:
  • x (Array) – The initial Array.

  • offsets (Dict[str, float]) – The position shift for each shifted dimension by name.

Returns:

The Array with its contents shifted in position space.

Return type:

Array