act.qc.unset_bit#
- act.qc.unset_bit(array, bit_number)[source]#
Function to remove a quality control bit given a scalar or array of values and a bit number.
- Parameters:
array (int list of int or numpy array) – Array of integers containing bit packed numbers.
bit_number (int) – Bit number to remove starting at 1.
- Returns:
array (int or numpy array) – Returns same data type as array entered with bit removed. Will fail gracefully if the bit requested to be removed was not set.
Examples
from act.qc.qcfilter import set_bit, unset_bit data = set_bit([0, 1, 2, 3, 4], 2) data = set_bit(data, 3) print(data) [6, 7, 6, 7, 6] data = unset_bit(data, 2) print(data) [4, 5, 4, 5, 4]