Module: Chemicalml::Convention::Spectroscopy

Extended by:
Base
Defined in:
lib/chemicalml/convention/spectroscopy.rb,
lib/chemicalml/convention/spectroscopy/constraints.rb,
lib/chemicalml/convention/spectroscopy/constraints/peak_should_have_values.rb,
lib/chemicalml/convention/spectroscopy/constraints/spectrum_must_have_format.rb,
lib/chemicalml/convention/spectroscopy/constraints/spectrum_must_have_content.rb,
lib/chemicalml/convention/spectroscopy/constraints/peak_list_must_contain_peaks.rb,
lib/chemicalml/convention/spectroscopy/constraints/spectrum_must_have_convention.rb

Overview

The Spectroscopy convention. A chemicalml-specific convention for CML spectroscopy data (<spectrum>, <peakList>, <peak>).

Upstream CML does not define a spectroscopy convention; the wire elements exist in the XSD but no constraints guard their well-formedness. This convention covers the gaps:

  • spectra MUST declare their own convention (per the molecular convention's "each spectrum MUST specify its own convention")
  • spectra MUST have a format (e.g. "mass", "ir", "nmr")
  • spectra MUST contain at least one of xaxis/yaxis/peakList
  • peakList MUST contain at least one peak/peakGroup
  • peaks SHOULD have at least one of xValue/yValue (warning)

Defined Under Namespace

Modules: Constraints

Constant Summary collapse

QNAME =
'convention:spectroscopy'
NAMESPACE_URI =
"#{Chemicalml::Convention::CONVENTION_NAMESPACE}spectroscopy".freeze

Class Method Summary collapse

Methods included from Base

constraint_count, constraints, namespace_uri, qname, register, reset_constraints!, validate, validate_report

Class Method Details

.namespace_uriObject



30
31
32
# File 'lib/chemicalml/convention/spectroscopy.rb', line 30

def self.namespace_uri
  NAMESPACE_URI
end

.qnameObject



26
27
28
# File 'lib/chemicalml/convention/spectroscopy.rb', line 26

def self.qname
  QNAME
end