code: def _construct_X(self, omega, weighted=True, **kwargs):
          
          t = kwargs.get('t', self.t)
          dy = kwargs.get('dy', self.dy)
          fit_offset = kwargs.get('fit_offset', self.fit_offset)
  
          if fit_offset:
              offsets = [np.ones(len(t))]
          else:
              offsets = []
  
          cols = sum(([np.sin((i + 1) * omega * t),
                       np.cos((i + 1) * omega * t)]
                      for i in range(self.Nterms)), offsets)
  
          if weighted:
              return np.transpose(np.vstack(cols) / dy)
          else:
              return np.transpose(np.vstack(cols))
docs: Construct the design matrix for the problem