crikit.cri package¶
Submodules¶
crikit.cri.error_correction module¶
Created on Mon Jun 6 11:20:35 2016
@author: chc
-
class
crikit.cri.error_correction.
PhaseErrCorrectALS
(smoothness_param=1, asym_param=0.01, redux=10, order=2, rng=None, fix_end_points=False, fix_rng=None, fix_const=1, max_iter=100, min_diff=1e-05, verbose=True, **kwargs)[source]¶ Bases:
object
Phase error correction using alternating least squares (ALS)
References
C H Camp Jr, Y J Lee, and M T Cicerone, JRS (2016).
crikit.cri.kk module¶
Kramers-Kronig relation phase retrieval.
References
[1] Y. Liu, Y. J. Lee, and M. T. Cicerone, “Broadband CARS spectral phase retrieval using a time-domain Kramers-Kronig transform,” Opt. Lett. 34, 1363-1365 (2009).
[2] C. H. Camp Jr, Y. J. Lee, and M. T. Cicerone, “Quantitative, Comparable Coherent Anti-Stokes Raman Scattering (CARS) Spectroscopy: Correcting Errors in Phase Retrieval,” Journal of Raman Spectroscopy 47, 408-415 (2016). arXiv:1507.06543.
-
class
crikit.cri.kk.
KramersKronig
(cars_amp_offset=0.0, nrb_amp_offset=0.0, phase_offset=0.0, norm_to_nrb=True, pad_factor=1, rng=None, n_edge=1, axis=-1, bad_value=1e-08, min_value=None, hilb_kwargs={}, **kwargs)[source]¶ Bases:
object
Retrieve the real and imaginary components of coherent Raman data via the Kramers-Kronig (KK) relation. See References.
- Parameters
cars_amp_offset (float, optional (default=0.0)) – DC offset applied to CARS spectrum(a) prior to KK relation. See Notes and Ref. [2].
nrb_amp_offset (float, optional (default=0.0)) – DC offset applied to NRB spectrum(a) prior to KK relation. See Notes and Ref. [2].
phase_offset (float or ndarray, optional (default=0.0)) – Phase constant or ndarray applied to retrieved phase prior to separating the real and imaginary components. See Notes and Ref. [2].
norm_to_nrb (bool, optional (default=True)) – Normalize the amplitude by sqrt(NRB). This effectively removes several system reponse functions. Highly recommended. See Ref. [2]
pad_factor (int, optional (default=1)) – Multiple size of spectral-length to pad the ends of each spectra with. Padded with a constant value corresponding to the value at that end of the spectrum. See Ref. [1].
rng (ndarray (1D), optional (default=None)) – Range of pixels/frequencies (if freq provided) to perform over
n_edge (int, optional) – For edge values, take a mean of n_edge neighbors
axis (int, optional) – Axis to perform over
min_value (float, optional) – Applies to cars/nrb (the ratio). Values below min_value set to min_value
bad_value (float, optional) – Applies to cars/nrb (the ratio). Inf’s and NaN’s set to bad_value
hilb_kwargs (dict) – kwargs sent to the hilbert transform. Only pad_factor, n_edge, and axis are automatically sent – these will overwrite anything in hilb_kwargs.
- Returns
KK of cars
- Return type
ndarray
Notes
This function does NOT overwrite input data
The imaginary components provides the sponatenous Raman-like spectra(um).
- This module assumes the spectra are oriented as such that the frequency
(wavenumber) increases with increasing index. If this is not the case for your spectra(um), apply a phase_offset of pi.
References
[1] Y. Liu, Y. J. Lee, and M. T. Cicerone, “Broadband CARS spectral phase retrieval using a time-domain Kramers-Kronig transform,” Opt. Lett. 34, 1363-1365 (2009).
[2] C. H. Camp Jr, Y. J. Lee, and M. T. Cicerone, “Quantitative, Comparable Coherent Anti-Stokes Raman Scattering (CARS) Spectroscopy: Correcting Errors in Phase Retrieval,” Journal of Raman Spectroscopy 47, 408-415 (2016). arXiv:1507.06543.
-
calculate
(cars, nrb)[source]¶ cars : ndarray Coherent Raman signal.
- nrbndarray
Nonresonant background (NRB)
-
property
norm_to_nrb
¶
-
property
pad_factor
¶
-
property
phase_offset
¶ Phase offset