def fcn(self, data_in):
"""
Performs the KK.
Parameters
----------
data : list
data[0] : Wavenumber vector
data[1] : NRB spectrum(a)
data[2] : CARS spectrum(a)
Returns
-------
out : np.array
Imaginary component the of KK-retrieved spectrum(a)
See also
--------
crikit.process.phase_retr, crikit.process.maths.kk
"""
if data_in.ndim == 1:
spl = _UnivariateSpline(self.WN_2, data_in, s=0, ext=0)
output = spl(self.WN)
elif data_in.ndim == 2:
output = _np.zeros(data_in.shape)
for num, spect in enumerate(data_in):
spl = _UnivariateSpline(self.WN_2, spect, s=0, ext=0)
output[num,:] = spl(self.WN)
return output
#return data_in
评论列表
文章目录