mtspec icon indicating copy to clipboard operation
mtspec copied to clipboard

tinvit error -2

Open jessecob13 opened this issue 5 years ago • 6 comments

Hello, getting an error called "tinvit error -2" and kicks me out of python3.

Can't find much about it anywhere, any one come across this before?

jessecob13 avatar Jun 13 '19 16:06 jessecob13

What platform are you running on? tinvit is a lapack function and mtspec does not directly link against lapack. scipy does though, so maybe something is wrong with your scipy installation? This is just a very uneducated guess...

krischer avatar Jun 13 '19 21:06 krischer

uneducated guess

wow, that's even worse than an educated guess ;-P

megies avatar Jun 14 '19 08:06 megies

It is certainly an issue with mtspec, as I have isolated it the problem.

jessecob13 avatar Jun 14 '19 10:06 jessecob13

I'm experiencing the same issue with: mtspec.mtspec(data=[2, 0, 10, 2, 1, 3, 0, 0, 6, 1, 42, 120, 14, 10, 4], delta=1, time_bandwidth=2, number_of_tapers=4, nfft=1024)

ncrnalab avatar Jun 14 '19 11:06 ncrnalab

Thank you ncrnalab. Mine is this : band_width = 2.5 k = int(2*band_width - 1) mtspec(in_data, sample_rate, band_width, number_of_tapers=k, quadratic=False, adaptive=True)

in_data, sample_rate are nothing too crazy, but working for ... 99% of the time with the same type of data,

jessecob13 avatar Jun 14 '19 11:06 jessecob13

Okay, I have narrowed it done. Something a bit stupid on my part was letting through small data lengths, and that crashes the whole thing with no warning. Looks somewhere in the Fotran code documented on these pages:

https://ocefpaf.github.io/python4oceanographers/blog/2015/01/26/fortran/

http://physics.bk.psu.edu/codes/eiggen.f

There's also a C implementation that might be nicer. I don't know much about this stuff: http://oalib.hlsresearch.com/Modes/Krak_mat/trivec.c

But yeah, for me I got around it by not passing small data lengths but exactly why, I don't know.

jessecob13 avatar Jun 14 '19 13:06 jessecob13