def q_shift_variants(q_values_prediction, q_values_input, corrected_reflectivity, n_variants, scale=0.001):
    'Create ``n_variants`` interpolated reflectivity curve variants with randomly distributed q shifts.'
    shift = np.random.normal(loc=0, size=n_variants, scale=scale).reshape(n_variants, 1)
    shifted_qs = (np.tile(q_values_input, (n_variants, 1)) + shift)
    interpolated_curves = np.zeros((n_variants, len(q_values_prediction)))
    for i in range(n_variants):
        interpolated_curves[i] = interp_reflectivity(q_values_prediction, shifted_qs[i], corrected_reflectivity)
    return (interpolated_curves, shift)
Create ``n_variants`` interpolated reflectivity curve variants with randomly distributed q shifts.
def q_shift_variants(q_values_prediction, q_values_input, corrected_reflectivity, n_variants, scale=0.001):
    
    shift = np.random.normal(loc=0, size=n_variants, scale=scale).reshape(n_variants, 1)
    shifted_qs = (np.tile(q_values_input, (n_variants, 1)) + shift)
    interpolated_curves = np.zeros((n_variants, len(q_values_prediction)))
    for i in range(n_variants):
        interpolated_curves[i] = interp_reflectivity(q_values_prediction, shifted_qs[i], corrected_reflectivity)
    return (interpolated_curves, shift)