MCPcopy Create free account
hub / github.com/IQEngine/IQEngine / get_bytes_per_iq_sample

Function get_bytes_per_iq_sample

api/rf/samples.py:51–73  ·  view source on GitHub ↗

Get the number of bytes per I+Q sample. Parameters ---------- data_type : str The data type of the bytes. Returns ------- int The number of bytes per I+Q sample.

(data_type)

Source from the content-addressed store, hash-verified

49
50
51def get_bytes_per_iq_sample(data_type):
52 """
53 Get the number of bytes per I+Q sample.
54
55 Parameters
56 ----------
57 data_type : str
58 The data type of the bytes.
59
60
61 Returns
62 -------
63 int
64 The number of bytes per I+Q sample.
65 """
66 if data_type == "cf32_le" or data_type == "cf32" or data_type == "cf32_be":
67 return 8
68 elif data_type == "ci16_le" or data_type == "ci16" or data_type == "ci16_be":
69 return 4
70 elif data_type == "ci8" or data_type == "i8":
71 return 2
72 else:
73 raise ValueError("Datatype " + data_type + " not implemented")

Callers 3

syncFunction · 0.90
get_iq_dataFunction · 0.90
get_minimap_iqFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected