def curve_scaling_variants(corrected_reflectivity, n_variants, scale=0.1):
    'Create ``n_variants`` reflectivity curve variants with randomly distributed scaling factors.'
    scalings = np.random.normal(loc=1, size=n_variants, scale=scale).reshape(n_variants, 1)
    scaled_curves = np.zeros((n_variants, len(corrected_reflectivity)))
    for i in range(n_variants):
        scaled_curves[i] = (corrected_reflectivity.copy() * scalings[i])
    return (scaled_curves, scalings)
Create ``n_variants`` reflectivity curve variants with randomly distributed scaling factors.
def curve_scaling_variants(corrected_reflectivity, n_variants, scale=0.1):
    
    scalings = np.random.normal(loc=1, size=n_variants, scale=scale).reshape(n_variants, 1)
    scaled_curves = np.zeros((n_variants, len(corrected_reflectivity)))
    for i in range(n_variants):
        scaled_curves[i] = (corrected_reflectivity.copy() * scalings[i])
    return (scaled_curves, scalings)