Skip to content

BUG: io.save.combined() crashes with single-channel multi-plane data (meanImg_chan2 not defined) #1193

@ytsimon2004

Description

@ytsimon2004

Describe the issue:

When running Suite2p with single-channel input (nchannels: 1) and multiple planes (nplanes > 1) with "combined": true, the pipeline crashes during the combine step because meanImg_chan2 is referenced before assignment

Reproduce the code example:

suite2p.run_s2p(ops={
  "nchannels": 1,
  "nplanes": 4,
  "combined": true,
  ...
})

Error message:

File ".../site-packages/suite2p/io/save.py", line 181, in combined
    print(meanImg_chan2.shape)
UnboundLocalError: local variable 'meanImg_chan2' referenced before assignment

Version information:

0.14.6

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