sarkit.verification.SicdConsistency.from_parts

static SicdConsistency.from_parts(sicd_xml, schema=None)

Create a SicdConsistency object from assorted parts

Parameters:
sicd_xmllxml.etree.Element or lxml.etree.ElementTree

SICD XML

schemapath-like object, optional

Path to XML Schema. If None, tries to find a version-specific schema

Returns:
SicdConsistency

The initialized consistency checker object

See also

from_file

Examples

Use from_parts to check a parsed XML element tree:

>>> import lxml.etree
>>> import sarkit.verification as skver
>>> sicd_xmltree = lxml.etree.parse("data/example-sicd-1.4.0.xml")
>>> con = skver.SicdConsistency.from_parts(sicd_xmltree)
>>> con.check()
>>> bool(con.passes())
True
>>> bool(con.failures())
False