Skip to content
Snippets Groups Projects
spectrogram.py 490 B
#!/usr/bin/env python2.7
# -*- encoding: utf-8 -*-

import math
import numpy as np
from pylab import plot,show,subplot,specgram

from scipy.fftpack import fft, ifft

file_path = "/home/meise/tmp/iq_dumps/enocean/868_2m_enocean.iq"

# convert file into pynum array and use a memory map
data = np.memmap(open(file_path), mode="r", dtype=np.complex64)

print(data.__class__)
print("samples: %s" % len(data))

specgram(abs(data), NFFT=262144, noverlap=0, mode='default') # small window

show()