Skip to content

BUG: Output overwrite when saving reg_tiff for 2 channels #1208

@arthurgodino

Description

@arthurgodino

Describe the issue:

Hello dev team,

First, thank you for the new version, loving it!

I believe I caught a minor bug. When running suite2p using 2 channels and saving reg_tiff for both channels (ie, in reg_tiff and reg_tiff_chan2), I noticed that the second step (chan2 registration) was overwriting the reg_tiff files from chan1 in the reg_tiff folder instead of writing the chan2 files in the reg_tiff_chan2 folder. The reg_tiff_chan2 folder is created but the tiff writing process appears to use the wrong saving path. I can see the overwriting happening in real time when looking at the output folder while suite2p is running the second-channel registration.

After a quick look at the code, I believe the issue might be a wrong TIFF root passed for channel 2. ​In registration_wrapper (l.954-956 of register.py), the second channel is saved with tif_root=tif_root_align instead of maybe tif_root=tif_root_alt in the shift_frames_and_write call? But I might be completely wrong on this.

Lmk if you need me to share a reproducible example or if you need any additional info.
I've run into this issue with nchannels=2, functional_chan=1, align_by_chan2=FALSE and input_format="bruker", although I don't think this will be relevant.

Thanks in advance!

Reproduce the code example:

not so much a code error/issue.
Related to register.py source code.

Example input dataset used to reproduce the issue:

No response

Error message:

Version information:

suite2p v1.0.0.1

Context for the issue:

Although ROI detection and fluorescence extraction appears unaffected, I need to use the registered reg_tiff files/movies for subsequent, independent analyses.

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