kymata-atlas / kymata-core

Core Kymata codebase, including statistical analysis and plotting tools
https://kymata.org
MIT License
5 stars 0 forks source link

"top 5 channels" figures from gridsearch are sometimes empty #303

Open caiw opened 2 months ago

caiw commented 2 months ago

Good: ciecam02_a_gridsearch_top_five_channels

Bad: heeger_2000hz_GPcomb_pos_gridsearch_top_five_channels

neukym commented 1 month ago

I believe the blank version is caused by this error in the .trace.txt

kymata-core/kymata/math/vector.py:10: RuntimeWarning: divide by zero encountered in divide
  x /= np.sqrt(np.sum(x**2, axis=-1, keepdims=True))
kymata-core/kymata/math/vector.py:10: RuntimeWarning: invalid value encountered in divide
  x /= np.sqrt(np.sum(x**2, axis=-1, keepdims=True))
~/.cache/pypoetry/virtualenvs/kymata-core-9z-PYDBX-py3.11/lib/python3.11/site-packages/numpy/core/_methods.py:118: RuntimeWarning: invalid value encountered in reduce
  ret = umr_sum(arr, axis, dtype, out, keepdims, where=where)
kymata-core/kymata/entities/sparse_data.py:37: RuntimeWarning: All-NaN slice encountered
  channel_min = nanmin(log_pmatrix, axis=1)
kymata-core/kymata/entities/expression.py:127: UserWarning: Supplied data contained nans. These will be replaced by p = 1 values.
  warn("Supplied data contained nans. These will be replaced by p = 1 values.")
kymata-core/kymata/entities/sparse_data.py:37: RuntimeWarning: All-NaN slice encountered
  channel_min = nanmin(log_pmatrix, axis=1)

I'm not exactly sure which cause the issue.