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_xml
lxml.etree.Elementorlxml.etree.ElementTree CRSD XML
- file_type_header
str, optional File type header from the first line of the file
- kvp_list
dictof {strstr}, optional Key-Value pair list of header fields
- ppps
dictof {strndarray}, optional Per-Pulse-Parameters keyed by transmit sequence identifier
- pvps
dictof {strndarray], optional Per-Vector-Parameters keyed by channel identifier
- support_arrays
dictof {strndarray}, optional Support arrays keyed by Support Array ID
- schema
str, optional Path to XML Schema. If None, tries to find a version-specific schema
- crsd_xml
- Returns:
CrsdConsistencyThe initialized consistency checker object
See also
Examples
Use
from_partsto 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_partsto 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