code: def _get_reflectance(self, projectables, optional_datasets):
          
          _nir, _tb11 = projectables
          LOG.info('Getting reflective part of %s', _nir.attrs['name'])
  
          sun_zenith = None
          tb13_4 = None
  
          for dataset in optional_datasets:
              wavelengths = dataset.attrs.get('wavelength', [100., 0, 0])
              if (dataset.attrs.get('units') == 'K' and
                      wavelengths[0] <= 13.4 <= wavelengths[2]):
                  tb13_4 = dataset
              elif ("standard_name" in dataset.attrs and
                    dataset.attrs["standard_name"] == "solar_zenith_angle"):
                  sun_zenith = dataset
  
          # Check if the sun-zenith angle was provided:
          if sun_zenith is None:
              if sun_zenith_angle is None:
                  raise ImportError("No module named pyorbital.astronomy")
              lons, lats = _nir.attrs["area"].get_lonlats_dask(CHUNK_SIZE)
              sun_zenith = sun_zenith_angle(_nir.attrs['start_time'], lons, lats)
  
          return self._refl3x.reflectance_from_tbs(sun_zenith, _nir, _tb11, tb_ir_co2=tb13_4)
docs: Calculate 3.x reflectance with pyspectral.