From 845f437a732d75e62f6d9249077ed91b901db0ab Mon Sep 17 00:00:00 2001 From: MoPrince <51728225+MoPrince@users.noreply.github.com> Date: Tue, 17 Sep 2024 16:53:56 -0500 Subject: [PATCH] Update ibadatfile.py Added the tbased method to get the sampling rate for each channel. This will help to interpolate between points in case someone has different sampling time in each channel. --- ibadatfile/ibadatfile.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ibadatfile/ibadatfile.py b/ibadatfile/ibadatfile.py index eaae470..62a714d 100644 --- a/ibadatfile/ibadatfile.py +++ b/ibadatfile/ibadatfile.py @@ -62,6 +62,11 @@ def pda_type(self) -> str: """Return the channel unit.""" return self.channel.QueryInfoByName("$PDA_Typ") + + def tbased(self): + """Return the channel sampling rate for each channel.""" + return float(self.channel.QueryInfoByName("$PDA_Tbase")) + def data(self) -> np.array: """Return the channel data.""" if self.channel.IsDefaultTimebased():