docs: def sb_vgp_calc(dataframe, site_correction='yes', dec_tc='dec_tc', inc_tc='inc_tc'):
      """
      This function calculates the angular dispersion of VGPs and corrects
      for within site dispersion (unless site_correction = 'no') to return
      a value S_b. The input data needs to be within a pandas Dataframe.
  
      Parameters
      -----------
      dataframe : the name of the pandas.DataFrame containing the data
  
      the data frame needs to contain these columns:
      dataframe['site_lat'] : latitude of the site
      dataframe['site_lon'] : longitude of the site
      dataframe['k'] : fisher precision parameter for directions
      dataframe['vgp_lat'] : VGP latitude
      dataframe['vgp_lon'] : VGP longitude
      ----- the following default parameters can be changes by keyword argument -----
      dataframe['inc_tc'] : tilt-corrected inclination
      dataframe['dec_tc'] : tilt-corrected declination
  
      plot : default is 'no', will make a plot of poles if 'yes'
      """
  
      # calculate the mean from the directional data
      dataframe_dirs = []
      for n in range(0, len(dataframe)):
          dataframe_dirs.append([dataframe[dec_tc][n],
                                 dataframe[inc_tc][n], 1.])
      dataframe_dir_mean = pmag.fisher_mean(dataframe_dirs)
  
      # calculate the mean from the vgp data
      dataframe_poles = []
      dataframe_pole_lats = []
      dataframe_pole_lons = []
      for n in range(0, len(dataframe)):
          dataframe_poles.append([dataframe['vgp_lon'][n],
                                  dataframe['vgp_lat'][n], 1.])
          dataframe_pole_lats.append(dataframe['vgp_lat'][n])
          dataframe_pole_lons.append(dataframe['vgp_lon'][n])
      dataframe_pole_mean = pmag.fisher_mean(dataframe_poles)
  
      # calculate mean paleolatitude from the directional data
      dataframe['paleolatitude'] = lat_from_inc(dataframe_dir_mean['inc'])
  
      angle_list = []
      for n in range(0, len(dataframe)):
          angle = pmag.angle([dataframe['vgp_lon'][n], dataframe['vgp_lat'][n]],
                             [dataframe_pole_mean['dec'], dataframe_pole_mean['inc']])
          angle_list.append(angle[0])
      dataframe['delta_mean_pole'] = angle_list
  
      if site_correction == 'yes':
          # use eq. 2 of Cox (1970) to translate the directional precision parameter
          # into pole coordinates using the assumption of a Fisherian distribution in
          # directional coordinates and the paleolatitude as calculated from mean
          # inclination using the dipole equation
          dataframe['K'] = old_div(dataframe['k'], (0.125 * (5 + 18 * np.sin(np.deg2rad(dataframe['paleolatitude']))**2
                                                             + 9 * np.sin(np.deg2rad(dataframe['paleolatitude']))**4)))
          dataframe['Sw'] = old_div(81, (dataframe['K']**0.5))
  
          summation = 0
          N = 0
          for n in range(0, len(dataframe)):
              quantity = dataframe['delta_mean_pole'][n]**2 - \
                  old_div(dataframe['Sw'][n]**2, dataframe['n'][n])
              summation += quantity
              N += 1
  
          Sb = ((old_div(1.0, (N - 1.0))) * summation)**0.5
  
      if site_correction == 'no':
  
          summation = 0
          N = 0
          for n in range(0, len(dataframe)):
              quantity = dataframe['delta_mean_pole'][n]**2
              summation += quantity
              N += 1
  
          Sb = ((old_div(1.0, (N - 1.0))) * summation)**0.5
  
      return Sb