sarkit.verification.SicdConsistency

class SicdConsistency(sicd_xml, *, schema_override=None, file=None)

Check SICD file structure and metadata for internal consistency

SicdConsistency objects should be instantiated using from_file or from_parts.

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

SICD XML

schema_overridepath-like object, optional

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

filefile object, optional

SICD NITF file; when specified, NITF headers are extracted during object instantiation

Methods

add_cli_args(parser)

Add CLI args used by run_cli to an argparser

all()

Returns all results.

check([func_name, allow_prefix, ignore_patterns])

Run checks.

failures([omit_passed_sub])

Returns failure results.

from_file(file[, schema])

Create a SicdConsistency object from a file

from_parts(sicd_xml[, schema])

Create a SicdConsistency object from assorted parts

need([details])

Context manager for scoping 'Error' level checks

passes()

Returns passed checks that are not wholly No-Op.

precondition([details])

Context manager for scoping conditional ('No-Op' level) checks

print_result(*[, include_passed_asserts, ...])

Print results to stdout.

run_cli(config)

Run checks and print results using args from add_cli_args

skips([include_partial])

Returns passed checks that are No-Op.

want([details])

Context manager for scoping 'Warning' level checks

Notes

The following checks are available:

check_against_schema

Checks against schema.

check_amptable

AmpTable of correct size with accurate Amplitude indices.

check_antenna_array_gain_phase

Checks consistency of the gain/phase values in the Antenna Array elements.

check_antenna_bspoly_gain

Checks consistency of the values in the Antenna child elements.

check_antenna_elem_gain_phase

Checks consistency of the gain/phase values in the Antenna Elem elements.

check_antenna_oneway_apc

Checks that APC polys are provided when one way patterns are used

check_antenna_polys

Checks consistency of all Antenna polynomials.

check_area_corners

Checks that area corners (ACPs) are nominally correct.

check_area_plane_polygon

RadarCollection/Area/Plane/Polygon is simple, valid and clockwise.

check_area_plane_valid

Checks that area plane surface intersects with grid plane area of support.

check_bistatic_fields

Optional fields are consistent with CollectType = BISTATIC for SICD v1.4.0+

check_chanindex

Checks consistency of ChanIndex.

check_collection_duration

Checks consistency of the collection duration in the Timeline element

check_deltak_wrt_ss

DeltaK[12] must agree with SS.

check_deltakpoly

DeltaKPoly matches DeltaK1.

check_des_subheader

Check NITF DES Subheaders

check_error_components_posvel_corr

Checks consistency of the values in the ErrorStatistics CorrCoefs elements.

check_error_components_posvel_stddev

Checks consistency of the values in the ErrorStatistics PosVelErr elements.

check_error_composite

Checks consistency of the values in the ErrorStatistics CompositeSCP elements.

check_error_radarsensor_rangebias

Checks consistency of the values in the ErrorStatistics RangeBias element.

check_errorstatistics_conditionals

Presence of ErrorStatistics child elements is consistent with CollectType.

check_geoinfo_line

Checks that GeoInfo/Line has a size attribute and segments have the index attribute.

check_geoinfo_polygon

Checks that GeoInfo/Polygon has a size attribute and segments have the index attribute.

check_grid_normal_away_from_earth

“Normal to Grid unit vectors points away from earth.

check_grid_polys

Checks consistency of all Grid polynomials.

check_grid_shadows_downward

Grid should indicate that shadows are downward. Taken to mean more downward than leftward or rightward.

check_grid_sign

Grid signs match.

check_grid_unit_vector

Unit vector must have unit magnitude.

check_grid_uvect_orthogonal

Checks the grid unit vectors are orthogonal to within 1 milliradian.

check_icp_indices

Checks consistency of the indices in the GeoData ICP elements.

check_image_corners

Checks that the image corner points (ICPs) are nominally correct.

check_image_formation_timeline

Checks that the slow time span for data processed to form the image is within collect.

check_inca

Checks that RMA/INCA parameters are consistent with other metadata.

check_ipp_poly

Checks that the IPPPolys are nominally correct.

check_ipp_set_indices

Checks consistency of the indices in the Timeline IPP elements.

check_iprbw_to_deltak

ImpRespBW <= DeltaK2 - DeltaK1.

check_iprbw_to_ss

Impulse Response BW is supported by sample spacing.

check_iprbw_to_ss_osr

