sarkit.verification.SicdConsistency
- class SicdConsistency(sicd_xml, *, schema_override=None, file=None)
Check SICD file structure and metadata for internal consistency
SicdConsistencyobjects should be instantiated usingfrom_fileorfrom_parts.- Parameters:
- sicd_xml
lxml.etree.Elementorlxml.etree.ElementTree SICD XML
- schema_override
path-like object, optional Path to XML Schema. If None, tries to find a version-specific schema
- file
file object, optional SICD NITF file; when specified, NITF headers are extracted during object instantiation
- sicd_xml
Methods
add_cli_args(parser)Add CLI args used by
run_clito an argparserall()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_argsskips([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_schemaChecks against schema.
check_amptableAmpTable of correct size with accurate Amplitude indices.
check_antenna_array_gain_phaseChecks consistency of the gain/phase values in the Antenna Array elements.
check_antenna_bspoly_gainChecks consistency of the values in the Antenna child elements.
check_antenna_elem_gain_phaseChecks consistency of the gain/phase values in the Antenna Elem elements.
check_antenna_oneway_apcChecks that APC polys are provided when one way patterns are used
check_antenna_polysChecks consistency of all Antenna polynomials.
check_area_cornersChecks that area corners (ACPs) are nominally correct.
check_area_plane_polygonRadarCollection/Area/Plane/Polygon is simple, valid and clockwise.
check_area_plane_validChecks that area plane surface intersects with grid plane area of support.
check_bistatic_fieldsOptional fields are consistent with CollectType = BISTATIC for SICD v1.4.0+
check_chanindexChecks consistency of ChanIndex.
check_collection_durationChecks consistency of the collection duration in the Timeline element
check_deltak_wrt_ssDeltaK[12] must agree with SS.
check_deltakpolyDeltaKPoly matches DeltaK1.
check_des_subheaderCheck NITF DES Subheaders
check_error_components_posvel_corrChecks consistency of the values in the ErrorStatistics CorrCoefs elements.
check_error_components_posvel_stddevChecks consistency of the values in the ErrorStatistics PosVelErr elements.
check_error_compositeChecks consistency of the values in the ErrorStatistics CompositeSCP elements.
check_error_radarsensor_rangebiasChecks consistency of the values in the ErrorStatistics RangeBias element.
check_errorstatistics_conditionalsPresence of ErrorStatistics child elements is consistent with CollectType.
check_geoinfo_lineChecks that GeoInfo/Line has a size attribute and segments have the index attribute.
check_geoinfo_polygonChecks 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_polysChecks consistency of all Grid polynomials.
check_grid_shadows_downwardGrid should indicate that shadows are downward. Taken to mean more downward than leftward or rightward.
check_grid_signGrid signs match.
check_grid_unit_vectorUnit vector must have unit magnitude.
check_grid_uvect_orthogonalChecks the grid unit vectors are orthogonal to within 1 milliradian.
check_icp_indicesChecks consistency of the indices in the GeoData ICP elements.
check_image_cornersChecks that the image corner points (ICPs) are nominally correct.
check_image_formation_timelineChecks that the slow time span for data processed to form the image is within collect.
check_incaChecks that RMA/INCA parameters are consistent with other metadata.
check_ipp_polyChecks that the IPPPolys are nominally correct.
check_ipp_set_indicesChecks consistency of the indices in the Timeline IPP elements.
check_iprbw_to_deltakImpRespBW <= DeltaK2 - DeltaK1.
check_iprbw_to_ssImpulse Response BW is supported by sample spacing.
check_iprbw_to_ss_osrOversample ratio [1/(Grid//ImpRespBW * Grid//SS)] is between 1.1 and 2.2
check_match_collectionChecks MatchCollection consistent with NumMatchCollections.
check_match_typeChecks MatchType consistent with NumMatchTypes.
check_nitf_igeoloCheck each NITF image segment’s IGEOLO
check_nitf_imsegCheck NITF Image Subheaders
check_nitf_imseg_lvlsCheck NITF inter-Image Subheaders Display and Attachment levels
check_nitf_imseg_sizeCheck the size of each NITF image segment
check_pfa_fpn_away_from_earthFPN points away from Earth.
check_pfa_grid_typePFA has grid type of RGAZIM.
check_pfa_ipn_away_from_earthIPN points away from Earth.
check_pfa_ipn_with_gridPFA IPN is normal to grid.
check_pfa_ipr_bwIPR bandwidth supported by PFA spatial frequency extent.
check_pfa_krg_to_gridPFA Krg within half of 1/Grid.Row.SS of KCtr.
check_pfa_polar_ang_polyPolar angle polynomial evaluates to 0 at reference time.
check_pfa_polysChecks consistency of all PFA polynomials.
check_pfa_proc_freqProcessed Frequency matches PFA inscription.
check_pfa_spot_kaz_to_gridPFA Kaz within half of 1/Grid.Col.SS of KCtr.
check_pfa_stds_kcoaChecks that the PFA/STDeskew/STDSPhasePoly is nominally correct.
check_position_polysChecks consistency of all Position polynomials.
check_proc_freqImageFormation/TxFrequencyProc lies within RadarCollection/TxFrequency.
check_radiometric_polysChecks consistency of all Radiometric polynomials.
check_rcv_channel_indicesChecks consistency of the values in the RadarCollection RcvChannels elements.
check_rcv_fmrateChecks consistency of the receive FM rate for chirp/stretch demodulation types.
check_rcvapc_indicesChecks consistency of the RcvAPC indexing.
check_rcvapcindexChecks consistency of RcvAPCIndex.
check_rgazcomp_polysChecks consistency of all RgAzComp polynomials.
check_rma_inca_polysChecks consistency of all RMA/INCA polynomials.
check_scp_ecf_llhSCP ECF and LLH positions match.
check_scpcoaChecks consistency of the values in the SCPCOA child elements.
check_segment_identifierChecks that segment identifier references a segment in the SegmentList.
check_segment_polygonsSegmentPolygons are simple, valid and clockwise.
check_segment_start_and_endChecks consistency of the values in the SegmentList StartLine and EndLine elements.
check_segment_unique_idsChecks that identifiers in SegmentList are unique.
check_segmentlist_boundsChecks that segments within the segment_list are bounded by the area plane.
check_segmentlist_indicesChecks that SegmentList has a size attribute and segments have the index attribute.
check_timeline_polysChecks consistency of all Timeline polynomials.
check_tx_freq_boundsChecks consistency of the frequency bounds implied by RadarCollection/Waveform/WFParameters values.
check_tx_freq_startChecks consistency of the RadarCollection/Waveform/WFParameters/TxFreqStart values.
check_tx_polarizationChecks consistency of the RadarCollection/TxPolarization node.
check_tx_rf_bandwidthChecks consistency of the RadarCollection/Waveform/WFParameters/TxRFBandwidth values.
check_txsequence_indicesChecks consistency of the TxSequence/TxStep indexing.
check_txsequence_waveform_indexChecks consistency of WFIndex
check_uniform_ipr_widthUniform weighted IPR width matches bandwidth.
check_valid_data_indicesChecks consistency of the values in the ImageData child elements.
check_valid_ifaImageFormationAlgo must be paired with appropriate block.
check_validdata_boundsValidData vertices contained within FullImage
check_validdata_first_vertexFirst ValidData Vertex should be min row -> min col.
check_validdata_presenceValidData should be in both GeoData and ImageData or neither.
check_validdata_simplenessValidData should be a simple polygon.
check_validdata_windingValidData should be clockwise.
check_waveform_paramsChecks consistency of the values in the RadarCollection Waveform Parameter elements.
check_waveform_params_indicesChecks consistency of the indices in the RadarCollection Waveform Parameter elements.
check_wgtfunct_indicesChecks consistency of the indices in the WgtFunct elements.