aolabNeuro / analyze

Code for specific analysis computations on processed data (e.g. spectral coherence)
MIT License
7 stars 0 forks source link

cryptic error message for plot_tfr #383

Open leoscholl opened 1 year ago

leoscholl commented 1 year ago

It sometimes complains

TypeError: Dimensions of C (10000, 160) should be one smaller than X(10000) and Y(160) while using shading='flat' see help(pcolormesh)

The culprit might be the shape of values is backwards from what is expected. We should check that C has shape (len(Y), len(X)) and make a warning if not. I think the shape can also be off by one and it's ok, it just uses centers instead of edges for shading.

leoscholl commented 1 year ago

also it should check for nans in the input, since the output will be all nans if there are any in the input