Skip to content

Commit

Permalink
Using sensor was static, added flexibility by changing to prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
Erikpostt committed Dec 16, 2024
1 parent a39d461 commit 4efdafb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/paradigma/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,10 @@ def read_metadata(
metadata_values = metadata_dict[values_filename]
return metadata_time, metadata_values

def load_tsdf_dataframe(path_to_data, prefix):
meta_filename = f"{prefix}_meta.json"
time_filename = f"{prefix}_time.bin"
values_filename = f"{prefix}_values.bin"
def load_tsdf_dataframe(path_to_data, prefix, meta_suffix='meta.json', time_suffix='time.bin', values_suffix='values.bin'):
meta_filename = f"{prefix}_{meta_suffix}"
time_filename = f"{prefix}_{time_suffix}"
values_filename = f"{prefix}_{values_suffix}"

metadata_time, metadata_values = read_metadata(path_to_data, meta_filename, time_filename, values_filename)
df = tsdf.load_dataframe_from_binaries([metadata_time, metadata_values], tsdf.constants.ConcatenationType.columns)
Expand Down

0 comments on commit 4efdafb

Please sign in to comment.