Module: Mspire::Isotope::Distribution

Defined in:
lib/mspire/isotope/distribution.rb,
lib/mspire/isotope/distribution.rb

Constant Summary collapse

NORMALIZE =
:total

Class Method Summary collapse

Class Method Details

.calculate(molecular_formula_like, normalize = Mspire::Isotope::Distribution::NORMALIZE, percent_cutoff = nil) ⇒ Object



109
110
111
112
# File 'lib/mspire/isotope/distribution.rb', line 109

def self.calculate(molecular_formula_like, normalize=Mspire::Isotope::Distribution::NORMALIZE, percent_cutoff=nil)
  mf = molecular_formula_like.is_a?(Mspire::MolecularFormula) ? molecular_formula_like : Mspire::MolecularFormula.from_any(molecular_formula_like)
  mf.isotope_distribution(normalize, percent_cutoff)
end

.spectrum(molecular_formula_like, normalize = Mspire::Isotope::Distribution::NORMALIZE, percent_cutoff = nil) ⇒ Object



114
115
116
117
# File 'lib/mspire/isotope/distribution.rb', line 114

def self.spectrum(molecular_formula_like, normalize=Mspire::Isotope::Distribution::NORMALIZE, percent_cutoff=nil)
  mf = molecular_formula_like.is_a?(Mspire::MolecularFormula) ? molecular_formula_like : Mspire::MolecularFormula.from_any(molecular_formula_like)
  mf.isotope_distribution_spectrum(normalize, percent_cutoff)
end