aspcore.utilities.block_process_idxs

aspcore.utilities.block_process_idxs(num_samples: int, block_size: int, overlap: int, start_idx=0)

Yields the starting index for each block, for block processing a signal

Parameters:
  • num_samples (int) – total number of samples for the signal that should be processed

  • block_size (int) – the size of each of the blocks

  • overlap (int) – the amount each block should be overlapped at the output

  • start_idx (int) – can be supplied if the processing should start at another place of the original signal than idx = 0

Yields:

idx (int) – can be used to get your block as signal[…, idx:idx + block_size]