hqs_nmr.analysis.similarity
Module for assessing whether two spectra stem from the same molecule.
- class hqs_nmr.analysis.similarity.SpectrumComparison(*, original_params: NMRParameters, adjusted_params: NMRParameters, experimental_spectrum: NMRSpectrum1DProtocol, computed_spectrum: NMRSpectrum1DProtocol)
Comparison of two spectra.
This class is used to judge wether two spectra describe the same molecule.
- original_params
The original NRM parameters for the computation.
- Type:
hqs_nmr_parameters.code.data_classes.NMRParameters
- adjusted_params
The parameters that have been adjusted to make the spectra more similar.
- Type:
hqs_nmr_parameters.code.data_classes.NMRParameters
- experimental_spectrum
The experimental spectrum.
- computed_spectrum
The spectrum to compare with.
- correlation
The correlation of the two spectral functions.
- hellinger_distance
The Hellinger distance of the two spectral functions.
- max_shift_adjustment
The largest shift adjustment that has been made.
Constructor.
- __init__(*, original_params: NMRParameters, adjusted_params: NMRParameters, experimental_spectrum: NMRSpectrum1DProtocol, computed_spectrum: NMRSpectrum1DProtocol) None
Constructor.
- original_params: NMRParameters
- adjusted_params: NMRParameters
- experimental_spectrum: NMRSpectrum1DProtocol
- computed_spectrum: NMRSpectrum1DProtocol
- is_match() bool
Returns whether the two spectra are likely to represent the same molecule.
- match_probability() float
Returns the probability for the two spectra being representing the same molecule.
- improvement_hints() set[SpectrumMismatchHint]
Returns possible reasons for a mismatch.