def _get_stddevs(self, imt, mag, n_sites, stddev_types):
        """
        The standard error (assumed equivalent to total standard deviation)
        is defined as a function of magnitude and period (equation 4,
        page 1168). For magnitudes lower than 5.0 the standard deviation is
        equal to that for the case in which magnitude is 5.0. For short
        periods (T < 0.05), including PGA, the standard deviation is
        assumed to be equal to the case in which T = 0.05, whilst for long
        periods (T > 3.0) it is assumed to be equal to the case in which
        T = 3.0
        """
        if mag < 5.0:
            stddev_mag = 5.0
        else:
            stddev_mag = mag

        if imt.name == "PGA" or imt.period < 0.05:
            total_sigma = 1.18 + 0.035 * np.log(0.05) - 0.06 * stddev_mag
        elif imt.period > 3.0:
            total_sigma = 1.18 + 0.035 * np.log(3.0) - 0.06 * stddev_mag
        else:
            total_sigma = 1.18 + 0.035 * np.log(imt.period) - 0.06 * stddev_mag
        stddevs = []
        for stddev_type in stddev_types:
            assert stddev_type in self.DEFINED_FOR_STANDARD_DEVIATION_TYPES
            if stddev_type == const.StdDev.TOTAL:
                stddevs.append(total_sigma + np.zeros(n_sites, dtype=float))
        return stddevs
The standard error (assumed equivalent to total standard deviation)
        is defined as a function of magnitude and period (equation 4,
        page 1168). For magnitudes lower than 5.0 the standard deviation is
        equal to that for the case in which magnitude is 5.0. For short
        periods (T < 0.05), including PGA, the standard deviation is
        assumed to be equal to the case in which T = 0.05, whilst for long
        periods (T > 3.0) it is assumed to be equal to the case in which
        T = 3.0