#!/usr/bin/env python3 # # Convert a given bladeRF CSV samples file to SC16Q11 binary format. # import csv import struct import sys from pathlib import Path def csv2bin( csvfile = None, binfile = None ): with open(csvfile, 'r') as c: with open(binfile, 'wb') as b: csvreader = csv.reader(c, delimiter=',') count = 0 for row in csvreader: for col in row: # Little endian 16-bit integers (shorts) b.write( struct.pack("