code: def apply_calibration(self, strain):
          
          amplitude_parameters =\
              [self.params['amplitude_{}_{}'.format(self.ifo_name, ii)]
               for ii in range(self.n_points)]
          amplitude_spline = UnivariateSpline(self.spline_points,
                                              amplitude_parameters)
          delta_amplitude = amplitude_spline(strain.sample_frequencies.numpy())
  
          phase_parameters =\
              [self.params['phase_{}_{}'.format(self.ifo_name, ii)]
               for ii in range(self.n_points)]
          phase_spline = UnivariateSpline(self.spline_points, phase_parameters)
          delta_phase = phase_spline(strain.sample_frequencies.numpy())
  
          strain_adjusted = strain * (1.0 + delta_amplitude)\
              * (2.0 + 1j * delta_phase) / (2.0 - 1j * delta_phase)
  
          return strain_adjusted
docs: Apply calibration model
  
          This applies cubic spline calibration to the strain.
  
          Parameters
          ----------
          strain : FrequencySeries
              The strain to be recalibrated.
  
          Return
          ------
          strain_adjusted : FrequencySeries
              The recalibrated strain.