def get_stddevs(ergodic, tau_model, TAU, PHI_SS, imt, ctx):
    """
    Returns the standard deviations for either the ergodic or
    non-ergodic models
    """
    phi = get_phi_ss(imt, ctx.mag, PHI_SS)
    if ergodic:
        phi_s2s = get_stewart_2019_phis2s(imt, ctx.vs30)
        phi = np.sqrt(phi ** 2. + phi_s2s ** 2.)
    tau = TAU_EXECUTION[tau_model](imt, ctx.mag, TAU)
    sigma = np.sqrt(tau ** 2. + phi ** 2.)
    return [sigma, tau, phi]