S/N比で検証する
Calculator.snr() は スパイク振幅 / 静穏区間のノイズRMS を返します。
def snr(peak_index: Peaks64, ch: int, noise_window: float = 0.015) -> float
生データと各プリセットを並べて、自分のデータで最良の手法を選びます。
for name, filter_type in [
("raw", FilterType.NONE),
("cardio_denoise", FilterType.CARDIO_DENOISE),
("cardio_denoise_weak", FilterType.CARDIO_DENOISE_WEAK),
]:
mea = read_MEA(hed_path, start, end, electrode_distance, filter_type)
peak_index = detect_peak_neg(mea.data)
snr = mea.calculator.snr(peak_index, ch=6)
print(f"{name:20s} S/N={snr:6.2f} 検出数={len(peak_index[6])}")