alihaydaroglu / suite3d

Fast, accurate, volumetric cell detection. Developed for Light Beads Microscopy, usable for other volumetric 2P. In development
6 stars 0 forks source link

channel ordering issues #18

Closed alihaydaroglu closed 1 year ago

alihaydaroglu commented 1 year ago
alihaydaroglu commented 1 year ago

should be fixed here: https://github.com/alihaydaroglu/s2p-lbm/commit/19165523ac0c6f4a681d5dbd5e50741790fd48d7 @oterocoronel try with job.params['convert_plane_ids_to_channel_ids'] = False for 15 plane recordings.

If you want to re-sort the channels in a custom way, change the 'planes' param

oterocoronel commented 1 year ago

Tried this, and it runs but it is only getting half the frames per file. I noticed when registering files of a known length of 100 frames each and reading this:

Saving registered file of shape (15, 50, 1314, 1314)

I think the issue is in load_and_stitch_full_tif_mp() in lbm.py with this line:

tiffile = tiffile.reshape(int(n_t_ch/30.0), 30, n1,n2)

Also, it seems like it would be safe to delete this line:

n_ch_overwrite = 30 since this variable is not being used

alihaydaroglu commented 1 year ago

Ah thanks for debugging that. Try now, there is a job.params['n_ch_tif'] parameter that determines how many channels exist in your recording. You should set that to 15 and it should work. You can leave convert_plane_ids_to_channel_ids as default, because it will ignore that parameter if you don't have exactly 30 planes.

alihaydaroglu commented 1 year ago

Hopefully that addresses everything... I can't find other hard-coded assumptions of 30 planes but there may be

alihaydaroglu commented 1 year ago

@oterocoronel if you haven't run into related issues with the latest versions I will close this