sarkit.verification.CrsdConsistency.from_parts

static CrsdConsistency.from_parts(crsd_xml, file_type_header=None, kvp_list=None, ppps=None, pvps=None, support_arrays=None, schema=None)

Create a CrsdConsistency object from assorted parts

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

CRSD XML

file_type_headerstr, optional

File type header from the first line of the file

kvp_listdict of {strstr}, optional

Key-Value pair list of header fields

pppsdict of {strndarray}, optional

Per-Pulse-Parameters keyed by transmit sequence identifier

pvpsdict of {strndarray], optional

Per-Vector-Parameters keyed by channel identifier

support_arraysdict of {strndarray}, optional

Support arrays keyed by Support Array ID

schemastr, optional

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

Returns:
CrsdConsistency

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
>>> crsd_xmltree = lxml.etree.parse("data/example-crsd-1.0.xml")
>>> con = skver.CrsdConsistency.from_parts(crsd_xmltree)
>>> con.check()
>>> bool(con.passes())
True
>>> bool(con.failures())
False

Use from_parts to check a parsed XML element tree and an invalid file type header:

>>> con = skver.CrsdConsistency.from_parts(crsd_xmltree, file_type_header="CRSDsar/INVALID\n")
>>> con.check()
>>> bool(con.failures())
True