code: def estimate_mass_range(numPoints, massRangeParams, metricParams, fUpper,\
                          covary=True):
      
      vals_set = get_random_mass(numPoints, massRangeParams)
      mass1 = vals_set[0]
      mass2 = vals_set[1]
      spin1z = vals_set[2]
      spin2z = vals_set[3]
      if covary:
          lambdas = get_cov_params(mass1, mass2, spin1z, spin2z, metricParams,
                                   fUpper)
      else:
          lambdas = get_conv_params(mass1, mass2, spin1z, spin2z, metricParams,
                                    fUpper)
  
      return numpy.array(lambdas)
docs: This function will generate a large set of points with random masses and
      spins (using pycbc.tmpltbank.get_random_mass) and translate these points
      into the xi_i coordinate system for the given upper frequency cutoff.
  
      Parameters
      ----------
      numPoints : int
          Number of systems to simulate
      massRangeParams : massRangeParameters instance
          Instance holding all the details of mass ranges and spin ranges.
      metricParams : metricParameters instance
          Structure holding all the options for construction of the metric
          and the eigenvalues, eigenvectors and covariance matrix
          needed to manipulate the space.
      fUpper : float
          The value of fUpper to use when getting the mu coordinates from the
          lambda coordinates. This must be a key in metricParams.evals and
          metricParams.evecs (ie. we must know how to do the transformation for
          the given value of fUpper). It also must be a key in
          metricParams.evecsCV if covary=True.
      covary : boolean, optional (default = True)
          If this is given then evecsCV will be used to rotate from the Cartesian
          coordinate system into the principal coordinate direction (xi_i). If
          not given then points in the original Cartesian coordinates are
          returned.
  
  
      Returns
      -------
      xis : numpy.array
          A list of the positions of each point in the xi_i coordinate system.