Commit adeccd99 authored by Anika Treffehn's avatar Anika Treffehn
Browse files

fix problem for delay not divisible by three

parent 563b3e14
Loading
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -212,6 +212,10 @@ def delay_compensation(
    d_samples = get_delay_flt_type(flt_type, up, down)

    # Delay compensation
    if flt_type == "SHQ3" and up:
        # delay not divisible by 3
        d_samples += 2

    x = x[d_samples:, :]

    return x
@@ -231,7 +235,7 @@ def get_delay_flt_type(flt_type, up, down, before=False):
    elif flt_type == "SHQ3" and up:
        d_samples = DELAY_COMPENSATION_FOR_FILTERING["SHQ3"]["up"]
        if before:
            d_samples = int(d_samples / 3)
            d_samples = int(np.ceil(d_samples / 3))
    elif flt_type == "SHQ3" and down:
        d_samples = DELAY_COMPENSATION_FOR_FILTERING["SHQ3"]["down"]
        if before: