code: def update_r(self, fs=None, qinv=None, fc=None, kappa_c=1.0,
                   kappa_tst_re=1.0, kappa_tst_im=0.0, kappa_pu_re=1.0,
                   kappa_pu_im=0.0):
          
          c = self.update_c(fs=fs, qinv=qinv, fc=fc, kappa_c=kappa_c)
          g = self.update_g(fs=fs, qinv=qinv, fc=fc, kappa_c=kappa_c,
                            kappa_tst_re=kappa_tst_re,
                            kappa_tst_im=kappa_tst_im,
                            kappa_pu_re=kappa_pu_re, kappa_pu_im=kappa_pu_im)
          return (1.0 + g) / c
docs: Calculate the response function R(f,t) given the new parameters
          kappa_c(t), kappa_a(t), f_c(t), fs, and qinv.
  
          Parameters
          ----------
          fc : float
              Coupled-cavity (CC) pole at time t.
          kappa_c : float
              Scalar correction factor for sensing function c at time t.
          kappa_tst_re : float
              Real part of scalar correction factor for actuation function
              a_tst0 at time t.
          kappa_pu_re : float
              Real part of scalar correction factor for actuation function
              a_pu0 at time t.
          kappa_tst_im : float
              Imaginary part of scalar correction factor for actuation function
              a_tst0 at time t.
          kappa_pu_im : float
              Imaginary part of scalar correction factor for actuation function
              a_pu0 at time t.
          fs : float
              Spring frequency for signal recycling cavity.
          qinv : float
              Inverse quality factor for signal recycling cavity.
  
          Returns
          -------
          r : numpy.array
              The new response function r(f,t).