flatironinstitute / CaImAn

Computational toolbox for large scale Calcium Imaging Analysis, including movie handling, motion correction, source extraction, spike deconvolution and result visualization.
https://caiman.readthedocs.io
GNU General Public License v2.0
640 stars 370 forks source link

RuntimeWarning: invalid value encountered in divide #1426

Open clee162 opened 6 days ago

clee162 commented 6 days ago
  1. Operating System (Linux, MacOS, Windows): Linux
  2. Hardware type (x86, ARM..) and RAM: x86, 376 GB RAM
  3. Python Version (e.g. 3.9): 3.10.15
  4. Caiman version (e.g. 1.9.12): 1.11.3 How you installed Caiman (pure conda, conda + compile, colab, ..): conda
  5. Details:

During the CNMF fitting step, the following warnings are printed. Everything continues to run and the results appear to be normal. I am using Scipy version 1.14.1, could this be a version compatibility issue? Thank you for your help!

/usr/local/bin/anaconda3/envs/caiman-1-11-3/lib/python3.10/site-packages/caiman/base/rois.py:60: RuntimeWarning: invalid value encountered in divide cm = (coor @ A / A.sum(axis=0)).T /usr/local/bin/anaconda3/envs/caiman-1-11-3/lib/python3.10/site-packages/scipy/ndimage/_measurements.py:1541: RuntimeWarning: invalid value encountered in scalar divide results = [sum(input grids[dir].astype(float), labels, index) / normalizer /usr/local/bin/anaconda3/envs/caiman-1-11-3/lib/python3.10/site-packages/caiman/base/rois.py:60: RuntimeWarning: invalid value encountered in divide cm = (coor @ A / A.sum(axis=0)).T /usr/local/bin/anaconda3/envs/caiman-1-11-3/lib/python3.10/site-packages/scipy/ndimage/_measurements.py:1541: RuntimeWarning: invalid value encountered in scalar divide results = [sum(input grids[dir].astype(float), labels, index) / normalizer /usr/local/bin/anaconda3/envs/caiman-1-11-3/lib/python3.10/site-packages/caiman/base/rois.py:60: RuntimeWarning: invalid value encountered in divide cm = (coor @ A / A.sum(axis=0)).T /usr/local/bin/anaconda3/envs/caiman-1-11-3/lib/python3.10/site-packages/scipy/ndimage/_measurements.py:1541: RuntimeWarning: invalid value encountered in scalar divide results = [sum(input grids[dir].astype(float), labels, index) / normalizer /usr/local/bin/anaconda3/envs/caiman-1-11-3/lib/python3.10/site-packages/caiman/base/rois.py:60: RuntimeWarning: invalid value encountered in divide cm = (coor @ A / A.sum(axis=0)).T /usr/local/bin/anaconda3/envs/caiman-1-11-3/lib/python3.10/site-packages/scipy/ndimage/_measurements.py:1541: RuntimeWarning: invalid value encountered in scalar divide results = [sum(input grids[dir].astype(float), labels, index) / normalizer

kushalkolar commented 6 days ago

that means there's a nan or infinity somewhere in that division, if your results look fine it's probably fine, you can usually ignore warnings.