cortex-lab / Suite2P

Tools for processing 2P recordings
Other
120 stars 65 forks source link

using "look_one_level_down" doesn't use "bad_frames.npy" #174

Closed hwpdalgleish closed 4 years ago

hwpdalgleish commented 4 years ago

Hey both,

I'm loving Python Suite2P - especially the bad_frames functionality for removing photostim artifacts! However, it appears it doesn't work when using the look_one_level_down flag. For the below setup, with look_one_level_down = 1: -> data_path ---> bad_frames.npy ---> directory 1: multi-page tif ---> directory 2: multi-page tif

I want the multi-page tiffs in directory 1 & 2 to be registered and processed together, with bad_frames excluded. The result is this: s2p_PhotostimROIs

However, if I then use this setup with look_one_level_down = 0: -> data_path ---> bad_frames.npy ---> multi-page tif ---> multi-page tif

Then the result is this: s2p_noPhotostimROIs

You can see in the first images (look_one_level_down = 1) there are some ROIs (particularly in the bottom left corner of the neuropil on the right) that have this vertical banding structure that is characteristic of our 2P photostimulation artefact. No such ROIs exist in the second image (look_one_level_down = 0).

Am I misunderstanding how to use bad_frames in this condition? If so could you let me know how to use it?

Cheers, Henry