def doFPAcalc(NISTpk, ttArr, twotheta, calcwid, step):
    """Compute a single peak using a NIST profile object

    :param object NISTpk: a peak profile computational object from the 
      NIST XRD Fundamental Parameters Code, typically established from
      a call to :func:`SetupFPAcalc`
    :param np.Array ttArr: an evenly-spaced grid of two-theta points (degrees)
    :param float twotheta: nominal center of peak (degrees)
    :param float calcwid: width to perform convolution (degrees)
    :param float step: step size
    """
    center_bin_idx = min(ttArr.searchsorted(twotheta), len(ttArr) - 1)
    NISTpk.set_optimized_window(twotheta_exact_bin_spacing_deg=step,
        twotheta_window_center_deg=ttArr[center_bin_idx],
        twotheta_approx_window_fullwidth_deg=calcwid)
    NISTpk.set_parameters(twotheta0_deg=twotheta)
    return center_bin_idx, NISTpk.compute_line_profile()
