code: def _model(self, t, theta, period, tmpid):
          
          template = self.templates[tmpid]
          phase = (t / period - theta[2]) % 1
          return theta[0] + theta[1] * template(phase)
docs: Compute model at t for the given parameters, period, & template