docs: def _windcalc(self, first, totalmass, nsteps, niso, ypssurf, ypsinit, \
      X_i, E_i, cycles):
          """
          This function calculates the windyields and ejected masses as called from
          windyields().  It uses a summation version of the formulae used in Hirschi
          et al. 2005, "Yields of rotating stars at solar metallicity".
  
          If it is the first file, the arrays need to be created and the initial
          abundances set
  
          """
  
          if first == True:
              X_i = np.zeros([niso], float)
              E_i = np.zeros([niso], float)
              ypsinit = ypssurf[0]
              for m in range(niso):
                  for n in range(nsteps):
                      X_i[m] = X_i[m] + ((totalmass[n] - totalmass[n+1]) * \
                      (0.5 * (ypssurf[n][m] + ypssurf[n+1][m]) - ypsinit[m]))
                      E_i[m] = E_i[m] + ((totalmass[n] - totalmass[n+1]) * \
                      (0.5 * (ypssurf[n][m] + ypssurf[n+1][m])))
  
          else:
              for m in range(niso):
                  for n in range(nsteps):
                      X_i[m] = X_i[m] + ((totalmass[n] - totalmass[n+1]) * \
                      (0.5 * (ypssurf[n][m] + ypssurf[n+1][m]) - ypsinit[m]))
                      E_i[m] = E_i[m] + ((totalmass[n] - totalmass[n+1]) * \
                      (0.5 * (ypssurf[n][m] + ypssurf[n+1][m])))
  
          return X_i, E_i