def generated(self, band, t, err=None, corrected=True):
        """Return generated magnitudes in the specified band

        Parameters
        ----------
        band : str
            desired bandpass: should be one of ['u', 'g', 'r', 'i', 'z']
        t : array_like
            array of times (in days)
        err : float or array_like
            gaussian error in observations
        corrected : bool (optional)
            If true, correct for extinction

        Returns
        -------
        mag : ndarray
            magnitudes at the specified times under the generated model.
        """
        t = np.asarray(t)
        num = self.meta[band + 'T']
        mu = self.meta[band + '0']
        amp = self.meta[band + 'A']
        t0 = self.meta[band + 'E']

        # if there are nans or infinities, mask them
        bad_vals = np.isnan(t) | np.isinf(t)
        t[bad_vals] = t0

        if corrected:
            ext = 0
        else:
            ext = self.obsmeta['rExt'] * self.ext_correction[band]

        func = self._template_func(num, band, mu + ext, amp)
        mag = func(((t0 - t) / self.period) % 1)

        mag[bad_vals] = np.nan

        if err is not None:
            mag += self.rng.normal(0, err, t.shape)

        return mag
dataset/ETHPy150Open astroML/gatspy/gatspy/datasets/rrlyrae_generated.py/RRLyraeGenerated.generated/swapped operands of `-`