Oversample ratio [1/(Grid//ImpRespBW * Grid//SS)] is between 1.1 and 2.2

check_match_collection

Checks MatchCollection consistent with NumMatchCollections.

check_match_type

Checks MatchType consistent with NumMatchTypes.

check_nitf_igeolo

Check each NITF image segment’s IGEOLO

check_nitf_imseg

Check NITF Image Subheaders

check_nitf_imseg_lvls

Check NITF inter-Image Subheaders Display and Attachment levels

check_nitf_imseg_size

Check the size of each NITF image segment

check_pfa_fpn_away_from_earth

FPN points away from Earth.

check_pfa_grid_type

PFA has grid type of RGAZIM.

check_pfa_ipn_away_from_earth

IPN points away from Earth.

check_pfa_ipn_with_grid

PFA IPN is normal to grid.

check_pfa_ipr_bw

IPR bandwidth supported by PFA spatial frequency extent.

check_pfa_krg_to_grid

PFA Krg within half of 1/Grid.Row.SS of KCtr.

check_pfa_polar_ang_poly

Polar angle polynomial evaluates to 0 at reference time.

check_pfa_polys

Checks consistency of all PFA polynomials.

check_pfa_proc_freq

Processed Frequency matches PFA inscription.

check_pfa_spot_kaz_to_grid

PFA Kaz within half of 1/Grid.Col.SS of KCtr.

check_pfa_stds_kcoa

Checks that the PFA/STDeskew/STDSPhasePoly is nominally correct.

check_position_polys

Checks consistency of all Position polynomials.

check_proc_freq

ImageFormation/TxFrequencyProc lies within RadarCollection/TxFrequency.

check_radiometric_polys

Checks consistency of all Radiometric polynomials.

check_rcv_channel_indices

Checks consistency of the values in the RadarCollection RcvChannels elements.

check_rcv_fmrate

Checks consistency of the receive FM rate for chirp/stretch demodulation types.

check_rcvapc_indices

Checks consistency of the RcvAPC indexing.

check_rcvapcindex

Checks consistency of RcvAPCIndex.

check_rgazcomp_polys

Checks consistency of all RgAzComp polynomials.

check_rma_inca_polys

Checks consistency of all RMA/INCA polynomials.

check_scp_ecf_llh

SCP ECF and LLH positions match.

check_scpcoa

Checks consistency of the values in the SCPCOA child elements.

check_segment_identifier

Checks that segment identifier references a segment in the SegmentList.

check_segment_polygons

SegmentPolygons are simple, valid and clockwise.

check_segment_start_and_end

Checks consistency of the values in the SegmentList StartLine and EndLine elements.

check_segment_unique_ids

Checks that identifiers in SegmentList are unique.

check_segmentlist_bounds

Checks that segments within the segment_list are bounded by the area plane.

check_segmentlist_indices

Checks that SegmentList has a size attribute and segments have the index attribute.

check_timeline_polys

Checks consistency of all Timeline polynomials.

check_tx_freq_bounds

Checks consistency of the frequency bounds implied by RadarCollection/Waveform/WFParameters values.

check_tx_freq_start

Checks consistency of the RadarCollection/Waveform/WFParameters/TxFreqStart values.

check_tx_polarization

Checks consistency of the RadarCollection/TxPolarization node.

check_tx_rf_bandwidth

Checks consistency of the RadarCollection/Waveform/WFParameters/TxRFBandwidth values.

check_txsequence_indices

Checks consistency of the TxSequence/TxStep indexing.

check_txsequence_waveform_index

Checks consistency of WFIndex

check_uniform_ipr_width

Uniform weighted IPR width matches bandwidth.

check_valid_data_indices

Checks consistency of the values in the ImageData child elements.

check_valid_ifa

ImageFormationAlgo must be paired with appropriate block.

check_validdata_bounds

ValidData vertices contained within FullImage

check_validdata_first_vertex

First ValidData Vertex should be min row -> min col.

check_validdata_presence

ValidData should be in both GeoData and ImageData or neither.

check_validdata_simpleness

ValidData should be a simple polygon.

check_validdata_winding

ValidData should be clockwise.

check_waveform_params

Checks consistency of the values in the RadarCollection Waveform Parameter elements.

check_waveform_params_indices

Checks consistency of the indices in the RadarCollection Waveform Parameter elements.

check_wgtfunct_indices

Checks consistency of the indices in the WgtFunct elements.