You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
outlines for functions to reverse unpack_to_array and unpack_to_dict()
def pack_from_dict(flag_dict, product, num_bits):
"""
Where keys are flag names, values are arrays all the same shape.
product is a custom product spec. num_bits should be 8,16, or 32
"""
qa_array = np.empty(shaped like input, dtyp = product[numbits])
for flag in products:
if 1 bit:
qa_array[flag_bit] = qa_dict[flag]
if > 1 bit:
# ie. take an array of possible values 0,1,2,3 and convert to two bits.
temp_qa_array = unpackbits(qa_dict(flag))
for ii in bits:
qa_array[flag_bit] = temp_qa_array[flag_bit] # or something like that
The text was updated successfully, but these errors were encountered:
outlines for functions to reverse unpack_to_array and unpack_to_dict()
The text was updated successfully, but these errors were encountered: