Skip to content

Commit

Permalink
Update ibadatfile.py
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
MoPrince authored Sep 17, 2024
1 parent 42df0a0 commit 845f437
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ibadatfile/ibadatfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down

0 comments on commit 845f437

Please sign in to comment.