class_docstr: File handler for surface reflectance files with optional vegetation indexes.
class_docstr_tok: ["File","handler","for","surface","reflectance","files","with","optional","vegetation","indexes","."]
code: def _get_veg_index_good_mask(self) -> da.Array:
      # each mask array should be TRUE when pixels are UNACCEPTABLE
      qf1 = self.nc["QF1 Surface Reflectance"]
      has_sun_glint = (qf1 & 0b11000000) > 0
      is_cloudy = (
          qf1 & 0b00001100
      ) > 0  # mask everything but "confident clear"
      cloud_quality = (qf1 & 0b00000011) < 0b10
  
      qf2 = self.nc["QF2 Surface Reflectance"]
      has_snow_or_ice = (qf2 & 0b00100000) > 0
      has_cloud_shadow = (qf2 & 0b00001000) > 0
      water_mask = qf2 & 0b00000111
      has_water = (water_mask <= 0b010) | (
          water_mask == 0b101
      )  # shallow water, deep ocean, arctic
  
      qf7 = self.nc["QF7 Surface Reflectance"]
      has_aerosols = (
          qf7 & 0b00001100
      ) > 0b1000  # high aerosol quantity
      adjacent_to_cloud = (qf7 & 0b00000010) > 0
  
      bad_mask = (
          has_sun_glint
          | is_cloudy
          | cloud_quality
          | has_snow_or_ice
          | has_cloud_shadow
          | has_water
          | has_aerosols
          | adjacent_to_cloud
      )
      # upscale from M-band resolution to I-band resolution
      bad_mask_iband_dask = bad_mask.data.repeat(2, axis=1).repeat(
          2, axis=0
      )
      return ~bad_mask_iband_dask
  
imports: from __future__ import annotations
  import logging
  from typing import Iterable
  import dask.array
  import xarray
  from satpy import DataID
  from satpy.readers.file_handlers import BaseFileHandler
  from satpy.utils import get_chunk_size_limit
label_desc: Use image node_id 3 for calling the VIIRSSurfaceReflectanceWithVIHandler obj's underlying member method code with example usage: obj._get_veg_index_good_mask() and returns: unknown