Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpticalTrackingRead shape reading error #6

Open
ikharitonov opened this issue Jun 25, 2024 · 0 comments
Open

OpticalTrackingRead shape reading error #6

ikharitonov opened this issue Jun 25, 2024 · 0 comments

Comments

@ikharitonov
Copy link

Hello,

Having trouble when trying to read binary files from H1, in particular HarpDataH1_46_*.bin
Trying to do:

harp_reader = harp.create_reader('h1-device.yml', epoch=harp.REFERENCE_EPOCH)
data = harp_reader.OpticalTrackingRead.read('/path/to/2024-05-07T15-22-53/HarpDataH1/HarpDataH1_46_1904-01-01T00-00-00.bin')

Getting an error from pandas package:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/ikharitonov/anaconda3/envs/aeon/lib/python3.12/site-packages/harp/reader.py", line 162, in reader
    data = read(
           ^^^^^
  File "/home/ikharitonov/anaconda3/envs/aeon/lib/python3.12/site-packages/harp/io.py", line 122, in read
    result = pd.DataFrame(payload, index=index, columns=columns)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ikharitonov/anaconda3/envs/aeon/lib/python3.12/site-packages/pandas/core/frame.py", line 827, in __init__
    mgr = ndarray_to_mgr(
          ^^^^^^^^^^^^^^^
  File "/home/ikharitonov/anaconda3/envs/aeon/lib/python3.12/site-packages/pandas/core/internals/construction.py", line 336, in ndarray_to_mgr
    _check_values_indices_shape_match(values, index, columns)
  File "/home/ikharitonov/anaconda3/envs/aeon/lib/python3.12/site-packages/pandas/core/internals/construction.py", line 420, in _check_values_indices_shape_match
    raise ValueError(f"Shape of passed values is {passed}, indices imply {implied}")
ValueError: Shape of passed values is (3730, 6), indices imply (3730, 1)

Probably not an issue with the data, as it has been successfully read here

@glopesdev glopesdev transferred this issue from harp-tech/harp-python Jun 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant