Skip to content
Snippets Groups Projects
Commit ef2920ae authored by Daniel Meißner's avatar Daniel Meißner Committed by Daniel Meißner
Browse files

added gr scripts directory for temporarily work

parent 76a1b0d0
No related branches found
No related tags found
No related merge requests found
#!/usr/bin/env python2.7
# -*- encoding: utf-8 -*-
import scipy
import pmt
from gnuradio.blocks import parse_file_metadata
# convert file into pynum array
f = scipy.fromfile(open("one_sample.iq"), dtype=scipy.complex64)
# extract header information
handle = open("one_sample.iq", "rb")
hdr_start = handle.tell()
header_str = handle.read(parse_file_metadata.HEADER_LENGTH)
header = pmt.deserialize_str(header_str)
print(f.__class__)
print(header.__class__)
print(header)
for i in f.flat:
print("I: %s Q: %s" % (i.real, i.imag))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment