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

Axis out of bounds when reading trigger #447

Open
oesteban opened this issue May 3, 2023 · 0 comments
Open

Axis out of bounds when reading trigger #447

oesteban opened this issue May 3, 2023 · 0 comments
Labels
Bug Something isn't working

Comments

@oesteban
Copy link

oesteban commented May 3, 2023

Expected Behavior

Actual Behavior

/home/oesteban/.miniconda/lib/python3.9/site-packages/phys2bids/physio_obj.py:649: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray.
  channel_ts = np.array(self.timeseries[1:])
Traceback (most recent call last):
  File "/home/oesteban/.miniconda/bin/phys2bids", line 8, in <module>
    sys.exit(_main())
  File "/home/oesteban/.miniconda/lib/python3.9/site-packages/phys2bids/phys2bids.py", line 544, in _main
    phys2bids(**vars(options))
  File "/home/oesteban/.miniconda/lib/python3.9/site-packages/phys2bids/phys2bids.py", line 250, in phys2bids
    phys_in = load_acq(infile, chtrig)
  File "/home/oesteban/.miniconda/lib/python3.9/site-packages/phys2bids/io.py", line 376, in load_acq
    return BlueprintInput(timeseries, freq, names, units, chtrig)
  File "/home/oesteban/.miniconda/lib/python3.9/site-packages/phys2bids/physio_obj.py", line 254, in __init__
    self.auto_trigger_selection()
  File "/home/oesteban/.miniconda/lib/python3.9/site-packages/phys2bids/physio_obj.py", line 652, in auto_trigger_selection
    min_ts = np.min(channel_ts, axis=1)[:, None]
  File "<__array_function__ internals>", line 180, in amin
  File "/home/oesteban/.miniconda/lib/python3.9/site-packages/numpy/core/fromnumeric.py", line 2918, in amin
    return _wrapreduction(a, np.minimum, 'min', axis, None, out,
  File "/home/oesteban/.miniconda/lib/python3.9/site-packages/numpy/core/fromnumeric.py", line 86, in _wrapreduction
    return ufunc.reduce(obj, axis, dtype, out, **passkwargs)
numpy.AxisError: axis 1 is out of bounds for array of dimension 1
@oesteban oesteban added the Bug Something isn't working label May 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
Status: To Do
Development

No branches or pull requests

1 participant