Skip to content

Help needed for data formatting and Type errors when opening data from syntetic data repository #61

@utkb

Description

@utkb

Hello,

I wanted to examine synthetic data samples to open a data file I collected with the Delsys EMG device. However, I get the following error in synthetic data from resurfemg package.

Traceback (most recent call last):
  File "/home/utkb/resurfemg/resurfemg/lib/python3.12/site-packages/resurfemg_dashboard/callbacks_update_data.py", line 88, in toggle_modal
    emg_timeseries = EmgDataGroup(
                     ^^^^^^^^^^^^^
  File "/home/utkb/resurfemg/resurfemg/lib/python3.12/site-packages/resurfemg/data_connector/data_classes.py", line 1222, in __init__
    super().__init__(
  File "/home/utkb/resurfemg/resurfemg/lib/python3.12/site-packages/resurfemg/data_connector/data_classes.py", line 1070, in __init__
    new_timeseries = TimeSeries(
                     ^^^^^^^^^^^
  File "/home/utkb/resurfemg/resurfemg/lib/python3.12/site-packages/resurfemg/data_connector/data_classes.py", line 84, in __init__
    self.param['fs'] = int(1/(t_data[1:]-t_data[:-1]))
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: only length-1 arrays can be converted to Python scalars

And also, i can read this warnings from console:

Loaded .npy, extracting data ...
Warning: Metadata fs not found. Set it manually.
Warning: Metadata labels not found. Set it manually.
Warning: Metadata units not found. Set it manually.

I couldn't work out how to format my data before importing it, either. For example, where does the resurfacing package take labels from? Could you point me in the right direction?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions