Skip to content

Commit

Permalink
added interpolation for force and impedance data
Browse files Browse the repository at this point in the history
  • Loading branch information
DrRobsAT committed Apr 16, 2024
1 parent 42aeca4 commit 233a5b5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pyceps/datatypes/study.py
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,8 @@ def interpolate_data(self, which):
Parameters:
which : str
parameter to interpolate, options: ['uni', 'bip', 'act']
parameter to interpolate
options: ['uni', 'bip', 'lat', 'imp', 'frc']
Raises:
KeyError : If parameter to interpolate is unknown
Expand Down Expand Up @@ -609,6 +610,10 @@ def interpolate_data(self, which):
data = np.asarray([p.bipVoltage for p in valid_points])
elif which.lower() == 'uni':
data = np.asarray([p.uniVoltage for p in valid_points])
elif which.lower() == 'imp':
data = np.asarray([p.impedance for p in valid_points])
elif which.lower() == 'frc':
data = np.asarray([p.force for p in valid_points])
else:
raise KeyError()

Expand Down
2 changes: 2 additions & 0 deletions pyceps/fileio/cartoio.py
Original file line number Diff line number Diff line change
Expand Up @@ -1194,6 +1194,8 @@ def import_map(self, egm_names_from_pos=False):
self.interpolate_data('lat')
self.interpolate_data('bip')
self.interpolate_data('uni')
self.interpolate_data('imp')
self.interpolate_data('frc')
self.bsecg = self.get_map_ecg(method=['median', 'mse', 'ccf'])

def load_mesh(self):
Expand Down

0 comments on commit 233a5b5

Please sign in to comment.