make_setter¶
-
baseband.vlbi_base.header.
make_setter
(word_index, bit_index, bit_length, default=None)[source] [edit on github]¶ Construct a function that uses a value to set specific bits in a header.
The function will act on a tuple/array of words, setting given bits from a given word using a value.
The parameters are just those that define header keywords.
Parameters: word_index : int
Index into the tuple of words passed to the function.
bit_index : int
Index to the starting bit of the part to be extracted.
bit_length : int
Number of bits to be extracted.
default : int or bool or None
Possible default value to use in function if no default is passed on.
Returns: setter : function
To be used as
setter(words, value)
.