code: def fit(R):
      ''' Fit skew - lognormal to the rate samples achived from a prior analysis
          Parameters
          ----------
          R: array
             Rate samples
          Returns
          -------
          ff[0]: float
              The skewness
          ff[1]: float
              The mean
          ff[2]: float
              The standard deviation
      '''
  
      lR = np.log(R)
      mu_norm, sigma_norm = np.mean(lR), np.std(lR)
  
      xs = np.linspace(min(lR), max(lR), 200)
      kde = ss.gaussian_kde(lR)
      pxs = kde(xs)
  
      # Initial guess has been taken as the mean and std-dev of the data
      # And a guess assuming small skewness
      ff = optimize.curve_fit(_optm, xs, pxs, p0 = [0.1, mu_norm, sigma_norm])[0]
      return ff[0], ff[1], ff[2f fit(R):
      ''' Fit skew - lognormal to the rate samples achived from a prior analysis
          Parameters
          ----------
          R: array
             Rate samples
          Returns
          -------
          ff[0]: float
              The skewness
          ff[1]: float
              The mean
          ff[2]: float
              The standard deviation
      '''
  
      lR = np.log(R)
      mu_norm, sigma_norm = np.mean(lR), np.std(lR)
  
      xs = np.linspace(min(lR), max(lR), 200)
      kde = ss.gaussian_kde(lR)
      pxs = kde(xs)
  
      # Initial guess has been taken as the mean and std-dev of the data
      # And a guess assuming small skewness
      ff = optimize.curve_fit(_optm, xs, pxs, p0 = [0.1, mu_norm, sigma_norm])[0]
      return ff[0], ff[1], ff[2]
docs: Fit skew - lognormal to the rate samples achived from a prior analysis
          Parameters
          ----------
          R: array
             Rate samples
          Returns
          -------
          ff[0]: float
              The skewness
          ff[1]: float
              The mean
          ff[2]: float
              The standard deviation