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

change n_init_files to n_init_frames in the initial pass #5

Closed jmmanley closed 1 year ago

jmmanley commented 1 year ago

In order to make the initial pass more stable across various file sizes, would be ideal to input a desired number of frames n_init_frames instead of n_init_files.

If too many frames are used, job.run_init_pass() can run out of memory when computing plane_std https://github.com/alihaydaroglu/suite2p/blob/8814021db46d6d63236697907d7596e99f86e817/suite2p/suite3d/init_pass.py#L142

Hotfix: 'plane_std' : init_mov.std(axis=(1,2,3), dtype=job.params['dtype']), and use job.params['dtype']=n.float32 to lower the memory demand (numpy defaults to float64).

alihaydaroglu commented 1 year ago

Fixed here on commit https://github.com/alihaydaroglu/suite2p/commit/ca3001a635e4c0622db291fb828e02cb7f3137e8: https://github.com/alihaydaroglu/suite2p/blob/fd04952d0804fc1510286c518582c897ef6e2843/suite2p/suite3d/init_pass.py#L106