spectral icon indicating copy to clipboard operation
spectral copied to clipboard

envi file containing complex values

Open Nipouradar1995 opened this issue 3 years ago • 3 comments

hello I've just started to work with SPy to read envi files which contains complex values ,after runing this code 1 i got this parameter 2 all seems okey because my envi header file is : dtype=6 which refer to 32*2 complex 3 but when i checked the values of the array i noticed that it contains just the real parts and the complex part is 0
5 which is different from what i got with IDL , here is some values of the first column which contain real and imaginary part 6 so there is something wrong on my code or SPy dont support the files which contains complex value. thanks in advance .

Nipouradar1995 avatar Apr 04 '22 12:04 Nipouradar1995

I've never processed complex images with SPy but it seems like it should be possible. What happens if you modify your code to replace img.load() with img.load(dtype=np.csingle)?

tboggs avatar Apr 04 '22 18:04 tboggs

thank you a lot ... it works with your modification .

Nipouradar1995 avatar Apr 05 '22 09:04 Nipouradar1995

Great. I'll update the code so the correct dtype is automatically used for complex data types.

tboggs avatar Apr 07 '22 01:04 tboggs