Skip to content

NeoMatlabIO doesn't save groups and imagesequences to .mat #1358

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

Closed
vonaviv opened this issue Dec 5, 2023 · 2 comments · Fixed by #1386
Closed

NeoMatlabIO doesn't save groups and imagesequences to .mat #1358

vonaviv opened this issue Dec 5, 2023 · 2 comments · Fixed by #1386
Labels

Comments

@vonaviv
Copy link

vonaviv commented Dec 5, 2023

Describe the bug
I created a block (recording session) with multiple segments (trials), which include multiple spike-trains and one image sequence. After saving in .mat format and later reloading it there are no image sequence entries.
Also, I created a group for each channel which were assigned to the block as parent. They are also not retrieved.
If I open .mat file in Matlab there are no groups and image sequences as well.

To Reproduce
from neo.io import NeoMatlabIO

session # "session" is a block with multiple segments with image sequences.
session .groups # has 128 groups
session.segments[0].imagesequences # a list with one ImageSequence()

w = NeoMatlabIO(filename)
w.write_block(session)

r = NeoMatlabIO(filename)
session = r.read_block()

session.segments[0].imagesequences # empty list
session .groups # empty list

Expected behaviour
The groups and image sequences are retrieved.

Environment:

  • OS: Linux (pop os)
  • Python 3.11.3
  • Neo version 0.12.0
  • NumPy version 1.24.3

Additional context

@vonaviv vonaviv added the bug label Dec 5, 2023
@apdavison
Copy link
Member

Thank you for this report.

Indeed, NeoMatlabIO has not been updated to handle recent additions to Neo.

(The attribute NeoMatlabIO.supported_objects contains [Block, Segment, AnalogSignal, IrregularlySampledSignal, Epoch, Event, SpikeTrain], from which Group and ImageSequence are missing, so this is a known problem).

Any volunteers to make the necessary changes?

@zm711
Copy link
Contributor

zm711 commented Dec 5, 2023

I linked a PR that can be reviewed to fix this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants