From 14bf2eaf50d347a3d570e7f54335888d740b363f Mon Sep 17 00:00:00 2001 From: Ewald de Wit Date: Thu, 15 Dec 2022 14:04:40 +0100 Subject: [PATCH] Ignore extra columns in microphone calibration files, fixes #14 --- hifiscan/io_.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hifiscan/io_.py b/hifiscan/io_.py index 135c4ec..70de598 100644 --- a/hifiscan/io_.py +++ b/hifiscan/io_.py @@ -93,7 +93,7 @@ def read_correction(path: str) -> Correction: with open(path, 'r') as f: for line in f.readlines(): try: - freq, db = line.split(',' if ',' in line else None) + freq, db, *_ = line.split(',' if ',' in line else None) corr.append((float(freq), float(db))) except ValueError: pass