code: def _mask_invalid(self, data, header):
          
          invalid = da.logical_or(data == header['block5']["count_value_outside_scan_pixels"][0],
                                  data == header['block5']["count_value_error_pixels"][0])
          return da.where(invalid, np.float32(np.nan), data)
docs: Mask invalid data