From 4903c3e4a32a209441c0f12b8bb09b9bbb9e9c10 Mon Sep 17 00:00:00 2001 From: edparris Date: Thu, 7 Sep 2023 12:27:18 -0400 Subject: [PATCH] feat: add SICD sensor model with planar projection (#10) --- schemas/sicd.xsdata.xml | 52 + .../sicd/SICD_schema_V1.2.1_2018_12_13.xsd | 1119 +++++ .../SICD_schema_V1.3.0_2021_11_30_FINAL.xsd | 1109 +++++ setup.cfg | 1 + src/aws/osml/formats/__init__.py | 0 src/aws/osml/formats/sicd/__init__.py | 1 + src/aws/osml/formats/sicd/models/__init__.py | 273 ++ .../osml/formats/sicd/models/sicd_v1_2_1.py | 3622 ++++++++++++++++ .../osml/formats/sicd/models/sicd_v1_3_0.py | 3654 +++++++++++++++++ src/aws/osml/gdal/gdal_utils.py | 8 +- src/aws/osml/gdal/sensor_model_factory.py | 22 +- .../osml/gdal/sicd_sensor_model_builder.py | 186 + src/aws/osml/photogrammetry/__init__.py | 19 + .../osml/photogrammetry/sicd_sensor_model.py | 813 ++++ .../osml/gdal/test_sensor_model_factory.py | 29 + .../photogrammetry/test_sicd_sensor_model.py | 197 + test/data/sicd/capella-sicd121-chip1.ntf | 3 + test/data/sicd/capella-sicd121-chip2.ntf | 3 + test/data/sicd/example.sicd121.capella.xml | 402 ++ test/data/sicd/example.sicd121.pfa.xml | 1156 ++++++ test/data/sicd/example.sicd121.rma.xml | 1577 +++++++ test/data/sicd/umbra-sicd121-chip1.ntf | 3 + 22 files changed, 14243 insertions(+), 6 deletions(-) create mode 100644 schemas/sicd.xsdata.xml create mode 100644 schemas/sicd/SICD_schema_V1.2.1_2018_12_13.xsd create mode 100644 schemas/sicd/SICD_schema_V1.3.0_2021_11_30_FINAL.xsd create mode 100644 src/aws/osml/formats/__init__.py create mode 100644 src/aws/osml/formats/sicd/__init__.py create mode 100644 src/aws/osml/formats/sicd/models/__init__.py create mode 100644 src/aws/osml/formats/sicd/models/sicd_v1_2_1.py create mode 100644 src/aws/osml/formats/sicd/models/sicd_v1_3_0.py create mode 100644 src/aws/osml/gdal/sicd_sensor_model_builder.py create mode 100644 src/aws/osml/photogrammetry/sicd_sensor_model.py create mode 100644 test/aws/osml/photogrammetry/test_sicd_sensor_model.py create mode 100644 test/data/sicd/capella-sicd121-chip1.ntf create mode 100644 test/data/sicd/capella-sicd121-chip2.ntf create mode 100644 test/data/sicd/example.sicd121.capella.xml create mode 100644 test/data/sicd/example.sicd121.pfa.xml create mode 100644 test/data/sicd/example.sicd121.rma.xml create mode 100644 test/data/sicd/umbra-sicd121-chip1.ntf diff --git a/schemas/sicd.xsdata.xml b/schemas/sicd.xsdata.xml new file mode 100644 index 0000000..ad89471 --- /dev/null +++ b/schemas/sicd.xsdata.xml @@ -0,0 +1,52 @@ + + + + sicd.models + dataclasses + filenames + reStructuredText + allGlobals + true + false + false + false + false + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/schemas/sicd/SICD_schema_V1.2.1_2018_12_13.xsd b/schemas/sicd/SICD_schema_V1.2.1_2018_12_13.xsd new file mode 100644 index 0000000..df36ea4 --- /dev/null +++ b/schemas/sicd/SICD_schema_V1.2.1_2018_12_13.xsd @@ -0,0 +1,1119 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/schemas/sicd/SICD_schema_V1.3.0_2021_11_30_FINAL.xsd b/schemas/sicd/SICD_schema_V1.3.0_2021_11_30_FINAL.xsd new file mode 100644 index 0000000..c1ee10e --- /dev/null +++ b/schemas/sicd/SICD_schema_V1.3.0_2021_11_30_FINAL.xsd @@ -0,0 +1,1109 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/setup.cfg b/setup.cfg index 5390bc6..cb2cca5 100644 --- a/setup.cfg +++ b/setup.cfg @@ -45,6 +45,7 @@ install_requires = geojson>=3.0.0 pyproj>=3.6.0 omegaconf==2.3.0;python_version<'3.10.0' + xsdata>=23.8 defusedxml>=0.7.1 [options.packages.find] diff --git a/src/aws/osml/formats/__init__.py b/src/aws/osml/formats/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/src/aws/osml/formats/sicd/__init__.py b/src/aws/osml/formats/sicd/__init__.py new file mode 100644 index 0000000..b2a4ba5 --- /dev/null +++ b/src/aws/osml/formats/sicd/__init__.py @@ -0,0 +1 @@ +# nothing here diff --git a/src/aws/osml/formats/sicd/models/__init__.py b/src/aws/osml/formats/sicd/models/__init__.py new file mode 100644 index 0000000..80d9651 --- /dev/null +++ b/src/aws/osml/formats/sicd/models/__init__.py @@ -0,0 +1,273 @@ +"""This file was generated by xsdata, v23.8, on 2023-08-30 17:21:13 + +Generator: DataclassGenerator +See: https://xsdata.readthedocs.io/ +""" +from .sicd_v1_2_1 import SICD as Type21SICD +from .sicd_v1_2_1 import AntennaType as Type21AntennaType +from .sicd_v1_2_1 import AntParamType as Type21AntParamType +from .sicd_v1_2_1 import ArrayDouble as Type21ArrayDouble +from .sicd_v1_2_1 import AzAutofocus as Type21AzAutofocus +from .sicd_v1_2_1 import CollectionInfoType as Type21CollectionInfoType +from .sicd_v1_2_1 import CollectType as Type21CollectType +from .sicd_v1_2_1 import ComplexType as Type21ComplexType +from .sicd_v1_2_1 import CornerStringType as Type21CornerStringType +from .sicd_v1_2_1 import DirParamType as Type21DirParamType +from .sicd_v1_2_1 import DirParamTypeSgn as Type21DirParamTypeSgn +from .sicd_v1_2_1 import DualPolarizationType +from .sicd_v1_2_1 import EarthModel as Type21EarthModel +from .sicd_v1_2_1 import ErrorDecorrFuncType as Type21ErrorDecorrFuncType +from .sicd_v1_2_1 import ErrorStatisticsType as Type21ErrorStatisticsType +from .sicd_v1_2_1 import GainPhasePolyType as Type21GainPhasePolyType +from .sicd_v1_2_1 import GeoDataType as Type21GeoDataType +from .sicd_v1_2_1 import GeoInfoType as Type21GeoInfoType +from .sicd_v1_2_1 import GridType as Type21GridType +from .sicd_v1_2_1 import ImageBeamComp as Type21ImageBeamComp +from .sicd_v1_2_1 import ImageCreationType as Type21ImageCreationType +from .sicd_v1_2_1 import ImageDataType as Type21ImageDataType +from .sicd_v1_2_1 import ImageFormAlgo as Type21ImageFormAlgo +from .sicd_v1_2_1 import ImageFormationType as Type21ImageFormationType +from .sicd_v1_2_1 import ImageGridType as Type21ImageGridType +from .sicd_v1_2_1 import ImagePixelType as Type21ImagePixelType +from .sicd_v1_2_1 import ImagePlane as Type21ImagePlane +from .sicd_v1_2_1 import LatLonCornerStringType as Type21LatLonCornerStringType +from .sicd_v1_2_1 import LatLonCornerType as Type21LatLonCornerType +from .sicd_v1_2_1 import LatLonHAECornerRestrictType as Type21LatLonHAECornerRestrictType +from .sicd_v1_2_1 import LatLonHAECornerStringType as Type21LatLonHAECornerStringType +from .sicd_v1_2_1 import LatLonHAERestrictionType as Type21LatLonHAERestrictionType +from .sicd_v1_2_1 import LatLonHAEType as Type21LatLonHAEType +from .sicd_v1_2_1 import LatLonRestrictionType as Type21LatLonRestrictionType +from .sicd_v1_2_1 import LatLonType as Type21LatLonType +from .sicd_v1_2_1 import LineType as Type21LineType +from .sicd_v1_2_1 import MatchInfoType as Type21MatchInfoType +from .sicd_v1_2_1 import NoiseLevelType as Type21NoiseLevelType +from .sicd_v1_2_1 import OrientationType as Type21OrientationType +from .sicd_v1_2_1 import ParameterType as Type21ParameterType +from .sicd_v1_2_1 import PFAType as Type21PFAType +from .sicd_v1_2_1 import Polarization1Type, Polarization2Type +from .sicd_v1_2_1 import Poly1DType as Type21Poly1DType +from .sicd_v1_2_1 import Poly2DType as Type21Poly2DType +from .sicd_v1_2_1 import PolyCoef1DType as Type21PolyCoef1DType +from .sicd_v1_2_1 import PolyCoef2DType as Type21PolyCoef2DType +from .sicd_v1_2_1 import PolygonType as Type21PolygonType +from .sicd_v1_2_1 import PositionType as Type21PositionType +from .sicd_v1_2_1 import PosVelErrFrame as Type21PosVelErrFrame +from .sicd_v1_2_1 import RadarCollectionType as Type21RadarCollectionType +from .sicd_v1_2_1 import RadarModeType as Type21RadarModeType +from .sicd_v1_2_1 import RadiometricType as Type21RadiometricType +from .sicd_v1_2_1 import RgAutofocus as Type21RgAutofocus +from .sicd_v1_2_1 import RgAzCompType as Type21RgAzCompType +from .sicd_v1_2_1 import RMAImageType as Type21RMAImageType +from .sicd_v1_2_1 import RMAlgorithm as Type21RMAlgorithm +from .sicd_v1_2_1 import RMAType as Type21RMAType +from .sicd_v1_2_1 import RowColType as Type21RowColType +from .sicd_v1_2_1 import RowColvertexType as Type21RowColvertexType +from .sicd_v1_2_1 import SCPCOAType as Type21SCPCOAType +from .sicd_v1_2_1 import SideOfTrack as Type21SideOfTrack +from .sicd_v1_2_1 import STBeamComp as Type21STBeamComp +from .sicd_v1_2_1 import TimelineType as Type21TimelineType +from .sicd_v1_2_1 import WFParametersRcvDemodType as Type21WFParametersRcvDemodType +from .sicd_v1_2_1 import XYZPolyAttributeType as Type21XYZPolyAttributeType +from .sicd_v1_2_1 import XYZPolyType as Type21XYZPolyType +from .sicd_v1_2_1 import XYZType as Type21XYZType +from .sicd_v1_3_0 import SICD as Type30SICD +from .sicd_v1_3_0 import AntennaType as Type30AntennaType +from .sicd_v1_3_0 import AntParamType as Type30AntParamType +from .sicd_v1_3_0 import ArrayDouble as Type30ArrayDouble +from .sicd_v1_3_0 import AzAutofocus as Type30AzAutofocus +from .sicd_v1_3_0 import CollectionInfoType as Type30CollectionInfoType +from .sicd_v1_3_0 import CollectType as Type30CollectType +from .sicd_v1_3_0 import ComplexType as Type30ComplexType +from .sicd_v1_3_0 import CornerStringType as Type30CornerStringType +from .sicd_v1_3_0 import DirParamType as Type30DirParamType +from .sicd_v1_3_0 import DirParamTypeSgn as Type30DirParamTypeSgn +from .sicd_v1_3_0 import EarthModel as Type30EarthModel +from .sicd_v1_3_0 import ErrorDecorrFuncType as Type30ErrorDecorrFuncType +from .sicd_v1_3_0 import ErrorStatisticsType as Type30ErrorStatisticsType +from .sicd_v1_3_0 import GainPhasePolyType as Type30GainPhasePolyType +from .sicd_v1_3_0 import GeoDataType as Type30GeoDataType +from .sicd_v1_3_0 import GeoInfoType as Type30GeoInfoType +from .sicd_v1_3_0 import GridType as Type30GridType +from .sicd_v1_3_0 import ImageBeamComp as Type30ImageBeamComp +from .sicd_v1_3_0 import ImageCreationType as Type30ImageCreationType +from .sicd_v1_3_0 import ImageDataType as Type30ImageDataType +from .sicd_v1_3_0 import ImageFormAlgo as Type30ImageFormAlgo +from .sicd_v1_3_0 import ImageFormationType as Type30ImageFormationType +from .sicd_v1_3_0 import ImageGridType as Type30ImageGridType +from .sicd_v1_3_0 import ImagePixelType as Type30ImagePixelType +from .sicd_v1_3_0 import ImagePlane as Type30ImagePlane +from .sicd_v1_3_0 import LatLonCornerStringType as Type30LatLonCornerStringType +from .sicd_v1_3_0 import LatLonCornerType as Type30LatLonCornerType +from .sicd_v1_3_0 import LatLonHAECornerRestrictType as Type30LatLonHAECornerRestrictType +from .sicd_v1_3_0 import LatLonHAECornerStringType as Type30LatLonHAECornerStringType +from .sicd_v1_3_0 import LatLonHAERestrictionType as Type30LatLonHAERestrictionType +from .sicd_v1_3_0 import LatLonHAEType as Type30LatLonHAEType +from .sicd_v1_3_0 import LatLonRestrictionType as Type30LatLonRestrictionType +from .sicd_v1_3_0 import LatLonType as Type30LatLonType +from .sicd_v1_3_0 import LineType as Type30LineType +from .sicd_v1_3_0 import MatchInfoType as Type30MatchInfoType +from .sicd_v1_3_0 import NoiseLevelType as Type30NoiseLevelType +from .sicd_v1_3_0 import OrientationType as Type30OrientationType +from .sicd_v1_3_0 import ParameterType as Type30ParameterType +from .sicd_v1_3_0 import PFAType as Type30PFAType +from .sicd_v1_3_0 import Poly1DType as Type30Poly1DType +from .sicd_v1_3_0 import Poly2DType as Type30Poly2DType +from .sicd_v1_3_0 import PolyCoef1DType as Type30PolyCoef1DType +from .sicd_v1_3_0 import PolyCoef2DType as Type30PolyCoef2DType +from .sicd_v1_3_0 import PolygonType as Type30PolygonType +from .sicd_v1_3_0 import PositionType as Type30PositionType +from .sicd_v1_3_0 import PosVelErrFrame as Type30PosVelErrFrame +from .sicd_v1_3_0 import RadarCollectionType as Type30RadarCollectionType +from .sicd_v1_3_0 import RadarModeType as Type30RadarModeType +from .sicd_v1_3_0 import RadiometricType as Type30RadiometricType +from .sicd_v1_3_0 import RgAutofocus as Type30RgAutofocus +from .sicd_v1_3_0 import RgAzCompType as Type30RgAzCompType +from .sicd_v1_3_0 import RMAImageType as Type30RMAImageType +from .sicd_v1_3_0 import RMAlgorithm as Type30RMAlgorithm +from .sicd_v1_3_0 import RMAType as Type30RMAType +from .sicd_v1_3_0 import RowColType as Type30RowColType +from .sicd_v1_3_0 import RowColvertexType as Type30RowColvertexType +from .sicd_v1_3_0 import SCPCOAType as Type30SCPCOAType +from .sicd_v1_3_0 import SideOfTrack as Type30SideOfTrack +from .sicd_v1_3_0 import STBeamComp as Type30STBeamComp +from .sicd_v1_3_0 import TimelineType as Type30TimelineType +from .sicd_v1_3_0 import WFParametersRcvDemodType as Type30WFParametersRcvDemodType +from .sicd_v1_3_0 import XYZPolyAttributeType as Type30XYZPolyAttributeType +from .sicd_v1_3_0 import XYZPolyType as Type30XYZPolyType +from .sicd_v1_3_0 import XYZType as Type30XYZType + +__all__ = [ + "Type21AntParamType", + "Type21AntennaType", + "Type21ArrayDouble", + "Type21CollectionInfoType", + "Type21CollectType", + "Type21ComplexType", + "Type21CornerStringType", + "Type21DirParamType", + "Type21DirParamTypeSgn", + "DualPolarizationType", + "Type21ErrorDecorrFuncType", + "Type21ErrorStatisticsType", + "Type21GainPhasePolyType", + "Type21GeoDataType", + "Type21EarthModel", + "Type21GeoInfoType", + "Type21GridType", + "Type21ImagePlane", + "Type21ImageGridType", + "Type21ImageCreationType", + "Type21ImageDataType", + "Type21ImagePixelType", + "Type21ImageFormationType", + "Type21AzAutofocus", + "Type21ImageBeamComp", + "Type21ImageFormAlgo", + "Type21RgAutofocus", + "Type21STBeamComp", + "Type21LatLonCornerStringType", + "Type21LatLonCornerType", + "Type21LatLonHAECornerRestrictType", + "Type21LatLonHAECornerStringType", + "Type21LatLonHAERestrictionType", + "Type21LatLonHAEType", + "Type21LatLonRestrictionType", + "Type21LatLonType", + "Type21LineType", + "Type21MatchInfoType", + "Type21NoiseLevelType", + "Type21OrientationType", + "Type21PFAType", + "Type21ParameterType", + "Polarization1Type", + "Polarization2Type", + "Type21Poly1DType", + "Type21Poly2DType", + "Type21PolyCoef1DType", + "Type21PolyCoef2DType", + "Type21PolygonType", + "Type21PosVelErrFrame", + "Type21PositionType", + "Type21RMAType", + "Type21RMAImageType", + "Type21RMAlgorithm", + "Type21RadarCollectionType", + "Type21RadarModeType", + "Type21RadiometricType", + "Type21RgAzCompType", + "Type21RowColType", + "Type21RowColvertexType", + "Type21SCPCOAType", + "Type21SideOfTrack", + "Type21SICD", + "Type21TimelineType", + "Type21WFParametersRcvDemodType", + "Type21XYZPolyAttributeType", + "Type21XYZPolyType", + "Type21XYZType", + "Type30AntParamType", + "Type30AntennaType", + "Type30ArrayDouble", + "Type30CollectionInfoType", + "Type30CollectType", + "Type30ComplexType", + "Type30CornerStringType", + "Type30DirParamType", + "Type30DirParamTypeSgn", + "Type30ErrorDecorrFuncType", + "Type30ErrorStatisticsType", + "Type30GainPhasePolyType", + "Type30GeoDataType", + "Type30EarthModel", + "Type30GeoInfoType", + "Type30GridType", + "Type30ImagePlane", + "Type30ImageGridType", + "Type30ImageCreationType", + "Type30ImageDataType", + "Type30ImagePixelType", + "Type30ImageFormationType", + "Type30AzAutofocus", + "Type30ImageBeamComp", + "Type30ImageFormAlgo", + "Type30RgAutofocus", + "Type30STBeamComp", + "Type30LatLonCornerStringType", + "Type30LatLonCornerType", + "Type30LatLonHAECornerRestrictType", + "Type30LatLonHAECornerStringType", + "Type30LatLonHAERestrictionType", + "Type30LatLonHAEType", + "Type30LatLonRestrictionType", + "Type30LatLonType", + "Type30LineType", + "Type30MatchInfoType", + "Type30NoiseLevelType", + "Type30OrientationType", + "Type30PFAType", + "Type30ParameterType", + "Type30Poly1DType", + "Type30Poly2DType", + "Type30PolyCoef1DType", + "Type30PolyCoef2DType", + "Type30PolygonType", + "Type30PosVelErrFrame", + "Type30PositionType", + "Type30RMAType", + "Type30RMAImageType", + "Type30RMAlgorithm", + "Type30RadarCollectionType", + "Type30RadarModeType", + "Type30RadiometricType", + "Type30RgAzCompType", + "Type30RowColType", + "Type30RowColvertexType", + "Type30SCPCOAType", + "Type30SideOfTrack", + "Type30SICD", + "Type30TimelineType", + "Type30WFParametersRcvDemodType", + "Type30XYZPolyAttributeType", + "Type30XYZPolyType", + "Type30XYZType", +] diff --git a/src/aws/osml/formats/sicd/models/sicd_v1_2_1.py b/src/aws/osml/formats/sicd/models/sicd_v1_2_1.py new file mode 100644 index 0000000..a458140 --- /dev/null +++ b/src/aws/osml/formats/sicd/models/sicd_v1_2_1.py @@ -0,0 +1,3622 @@ +"""This file was generated by xsdata, v23.8, on 2023-08-30 17:21:13 + +Generator: DataclassGenerator +See: https://xsdata.readthedocs.io/ +""" +from dataclasses import dataclass, field +from enum import Enum +from typing import List, Optional + +from xsdata.models.datatype import XmlDateTime + +__NAMESPACE__ = "urn:SICD:1.2.1" + + +@dataclass +class ArrayDouble: + value: Optional[float] = field( + default=None, + metadata={ + "required": True, + }, + ) + index: Optional[int] = field( + default=None, + metadata={ + "type": "Attribute", + "required": True, + }, + ) + + +class CollectType(Enum): + MONOSTATIC = "MONOSTATIC" + BISTATIC = "BISTATIC" + + +@dataclass +class ComplexType: + real: Optional[float] = field( + default=None, + metadata={ + "name": "Real", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + imag: Optional[float] = field( + default=None, + metadata={ + "name": "Imag", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + + +class CornerStringType(Enum): + FRFC_1 = "1:FRFC" + FRLC_2 = "2:FRLC" + LRLC_3 = "3:LRLC" + LRFC_4 = "4:LRFC" + + +class DirParamTypeSgn(Enum): + PLUS_ONE = 1 + MINUS_ONE = -1 + + +class DualPolarizationType(Enum): + V_V = "V:V" + V_H = "V:H" + V_RHC = "V:RHC" + V_LHC = "V:LHC" + H_V = "H:V" + H_H = "H:H" + H_RHC = "H:RHC" + H_LHC = "H:LHC" + RHC_RHC = "RHC:RHC" + RHC_LHC = "RHC:LHC" + RHC_V = "RHC:V" + RHC_H = "RHC:H" + LHC_RHC = "LHC:RHC" + LHC_LHC = "LHC:LHC" + LHC_V = "LHC:V" + LHC_H = "LHC:H" + OTHER = "OTHER" + UNKNOWN = "UNKNOWN" + + +@dataclass +class ErrorDecorrFuncType: + corr_coef_zero: Optional[float] = field( + default=None, + metadata={ + "name": "CorrCoefZero", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + decorr_rate: Optional[float] = field( + default=None, + metadata={ + "name": "DecorrRate", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + + +class EarthModel(Enum): + WGS_84 = "WGS_84" + + +class ImagePlane(Enum): + SLANT = "SLANT" + GROUND = "GROUND" + OTHER = "OTHER" + + +class ImageGridType(Enum): + RGAZIM = "RGAZIM" + RGZERO = "RGZERO" + XRGYCR = "XRGYCR" + XCTYAT = "XCTYAT" + PLANE = "PLANE" + + +@dataclass +class ImageCreationType: + application: Optional[str] = field( + default=None, + metadata={ + "name": "Application", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + }, + ) + date_time: Optional[XmlDateTime] = field( + default=None, + metadata={ + "name": "DateTime", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + }, + ) + site: Optional[str] = field( + default=None, + metadata={ + "name": "Site", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + }, + ) + profile: Optional[str] = field( + default=None, + metadata={ + "name": "Profile", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + }, + ) + + +class ImagePixelType(Enum): + RE32F_IM32F = "RE32F_IM32F" + RE16I_IM16I = "RE16I_IM16I" + AMP8I_PHS8I = "AMP8I_PHS8I" + + +class AzAutofocus(Enum): + NO = "NO" + GLOBAL = "GLOBAL" + SV = "SV" + + +class ImageBeamComp(Enum): + NO = "NO" + SV = "SV" + + +class ImageFormAlgo(Enum): + PFA = "PFA" + RMA = "RMA" + RGAZCOMP = "RGAZCOMP" + OTHER = "OTHER" + + +class RgAutofocus(Enum): + NO = "NO" + GLOBAL = "GLOBAL" + SV = "SV" + + +class STBeamComp(Enum): + NO = "NO" + GLOBAL = "GLOBAL" + SV = "SV" + + +@dataclass +class LatLonHAERestrictionType: + lat: Optional[float] = field( + default=None, + metadata={ + "name": "Lat", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + "min_inclusive": -90.0, + "max_inclusive": 90.0, + }, + ) + lon: Optional[float] = field( + default=None, + metadata={ + "name": "Lon", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + "min_inclusive": -180.0, + "max_inclusive": 180.0, + }, + ) + hae: Optional[float] = field( + default=None, + metadata={ + "name": "HAE", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + + +@dataclass +class LatLonHAEType: + lat: Optional[float] = field( + default=None, + metadata={ + "name": "Lat", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + lon: Optional[float] = field( + default=None, + metadata={ + "name": "Lon", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + hae: Optional[float] = field( + default=None, + metadata={ + "name": "HAE", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + + +@dataclass +class LatLonRestrictionType: + lat: Optional[float] = field( + default=None, + metadata={ + "name": "Lat", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + "min_inclusive": -90.0, + "max_inclusive": 90.0, + }, + ) + lon: Optional[float] = field( + default=None, + metadata={ + "name": "Lon", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + "min_inclusive": -180.0, + "max_inclusive": 180.0, + }, + ) + + +@dataclass +class LatLonType: + lat: Optional[float] = field( + default=None, + metadata={ + "name": "Lat", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + lon: Optional[float] = field( + default=None, + metadata={ + "name": "Lon", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + + +class NoiseLevelType(Enum): + ABSOLUTE = "ABSOLUTE" + RELATIVE = "RELATIVE" + + +class OrientationType(Enum): + UP = "UP" + DOWN = "DOWN" + LEFT = "LEFT" + RIGHT = "RIGHT" + ARBITRARY = "ARBITRARY" + + +@dataclass +class ParameterType: + value: str = field( + default="", + metadata={ + "required": True, + }, + ) + name: Optional[str] = field( + default=None, + metadata={ + "type": "Attribute", + "required": True, + }, + ) + + +class Polarization1Type(Enum): + V = "V" + H = "H" + RHC = "RHC" + LHC = "LHC" + OTHER = "OTHER" + UNKNOWN = "UNKNOWN" + SEQUENCE = "SEQUENCE" + + +class Polarization2Type(Enum): + V = "V" + H = "H" + RHC = "RHC" + LHC = "LHC" + OTHER = "OTHER" + + +@dataclass +class PolyCoef1DType: + value: Optional[float] = field( + default=None, + metadata={ + "required": True, + }, + ) + exponent1: Optional[int] = field( + default=None, + metadata={ + "type": "Attribute", + "required": True, + }, + ) + + +@dataclass +class PolyCoef2DType: + value: Optional[float] = field( + default=None, + metadata={ + "required": True, + }, + ) + exponent1: Optional[int] = field( + default=None, + metadata={ + "type": "Attribute", + "required": True, + }, + ) + exponent2: Optional[int] = field( + default=None, + metadata={ + "type": "Attribute", + "required": True, + }, + ) + + +class PosVelErrFrame(Enum): + ECF = "ECF" + RIC_ECF = "RIC_ECF" + RIC_ECI = "RIC_ECI" + + +class RMAImageType(Enum): + RMAT = "RMAT" + RMCR = "RMCR" + INCA = "INCA" + + +class RMAlgorithm(Enum): + OMEGA_K = "OMEGA_K" + CSA = "CSA" + RG_DOP = "RG_DOP" + + +class RadarModeType(Enum): + SPOTLIGHT = "SPOTLIGHT" + STRIPMAP = "STRIPMAP" + DYNAMIC_STRIPMAP = "DYNAMIC STRIPMAP" + + +@dataclass +class RowColType: + row: Optional[int] = field( + default=None, + metadata={ + "name": "Row", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + col: Optional[int] = field( + default=None, + metadata={ + "name": "Col", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + + +class SideOfTrack(Enum): + L = "L" + R = "R" + + +class WFParametersRcvDemodType(Enum): + STRETCH = "STRETCH" + CHIRP = "CHIRP" + + +@dataclass +class XYZType: + x: Optional[float] = field( + default=None, + metadata={ + "name": "X", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + y: Optional[float] = field( + default=None, + metadata={ + "name": "Y", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + z: Optional[float] = field( + default=None, + metadata={ + "name": "Z", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + + +@dataclass +class CollectionInfoType: + collector_name: Optional[str] = field( + default=None, + metadata={ + "name": "CollectorName", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + illuminator_name: Optional[str] = field( + default=None, + metadata={ + "name": "IlluminatorName", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + }, + ) + core_name: Optional[str] = field( + default=None, + metadata={ + "name": "CoreName", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + collect_type: Optional[CollectType] = field( + default=None, + metadata={ + "name": "CollectType", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + }, + ) + radar_mode: Optional["CollectionInfoType.RadarMode"] = field( + default=None, + metadata={ + "name": "RadarMode", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + classification: Optional[str] = field( + default=None, + metadata={ + "name": "Classification", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + country_code: List[str] = field( + default_factory=list, + metadata={ + "name": "CountryCode", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + }, + ) + parameter: List[ParameterType] = field( + default_factory=list, + metadata={ + "name": "Parameter", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + }, + ) + + @dataclass + class RadarMode: + mode_type: Optional[RadarModeType] = field( + default=None, + metadata={ + "name": "ModeType", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + mode_id: Optional[str] = field( + default=None, + metadata={ + "name": "ModeID", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + }, + ) + + +@dataclass +class ErrorStatisticsType: + composite_scp: Optional["ErrorStatisticsType.CompositeSCP"] = field( + default=None, + metadata={ + "name": "CompositeSCP", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + }, + ) + components: Optional["ErrorStatisticsType.Components"] = field( + default=None, + metadata={ + "name": "Components", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + }, + ) + additional_parms: Optional["ErrorStatisticsType.AdditionalParms"] = field( + default=None, + metadata={ + "name": "AdditionalParms", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + }, + ) + + @dataclass + class CompositeSCP: + rg: Optional[float] = field( + default=None, + metadata={ + "name": "Rg", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + az: Optional[float] = field( + default=None, + metadata={ + "name": "Az", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + rg_az: Optional[float] = field( + default=None, + metadata={ + "name": "RgAz", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + + @dataclass + class Components: + pos_vel_err: Optional["ErrorStatisticsType.Components.PosVelErr"] = field( + default=None, + metadata={ + "name": "PosVelErr", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + radar_sensor: Optional["ErrorStatisticsType.Components.RadarSensor"] = field( + default=None, + metadata={ + "name": "RadarSensor", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + tropo_error: Optional["ErrorStatisticsType.Components.TropoError"] = field( + default=None, + metadata={ + "name": "TropoError", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + }, + ) + iono_error: Optional["ErrorStatisticsType.Components.IonoError"] = field( + default=None, + metadata={ + "name": "IonoError", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + }, + ) + + @dataclass + class PosVelErr: + frame: Optional[PosVelErrFrame] = field( + default=None, + metadata={ + "name": "Frame", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + p1: Optional[float] = field( + default=None, + metadata={ + "name": "P1", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + p2: Optional[float] = field( + default=None, + metadata={ + "name": "P2", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + p3: Optional[float] = field( + default=None, + metadata={ + "name": "P3", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + v1: Optional[float] = field( + default=None, + metadata={ + "name": "V1", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + v2: Optional[float] = field( + default=None, + metadata={ + "name": "V2", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + v3: Optional[float] = field( + default=None, + metadata={ + "name": "V3", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + corr_coefs: Optional["ErrorStatisticsType.Components.PosVelErr.CorrCoefs"] = field( + default=None, + metadata={ + "name": "CorrCoefs", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + }, + ) + position_decorr: Optional[ErrorDecorrFuncType] = field( + default=None, + metadata={ + "name": "PositionDecorr", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + }, + ) + + @dataclass + class CorrCoefs: + p1_p2: Optional[float] = field( + default=None, + metadata={ + "name": "P1P2", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + p1_p3: Optional[float] = field( + default=None, + metadata={ + "name": "P1P3", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + p1_v1: Optional[float] = field( + default=None, + metadata={ + "name": "P1V1", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + p1_v2: Optional[float] = field( + default=None, + metadata={ + "name": "P1V2", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + p1_v3: Optional[float] = field( + default=None, + metadata={ + "name": "P1V3", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + p2_p3: Optional[float] = field( + default=None, + metadata={ + "name": "P2P3", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + p2_v1: Optional[float] = field( + default=None, + metadata={ + "name": "P2V1", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + p2_v2: Optional[float] = field( + default=None, + metadata={ + "name": "P2V2", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + p2_v3: Optional[float] = field( + default=None, + metadata={ + "name": "P2V3", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + p3_v1: Optional[float] = field( + default=None, + metadata={ + "name": "P3V1", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + p3_v2: Optional[float] = field( + default=None, + metadata={ + "name": "P3V2", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + p3_v3: Optional[float] = field( + default=None, + metadata={ + "name": "P3V3", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + v1_v2: Optional[float] = field( + default=None, + metadata={ + "name": "V1V2", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + v1_v3: Optional[float] = field( + default=None, + metadata={ + "name": "V1V3", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + v2_v3: Optional[float] = field( + default=None, + metadata={ + "name": "V2V3", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + + @dataclass + class RadarSensor: + range_bias: Optional[float] = field( + default=None, + metadata={ + "name": "RangeBias", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + clock_freq_sf: Optional[float] = field( + default=None, + metadata={ + "name": "ClockFreqSF", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + }, + ) + transmit_freq_sf: Optional[float] = field( + default=None, + metadata={ + "name": "TransmitFreqSF", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + }, + ) + range_bias_decorr: Optional[ErrorDecorrFuncType] = field( + default=None, + metadata={ + "name": "RangeBiasDecorr", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + }, + ) + + @dataclass + class TropoError: + tropo_range_vertical: Optional[float] = field( + default=None, + metadata={ + "name": "TropoRangeVertical", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + }, + ) + tropo_range_slant: Optional[float] = field( + default=None, + metadata={ + "name": "TropoRangeSlant", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + }, + ) + tropo_range_decorr: Optional[ErrorDecorrFuncType] = field( + default=None, + metadata={ + "name": "TropoRangeDecorr", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + }, + ) + + @dataclass + class IonoError: + iono_range_vertical: Optional[float] = field( + default=None, + metadata={ + "name": "IonoRangeVertical", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + }, + ) + iono_range_rate_vertical: Optional[float] = field( + default=None, + metadata={ + "name": "IonoRangeRateVertical", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + }, + ) + iono_rg_rg_rate_cc: Optional[float] = field( + default=None, + metadata={ + "name": "IonoRgRgRateCC", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + iono_range_vert_decorr: Optional[ErrorDecorrFuncType] = field( + default=None, + metadata={ + "name": "IonoRangeVertDecorr", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + }, + ) + + @dataclass + class AdditionalParms: + parameter: List[ParameterType] = field( + default_factory=list, + metadata={ + "name": "Parameter", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "min_occurs": 1, + }, + ) + + +@dataclass +class ImageFormationType: + rcv_chan_proc: Optional["ImageFormationType.RcvChanProc"] = field( + default=None, + metadata={ + "name": "RcvChanProc", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + tx_rcv_polarization_proc: Optional[DualPolarizationType] = field( + default=None, + metadata={ + "name": "TxRcvPolarizationProc", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + tstart_proc: Optional[float] = field( + default=None, + metadata={ + "name": "TStartProc", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + tend_proc: Optional[float] = field( + default=None, + metadata={ + "name": "TEndProc", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + tx_frequency_proc: Optional["ImageFormationType.TxFrequencyProc"] = field( + default=None, + metadata={ + "name": "TxFrequencyProc", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + segment_identifier: Optional[str] = field( + default=None, + metadata={ + "name": "SegmentIdentifier", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + }, + ) + image_form_algo: Optional[ImageFormAlgo] = field( + default=None, + metadata={ + "name": "ImageFormAlgo", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + stbeam_comp: Optional[STBeamComp] = field( + default=None, + metadata={ + "name": "STBeamComp", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + image_beam_comp: Optional[ImageBeamComp] = field( + default=None, + metadata={ + "name": "ImageBeamComp", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + az_autofocus: Optional[AzAutofocus] = field( + default=None, + metadata={ + "name": "AzAutofocus", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + rg_autofocus: Optional[RgAutofocus] = field( + default=None, + metadata={ + "name": "RgAutofocus", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + processing: List["ImageFormationType.Processing"] = field( + default_factory=list, + metadata={ + "name": "Processing", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + }, + ) + polarization_calibration: Optional["ImageFormationType.PolarizationCalibration"] = field( + default=None, + metadata={ + "name": "PolarizationCalibration", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + }, + ) + + @dataclass + class RcvChanProc: + num_chan_proc: Optional[int] = field( + default=None, + metadata={ + "name": "NumChanProc", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + prfscale_factor: Optional[float] = field( + default=None, + metadata={ + "name": "PRFScaleFactor", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + }, + ) + chan_index: List[int] = field( + default_factory=list, + metadata={ + "name": "ChanIndex", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "min_occurs": 1, + }, + ) + + @dataclass + class TxFrequencyProc: + min_proc: Optional[float] = field( + default=None, + metadata={ + "name": "MinProc", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + max_proc: Optional[float] = field( + default=None, + metadata={ + "name": "MaxProc", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + + @dataclass + class Processing: + type_value: Optional[str] = field( + default=None, + metadata={ + "name": "Type", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + applied: Optional[bool] = field( + default=None, + metadata={ + "name": "Applied", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + parameter: List[ParameterType] = field( + default_factory=list, + metadata={ + "name": "Parameter", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + }, + ) + + @dataclass + class PolarizationCalibration: + distort_correction_applied: Optional[bool] = field( + default=None, + metadata={ + "name": "DistortCorrectionApplied", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + distortion: Optional["ImageFormationType.PolarizationCalibration.Distortion"] = field( + default=None, + metadata={ + "name": "Distortion", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + + @dataclass + class Distortion: + calibration_date: Optional[XmlDateTime] = field( + default=None, + metadata={ + "name": "CalibrationDate", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + }, + ) + a: Optional[float] = field( + default=None, + metadata={ + "name": "A", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + f1: Optional[ComplexType] = field( + default=None, + metadata={ + "name": "F1", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + q1: Optional[ComplexType] = field( + default=None, + metadata={ + "name": "Q1", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + q2: Optional[ComplexType] = field( + default=None, + metadata={ + "name": "Q2", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + f2: Optional[ComplexType] = field( + default=None, + metadata={ + "name": "F2", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + q3: Optional[ComplexType] = field( + default=None, + metadata={ + "name": "Q3", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + q4: Optional[ComplexType] = field( + default=None, + metadata={ + "name": "Q4", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + gain_error_a: Optional[float] = field( + default=None, + metadata={ + "name": "GainErrorA", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + }, + ) + gain_error_f1: Optional[float] = field( + default=None, + metadata={ + "name": "GainErrorF1", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + }, + ) + gain_error_f2: Optional[float] = field( + default=None, + metadata={ + "name": "GainErrorF2", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + }, + ) + phase_error_f1: Optional[float] = field( + default=None, + metadata={ + "name": "PhaseErrorF1", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + }, + ) + phase_error_f2: Optional[float] = field( + default=None, + metadata={ + "name": "PhaseErrorF2", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + }, + ) + + +@dataclass +class LatLonCornerStringType(LatLonType): + index: Optional[CornerStringType] = field( + default=None, + metadata={ + "type": "Attribute", + "required": True, + }, + ) + + +@dataclass +class LatLonCornerType(LatLonType): + index: Optional[int] = field( + default=None, + metadata={ + "type": "Attribute", + "required": True, + "min_inclusive": 1, + "max_inclusive": 4, + }, + ) + + +@dataclass +class LatLonHAECornerRestrictType(LatLonHAERestrictionType): + index: Optional[int] = field( + default=None, + metadata={ + "type": "Attribute", + "required": True, + "min_inclusive": 1, + "max_inclusive": 4, + }, + ) + + +@dataclass +class LatLonHAECornerStringType(LatLonHAEType): + index: Optional[CornerStringType] = field( + default=None, + metadata={ + "type": "Attribute", + "required": True, + }, + ) + + +@dataclass +class LineType: + endpoint: List["LineType.Endpoint"] = field( + default_factory=list, + metadata={ + "name": "Endpoint", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "min_occurs": 2, + }, + ) + size: Optional[int] = field( + default=None, + metadata={ + "type": "Attribute", + "required": True, + }, + ) + + @dataclass + class Endpoint(LatLonType): + index: Optional[int] = field( + default=None, + metadata={ + "type": "Attribute", + "required": True, + }, + ) + + +@dataclass +class MatchInfoType: + num_match_types: Optional[int] = field( + default=None, + metadata={ + "name": "NumMatchTypes", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + match_type: List["MatchInfoType.MatchType"] = field( + default_factory=list, + metadata={ + "name": "MatchType", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "min_occurs": 1, + }, + ) + + @dataclass + class MatchType: + type_id: Optional[str] = field( + default=None, + metadata={ + "name": "TypeID", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + current_index: Optional[int] = field( + default=None, + metadata={ + "name": "CurrentIndex", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + }, + ) + num_match_collections: Optional[int] = field( + default=None, + metadata={ + "name": "NumMatchCollections", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + match_collection: List["MatchInfoType.MatchType.MatchCollection"] = field( + default_factory=list, + metadata={ + "name": "MatchCollection", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + }, + ) + index: Optional[int] = field( + default=None, + metadata={ + "type": "Attribute", + "required": True, + }, + ) + + @dataclass + class MatchCollection: + core_name: Optional[str] = field( + default=None, + metadata={ + "name": "CoreName", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + match_index: Optional[int] = field( + default=None, + metadata={ + "name": "MatchIndex", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + }, + ) + parameter: List[ParameterType] = field( + default_factory=list, + metadata={ + "name": "Parameter", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + }, + ) + index: Optional[int] = field( + default=None, + metadata={ + "type": "Attribute", + "required": True, + }, + ) + + +@dataclass +class Poly1DType: + coef: List[PolyCoef1DType] = field( + default_factory=list, + metadata={ + "name": "Coef", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "min_occurs": 1, + }, + ) + order1: Optional[int] = field( + default=None, + metadata={ + "type": "Attribute", + "required": True, + }, + ) + + +@dataclass +class Poly2DType: + coef: List[PolyCoef2DType] = field( + default_factory=list, + metadata={ + "name": "Coef", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "min_occurs": 1, + }, + ) + order1: Optional[int] = field( + default=None, + metadata={ + "type": "Attribute", + "required": True, + }, + ) + order2: Optional[int] = field( + default=None, + metadata={ + "type": "Attribute", + "required": True, + }, + ) + + +@dataclass +class PolygonType: + vertex: List["PolygonType.Vertex"] = field( + default_factory=list, + metadata={ + "name": "Vertex", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "min_occurs": 3, + }, + ) + size: Optional[int] = field( + default=None, + metadata={ + "type": "Attribute", + "required": True, + }, + ) + + @dataclass + class Vertex(LatLonRestrictionType): + index: Optional[int] = field( + default=None, + metadata={ + "type": "Attribute", + "required": True, + }, + ) + + +@dataclass +class RowColvertexType(RowColType): + index: Optional[int] = field( + default=None, + metadata={ + "type": "Attribute", + "required": True, + }, + ) + + +@dataclass +class SCPCOAType: + scptime: Optional[float] = field( + default=None, + metadata={ + "name": "SCPTime", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + arppos: Optional[XYZType] = field( + default=None, + metadata={ + "name": "ARPPos", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + arpvel: Optional[XYZType] = field( + default=None, + metadata={ + "name": "ARPVel", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + arpacc: Optional[XYZType] = field( + default=None, + metadata={ + "name": "ARPAcc", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + side_of_track: Optional[SideOfTrack] = field( + default=None, + metadata={ + "name": "SideOfTrack", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + slant_range: Optional[float] = field( + default=None, + metadata={ + "name": "SlantRange", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + ground_range: Optional[float] = field( + default=None, + metadata={ + "name": "GroundRange", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + doppler_cone_ang: Optional[float] = field( + default=None, + metadata={ + "name": "DopplerConeAng", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + graze_ang: Optional[float] = field( + default=None, + metadata={ + "name": "GrazeAng", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + "min_inclusive": 0.0, + "max_inclusive": 90.0, + }, + ) + incidence_ang: Optional[float] = field( + default=None, + metadata={ + "name": "IncidenceAng", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + "min_inclusive": 0.0, + "max_inclusive": 90.0, + }, + ) + twist_ang: Optional[float] = field( + default=None, + metadata={ + "name": "TwistAng", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + "min_inclusive": -90.0, + "max_inclusive": 90.0, + }, + ) + slope_ang: Optional[float] = field( + default=None, + metadata={ + "name": "SlopeAng", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + "min_inclusive": 0.0, + "max_inclusive": 90.0, + }, + ) + azim_ang: Optional[float] = field( + default=None, + metadata={ + "name": "AzimAng", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + "min_inclusive": 0.0, + "max_inclusive": 360.0, + }, + ) + layover_ang: Optional[float] = field( + default=None, + metadata={ + "name": "LayoverAng", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + "min_inclusive": 0.0, + "max_inclusive": 360.0, + }, + ) + + +@dataclass +class DirParamType: + uvect_ecf: Optional[XYZType] = field( + default=None, + metadata={ + "name": "UVectECF", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + ss: Optional[float] = field( + default=None, + metadata={ + "name": "SS", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + imp_resp_wid: Optional[float] = field( + default=None, + metadata={ + "name": "ImpRespWid", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + sgn: Optional[DirParamTypeSgn] = field( + default=None, + metadata={ + "name": "Sgn", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + imp_resp_bw: Optional[float] = field( + default=None, + metadata={ + "name": "ImpRespBW", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + kctr: Optional[float] = field( + default=None, + metadata={ + "name": "KCtr", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + delta_k1: Optional[float] = field( + default=None, + metadata={ + "name": "DeltaK1", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + delta_k2: Optional[float] = field( + default=None, + metadata={ + "name": "DeltaK2", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + delta_kcoapoly: Optional[Poly2DType] = field( + default=None, + metadata={ + "name": "DeltaKCOAPoly", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + }, + ) + wgt_type: Optional["DirParamType.WgtType"] = field( + default=None, + metadata={ + "name": "WgtType", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + }, + ) + wgt_funct: Optional["DirParamType.WgtFunct"] = field( + default=None, + metadata={ + "name": "WgtFunct", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + }, + ) + + @dataclass + class WgtType: + window_name: Optional[str] = field( + default=None, + metadata={ + "name": "WindowName", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + parameter: List[ParameterType] = field( + default_factory=list, + metadata={ + "name": "Parameter", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + }, + ) + + @dataclass + class WgtFunct: + wgt: List[ArrayDouble] = field( + default_factory=list, + metadata={ + "name": "Wgt", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "min_occurs": 2, + }, + ) + size: Optional[int] = field( + default=None, + metadata={ + "type": "Attribute", + "required": True, + }, + ) + + +@dataclass +class GainPhasePolyType: + gain_poly: Optional[Poly2DType] = field( + default=None, + metadata={ + "name": "GainPoly", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + phase_poly: Optional[Poly2DType] = field( + default=None, + metadata={ + "name": "PhasePoly", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + + +@dataclass +class GeoInfoType: + desc: List[ParameterType] = field( + default_factory=list, + metadata={ + "name": "Desc", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + }, + ) + point: Optional[LatLonRestrictionType] = field( + default=None, + metadata={ + "name": "Point", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + }, + ) + line: Optional[LineType] = field( + default=None, + metadata={ + "name": "Line", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + }, + ) + polygon: Optional[PolygonType] = field( + default=None, + metadata={ + "name": "Polygon", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + }, + ) + geo_info: List["GeoInfoType"] = field( + default_factory=list, + metadata={ + "name": "GeoInfo", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + }, + ) + name: Optional[str] = field( + default=None, + metadata={ + "type": "Attribute", + "required": True, + }, + ) + + +@dataclass +class ImageDataType: + pixel_type: Optional[ImagePixelType] = field( + default=None, + metadata={ + "name": "PixelType", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + amp_table: Optional["ImageDataType.AmpTable"] = field( + default=None, + metadata={ + "name": "AmpTable", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + }, + ) + num_rows: Optional[int] = field( + default=None, + metadata={ + "name": "NumRows", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + num_cols: Optional[int] = field( + default=None, + metadata={ + "name": "NumCols", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + first_row: Optional[int] = field( + default=None, + metadata={ + "name": "FirstRow", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + first_col: Optional[int] = field( + default=None, + metadata={ + "name": "FirstCol", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + full_image: Optional["ImageDataType.FullImage"] = field( + default=None, + metadata={ + "name": "FullImage", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + scppixel: Optional[RowColType] = field( + default=None, + metadata={ + "name": "SCPPixel", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + valid_data: Optional["ImageDataType.ValidData"] = field( + default=None, + metadata={ + "name": "ValidData", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + }, + ) + + @dataclass + class AmpTable: + amplitude: List[ArrayDouble] = field( + default_factory=list, + metadata={ + "name": "Amplitude", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "min_occurs": 256, + "max_occurs": 256, + }, + ) + size: Optional[int] = field( + default=None, + metadata={ + "type": "Attribute", + "required": True, + }, + ) + + @dataclass + class FullImage: + num_rows: Optional[int] = field( + default=None, + metadata={ + "name": "NumRows", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + num_cols: Optional[int] = field( + default=None, + metadata={ + "name": "NumCols", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + + @dataclass + class ValidData: + vertex: List[RowColvertexType] = field( + default_factory=list, + metadata={ + "name": "Vertex", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "min_occurs": 3, + }, + ) + size: Optional[int] = field( + default=None, + metadata={ + "type": "Attribute", + "required": True, + }, + ) + + +@dataclass +class PFAType: + fpn: Optional[XYZType] = field( + default=None, + metadata={ + "name": "FPN", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + ipn: Optional[XYZType] = field( + default=None, + metadata={ + "name": "IPN", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + polar_ang_ref_time: Optional[float] = field( + default=None, + metadata={ + "name": "PolarAngRefTime", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + polar_ang_poly: Optional[Poly1DType] = field( + default=None, + metadata={ + "name": "PolarAngPoly", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + spatial_freq_sfpoly: Optional[Poly1DType] = field( + default=None, + metadata={ + "name": "SpatialFreqSFPoly", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + krg1: Optional[float] = field( + default=None, + metadata={ + "name": "Krg1", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + krg2: Optional[float] = field( + default=None, + metadata={ + "name": "Krg2", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + kaz1: Optional[float] = field( + default=None, + metadata={ + "name": "Kaz1", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + kaz2: Optional[float] = field( + default=None, + metadata={ + "name": "Kaz2", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + stdeskew: Optional["PFAType.STDeskew"] = field( + default=None, + metadata={ + "name": "STDeskew", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + }, + ) + + @dataclass + class STDeskew: + applied: Optional[bool] = field( + default=None, + metadata={ + "name": "Applied", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + stdsphase_poly: Optional[Poly2DType] = field( + default=None, + metadata={ + "name": "STDSPhasePoly", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + + +@dataclass +class RMAType: + rmalgo_type: Optional[RMAlgorithm] = field( + default=None, + metadata={ + "name": "RMAlgoType", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + image_type: Optional[RMAImageType] = field( + default=None, + metadata={ + "name": "ImageType", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + rmat: Optional["RMAType.RMAT"] = field( + default=None, + metadata={ + "name": "RMAT", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + }, + ) + rmcr: Optional["RMAType.RMCR"] = field( + default=None, + metadata={ + "name": "RMCR", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + }, + ) + inca: Optional["RMAType.INCA"] = field( + default=None, + metadata={ + "name": "INCA", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + }, + ) + + @dataclass + class RMAT: + pos_ref: Optional[XYZType] = field( + default=None, + metadata={ + "name": "PosRef", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + vel_ref: Optional[XYZType] = field( + default=None, + metadata={ + "name": "VelRef", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + dop_cone_ang_ref: Optional[float] = field( + default=None, + metadata={ + "name": "DopConeAngRef", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + + @dataclass + class RMCR: + pos_ref: Optional[XYZType] = field( + default=None, + metadata={ + "name": "PosRef", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + vel_ref: Optional[XYZType] = field( + default=None, + metadata={ + "name": "VelRef", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + dop_cone_ang_ref: Optional[float] = field( + default=None, + metadata={ + "name": "DopConeAngRef", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + + @dataclass + class INCA: + time_capoly: Optional[Poly1DType] = field( + default=None, + metadata={ + "name": "TimeCAPoly", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + r_ca_scp: Optional[float] = field( + default=None, + metadata={ + "name": "R_CA_SCP", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + freq_zero: Optional[float] = field( + default=None, + metadata={ + "name": "FreqZero", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + drate_sfpoly: Optional[Poly2DType] = field( + default=None, + metadata={ + "name": "DRateSFPoly", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + dop_centroid_poly: Optional[Poly2DType] = field( + default=None, + metadata={ + "name": "DopCentroidPoly", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + }, + ) + dop_centroid_coa: Optional[bool] = field( + default=None, + metadata={ + "name": "DopCentroidCOA", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + }, + ) + + +@dataclass +class RadarCollectionType: + tx_frequency: Optional["RadarCollectionType.TxFrequency"] = field( + default=None, + metadata={ + "name": "TxFrequency", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + ref_freq_index: Optional[int] = field( + default=None, + metadata={ + "name": "RefFreqIndex", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + }, + ) + waveform: Optional["RadarCollectionType.Waveform"] = field( + default=None, + metadata={ + "name": "Waveform", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + }, + ) + tx_polarization: Optional[Polarization1Type] = field( + default=None, + metadata={ + "name": "TxPolarization", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + tx_sequence: Optional["RadarCollectionType.TxSequence"] = field( + default=None, + metadata={ + "name": "TxSequence", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + }, + ) + rcv_channels: Optional["RadarCollectionType.RcvChannels"] = field( + default=None, + metadata={ + "name": "RcvChannels", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + area: Optional["RadarCollectionType.Area"] = field( + default=None, + metadata={ + "name": "Area", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + }, + ) + parameter: List[ParameterType] = field( + default_factory=list, + metadata={ + "name": "Parameter", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + }, + ) + + @dataclass + class TxFrequency: + min: Optional[float] = field( + default=None, + metadata={ + "name": "Min", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + max: Optional[float] = field( + default=None, + metadata={ + "name": "Max", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + + @dataclass + class Waveform: + wfparameters: List["RadarCollectionType.Waveform.WFParameters"] = field( + default_factory=list, + metadata={ + "name": "WFParameters", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "min_occurs": 1, + }, + ) + size: Optional[int] = field( + default=None, + metadata={ + "type": "Attribute", + "required": True, + }, + ) + + @dataclass + class WFParameters: + tx_pulse_length: Optional[float] = field( + default=None, + metadata={ + "name": "TxPulseLength", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + }, + ) + tx_rfbandwidth: Optional[float] = field( + default=None, + metadata={ + "name": "TxRFBandwidth", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + }, + ) + tx_freq_start: Optional[float] = field( + default=None, + metadata={ + "name": "TxFreqStart", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + }, + ) + tx_fmrate: Optional[float] = field( + default=None, + metadata={ + "name": "TxFMRate", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + }, + ) + rcv_demod_type: Optional[WFParametersRcvDemodType] = field( + default=None, + metadata={ + "name": "RcvDemodType", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + }, + ) + rcv_window_length: Optional[float] = field( + default=None, + metadata={ + "name": "RcvWindowLength", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + }, + ) + adcsample_rate: Optional[float] = field( + default=None, + metadata={ + "name": "ADCSampleRate", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + }, + ) + rcv_ifbandwidth: Optional[float] = field( + default=None, + metadata={ + "name": "RcvIFBandwidth", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + }, + ) + rcv_freq_start: Optional[float] = field( + default=None, + metadata={ + "name": "RcvFreqStart", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + }, + ) + rcv_fmrate: Optional[float] = field( + default=None, + metadata={ + "name": "RcvFMRate", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + }, + ) + index: Optional[int] = field( + default=None, + metadata={ + "type": "Attribute", + "required": True, + }, + ) + + @dataclass + class TxSequence: + tx_step: List["RadarCollectionType.TxSequence.TxStep"] = field( + default_factory=list, + metadata={ + "name": "TxStep", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "min_occurs": 1, + }, + ) + size: Optional[int] = field( + default=None, + metadata={ + "type": "Attribute", + "required": True, + }, + ) + + @dataclass + class TxStep: + wfindex: Optional[int] = field( + default=None, + metadata={ + "name": "WFIndex", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + }, + ) + tx_polarization: Optional[Polarization2Type] = field( + default=None, + metadata={ + "name": "TxPolarization", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + }, + ) + index: Optional[int] = field( + default=None, + metadata={ + "type": "Attribute", + "required": True, + }, + ) + + @dataclass + class RcvChannels: + chan_parameters: List["RadarCollectionType.RcvChannels.ChanParameters"] = field( + default_factory=list, + metadata={ + "name": "ChanParameters", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "min_occurs": 1, + }, + ) + size: Optional[int] = field( + default=None, + metadata={ + "type": "Attribute", + "required": True, + }, + ) + + @dataclass + class ChanParameters: + tx_rcv_polarization: Optional[DualPolarizationType] = field( + default=None, + metadata={ + "name": "TxRcvPolarization", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + rcv_apcindex: Optional[int] = field( + default=None, + metadata={ + "name": "RcvAPCIndex", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + }, + ) + index: Optional[int] = field( + default=None, + metadata={ + "type": "Attribute", + "required": True, + }, + ) + + @dataclass + class Area: + corner: Optional["RadarCollectionType.Area.Corner"] = field( + default=None, + metadata={ + "name": "Corner", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + plane: Optional["RadarCollectionType.Area.Plane"] = field( + default=None, + metadata={ + "name": "Plane", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + }, + ) + + @dataclass + class Corner: + acp: List[LatLonHAECornerRestrictType] = field( + default_factory=list, + metadata={ + "name": "ACP", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "min_occurs": 4, + "max_occurs": 4, + }, + ) + + @dataclass + class Plane: + ref_pt: Optional["RadarCollectionType.Area.Plane.RefPt"] = field( + default=None, + metadata={ + "name": "RefPt", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + xdir: Optional["RadarCollectionType.Area.Plane.XDir"] = field( + default=None, + metadata={ + "name": "XDir", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + ydir: Optional["RadarCollectionType.Area.Plane.YDir"] = field( + default=None, + metadata={ + "name": "YDir", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + segment_list: Optional["RadarCollectionType.Area.Plane.SegmentList"] = field( + default=None, + metadata={ + "name": "SegmentList", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + }, + ) + orientation: Optional[OrientationType] = field( + default=None, + metadata={ + "name": "Orientation", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + }, + ) + + @dataclass + class RefPt: + ecf: Optional[XYZType] = field( + default=None, + metadata={ + "name": "ECF", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + line: Optional[float] = field( + default=None, + metadata={ + "name": "Line", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + sample: Optional[float] = field( + default=None, + metadata={ + "name": "Sample", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + name: Optional[str] = field( + default=None, + metadata={ + "type": "Attribute", + }, + ) + + @dataclass + class XDir: + uvect_ecf: Optional[XYZType] = field( + default=None, + metadata={ + "name": "UVectECF", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + line_spacing: Optional[float] = field( + default=None, + metadata={ + "name": "LineSpacing", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + num_lines: Optional[int] = field( + default=None, + metadata={ + "name": "NumLines", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + first_line: Optional[int] = field( + default=None, + metadata={ + "name": "FirstLine", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + + @dataclass + class YDir: + uvect_ecf: Optional[XYZType] = field( + default=None, + metadata={ + "name": "UVectECF", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + sample_spacing: Optional[float] = field( + default=None, + metadata={ + "name": "SampleSpacing", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + num_samples: Optional[int] = field( + default=None, + metadata={ + "name": "NumSamples", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + first_sample: Optional[int] = field( + default=None, + metadata={ + "name": "FirstSample", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + + @dataclass + class SegmentList: + segment: List["RadarCollectionType.Area.Plane.SegmentList.Segment"] = field( + default_factory=list, + metadata={ + "name": "Segment", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "min_occurs": 1, + }, + ) + size: Optional[int] = field( + default=None, + metadata={ + "type": "Attribute", + "required": True, + }, + ) + + @dataclass + class Segment: + start_line: Optional[int] = field( + default=None, + metadata={ + "name": "StartLine", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + start_sample: Optional[int] = field( + default=None, + metadata={ + "name": "StartSample", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + end_line: Optional[int] = field( + default=None, + metadata={ + "name": "EndLine", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + end_sample: Optional[int] = field( + default=None, + metadata={ + "name": "EndSample", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + identifier: Optional[str] = field( + default=None, + metadata={ + "name": "Identifier", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + index: Optional[int] = field( + default=None, + metadata={ + "type": "Attribute", + "required": True, + }, + ) + + +@dataclass +class RadiometricType: + noise_level: Optional["RadiometricType.NoiseLevel"] = field( + default=None, + metadata={ + "name": "NoiseLevel", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + }, + ) + rcssfpoly: Optional[Poly2DType] = field( + default=None, + metadata={ + "name": "RCSSFPoly", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + }, + ) + sigma_zero_sfpoly: Optional[Poly2DType] = field( + default=None, + metadata={ + "name": "SigmaZeroSFPoly", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + }, + ) + beta_zero_sfpoly: Optional[Poly2DType] = field( + default=None, + metadata={ + "name": "BetaZeroSFPoly", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + }, + ) + gamma_zero_sfpoly: Optional[Poly2DType] = field( + default=None, + metadata={ + "name": "GammaZeroSFPoly", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + }, + ) + + @dataclass + class NoiseLevel: + noise_level_type: Optional[NoiseLevelType] = field( + default=None, + metadata={ + "name": "NoiseLevelType", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + noise_poly: Optional[Poly2DType] = field( + default=None, + metadata={ + "name": "NoisePoly", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + + +@dataclass +class RgAzCompType: + az_sf: Optional[float] = field( + default=None, + metadata={ + "name": "AzSF", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + kaz_poly: Optional[Poly1DType] = field( + default=None, + metadata={ + "name": "KazPoly", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + + +@dataclass +class TimelineType: + collect_start: Optional[XmlDateTime] = field( + default=None, + metadata={ + "name": "CollectStart", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + collect_duration: Optional[float] = field( + default=None, + metadata={ + "name": "CollectDuration", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + ipp: Optional["TimelineType.IPP"] = field( + default=None, + metadata={ + "name": "IPP", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + }, + ) + + @dataclass + class IPP: + set: List["TimelineType.IPP.Set"] = field( + default_factory=list, + metadata={ + "name": "Set", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "min_occurs": 1, + }, + ) + size: Optional[int] = field( + default=None, + metadata={ + "type": "Attribute", + "required": True, + }, + ) + + @dataclass + class Set: + tstart: Optional[float] = field( + default=None, + metadata={ + "name": "TStart", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + tend: Optional[float] = field( + default=None, + metadata={ + "name": "TEnd", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + ippstart: Optional[int] = field( + default=None, + metadata={ + "name": "IPPStart", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + ippend: Optional[int] = field( + default=None, + metadata={ + "name": "IPPEnd", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + ipppoly: Optional[Poly1DType] = field( + default=None, + metadata={ + "name": "IPPPoly", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + index: Optional[int] = field( + default=None, + metadata={ + "type": "Attribute", + "required": True, + }, + ) + + +@dataclass +class XYZPolyType: + x: Optional[Poly1DType] = field( + default=None, + metadata={ + "name": "X", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + y: Optional[Poly1DType] = field( + default=None, + metadata={ + "name": "Y", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + z: Optional[Poly1DType] = field( + default=None, + metadata={ + "name": "Z", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + + +@dataclass +class AntParamType: + xaxis_poly: Optional[XYZPolyType] = field( + default=None, + metadata={ + "name": "XAxisPoly", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + yaxis_poly: Optional[XYZPolyType] = field( + default=None, + metadata={ + "name": "YAxisPoly", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + freq_zero: Optional[float] = field( + default=None, + metadata={ + "name": "FreqZero", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + eb: Optional["AntParamType.EB"] = field( + default=None, + metadata={ + "name": "EB", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + }, + ) + array: Optional[GainPhasePolyType] = field( + default=None, + metadata={ + "name": "Array", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + elem: Optional[GainPhasePolyType] = field( + default=None, + metadata={ + "name": "Elem", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + }, + ) + gain_bspoly: Optional[Poly1DType] = field( + default=None, + metadata={ + "name": "GainBSPoly", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + }, + ) + ebfreq_shift: Optional[bool] = field( + default=None, + metadata={ + "name": "EBFreqShift", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + }, + ) + mlfreq_dilation: Optional[bool] = field( + default=None, + metadata={ + "name": "MLFreqDilation", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + }, + ) + + @dataclass + class EB: + dcxpoly: Optional[Poly1DType] = field( + default=None, + metadata={ + "name": "DCXPoly", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + dcypoly: Optional[Poly1DType] = field( + default=None, + metadata={ + "name": "DCYPoly", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + + +@dataclass +class GeoDataType: + earth_model: Optional[EarthModel] = field( + default=None, + metadata={ + "name": "EarthModel", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + scp: Optional["GeoDataType.SCP"] = field( + default=None, + metadata={ + "name": "SCP", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + image_corners: Optional["GeoDataType.ImageCorners"] = field( + default=None, + metadata={ + "name": "ImageCorners", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + valid_data: Optional[PolygonType] = field( + default=None, + metadata={ + "name": "ValidData", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + }, + ) + geo_info: List[GeoInfoType] = field( + default_factory=list, + metadata={ + "name": "GeoInfo", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + }, + ) + + @dataclass + class SCP: + ecf: Optional[XYZType] = field( + default=None, + metadata={ + "name": "ECF", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + llh: Optional[LatLonHAERestrictionType] = field( + default=None, + metadata={ + "name": "LLH", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + + @dataclass + class ImageCorners: + icp: List[LatLonCornerStringType] = field( + default_factory=list, + metadata={ + "name": "ICP", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "min_occurs": 4, + "max_occurs": 4, + }, + ) + + +@dataclass +class GridType: + image_plane: Optional[ImagePlane] = field( + default=None, + metadata={ + "name": "ImagePlane", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + type_value: Optional[ImageGridType] = field( + default=None, + metadata={ + "name": "Type", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + time_coapoly: Optional[Poly2DType] = field( + default=None, + metadata={ + "name": "TimeCOAPoly", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + row: Optional[DirParamType] = field( + default=None, + metadata={ + "name": "Row", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + col: Optional[DirParamType] = field( + default=None, + metadata={ + "name": "Col", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + + +@dataclass +class XYZPolyAttributeType(XYZPolyType): + index: Optional[int] = field( + default=None, + metadata={ + "type": "Attribute", + "required": True, + }, + ) + + +@dataclass +class AntennaType: + tx: Optional[AntParamType] = field( + default=None, + metadata={ + "name": "Tx", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + }, + ) + rcv: Optional[AntParamType] = field( + default=None, + metadata={ + "name": "Rcv", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + }, + ) + two_way: Optional[AntParamType] = field( + default=None, + metadata={ + "name": "TwoWay", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + }, + ) + + +@dataclass +class PositionType: + arppoly: Optional[XYZPolyType] = field( + default=None, + metadata={ + "name": "ARPPoly", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "required": True, + }, + ) + grppoly: Optional[XYZPolyType] = field( + default=None, + metadata={ + "name": "GRPPoly", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + }, + ) + tx_apcpoly: Optional[XYZPolyType] = field( + default=None, + metadata={ + "name": "TxAPCPoly", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + }, + ) + rcv_apc: Optional["PositionType.RcvAPC"] = field( + default=None, + metadata={ + "name": "RcvAPC", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + }, + ) + + @dataclass + class RcvAPC: + rcv_apcpoly: List[XYZPolyAttributeType] = field( + default_factory=list, + metadata={ + "name": "RcvAPCPoly", + "type": "Element", + "namespace": "urn:SICD:1.2.1", + "min_occurs": 1, + }, + ) + size: Optional[int] = field( + default=None, + metadata={ + "type": "Attribute", + "required": True, + }, + ) + + +@dataclass +class SICD: + class Meta: + namespace = "urn:SICD:1.2.1" + + collection_info: Optional[CollectionInfoType] = field( + default=None, + metadata={ + "name": "CollectionInfo", + "type": "Element", + "required": True, + }, + ) + image_creation: Optional[ImageCreationType] = field( + default=None, + metadata={ + "name": "ImageCreation", + "type": "Element", + }, + ) + image_data: Optional[ImageDataType] = field( + default=None, + metadata={ + "name": "ImageData", + "type": "Element", + "required": True, + }, + ) + geo_data: Optional[GeoDataType] = field( + default=None, + metadata={ + "name": "GeoData", + "type": "Element", + "required": True, + }, + ) + grid: Optional[GridType] = field( + default=None, + metadata={ + "name": "Grid", + "type": "Element", + "required": True, + }, + ) + timeline: Optional[TimelineType] = field( + default=None, + metadata={ + "name": "Timeline", + "type": "Element", + "required": True, + }, + ) + position: Optional[PositionType] = field( + default=None, + metadata={ + "name": "Position", + "type": "Element", + "required": True, + }, + ) + radar_collection: Optional[RadarCollectionType] = field( + default=None, + metadata={ + "name": "RadarCollection", + "type": "Element", + "required": True, + }, + ) + image_formation: Optional[ImageFormationType] = field( + default=None, + metadata={ + "name": "ImageFormation", + "type": "Element", + "required": True, + }, + ) + scpcoa: Optional[SCPCOAType] = field( + default=None, + metadata={ + "name": "SCPCOA", + "type": "Element", + "required": True, + }, + ) + radiometric: Optional[RadiometricType] = field( + default=None, + metadata={ + "name": "Radiometric", + "type": "Element", + }, + ) + antenna: Optional[AntennaType] = field( + default=None, + metadata={ + "name": "Antenna", + "type": "Element", + }, + ) + error_statistics: Optional[ErrorStatisticsType] = field( + default=None, + metadata={ + "name": "ErrorStatistics", + "type": "Element", + }, + ) + match_info: Optional[MatchInfoType] = field( + default=None, + metadata={ + "name": "MatchInfo", + "type": "Element", + }, + ) + rg_az_comp: Optional[RgAzCompType] = field( + default=None, + metadata={ + "name": "RgAzComp", + "type": "Element", + }, + ) + pfa: Optional[PFAType] = field( + default=None, + metadata={ + "name": "PFA", + "type": "Element", + }, + ) + rma: Optional[RMAType] = field( + default=None, + metadata={ + "name": "RMA", + "type": "Element", + }, + ) diff --git a/src/aws/osml/formats/sicd/models/sicd_v1_3_0.py b/src/aws/osml/formats/sicd/models/sicd_v1_3_0.py new file mode 100644 index 0000000..f98f745 --- /dev/null +++ b/src/aws/osml/formats/sicd/models/sicd_v1_3_0.py @@ -0,0 +1,3654 @@ +"""This file was generated by xsdata, v23.8, on 2023-08-30 17:21:13 + +Generator: DataclassGenerator +See: https://xsdata.readthedocs.io/ +""" +from dataclasses import dataclass, field +from enum import Enum +from typing import List, Optional + +from xsdata.models.datatype import XmlDateTime + +__NAMESPACE__ = "urn:SICD:1.3.0" + + +@dataclass +class ArrayDouble: + value: Optional[float] = field( + default=None, + metadata={ + "required": True, + }, + ) + index: Optional[int] = field( + default=None, + metadata={ + "type": "Attribute", + "required": True, + }, + ) + + +class CollectType(Enum): + MONOSTATIC = "MONOSTATIC" + BISTATIC = "BISTATIC" + + +@dataclass +class ComplexType: + real: Optional[float] = field( + default=None, + metadata={ + "name": "Real", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + imag: Optional[float] = field( + default=None, + metadata={ + "name": "Imag", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + + +class CornerStringType(Enum): + FRFC_1 = "1:FRFC" + FRLC_2 = "2:FRLC" + LRLC_3 = "3:LRLC" + LRFC_4 = "4:LRFC" + + +class DirParamTypeSgn(Enum): + PLUS_ONE = 1 + MINUS_ONE = -1 + + +@dataclass +class ErrorDecorrFuncType: + corr_coef_zero: Optional[float] = field( + default=None, + metadata={ + "name": "CorrCoefZero", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + decorr_rate: Optional[float] = field( + default=None, + metadata={ + "name": "DecorrRate", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + + +class EarthModel(Enum): + WGS_84 = "WGS_84" + + +class ImagePlane(Enum): + SLANT = "SLANT" + GROUND = "GROUND" + OTHER = "OTHER" + + +class ImageGridType(Enum): + RGAZIM = "RGAZIM" + RGZERO = "RGZERO" + XRGYCR = "XRGYCR" + XCTYAT = "XCTYAT" + PLANE = "PLANE" + + +@dataclass +class ImageCreationType: + application: Optional[str] = field( + default=None, + metadata={ + "name": "Application", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + }, + ) + date_time: Optional[XmlDateTime] = field( + default=None, + metadata={ + "name": "DateTime", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + }, + ) + site: Optional[str] = field( + default=None, + metadata={ + "name": "Site", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + }, + ) + profile: Optional[str] = field( + default=None, + metadata={ + "name": "Profile", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + }, + ) + + +class ImagePixelType(Enum): + RE32F_IM32F = "RE32F_IM32F" + RE16I_IM16I = "RE16I_IM16I" + AMP8I_PHS8I = "AMP8I_PHS8I" + + +class AzAutofocus(Enum): + NO = "NO" + GLOBAL = "GLOBAL" + SV = "SV" + + +class ImageBeamComp(Enum): + NO = "NO" + SV = "SV" + + +class ImageFormAlgo(Enum): + PFA = "PFA" + RMA = "RMA" + RGAZCOMP = "RGAZCOMP" + OTHER = "OTHER" + + +class RgAutofocus(Enum): + NO = "NO" + GLOBAL = "GLOBAL" + SV = "SV" + + +class STBeamComp(Enum): + NO = "NO" + GLOBAL = "GLOBAL" + SV = "SV" + + +@dataclass +class LatLonHAERestrictionType: + lat: Optional[float] = field( + default=None, + metadata={ + "name": "Lat", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + "min_inclusive": -90.0, + "max_inclusive": 90.0, + }, + ) + lon: Optional[float] = field( + default=None, + metadata={ + "name": "Lon", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + "min_inclusive": -180.0, + "max_inclusive": 180.0, + }, + ) + hae: Optional[float] = field( + default=None, + metadata={ + "name": "HAE", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + + +@dataclass +class LatLonHAEType: + lat: Optional[float] = field( + default=None, + metadata={ + "name": "Lat", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + lon: Optional[float] = field( + default=None, + metadata={ + "name": "Lon", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + hae: Optional[float] = field( + default=None, + metadata={ + "name": "HAE", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + + +@dataclass +class LatLonRestrictionType: + lat: Optional[float] = field( + default=None, + metadata={ + "name": "Lat", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + "min_inclusive": -90.0, + "max_inclusive": 90.0, + }, + ) + lon: Optional[float] = field( + default=None, + metadata={ + "name": "Lon", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + "min_inclusive": -180.0, + "max_inclusive": 180.0, + }, + ) + + +@dataclass +class LatLonType: + lat: Optional[float] = field( + default=None, + metadata={ + "name": "Lat", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + lon: Optional[float] = field( + default=None, + metadata={ + "name": "Lon", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + + +class NoiseLevelType(Enum): + ABSOLUTE = "ABSOLUTE" + RELATIVE = "RELATIVE" + + +class OrientationType(Enum): + UP = "UP" + DOWN = "DOWN" + LEFT = "LEFT" + RIGHT = "RIGHT" + ARBITRARY = "ARBITRARY" + + +@dataclass +class ParameterType: + value: str = field( + default="", + metadata={ + "required": True, + }, + ) + name: Optional[str] = field( + default=None, + metadata={ + "type": "Attribute", + "required": True, + }, + ) + + +@dataclass +class PolyCoef1DType: + value: Optional[float] = field( + default=None, + metadata={ + "required": True, + }, + ) + exponent1: Optional[int] = field( + default=None, + metadata={ + "type": "Attribute", + "required": True, + }, + ) + + +@dataclass +class PolyCoef2DType: + value: Optional[float] = field( + default=None, + metadata={ + "required": True, + }, + ) + exponent1: Optional[int] = field( + default=None, + metadata={ + "type": "Attribute", + "required": True, + }, + ) + exponent2: Optional[int] = field( + default=None, + metadata={ + "type": "Attribute", + "required": True, + }, + ) + + +class PosVelErrFrame(Enum): + ECF = "ECF" + RIC_ECF = "RIC_ECF" + RIC_ECI = "RIC_ECI" + + +class RMAImageType(Enum): + RMAT = "RMAT" + RMCR = "RMCR" + INCA = "INCA" + + +class RMAlgorithm(Enum): + OMEGA_K = "OMEGA_K" + CSA = "CSA" + RG_DOP = "RG_DOP" + + +class RadarModeType(Enum): + SPOTLIGHT = "SPOTLIGHT" + STRIPMAP = "STRIPMAP" + DYNAMIC_STRIPMAP = "DYNAMIC STRIPMAP" + + +@dataclass +class RowColType: + row: Optional[int] = field( + default=None, + metadata={ + "name": "Row", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + col: Optional[int] = field( + default=None, + metadata={ + "name": "Col", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + + +class SideOfTrack(Enum): + L = "L" + R = "R" + + +class WFParametersRcvDemodType(Enum): + STRETCH = "STRETCH" + CHIRP = "CHIRP" + + +@dataclass +class XYZType: + x: Optional[float] = field( + default=None, + metadata={ + "name": "X", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + y: Optional[float] = field( + default=None, + metadata={ + "name": "Y", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + z: Optional[float] = field( + default=None, + metadata={ + "name": "Z", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + + +@dataclass +class CollectionInfoType: + collector_name: Optional[str] = field( + default=None, + metadata={ + "name": "CollectorName", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + illuminator_name: Optional[str] = field( + default=None, + metadata={ + "name": "IlluminatorName", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + }, + ) + core_name: Optional[str] = field( + default=None, + metadata={ + "name": "CoreName", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + collect_type: Optional[CollectType] = field( + default=None, + metadata={ + "name": "CollectType", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + }, + ) + radar_mode: Optional["CollectionInfoType.RadarMode"] = field( + default=None, + metadata={ + "name": "RadarMode", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + classification: Optional[str] = field( + default=None, + metadata={ + "name": "Classification", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + country_code: List[str] = field( + default_factory=list, + metadata={ + "name": "CountryCode", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + }, + ) + parameter: List[ParameterType] = field( + default_factory=list, + metadata={ + "name": "Parameter", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + }, + ) + + @dataclass + class RadarMode: + mode_type: Optional[RadarModeType] = field( + default=None, + metadata={ + "name": "ModeType", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + mode_id: Optional[str] = field( + default=None, + metadata={ + "name": "ModeID", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + }, + ) + + +@dataclass +class ErrorStatisticsType: + composite_scp: Optional["ErrorStatisticsType.CompositeSCP"] = field( + default=None, + metadata={ + "name": "CompositeSCP", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + }, + ) + components: Optional["ErrorStatisticsType.Components"] = field( + default=None, + metadata={ + "name": "Components", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + }, + ) + unmodeled: Optional["ErrorStatisticsType.Unmodeled"] = field( + default=None, + metadata={ + "name": "Unmodeled", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + }, + ) + additional_parms: Optional["ErrorStatisticsType.AdditionalParms"] = field( + default=None, + metadata={ + "name": "AdditionalParms", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + }, + ) + + @dataclass + class CompositeSCP: + rg: Optional[float] = field( + default=None, + metadata={ + "name": "Rg", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + az: Optional[float] = field( + default=None, + metadata={ + "name": "Az", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + rg_az: Optional[float] = field( + default=None, + metadata={ + "name": "RgAz", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + + @dataclass + class Components: + pos_vel_err: Optional["ErrorStatisticsType.Components.PosVelErr"] = field( + default=None, + metadata={ + "name": "PosVelErr", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + radar_sensor: Optional["ErrorStatisticsType.Components.RadarSensor"] = field( + default=None, + metadata={ + "name": "RadarSensor", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + tropo_error: Optional["ErrorStatisticsType.Components.TropoError"] = field( + default=None, + metadata={ + "name": "TropoError", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + }, + ) + iono_error: Optional["ErrorStatisticsType.Components.IonoError"] = field( + default=None, + metadata={ + "name": "IonoError", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + }, + ) + + @dataclass + class PosVelErr: + frame: Optional[PosVelErrFrame] = field( + default=None, + metadata={ + "name": "Frame", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + p1: Optional[float] = field( + default=None, + metadata={ + "name": "P1", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + p2: Optional[float] = field( + default=None, + metadata={ + "name": "P2", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + p3: Optional[float] = field( + default=None, + metadata={ + "name": "P3", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + v1: Optional[float] = field( + default=None, + metadata={ + "name": "V1", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + v2: Optional[float] = field( + default=None, + metadata={ + "name": "V2", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + v3: Optional[float] = field( + default=None, + metadata={ + "name": "V3", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + corr_coefs: Optional["ErrorStatisticsType.Components.PosVelErr.CorrCoefs"] = field( + default=None, + metadata={ + "name": "CorrCoefs", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + }, + ) + position_decorr: Optional[ErrorDecorrFuncType] = field( + default=None, + metadata={ + "name": "PositionDecorr", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + }, + ) + + @dataclass + class CorrCoefs: + p1_p2: Optional[float] = field( + default=None, + metadata={ + "name": "P1P2", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + p1_p3: Optional[float] = field( + default=None, + metadata={ + "name": "P1P3", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + p1_v1: Optional[float] = field( + default=None, + metadata={ + "name": "P1V1", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + p1_v2: Optional[float] = field( + default=None, + metadata={ + "name": "P1V2", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + p1_v3: Optional[float] = field( + default=None, + metadata={ + "name": "P1V3", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + p2_p3: Optional[float] = field( + default=None, + metadata={ + "name": "P2P3", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + p2_v1: Optional[float] = field( + default=None, + metadata={ + "name": "P2V1", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + p2_v2: Optional[float] = field( + default=None, + metadata={ + "name": "P2V2", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + p2_v3: Optional[float] = field( + default=None, + metadata={ + "name": "P2V3", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + p3_v1: Optional[float] = field( + default=None, + metadata={ + "name": "P3V1", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + p3_v2: Optional[float] = field( + default=None, + metadata={ + "name": "P3V2", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + p3_v3: Optional[float] = field( + default=None, + metadata={ + "name": "P3V3", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + v1_v2: Optional[float] = field( + default=None, + metadata={ + "name": "V1V2", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + v1_v3: Optional[float] = field( + default=None, + metadata={ + "name": "V1V3", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + v2_v3: Optional[float] = field( + default=None, + metadata={ + "name": "V2V3", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + + @dataclass + class RadarSensor: + range_bias: Optional[float] = field( + default=None, + metadata={ + "name": "RangeBias", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + clock_freq_sf: Optional[float] = field( + default=None, + metadata={ + "name": "ClockFreqSF", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + }, + ) + transmit_freq_sf: Optional[float] = field( + default=None, + metadata={ + "name": "TransmitFreqSF", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + }, + ) + range_bias_decorr: Optional[ErrorDecorrFuncType] = field( + default=None, + metadata={ + "name": "RangeBiasDecorr", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + }, + ) + + @dataclass + class TropoError: + tropo_range_vertical: Optional[float] = field( + default=None, + metadata={ + "name": "TropoRangeVertical", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + }, + ) + tropo_range_slant: Optional[float] = field( + default=None, + metadata={ + "name": "TropoRangeSlant", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + }, + ) + tropo_range_decorr: Optional[ErrorDecorrFuncType] = field( + default=None, + metadata={ + "name": "TropoRangeDecorr", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + }, + ) + + @dataclass + class IonoError: + iono_range_vertical: Optional[float] = field( + default=None, + metadata={ + "name": "IonoRangeVertical", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + }, + ) + iono_range_rate_vertical: Optional[float] = field( + default=None, + metadata={ + "name": "IonoRangeRateVertical", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + }, + ) + iono_rg_rg_rate_cc: Optional[float] = field( + default=None, + metadata={ + "name": "IonoRgRgRateCC", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + iono_range_vert_decorr: Optional[ErrorDecorrFuncType] = field( + default=None, + metadata={ + "name": "IonoRangeVertDecorr", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + }, + ) + + @dataclass + class Unmodeled: + xrow: Optional[float] = field( + default=None, + metadata={ + "name": "Xrow", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + ycol: Optional[float] = field( + default=None, + metadata={ + "name": "Ycol", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + xrow_ycol: Optional[float] = field( + default=None, + metadata={ + "name": "XrowYcol", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + unmodeled_decorr: Optional["ErrorStatisticsType.Unmodeled.UnmodeledDecorr"] = field( + default=None, + metadata={ + "name": "UnmodeledDecorr", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + }, + ) + + @dataclass + class UnmodeledDecorr: + xrow: Optional[ErrorDecorrFuncType] = field( + default=None, + metadata={ + "name": "Xrow", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + ycol: Optional[ErrorDecorrFuncType] = field( + default=None, + metadata={ + "name": "Ycol", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + + @dataclass + class AdditionalParms: + parameter: List[ParameterType] = field( + default_factory=list, + metadata={ + "name": "Parameter", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "min_occurs": 1, + }, + ) + + +@dataclass +class ImageFormationType: + rcv_chan_proc: Optional["ImageFormationType.RcvChanProc"] = field( + default=None, + metadata={ + "name": "RcvChanProc", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + tx_rcv_polarization_proc: Optional[str] = field( + default=None, + metadata={ + "name": "TxRcvPolarizationProc", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + "pattern": r"(([VHXYSE]|RHC|LHC|OTHER[^:]*):([VHXYSE]|RHC|LHC|OTHER[^:]*))|OTHER|UNKNOWN", + }, + ) + tstart_proc: Optional[float] = field( + default=None, + metadata={ + "name": "TStartProc", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + tend_proc: Optional[float] = field( + default=None, + metadata={ + "name": "TEndProc", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + tx_frequency_proc: Optional["ImageFormationType.TxFrequencyProc"] = field( + default=None, + metadata={ + "name": "TxFrequencyProc", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + segment_identifier: Optional[str] = field( + default=None, + metadata={ + "name": "SegmentIdentifier", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + }, + ) + image_form_algo: Optional[ImageFormAlgo] = field( + default=None, + metadata={ + "name": "ImageFormAlgo", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + stbeam_comp: Optional[STBeamComp] = field( + default=None, + metadata={ + "name": "STBeamComp", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + image_beam_comp: Optional[ImageBeamComp] = field( + default=None, + metadata={ + "name": "ImageBeamComp", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + az_autofocus: Optional[AzAutofocus] = field( + default=None, + metadata={ + "name": "AzAutofocus", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + rg_autofocus: Optional[RgAutofocus] = field( + default=None, + metadata={ + "name": "RgAutofocus", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + processing: List["ImageFormationType.Processing"] = field( + default_factory=list, + metadata={ + "name": "Processing", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + }, + ) + polarization_calibration: Optional["ImageFormationType.PolarizationCalibration"] = field( + default=None, + metadata={ + "name": "PolarizationCalibration", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + }, + ) + + @dataclass + class RcvChanProc: + num_chan_proc: Optional[int] = field( + default=None, + metadata={ + "name": "NumChanProc", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + prfscale_factor: Optional[float] = field( + default=None, + metadata={ + "name": "PRFScaleFactor", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + }, + ) + chan_index: List[int] = field( + default_factory=list, + metadata={ + "name": "ChanIndex", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "min_occurs": 1, + }, + ) + + @dataclass + class TxFrequencyProc: + min_proc: Optional[float] = field( + default=None, + metadata={ + "name": "MinProc", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + max_proc: Optional[float] = field( + default=None, + metadata={ + "name": "MaxProc", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + + @dataclass + class Processing: + type_value: Optional[str] = field( + default=None, + metadata={ + "name": "Type", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + applied: Optional[bool] = field( + default=None, + metadata={ + "name": "Applied", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + parameter: List[ParameterType] = field( + default_factory=list, + metadata={ + "name": "Parameter", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + }, + ) + + @dataclass + class PolarizationCalibration: + distort_correction_applied: Optional[bool] = field( + default=None, + metadata={ + "name": "DistortCorrectionApplied", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + distortion: Optional["ImageFormationType.PolarizationCalibration.Distortion"] = field( + default=None, + metadata={ + "name": "Distortion", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + + @dataclass + class Distortion: + calibration_date: Optional[XmlDateTime] = field( + default=None, + metadata={ + "name": "CalibrationDate", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + }, + ) + a: Optional[float] = field( + default=None, + metadata={ + "name": "A", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + f1: Optional[ComplexType] = field( + default=None, + metadata={ + "name": "F1", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + q1: Optional[ComplexType] = field( + default=None, + metadata={ + "name": "Q1", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + q2: Optional[ComplexType] = field( + default=None, + metadata={ + "name": "Q2", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + f2: Optional[ComplexType] = field( + default=None, + metadata={ + "name": "F2", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + q3: Optional[ComplexType] = field( + default=None, + metadata={ + "name": "Q3", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + q4: Optional[ComplexType] = field( + default=None, + metadata={ + "name": "Q4", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + gain_error_a: Optional[float] = field( + default=None, + metadata={ + "name": "GainErrorA", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + }, + ) + gain_error_f1: Optional[float] = field( + default=None, + metadata={ + "name": "GainErrorF1", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + }, + ) + gain_error_f2: Optional[float] = field( + default=None, + metadata={ + "name": "GainErrorF2", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + }, + ) + phase_error_f1: Optional[float] = field( + default=None, + metadata={ + "name": "PhaseErrorF1", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + }, + ) + phase_error_f2: Optional[float] = field( + default=None, + metadata={ + "name": "PhaseErrorF2", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + }, + ) + + +@dataclass +class LatLonCornerStringType(LatLonType): + index: Optional[CornerStringType] = field( + default=None, + metadata={ + "type": "Attribute", + "required": True, + }, + ) + + +@dataclass +class LatLonCornerType(LatLonType): + index: Optional[int] = field( + default=None, + metadata={ + "type": "Attribute", + "required": True, + "min_inclusive": 1, + "max_inclusive": 4, + }, + ) + + +@dataclass +class LatLonHAECornerRestrictType(LatLonHAERestrictionType): + index: Optional[int] = field( + default=None, + metadata={ + "type": "Attribute", + "required": True, + "min_inclusive": 1, + "max_inclusive": 4, + }, + ) + + +@dataclass +class LatLonHAECornerStringType(LatLonHAEType): + index: Optional[CornerStringType] = field( + default=None, + metadata={ + "type": "Attribute", + "required": True, + }, + ) + + +@dataclass +class LineType: + endpoint: List["LineType.Endpoint"] = field( + default_factory=list, + metadata={ + "name": "Endpoint", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "min_occurs": 2, + }, + ) + size: Optional[int] = field( + default=None, + metadata={ + "type": "Attribute", + "required": True, + }, + ) + + @dataclass + class Endpoint(LatLonType): + index: Optional[int] = field( + default=None, + metadata={ + "type": "Attribute", + "required": True, + }, + ) + + +@dataclass +class MatchInfoType: + num_match_types: Optional[int] = field( + default=None, + metadata={ + "name": "NumMatchTypes", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + match_type: List["MatchInfoType.MatchType"] = field( + default_factory=list, + metadata={ + "name": "MatchType", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "min_occurs": 1, + }, + ) + + @dataclass + class MatchType: + type_id: Optional[str] = field( + default=None, + metadata={ + "name": "TypeID", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + current_index: Optional[int] = field( + default=None, + metadata={ + "name": "CurrentIndex", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + }, + ) + num_match_collections: Optional[int] = field( + default=None, + metadata={ + "name": "NumMatchCollections", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + match_collection: List["MatchInfoType.MatchType.MatchCollection"] = field( + default_factory=list, + metadata={ + "name": "MatchCollection", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + }, + ) + index: Optional[int] = field( + default=None, + metadata={ + "type": "Attribute", + "required": True, + }, + ) + + @dataclass + class MatchCollection: + core_name: Optional[str] = field( + default=None, + metadata={ + "name": "CoreName", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + match_index: Optional[int] = field( + default=None, + metadata={ + "name": "MatchIndex", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + }, + ) + parameter: List[ParameterType] = field( + default_factory=list, + metadata={ + "name": "Parameter", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + }, + ) + index: Optional[int] = field( + default=None, + metadata={ + "type": "Attribute", + "required": True, + }, + ) + + +@dataclass +class Poly1DType: + coef: List[PolyCoef1DType] = field( + default_factory=list, + metadata={ + "name": "Coef", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "min_occurs": 1, + }, + ) + order1: Optional[int] = field( + default=None, + metadata={ + "type": "Attribute", + "required": True, + }, + ) + + +@dataclass +class Poly2DType: + coef: List[PolyCoef2DType] = field( + default_factory=list, + metadata={ + "name": "Coef", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "min_occurs": 1, + }, + ) + order1: Optional[int] = field( + default=None, + metadata={ + "type": "Attribute", + "required": True, + }, + ) + order2: Optional[int] = field( + default=None, + metadata={ + "type": "Attribute", + "required": True, + }, + ) + + +@dataclass +class PolygonType: + vertex: List["PolygonType.Vertex"] = field( + default_factory=list, + metadata={ + "name": "Vertex", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "min_occurs": 3, + }, + ) + size: Optional[int] = field( + default=None, + metadata={ + "type": "Attribute", + "required": True, + }, + ) + + @dataclass + class Vertex(LatLonRestrictionType): + index: Optional[int] = field( + default=None, + metadata={ + "type": "Attribute", + "required": True, + }, + ) + + +@dataclass +class RowColvertexType(RowColType): + index: Optional[int] = field( + default=None, + metadata={ + "type": "Attribute", + "required": True, + }, + ) + + +@dataclass +class SCPCOAType: + scptime: Optional[float] = field( + default=None, + metadata={ + "name": "SCPTime", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + arppos: Optional[XYZType] = field( + default=None, + metadata={ + "name": "ARPPos", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + arpvel: Optional[XYZType] = field( + default=None, + metadata={ + "name": "ARPVel", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + arpacc: Optional[XYZType] = field( + default=None, + metadata={ + "name": "ARPAcc", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + side_of_track: Optional[SideOfTrack] = field( + default=None, + metadata={ + "name": "SideOfTrack", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + slant_range: Optional[float] = field( + default=None, + metadata={ + "name": "SlantRange", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + ground_range: Optional[float] = field( + default=None, + metadata={ + "name": "GroundRange", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + doppler_cone_ang: Optional[float] = field( + default=None, + metadata={ + "name": "DopplerConeAng", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + graze_ang: Optional[float] = field( + default=None, + metadata={ + "name": "GrazeAng", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + "min_inclusive": 0.0, + "max_inclusive": 90.0, + }, + ) + incidence_ang: Optional[float] = field( + default=None, + metadata={ + "name": "IncidenceAng", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + "min_inclusive": 0.0, + "max_inclusive": 90.0, + }, + ) + twist_ang: Optional[float] = field( + default=None, + metadata={ + "name": "TwistAng", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + "min_inclusive": -90.0, + "max_inclusive": 90.0, + }, + ) + slope_ang: Optional[float] = field( + default=None, + metadata={ + "name": "SlopeAng", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + "min_inclusive": 0.0, + "max_inclusive": 90.0, + }, + ) + azim_ang: Optional[float] = field( + default=None, + metadata={ + "name": "AzimAng", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + "min_inclusive": 0.0, + "max_inclusive": 360.0, + }, + ) + layover_ang: Optional[float] = field( + default=None, + metadata={ + "name": "LayoverAng", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + "min_inclusive": 0.0, + "max_inclusive": 360.0, + }, + ) + + +@dataclass +class DirParamType: + uvect_ecf: Optional[XYZType] = field( + default=None, + metadata={ + "name": "UVectECF", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + ss: Optional[float] = field( + default=None, + metadata={ + "name": "SS", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + imp_resp_wid: Optional[float] = field( + default=None, + metadata={ + "name": "ImpRespWid", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + sgn: Optional[DirParamTypeSgn] = field( + default=None, + metadata={ + "name": "Sgn", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + imp_resp_bw: Optional[float] = field( + default=None, + metadata={ + "name": "ImpRespBW", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + kctr: Optional[float] = field( + default=None, + metadata={ + "name": "KCtr", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + delta_k1: Optional[float] = field( + default=None, + metadata={ + "name": "DeltaK1", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + delta_k2: Optional[float] = field( + default=None, + metadata={ + "name": "DeltaK2", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + delta_kcoapoly: Optional[Poly2DType] = field( + default=None, + metadata={ + "name": "DeltaKCOAPoly", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + }, + ) + wgt_type: Optional["DirParamType.WgtType"] = field( + default=None, + metadata={ + "name": "WgtType", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + }, + ) + wgt_funct: Optional["DirParamType.WgtFunct"] = field( + default=None, + metadata={ + "name": "WgtFunct", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + }, + ) + + @dataclass + class WgtType: + window_name: Optional[str] = field( + default=None, + metadata={ + "name": "WindowName", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + parameter: List[ParameterType] = field( + default_factory=list, + metadata={ + "name": "Parameter", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + }, + ) + + @dataclass + class WgtFunct: + wgt: List[ArrayDouble] = field( + default_factory=list, + metadata={ + "name": "Wgt", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "min_occurs": 2, + }, + ) + size: Optional[int] = field( + default=None, + metadata={ + "type": "Attribute", + "required": True, + }, + ) + + +@dataclass +class GainPhasePolyType: + gain_poly: Optional[Poly2DType] = field( + default=None, + metadata={ + "name": "GainPoly", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + phase_poly: Optional[Poly2DType] = field( + default=None, + metadata={ + "name": "PhasePoly", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + + +@dataclass +class GeoInfoType: + desc: List[ParameterType] = field( + default_factory=list, + metadata={ + "name": "Desc", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + }, + ) + point: Optional[LatLonRestrictionType] = field( + default=None, + metadata={ + "name": "Point", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + }, + ) + line: Optional[LineType] = field( + default=None, + metadata={ + "name": "Line", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + }, + ) + polygon: Optional[PolygonType] = field( + default=None, + metadata={ + "name": "Polygon", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + }, + ) + geo_info: List["GeoInfoType"] = field( + default_factory=list, + metadata={ + "name": "GeoInfo", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + }, + ) + name: Optional[str] = field( + default=None, + metadata={ + "type": "Attribute", + "required": True, + }, + ) + + +@dataclass +class ImageDataType: + pixel_type: Optional[ImagePixelType] = field( + default=None, + metadata={ + "name": "PixelType", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + amp_table: Optional["ImageDataType.AmpTable"] = field( + default=None, + metadata={ + "name": "AmpTable", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + }, + ) + num_rows: Optional[int] = field( + default=None, + metadata={ + "name": "NumRows", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + num_cols: Optional[int] = field( + default=None, + metadata={ + "name": "NumCols", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + first_row: Optional[int] = field( + default=None, + metadata={ + "name": "FirstRow", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + first_col: Optional[int] = field( + default=None, + metadata={ + "name": "FirstCol", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + full_image: Optional["ImageDataType.FullImage"] = field( + default=None, + metadata={ + "name": "FullImage", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + scppixel: Optional[RowColType] = field( + default=None, + metadata={ + "name": "SCPPixel", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + valid_data: Optional["ImageDataType.ValidData"] = field( + default=None, + metadata={ + "name": "ValidData", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + }, + ) + + @dataclass + class AmpTable: + amplitude: List[ArrayDouble] = field( + default_factory=list, + metadata={ + "name": "Amplitude", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "min_occurs": 256, + "max_occurs": 256, + }, + ) + size: Optional[int] = field( + default=None, + metadata={ + "type": "Attribute", + "required": True, + }, + ) + + @dataclass + class FullImage: + num_rows: Optional[int] = field( + default=None, + metadata={ + "name": "NumRows", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + num_cols: Optional[int] = field( + default=None, + metadata={ + "name": "NumCols", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + + @dataclass + class ValidData: + vertex: List[RowColvertexType] = field( + default_factory=list, + metadata={ + "name": "Vertex", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "min_occurs": 3, + }, + ) + size: Optional[int] = field( + default=None, + metadata={ + "type": "Attribute", + "required": True, + }, + ) + + +@dataclass +class PFAType: + fpn: Optional[XYZType] = field( + default=None, + metadata={ + "name": "FPN", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + ipn: Optional[XYZType] = field( + default=None, + metadata={ + "name": "IPN", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + polar_ang_ref_time: Optional[float] = field( + default=None, + metadata={ + "name": "PolarAngRefTime", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + polar_ang_poly: Optional[Poly1DType] = field( + default=None, + metadata={ + "name": "PolarAngPoly", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + spatial_freq_sfpoly: Optional[Poly1DType] = field( + default=None, + metadata={ + "name": "SpatialFreqSFPoly", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + krg1: Optional[float] = field( + default=None, + metadata={ + "name": "Krg1", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + krg2: Optional[float] = field( + default=None, + metadata={ + "name": "Krg2", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + kaz1: Optional[float] = field( + default=None, + metadata={ + "name": "Kaz1", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + kaz2: Optional[float] = field( + default=None, + metadata={ + "name": "Kaz2", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + stdeskew: Optional["PFAType.STDeskew"] = field( + default=None, + metadata={ + "name": "STDeskew", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + }, + ) + + @dataclass + class STDeskew: + applied: Optional[bool] = field( + default=None, + metadata={ + "name": "Applied", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + stdsphase_poly: Optional[Poly2DType] = field( + default=None, + metadata={ + "name": "STDSPhasePoly", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + + +@dataclass +class RMAType: + rmalgo_type: Optional[RMAlgorithm] = field( + default=None, + metadata={ + "name": "RMAlgoType", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + image_type: Optional[RMAImageType] = field( + default=None, + metadata={ + "name": "ImageType", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + rmat: Optional["RMAType.RMAT"] = field( + default=None, + metadata={ + "name": "RMAT", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + }, + ) + rmcr: Optional["RMAType.RMCR"] = field( + default=None, + metadata={ + "name": "RMCR", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + }, + ) + inca: Optional["RMAType.INCA"] = field( + default=None, + metadata={ + "name": "INCA", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + }, + ) + + @dataclass + class RMAT: + pos_ref: Optional[XYZType] = field( + default=None, + metadata={ + "name": "PosRef", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + vel_ref: Optional[XYZType] = field( + default=None, + metadata={ + "name": "VelRef", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + dop_cone_ang_ref: Optional[float] = field( + default=None, + metadata={ + "name": "DopConeAngRef", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + + @dataclass + class RMCR: + pos_ref: Optional[XYZType] = field( + default=None, + metadata={ + "name": "PosRef", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + vel_ref: Optional[XYZType] = field( + default=None, + metadata={ + "name": "VelRef", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + dop_cone_ang_ref: Optional[float] = field( + default=None, + metadata={ + "name": "DopConeAngRef", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + + @dataclass + class INCA: + time_capoly: Optional[Poly1DType] = field( + default=None, + metadata={ + "name": "TimeCAPoly", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + r_ca_scp: Optional[float] = field( + default=None, + metadata={ + "name": "R_CA_SCP", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + freq_zero: Optional[float] = field( + default=None, + metadata={ + "name": "FreqZero", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + drate_sfpoly: Optional[Poly2DType] = field( + default=None, + metadata={ + "name": "DRateSFPoly", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + dop_centroid_poly: Optional[Poly2DType] = field( + default=None, + metadata={ + "name": "DopCentroidPoly", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + }, + ) + dop_centroid_coa: Optional[bool] = field( + default=None, + metadata={ + "name": "DopCentroidCOA", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + }, + ) + + +@dataclass +class RadarCollectionType: + tx_frequency: Optional["RadarCollectionType.TxFrequency"] = field( + default=None, + metadata={ + "name": "TxFrequency", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + ref_freq_index: Optional[int] = field( + default=None, + metadata={ + "name": "RefFreqIndex", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + }, + ) + waveform: Optional["RadarCollectionType.Waveform"] = field( + default=None, + metadata={ + "name": "Waveform", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + }, + ) + tx_polarization: Optional[str] = field( + default=None, + metadata={ + "name": "TxPolarization", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + "pattern": r"[VHXYSE]|RHC|LHC|UNKNOWN|SEQUENCE|OTHER[^:]*", + }, + ) + tx_sequence: Optional["RadarCollectionType.TxSequence"] = field( + default=None, + metadata={ + "name": "TxSequence", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + }, + ) + rcv_channels: Optional["RadarCollectionType.RcvChannels"] = field( + default=None, + metadata={ + "name": "RcvChannels", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + area: Optional["RadarCollectionType.Area"] = field( + default=None, + metadata={ + "name": "Area", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + }, + ) + parameter: List[ParameterType] = field( + default_factory=list, + metadata={ + "name": "Parameter", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + }, + ) + + @dataclass + class TxFrequency: + min: Optional[float] = field( + default=None, + metadata={ + "name": "Min", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + max: Optional[float] = field( + default=None, + metadata={ + "name": "Max", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + + @dataclass + class Waveform: + wfparameters: List["RadarCollectionType.Waveform.WFParameters"] = field( + default_factory=list, + metadata={ + "name": "WFParameters", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "min_occurs": 1, + }, + ) + size: Optional[int] = field( + default=None, + metadata={ + "type": "Attribute", + "required": True, + }, + ) + + @dataclass + class WFParameters: + tx_pulse_length: Optional[float] = field( + default=None, + metadata={ + "name": "TxPulseLength", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + }, + ) + tx_rfbandwidth: Optional[float] = field( + default=None, + metadata={ + "name": "TxRFBandwidth", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + }, + ) + tx_freq_start: Optional[float] = field( + default=None, + metadata={ + "name": "TxFreqStart", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + }, + ) + tx_fmrate: Optional[float] = field( + default=None, + metadata={ + "name": "TxFMRate", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + }, + ) + rcv_demod_type: Optional[WFParametersRcvDemodType] = field( + default=None, + metadata={ + "name": "RcvDemodType", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + }, + ) + rcv_window_length: Optional[float] = field( + default=None, + metadata={ + "name": "RcvWindowLength", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + }, + ) + adcsample_rate: Optional[float] = field( + default=None, + metadata={ + "name": "ADCSampleRate", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + }, + ) + rcv_ifbandwidth: Optional[float] = field( + default=None, + metadata={ + "name": "RcvIFBandwidth", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + }, + ) + rcv_freq_start: Optional[float] = field( + default=None, + metadata={ + "name": "RcvFreqStart", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + }, + ) + rcv_fmrate: Optional[float] = field( + default=None, + metadata={ + "name": "RcvFMRate", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + }, + ) + index: Optional[int] = field( + default=None, + metadata={ + "type": "Attribute", + "required": True, + }, + ) + + @dataclass + class TxSequence: + tx_step: List["RadarCollectionType.TxSequence.TxStep"] = field( + default_factory=list, + metadata={ + "name": "TxStep", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "min_occurs": 1, + }, + ) + size: Optional[int] = field( + default=None, + metadata={ + "type": "Attribute", + "required": True, + }, + ) + + @dataclass + class TxStep: + wfindex: Optional[int] = field( + default=None, + metadata={ + "name": "WFIndex", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + }, + ) + tx_polarization: Optional[str] = field( + default=None, + metadata={ + "name": "TxPolarization", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "pattern": r"[VHXYSE]|RHC|LHC|UNKNOWN|OTHER[^:]*", + }, + ) + index: Optional[int] = field( + default=None, + metadata={ + "type": "Attribute", + "required": True, + }, + ) + + @dataclass + class RcvChannels: + chan_parameters: List["RadarCollectionType.RcvChannels.ChanParameters"] = field( + default_factory=list, + metadata={ + "name": "ChanParameters", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "min_occurs": 1, + }, + ) + size: Optional[int] = field( + default=None, + metadata={ + "type": "Attribute", + "required": True, + }, + ) + + @dataclass + class ChanParameters: + tx_rcv_polarization: Optional[str] = field( + default=None, + metadata={ + "name": "TxRcvPolarization", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + "pattern": r"(([VHXYSE]|RHC|LHC|OTHER[^:]*):([VHXYSE]|RHC|LHC|OTHER[^:]*))|OTHER|UNKNOWN", + }, + ) + rcv_apcindex: Optional[int] = field( + default=None, + metadata={ + "name": "RcvAPCIndex", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + }, + ) + index: Optional[int] = field( + default=None, + metadata={ + "type": "Attribute", + "required": True, + }, + ) + + @dataclass + class Area: + corner: Optional["RadarCollectionType.Area.Corner"] = field( + default=None, + metadata={ + "name": "Corner", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + plane: Optional["RadarCollectionType.Area.Plane"] = field( + default=None, + metadata={ + "name": "Plane", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + }, + ) + + @dataclass + class Corner: + acp: List[LatLonHAECornerRestrictType] = field( + default_factory=list, + metadata={ + "name": "ACP", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "min_occurs": 4, + "max_occurs": 4, + }, + ) + + @dataclass + class Plane: + ref_pt: Optional["RadarCollectionType.Area.Plane.RefPt"] = field( + default=None, + metadata={ + "name": "RefPt", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + xdir: Optional["RadarCollectionType.Area.Plane.XDir"] = field( + default=None, + metadata={ + "name": "XDir", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + ydir: Optional["RadarCollectionType.Area.Plane.YDir"] = field( + default=None, + metadata={ + "name": "YDir", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + segment_list: Optional["RadarCollectionType.Area.Plane.SegmentList"] = field( + default=None, + metadata={ + "name": "SegmentList", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + }, + ) + orientation: Optional[OrientationType] = field( + default=None, + metadata={ + "name": "Orientation", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + }, + ) + + @dataclass + class RefPt: + ecf: Optional[XYZType] = field( + default=None, + metadata={ + "name": "ECF", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + line: Optional[float] = field( + default=None, + metadata={ + "name": "Line", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + sample: Optional[float] = field( + default=None, + metadata={ + "name": "Sample", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + name: Optional[str] = field( + default=None, + metadata={ + "type": "Attribute", + }, + ) + + @dataclass + class XDir: + uvect_ecf: Optional[XYZType] = field( + default=None, + metadata={ + "name": "UVectECF", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + line_spacing: Optional[float] = field( + default=None, + metadata={ + "name": "LineSpacing", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + num_lines: Optional[int] = field( + default=None, + metadata={ + "name": "NumLines", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + first_line: Optional[int] = field( + default=None, + metadata={ + "name": "FirstLine", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + + @dataclass + class YDir: + uvect_ecf: Optional[XYZType] = field( + default=None, + metadata={ + "name": "UVectECF", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + sample_spacing: Optional[float] = field( + default=None, + metadata={ + "name": "SampleSpacing", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + num_samples: Optional[int] = field( + default=None, + metadata={ + "name": "NumSamples", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + first_sample: Optional[int] = field( + default=None, + metadata={ + "name": "FirstSample", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + + @dataclass + class SegmentList: + segment: List["RadarCollectionType.Area.Plane.SegmentList.Segment"] = field( + default_factory=list, + metadata={ + "name": "Segment", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "min_occurs": 1, + }, + ) + size: Optional[int] = field( + default=None, + metadata={ + "type": "Attribute", + "required": True, + }, + ) + + @dataclass + class Segment: + start_line: Optional[int] = field( + default=None, + metadata={ + "name": "StartLine", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + start_sample: Optional[int] = field( + default=None, + metadata={ + "name": "StartSample", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + end_line: Optional[int] = field( + default=None, + metadata={ + "name": "EndLine", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + end_sample: Optional[int] = field( + default=None, + metadata={ + "name": "EndSample", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + identifier: Optional[str] = field( + default=None, + metadata={ + "name": "Identifier", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + index: Optional[int] = field( + default=None, + metadata={ + "type": "Attribute", + "required": True, + }, + ) + + +@dataclass +class RadiometricType: + noise_level: Optional["RadiometricType.NoiseLevel"] = field( + default=None, + metadata={ + "name": "NoiseLevel", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + }, + ) + rcssfpoly: Optional[Poly2DType] = field( + default=None, + metadata={ + "name": "RCSSFPoly", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + }, + ) + sigma_zero_sfpoly: Optional[Poly2DType] = field( + default=None, + metadata={ + "name": "SigmaZeroSFPoly", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + }, + ) + beta_zero_sfpoly: Optional[Poly2DType] = field( + default=None, + metadata={ + "name": "BetaZeroSFPoly", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + }, + ) + gamma_zero_sfpoly: Optional[Poly2DType] = field( + default=None, + metadata={ + "name": "GammaZeroSFPoly", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + }, + ) + + @dataclass + class NoiseLevel: + noise_level_type: Optional[NoiseLevelType] = field( + default=None, + metadata={ + "name": "NoiseLevelType", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + noise_poly: Optional[Poly2DType] = field( + default=None, + metadata={ + "name": "NoisePoly", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + + +@dataclass +class RgAzCompType: + az_sf: Optional[float] = field( + default=None, + metadata={ + "name": "AzSF", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + kaz_poly: Optional[Poly1DType] = field( + default=None, + metadata={ + "name": "KazPoly", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + + +@dataclass +class TimelineType: + collect_start: Optional[XmlDateTime] = field( + default=None, + metadata={ + "name": "CollectStart", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + collect_duration: Optional[float] = field( + default=None, + metadata={ + "name": "CollectDuration", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + ipp: Optional["TimelineType.IPP"] = field( + default=None, + metadata={ + "name": "IPP", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + }, + ) + + @dataclass + class IPP: + set: List["TimelineType.IPP.Set"] = field( + default_factory=list, + metadata={ + "name": "Set", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "min_occurs": 1, + }, + ) + size: Optional[int] = field( + default=None, + metadata={ + "type": "Attribute", + "required": True, + }, + ) + + @dataclass + class Set: + tstart: Optional[float] = field( + default=None, + metadata={ + "name": "TStart", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + tend: Optional[float] = field( + default=None, + metadata={ + "name": "TEnd", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + ippstart: Optional[int] = field( + default=None, + metadata={ + "name": "IPPStart", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + ippend: Optional[int] = field( + default=None, + metadata={ + "name": "IPPEnd", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + ipppoly: Optional[Poly1DType] = field( + default=None, + metadata={ + "name": "IPPPoly", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + index: Optional[int] = field( + default=None, + metadata={ + "type": "Attribute", + "required": True, + }, + ) + + +@dataclass +class XYZPolyType: + x: Optional[Poly1DType] = field( + default=None, + metadata={ + "name": "X", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + y: Optional[Poly1DType] = field( + default=None, + metadata={ + "name": "Y", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + z: Optional[Poly1DType] = field( + default=None, + metadata={ + "name": "Z", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + + +@dataclass +class AntParamType: + xaxis_poly: Optional[XYZPolyType] = field( + default=None, + metadata={ + "name": "XAxisPoly", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + yaxis_poly: Optional[XYZPolyType] = field( + default=None, + metadata={ + "name": "YAxisPoly", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + freq_zero: Optional[float] = field( + default=None, + metadata={ + "name": "FreqZero", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + eb: Optional["AntParamType.EB"] = field( + default=None, + metadata={ + "name": "EB", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + }, + ) + array: Optional[GainPhasePolyType] = field( + default=None, + metadata={ + "name": "Array", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + elem: Optional[GainPhasePolyType] = field( + default=None, + metadata={ + "name": "Elem", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + }, + ) + gain_bspoly: Optional[Poly1DType] = field( + default=None, + metadata={ + "name": "GainBSPoly", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + }, + ) + ebfreq_shift: Optional[bool] = field( + default=None, + metadata={ + "name": "EBFreqShift", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + }, + ) + mlfreq_dilation: Optional[bool] = field( + default=None, + metadata={ + "name": "MLFreqDilation", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + }, + ) + + @dataclass + class EB: + dcxpoly: Optional[Poly1DType] = field( + default=None, + metadata={ + "name": "DCXPoly", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + dcypoly: Optional[Poly1DType] = field( + default=None, + metadata={ + "name": "DCYPoly", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + + +@dataclass +class GeoDataType: + earth_model: Optional[EarthModel] = field( + default=None, + metadata={ + "name": "EarthModel", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + scp: Optional["GeoDataType.SCP"] = field( + default=None, + metadata={ + "name": "SCP", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + image_corners: Optional["GeoDataType.ImageCorners"] = field( + default=None, + metadata={ + "name": "ImageCorners", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + valid_data: Optional[PolygonType] = field( + default=None, + metadata={ + "name": "ValidData", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + }, + ) + geo_info: List[GeoInfoType] = field( + default_factory=list, + metadata={ + "name": "GeoInfo", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + }, + ) + + @dataclass + class SCP: + ecf: Optional[XYZType] = field( + default=None, + metadata={ + "name": "ECF", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + llh: Optional[LatLonHAERestrictionType] = field( + default=None, + metadata={ + "name": "LLH", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + + @dataclass + class ImageCorners: + icp: List[LatLonCornerStringType] = field( + default_factory=list, + metadata={ + "name": "ICP", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "min_occurs": 4, + "max_occurs": 4, + }, + ) + + +@dataclass +class GridType: + image_plane: Optional[ImagePlane] = field( + default=None, + metadata={ + "name": "ImagePlane", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + type_value: Optional[ImageGridType] = field( + default=None, + metadata={ + "name": "Type", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + time_coapoly: Optional[Poly2DType] = field( + default=None, + metadata={ + "name": "TimeCOAPoly", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + row: Optional[DirParamType] = field( + default=None, + metadata={ + "name": "Row", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + col: Optional[DirParamType] = field( + default=None, + metadata={ + "name": "Col", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + + +@dataclass +class XYZPolyAttributeType(XYZPolyType): + index: Optional[int] = field( + default=None, + metadata={ + "type": "Attribute", + "required": True, + }, + ) + + +@dataclass +class AntennaType: + tx: Optional[AntParamType] = field( + default=None, + metadata={ + "name": "Tx", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + }, + ) + rcv: Optional[AntParamType] = field( + default=None, + metadata={ + "name": "Rcv", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + }, + ) + two_way: Optional[AntParamType] = field( + default=None, + metadata={ + "name": "TwoWay", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + }, + ) + + +@dataclass +class PositionType: + arppoly: Optional[XYZPolyType] = field( + default=None, + metadata={ + "name": "ARPPoly", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "required": True, + }, + ) + grppoly: Optional[XYZPolyType] = field( + default=None, + metadata={ + "name": "GRPPoly", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + }, + ) + tx_apcpoly: Optional[XYZPolyType] = field( + default=None, + metadata={ + "name": "TxAPCPoly", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + }, + ) + rcv_apc: Optional["PositionType.RcvAPC"] = field( + default=None, + metadata={ + "name": "RcvAPC", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + }, + ) + + @dataclass + class RcvAPC: + rcv_apcpoly: List[XYZPolyAttributeType] = field( + default_factory=list, + metadata={ + "name": "RcvAPCPoly", + "type": "Element", + "namespace": "urn:SICD:1.3.0", + "min_occurs": 1, + }, + ) + size: Optional[int] = field( + default=None, + metadata={ + "type": "Attribute", + "required": True, + }, + ) + + +@dataclass +class SICD: + class Meta: + namespace = "urn:SICD:1.3.0" + + collection_info: Optional[CollectionInfoType] = field( + default=None, + metadata={ + "name": "CollectionInfo", + "type": "Element", + "required": True, + }, + ) + image_creation: Optional[ImageCreationType] = field( + default=None, + metadata={ + "name": "ImageCreation", + "type": "Element", + }, + ) + image_data: Optional[ImageDataType] = field( + default=None, + metadata={ + "name": "ImageData", + "type": "Element", + "required": True, + }, + ) + geo_data: Optional[GeoDataType] = field( + default=None, + metadata={ + "name": "GeoData", + "type": "Element", + "required": True, + }, + ) + grid: Optional[GridType] = field( + default=None, + metadata={ + "name": "Grid", + "type": "Element", + "required": True, + }, + ) + timeline: Optional[TimelineType] = field( + default=None, + metadata={ + "name": "Timeline", + "type": "Element", + "required": True, + }, + ) + position: Optional[PositionType] = field( + default=None, + metadata={ + "name": "Position", + "type": "Element", + "required": True, + }, + ) + radar_collection: Optional[RadarCollectionType] = field( + default=None, + metadata={ + "name": "RadarCollection", + "type": "Element", + "required": True, + }, + ) + image_formation: Optional[ImageFormationType] = field( + default=None, + metadata={ + "name": "ImageFormation", + "type": "Element", + "required": True, + }, + ) + scpcoa: Optional[SCPCOAType] = field( + default=None, + metadata={ + "name": "SCPCOA", + "type": "Element", + "required": True, + }, + ) + radiometric: Optional[RadiometricType] = field( + default=None, + metadata={ + "name": "Radiometric", + "type": "Element", + }, + ) + antenna: Optional[AntennaType] = field( + default=None, + metadata={ + "name": "Antenna", + "type": "Element", + }, + ) + error_statistics: Optional[ErrorStatisticsType] = field( + default=None, + metadata={ + "name": "ErrorStatistics", + "type": "Element", + }, + ) + match_info: Optional[MatchInfoType] = field( + default=None, + metadata={ + "name": "MatchInfo", + "type": "Element", + }, + ) + rg_az_comp: Optional[RgAzCompType] = field( + default=None, + metadata={ + "name": "RgAzComp", + "type": "Element", + }, + ) + pfa: Optional[PFAType] = field( + default=None, + metadata={ + "name": "PFA", + "type": "Element", + }, + ) + rma: Optional[RMAType] = field( + default=None, + metadata={ + "name": "RMA", + "type": "Element", + }, + ) diff --git a/src/aws/osml/gdal/gdal_utils.py b/src/aws/osml/gdal/gdal_utils.py index 90e2696..8e86f5c 100644 --- a/src/aws/osml/gdal/gdal_utils.py +++ b/src/aws/osml/gdal/gdal_utils.py @@ -40,16 +40,14 @@ def load_gdal_dataset(image_path: str) -> Tuple[gdal.Dataset, Optional[SensorMod if xml_tres is not None and len(xml_tres) > 0: parsed_tres = ElementTree.fromstring(xml_tres[0]) - # If this image has SICD Metadata parse it - parsed_dess = None + # If this image has NITF DES segments read them xml_dess = ds.GetMetadata("xml:DES") - if xml_dess is not None and len(xml_dess) > 0: - parsed_dess = ElementTree.fromstring(xml_dess[0]) selected_sensor_model_types = [ SensorModelTypes.AFFINE, SensorModelTypes.PROJECTIVE, SensorModelTypes.RPC, + SensorModelTypes.SICD, # TODO: Enable RSM model once testing complete # SensorModelTypes.RSM, ] @@ -58,7 +56,7 @@ def load_gdal_dataset(image_path: str) -> Tuple[gdal.Dataset, Optional[SensorMod ds.RasterXSize, ds.RasterYSize, xml_tres=parsed_tres, - xml_dess=parsed_dess, + xml_dess=xml_dess, geo_transform=geo_transform, ground_control_points=ground_control_points, selected_sensor_model_types=selected_sensor_model_types, diff --git a/src/aws/osml/gdal/sensor_model_factory.py b/src/aws/osml/gdal/sensor_model_factory.py index bca8282..b969aa3 100644 --- a/src/aws/osml/gdal/sensor_model_factory.py +++ b/src/aws/osml/gdal/sensor_model_factory.py @@ -1,3 +1,4 @@ +import base64 import logging from enum import Enum from typing import List, Optional @@ -8,9 +9,11 @@ from aws.osml.photogrammetry import ChippedImageSensorModel, CompositeSensorModel, ImageCoordinate, SensorModel from .gdal_sensor_model_builder import GDALAffineSensorModelBuilder, GDALGCPSensorModelBuilder +from .nitf_des_accessor import NITFDESAccessor from .projective_sensor_model_builder import ProjectiveSensorModelBuilder from .rpc_sensor_model_builder import RPCSensorModelBuilder from .rsm_sensor_model_builder import RSMSensorModelBuilder +from .sicd_sensor_model_builder import SICDSensorModelBuilder from .xmltre_utils import get_tre_field_value @@ -57,6 +60,7 @@ class SensorModelTypes(Enum): PROJECTIVE = "PROJECTIVE" RPC = "RPC" RSM = "RSM" + SICD = "SICD" ALL_SENSOR_MODEL_TYPES = [item for item in SensorModelTypes] @@ -74,7 +78,7 @@ def __init__( actual_image_width: int, actual_image_height: int, xml_tres: Optional[ET.Element] = None, - xml_dess: Optional[ET.Element] = None, + xml_dess: Optional[List[str]] = None, geo_transform: Optional[List[float]] = None, ground_control_points: Optional[List[gdal.GCP]] = None, selected_sensor_model_types: Optional[List[SensorModelTypes]] = None, @@ -172,6 +176,22 @@ def build(self) -> Optional[SensorModel]: # TODO: Maybe create a projective sensor model from corner locations derived from the precision model # TODO: Consider using the rough corners from IGEOLO + if self.xml_dess is not None and len(self.xml_dess) > 0: + des_accessor = NITFDESAccessor(self.xml_dess) + + xml_data_content_segments = des_accessor.get_segments_by_name("XML_DATA_CONTENT") + if xml_data_content_segments is not None: + for xml_data_segment in xml_data_content_segments: + xml_bytes = des_accessor.parse_field_value(xml_data_segment, "DESDATA", base64.b64decode) + xml_str = xml_bytes.decode("utf-8") + if "SIDD" in xml_str: + # This looks like a SIDD file. Skip for now + # SIDD images will contain SICD extensions but the SIDD should come first + break + elif "SICD" in xml_str and SensorModelTypes.SICD in self.selected_sensor_model_types: + precision_sensor_model = SICDSensorModelBuilder(sicd_xml=xml_str).build() + break + # If we have both an approximate and a precision sensor model return them as a composite so applications # can choose which model best meets their needs. If we were only able to construct one or the other then # return what we were able to build. diff --git a/src/aws/osml/gdal/sicd_sensor_model_builder.py b/src/aws/osml/gdal/sicd_sensor_model_builder.py new file mode 100644 index 0000000..37aba27 --- /dev/null +++ b/src/aws/osml/gdal/sicd_sensor_model_builder.py @@ -0,0 +1,186 @@ +import logging +from typing import Optional, Union + +import numpy as np +from xsdata.formats.dataclass.parsers import XmlParser + +import aws.osml.formats.sicd.models.sicd_v1_2_1 as sicd121 +import aws.osml.formats.sicd.models.sicd_v1_3_0 as sicd130 + +from ..photogrammetry import ( + ImageCoordinate, + INCAProjectionSet, + PFAProjectionSet, + PlaneProjectionSet, + Polynomial2D, + PolynomialXYZ, + RGAZCOMPProjectionSet, + SARImageCoordConverter, + SensorModel, + SICDSensorModel, + WorldCoordinate, +) +from .sensor_model_builder import SensorModelBuilder + +logger = logging.getLogger(__name__) + + +def xyztype_to_ndarray(xyztype: Union[sicd121.XYZType, sicd130.XYZType]) -> np.ndarray: + """ + Convert the XYZType to a 1-d NumPy array. + + :param xyztype: the XYZType dataclass + :return: the NumPy array + """ + return np.array([xyztype.x, xyztype.y, xyztype.z]) + + +def poly1d_to_native(poly1d: Union[sicd121.Poly1DType, sicd130.XYZType]) -> np.polynomial.Polynomial: + """ + Convert the Poly1DType to a NumPy Polynomial. + + :param poly1d: the Poly1D dataclass + :return: the NumPy polynomial with matching coefficients + """ + coefficients = [0] * (poly1d.order1 + 1) + for coef in poly1d.coef: + coefficients[coef.exponent1] = coef.value + return np.polynomial.Polynomial(coefficients) + + +def poly2d_to_native(poly2d: Union[sicd121.Poly2DType, sicd130.Poly2DType]) -> Polynomial2D: + """ + Convert the Poly2D dataclass to a Polynomial2D. + + :param poly2d: the Poly2D dataclass + :return: the Polynomial2D with matching coefficients + """ + coefficients = [0] * (poly2d.order1 + 1) + for row in range(0, len(coefficients)): + coefficients[row] = [0] * (poly2d.order2 + 1) + for coef in poly2d.coef: + coefficients[coef.exponent1][coef.exponent2] = coef.value + return Polynomial2D(np.array(coefficients)) + + +def xyzpoly_to_native(xyzpoly: Union[sicd121.XYZPolyType, sicd130.XYZPolyType]) -> PolynomialXYZ: + """ + Convert the XYZPoly dataclass into a PolynomialXYZ. + + :param xyzpoly: the XYZPoly dataclass + :return: the PolynomialXYZ with matching coefficients + """ + return PolynomialXYZ( + x_polynomial=poly1d_to_native(xyzpoly.x), + y_polynomial=poly1d_to_native(xyzpoly.y), + z_polynomial=poly1d_to_native(xyzpoly.z), + ) + + +class SICDSensorModelBuilder(SensorModelBuilder): + """ + This builder is used to create sensor models for images that have SICD metadata. The metadata is provided + as XML that conforms to the SICD specifications. We intend to support multiple SICD versions but the current + software was implemented using the v1.2.1 and v1.3.0 specifications. + """ + + def __init__(self, sicd_xml: str): + """ + Construct the builder given the SICD XML. + + :param sicd_xml: the XML string + """ + super().__init__() + self.sicd_xml = sicd_xml + + def build(self) -> Optional[SensorModel]: + """ + Attempt to build a precise SAR sensor model. This sensor model handles chipped images natively. + + :return: the sensor model; if available + """ + try: + if self.sicd_xml is None or len(self.sicd_xml) == 0: + return None + + parser = XmlParser() + sicd = parser.from_string(self.sicd_xml) + return SICDSensorModelBuilder.from_dataclass(sicd) + except Exception as e: + logging.error("Exception caught attempting to build SICD sensor model.", e) + return None + + @staticmethod + def from_dataclass(sicd: Union[sicd121.SICD, sicd130.SICD]) -> Optional[SensorModel]: + """ + This method constructs a SICD sensor model from the python dataclasses generated when parsing the XML. + + :param sicd: the dataclass object constructed from the XML + :return: the sensor model; if available + """ + + scp_ecf = WorldCoordinate(xyztype_to_ndarray(sicd.geo_data.scp.ecf)) + scp_pixel = ImageCoordinate([sicd.image_data.scppixel.col, sicd.image_data.scppixel.row]) + time_coa_poly = poly2d_to_native(sicd.grid.time_coapoly) + arp_poly = xyzpoly_to_native(sicd.position.arppoly) + + coord_converter = SARImageCoordConverter( + scp_pixel=scp_pixel, + scp_ecf=scp_ecf, + u_row=xyztype_to_ndarray(sicd.grid.row.uvect_ecf), + u_col=xyztype_to_ndarray(sicd.grid.col.uvect_ecf), + row_ss=sicd.grid.row.ss, + col_ss=sicd.grid.col.ss, + first_pixel=ImageCoordinate([sicd.image_data.first_col, sicd.image_data.first_row]), + ) + + projection_set = None + ugpn = None + if sicd.grid.type_value == sicd121.ImageGridType.RGAZIM: + if sicd.image_formation.image_form_algo == sicd121.ImageFormAlgo.PFA: + ugpn = xyztype_to_ndarray(sicd.pfa.fpn) + projection_set = PFAProjectionSet( + scp_ecf=scp_ecf, + polar_ang_poly=poly1d_to_native(sicd.pfa.polar_ang_poly), + spatial_freq_sf_poly=poly1d_to_native(sicd.pfa.spatial_freq_sfpoly), + coa_time_poly=time_coa_poly, + arp_poly=arp_poly, + ) + elif sicd.image_formation.image_form_algo == sicd121.ImageFormAlgo.RGAZCOMP: + projection_set = RGAZCOMPProjectionSet( + scp_ecf=scp_ecf, az_scale_factor=sicd.rg_az_comp.az_sf, coa_time_poly=time_coa_poly, arp_poly=arp_poly + ) + elif sicd.grid.type_value == sicd121.ImageGridType.RGZERO: + projection_set = INCAProjectionSet( + r_ca_scp=sicd.rma.inca.r_ca_scp, + inca_time_coa_poly=poly1d_to_native(sicd.rma.inca.time_capoly), + drate_sf_poly=poly2d_to_native(sicd.rma.inca.drate_sfpoly), + coa_time_poly=time_coa_poly, + arp_poly=arp_poly, + ) + elif sicd.grid.type_value in [ + sicd121.ImageGridType.PLANE, + sicd121.ImageGridType.XCTYAT, + sicd121.ImageGridType.XRGYCR, + ]: + projection_set = PlaneProjectionSet( + scp_ecf=scp_ecf, + image_plane_urow=xyztype_to_ndarray(sicd.grid.row.uvect_ecf), + image_plane_ucol=xyztype_to_ndarray(sicd.grid.col.uvect_ecf), + coa_time_poly=time_coa_poly, + arp_poly=arp_poly, + ) + else: + logger.warning(f"SICD image with unknown grid type {sicd.grid.type_value}. No sensor model created.") + return None + + sicd_sensor_model = SICDSensorModel( + coord_converter=coord_converter, + coa_projection_set=projection_set, + scp_arp=xyztype_to_ndarray(sicd.scpcoa.arppos), + scp_varp=xyztype_to_ndarray(sicd.scpcoa.arpvel), + side_of_track=str(sicd.scpcoa.side_of_track.value), + u_gpn=ugpn, + ) + + return sicd_sensor_model diff --git a/src/aws/osml/photogrammetry/__init__.py b/src/aws/osml/photogrammetry/__init__.py index 20a746f..f62e01e 100644 --- a/src/aws/osml/photogrammetry/__init__.py +++ b/src/aws/osml/photogrammetry/__init__.py @@ -31,6 +31,17 @@ ) from .rpc_sensor_model import RPCPolynomial, RPCSensorModel from .sensor_model import SensorModel, SensorModelOptions +from .sicd_sensor_model import ( + COAProjectionSet, + INCAProjectionSet, + PFAProjectionSet, + PlaneProjectionSet, + Polynomial2D, + PolynomialXYZ, + RGAZCOMPProjectionSet, + SARImageCoordConverter, + SICDSensorModel, +) from .srtm_dem_tile_set import SRTMTileSet __all__ = [ @@ -47,7 +58,14 @@ "ConstantElevationModel", "ElevationModel", "GDALAffineSensorModel", + "SARImageCoordConverter", + "INCAProjectionSet", + "PlaneProjectionSet", + "PFAProjectionSet", + "PolynomialXYZ", + "Polynomial2D", "ProjectiveSensorModel", + "RGAZCOMPProjectionSet", "RSMContext", "RSMGroundDomain", "RSMGroundDomainForm", @@ -60,5 +78,6 @@ "RPCSensorModel", "SensorModel", "SensorModelOptions", + "SICDSensorModel", "SRTMTileSet", ] diff --git a/src/aws/osml/photogrammetry/sicd_sensor_model.py b/src/aws/osml/photogrammetry/sicd_sensor_model.py new file mode 100644 index 0000000..29f8ef6 --- /dev/null +++ b/src/aws/osml/photogrammetry/sicd_sensor_model.py @@ -0,0 +1,813 @@ +import logging +from abc import abstractmethod +from enum import Enum +from typing import Any, Dict, Optional, Tuple, Union + +import numpy as np +import numpy.typing as npt + +from . import ElevationModel +from .coordinates import ( + GeodeticWorldCoordinate, + ImageCoordinate, + WorldCoordinate, + geocentric_to_geodetic, + geodetic_to_geocentric, +) +from .sensor_model import SensorModel + +logger = logging.getLogger(__name__) + + +class Polynomial2D: + """ + This class contains coefficients for a two-dimensional polynomial. + """ + + def __init__(self, coef: npt.ArrayLike): + """ + Constructor that takes the coefficients of the polynomial. The coefficients should be ordered so that the + coefficient of the term of multi-degree i,j is contained in coef[i,j]. + + :param coef: array-like structure of coefficients + """ + self.coef = np.array(coef) + if len(self.coef.shape) != 2: + raise ValueError( + f"Coefficients for class Polynomial2D must be two-dimensional. " + f"Received numpy.ndarray of shape {self.coef.shape}" + ) + + def __call__(self, x: Union[float, np.ndarray], y: Union[float, np.ndarray]) -> np.ndarray: + """ + Invoke NumPy's polyval2d given the inputs and the coefficients of the polynomial. + + :param x: the first input parameter + :param y: the second input parameter + :return: the values of the 2-d polynomial at points formed with pairs of corresponding values from x and y. + """ + return np.polynomial.polynomial.polyval2d(x, y, self.coef) + + +class PolynomialXYZ: + """ + This class is an aggregation 3 one-dimensional polynomials all with the same input variable. The result of + evaluating this class on the input variable is an [x, y, z] vector. + """ + + def __init__( + self, + x_polynomial: np.polynomial.Polynomial, + y_polynomial: np.polynomial.Polynomial, + z_polynomial: np.polynomial.Polynomial, + ): + """ + Constructor that accepts the 3 NumPy 1-d polynomials one for each component. + + :param x_polynomial: polynomial for the x component + :param y_polynomial: polynomial for the y component + :param z_polynomial: polynomial for the z component + """ + self.x_polynomial = x_polynomial + self.y_polynomial = y_polynomial + self.z_polynomial = z_polynomial + + def __call__(self, t: float) -> np.ndarray: + """ + Evaluate the x, y, and z polynomials at t and return the result as a vector. + + :param t: the value + :return: the polynomial result + """ + x = self.x_polynomial(t) + y = self.y_polynomial(t) + z = self.z_polynomial(t) + + return np.array([x, y, z], dtype=x.dtype) + + def deriv(self, m: int = 1): + """ + Create a new PolynomialXYZ that is the derivative of the current PolynomialXYZ. + + :param m: find the derivative of order m + :return: the new polynomial derivative + """ + x_derivative = self.x_polynomial.deriv(m=m) + y_derivative = self.y_polynomial.deriv(m=m) + z_derivative = self.z_polynomial.deriv(m=m) + + return PolynomialXYZ(x_polynomial=x_derivative, y_polynomial=y_derivative, z_polynomial=z_derivative) + + +class SARImageCoordConverter: + """ + This class contains image grid and image plane coordinate conversions for a provided set of SICD parameters. The + equations are mostly defined in Section 2 of the SICD Standard Volume 3. + """ + + def __init__( + self, + scp_pixel: ImageCoordinate, + scp_ecf: WorldCoordinate, + u_row: np.ndarray, + u_col: np.ndarray, + row_ss: float, + col_ss: float, + first_pixel: ImageCoordinate = ImageCoordinate([0.0, 0.0]), + ): + """ + Construct the coordinate converter given parameters from the metadata. The names of these parameters have been + chosen to align with the names in the specification. + + :param scp_pixel: location of the scene center point (SCP) in the global pixel grid + :param scp_ecf: location of the scene center point (SCP) in earth centered fixed (ECF) coordinates + :param u_row: unit vector in the increasing row direction in ECF coordinates. + :param u_col: unit vector in the increasing column direction in ECF coordinates. + :param row_ss: sample spacing in the row direction + :param col_ss: sample spacing in the column direction + :param first_pixel: location of the first row/column of the pixel array. For a full image array [0, 0] + """ + self.scp_pixel = scp_pixel + self.scp_ecf = scp_ecf + self.row_ss = row_ss + self.col_ss = col_ss + self.u_row = u_row + self.u_col = u_col + self.first_pixel = first_pixel + # Section 2.4 calculation of the image plane unit normal vector + ipn = np.cross(self.u_row, self.u_col) + self.uvect_ipn = ipn / np.linalg.norm(ipn) + + # Section 2.4 calculation of transform from ipp to xrow, ycol + cos_theta = np.dot(self.u_row, self.u_col) + sin_theta = np.sqrt(1 - cos_theta * cos_theta) + ipp_transform = np.array([[1, -cos_theta], [-cos_theta, 1]], dtype="float64") / (sin_theta * sin_theta) + row_col_transform = np.zeros((3, 2), dtype="float64") + row_col_transform[:, 0] = self.u_row + row_col_transform[:, 1] = self.u_col + self.matrix_transform = np.dot(row_col_transform, ipp_transform) + + def rowcol_to_xrowycol(self, row_col: np.ndarray) -> np.ndarray: + """ + This function converts the row and column indexes (row, col) in the global image grid to SCP centered + image coordinates (xrow, ycol) using equations (2) (3) in Section 2.2 of the SICD Specification + Volume 3. + + :param row_col: the [row, col] location as an array + :return: the [xrow, ycol] location as an array + """ + xrow_ycol = np.zeros(2, dtype="float64") + xrow_ycol[0] = (row_col[0] - self.scp_pixel.r) * self.row_ss + xrow_ycol[1] = (row_col[1] - self.scp_pixel.c) * self.col_ss + return xrow_ycol + + def xrowycol_to_rowcol(self, xrow_ycol: np.ndarray) -> np.ndarray: + """ + This function converts the SCP centered image coordinates (xrow, ycol) to row and column indexes (row, col) + in the global image grid using equations (2) (3) in Section 2.2 of the SICD Specification Volume 3. + + :param xrow_ycol: the [xrow, ycol] location as an array + :return: the [row, col] location as an array + """ + row_col = np.zeros(2, dtype="float64") + row_col[0] = xrow_ycol[0] / self.row_ss + self.scp_pixel.r + row_col[1] = xrow_ycol[1] / self.col_ss + self.scp_pixel.c + return row_col + + def xrowycol_to_ipp(self, xrow_ycol: np.ndarray) -> np.ndarray: + """ + This function converts SCP centered image coordinates (xrow, ycol) to a ECF coordinate, image plane point (IPP), + on the image plane using equations in Section 2.4 of the SICD Specification Volume 3. + + :param xrow_ycol: the [xrow, ycol] location as an array + :return: the image plane point [x, y, z] ECF location on the image plane + """ + delta_ipp = xrow_ycol[0] * self.u_row + xrow_ycol[1] * self.u_col + return self.scp_ecf.coordinate + delta_ipp + + def ipp_to_xrowycol(self, ipp: np.ndarray) -> np.ndarray: + """ + This function converts an ECF location on the image plane into SCP centered image coordinates (xrow, ycol) + using equations in Section 2.4 of the SICD Specification volume 3. + + :param ipp: the image plane point [x, y, z] ECF location on the image plane + :return: the [xrow, ycol] location as an array + """ + delta_ipp = ipp - self.scp_ecf.coordinate + xrow_ycol = np.dot(delta_ipp, self.matrix_transform) + return xrow_ycol + + +class COAProjectionSet: + """ + This is an abstract base class for R/Rdot projection contour computations described in Section 4 of the SICD + Standard Volume 3. + """ + + def __init__( + self, + coa_time_poly: Polynomial2D, + arp_poly: PolynomialXYZ, + delta_arp: np.ndarray = np.array([0.0, 0.0, 0.0], dtype="float64"), + delta_varp: np.ndarray = np.array([0.0, 0.0, 0.0], dtype="float64"), + range_bias: float = 0.0, + ): + """ + Constructor with parameters supporting the calculations common to all R/Rdot projections (i.e. the + calculations that do not depend on grid type and image formation algorithm). + + :param coa_time_poly: Center Of Aperture (COA) time polynomial. + :param arp_poly: Aperture Reference Point (ARP) position polynomial coefficients. + :param delta_arp: the ARP position offset + :param delta_varp: the ARP velocity offset + :param range_bias: the range bias offset + """ + self.coa_time_poly = coa_time_poly + self.arp_poly = arp_poly + self.varp_poly = self.arp_poly.deriv(m=1) + + self.delta_arp = delta_arp + self.delta_varp = delta_varp + self.range_bias = float(range_bias) + + def precise_rrdot_computation( + self, xrow_ycol: np.ndarray + ) -> Tuple[np.ndarray, np.ndarray, np.ndarray, np.ndarray, np.ndarray]: + """ + This executes the precise image pixel grid location to R/Rdot projection. This function invokes + the _grid_specific_projection() function implemented by subclasses which should handle the portions + of the calculation that are dependent on the image grid and image formation algorithm. + + :param xrow_ycol: the [xrow, ycol] location as an array + :return: the COA projection set { Rcoa, Rdotcoa, tcoa, arpcoa, varpcoa } + """ + # These are the common calculations for image COA time (coa_time), COA ARP position and velocity + # (arp_position and arp_velocity) as described in Section 2 of the SICD specification Volume 3. + coa_time = self.coa_time_poly(xrow_ycol[0], xrow_ycol[1]) + arp_position = self.arp_poly(coa_time) + arp_velocity = self.varp_poly(coa_time) + + # These are the image grid and image formation algorithm dependent calculations for the precise + # computation of the R/Rdot contour. Each subclass should implement an approach as described in + # sections 4.1 through 4.6 of the SICD specification Volume 3. + r_tgt_coa, r_dot_tgt_coa = self._grid_specific_projection(xrow_ycol, coa_time, arp_position, arp_velocity) + + # If provided the Adjustable Parameter Offsets are incorporated into the computation from + # image pixel location to COA projection parameters. See Section 8.1 of the SICD specification Volume 3. + # TODO: Check this. This is the same approach as SarPy but I'm not 100% sure it is correct + arp_position += self.delta_arp + arp_velocity += self.delta_varp + r_tgt_coa += self.range_bias + + return r_tgt_coa, r_dot_tgt_coa, coa_time, arp_position, arp_velocity + + @abstractmethod + def _grid_specific_projection(self, xrow_ycol, coa_time, arp_position, arp_velocity) -> Tuple[np.ndarray, np.ndarray]: + """ + The precise computation of the R/Rdot contour is dependent upon the image grid type and the image + formation algorithm that produced the image but the computation of the COA time, ARP position, and + velocity is the same for all image products. + + This abstract method should be overriden by subclasses to perform the R/Rdot calculations for a + specific image grid and formation algorithm. + + :param xrow_ycol: the [xrow, ycol] location as an array + :param coa_time: Center Of Aperture (COA) time + :param arp_position: Aperture Reference Point (ARP) position + :param arp_velocity: Aperture Reference Point (ARP) velocity + :return: the tuple containing range and range rate relative to the ARP at COA time + """ + + +class PFAProjectionSet(COAProjectionSet): + """ + This Center Of Aperture (COA) Projection set is to be used with a range azimuth image grid (RGAZIM) and polar + formatted (PFA) phase history data. See section 4.1 of the SICD Specification Volume 3. + """ + + def __init__( + self, + scp_ecf: WorldCoordinate, + polar_ang_poly, + spatial_freq_sf_poly, + coa_time_poly: Polynomial2D, + arp_poly: PolynomialXYZ, + delta_arp: np.ndarray = np.array([0.0, 0.0, 0.0], dtype="float64"), + delta_varp: np.ndarray = np.array([0.0, 0.0, 0.0], dtype="float64"), + range_bias: float = 0.0, + ): + """ + Constructor for this projection set. + + :param scp_ecf: Scene Center Point position in ECF coordinates + :param polar_ang_poly: Polar Angle polynomial coefficients + :param spatial_freq_sf_poly: Spatial Frequency Scale Factor polynomial coefficients + :param coa_time_poly: Center Of Aperture (COA) time polynomial + :param arp_poly: Aperture Reference Point (ARP) position polynomial coefficients + :param delta_arp: the ARP position offset + :param delta_varp: the ARP velocity offset + :param range_bias: the range bias offset + """ + super().__init__(coa_time_poly, arp_poly, delta_arp, delta_varp, range_bias) + self.scp_ecf = scp_ecf + self.polar_ang_poly = polar_ang_poly + self.spatial_freq_sf_poly = spatial_freq_sf_poly + self.polar_ang_poly_der = polar_ang_poly.deriv(m=1) + self.spatial_freq_sf_poly_der = spatial_freq_sf_poly.deriv(m=1) + + def _grid_specific_projection(self, xrow_ycol, coa_time, arp_position, arp_velocity) -> Tuple[np.ndarray, np.ndarray]: + """ + These are the calculations for the precise computation of the R/Rdot contour unique to these grid and + image formation algorithm types. See SICD Volume 3 Section 4.1 + + :param xrow_ycol: the [xrow, ycol] location as an array + :param coa_time: Center Of Aperture (COA) time + :param arp_position: Aperture Reference Point (ARP) position + :param arp_velocity: Aperture Reference Point (ARP) velocity + :return: the tuple containing range and range rate relative to the ARP at COA time + """ + # For the RGAZIM grid, the image coordinates are range and azimuth. The row coordinate is the range + # coordinate, xrow = rg. The column coordinate is the azimuth coordinate, ycol = az. + rg = xrow_ycol[0] + az = xrow_ycol[1] + + # (2) Compute the range and range rate to the SCP at the pixel COA time + arp_minus_scp = arp_position - self.scp_ecf.coordinate + range_to_scp = np.linalg.norm(arp_minus_scp, axis=-1) + rdot_to_scp = np.sum(arp_velocity * arp_minus_scp, axis=-1) / range_to_scp + + # (3) Compute the polar angle (theta) and its derivative with respect to time (d_theta_d_time) + # at the pixel COA time. + theta = self.polar_ang_poly(coa_time) + d_theta_d_time = self.polar_ang_poly_der(coa_time) + + # (4) Compute the polar aperture scale factor (KSF) and its derivative with respect to polar angle + # (d_ksf_d_theta) at the pixel COA time + ksf = self.spatial_freq_sf_poly(theta) + d_ksf_d_theta = self.spatial_freq_sf_poly_der(theta) + + # (5) Compute the spatial frequency domain phase slopes in the radial (ka) and cross radial + # (kc) directions (d_phi_d_ka and d_phi_d_kc) for the radial direction at theta. Note: The sign COA + # parameter (SGN) for the phase may be ignored as it is cancelled in a subsequent computation. + d_phi_d_ka = rg * np.cos(theta) + az * np.sin(theta) + d_phi_d_kc = -rg * np.sin(theta) + az * np.cos(theta) + + # (6) Compute range relative to the SCP (delta_range) at the COA. + delta_range = ksf * d_phi_d_ka + + # (7) Compute the derivative of the range relative to the SCP with respect to polar angle + # (d_delta_range_d_theta) at the COA. Scale by the derivative of the polar angle with respect + # to time to yield the derivative with respect to time (delta_r_dot_tgt_coa). + d_delta_range_d_theta = d_ksf_d_theta * d_phi_d_ka + ksf * d_phi_d_kc + delta_r_dot_tgt_coa = d_delta_range_d_theta * d_theta_d_time + + # (8) Compute the range and range rate relative to the ARP at COA ( r_tgt_coa and rdot_tgt_coa). + # The projection to three-dimensional scene point for grid location (rgTGT, azTGT) is along this + # R/Rdot contour. + r_tgt_coa = range_to_scp + delta_range + rdot_tgt_coa = rdot_to_scp + delta_r_dot_tgt_coa + + return r_tgt_coa, rdot_tgt_coa + + +class RGAZCOMPProjectionSet(COAProjectionSet): + def __init__( + self, + scp_ecf: WorldCoordinate, + az_scale_factor: float, + coa_time_poly: Polynomial2D, + arp_poly: PolynomialXYZ, + delta_arp: np.ndarray = np.array([0.0, 0.0, 0.0], dtype="float64"), + delta_varp: np.ndarray = np.array([0.0, 0.0, 0.0], dtype="float64"), + range_bias: float = 0.0, + ): + """ + Constructor for this projection set. + + :param scp_ecf: Scene Center Point position in ECF coordinates + :param az_scale_factor: Scale factor that converts azimuth coordinate to an increment in cosine of the DCA at COA + :param coa_time_poly: Center Of Aperture (COA) time polynomial + :param arp_poly: Aperture Reference Point (ARP) position polynomial coefficients + :param delta_arp: the ARP position offset + :param delta_varp: the ARP velocity offset + :param range_bias: the range bias offset + """ + super().__init__(coa_time_poly, arp_poly, delta_arp, delta_varp, range_bias) + self.scp_ecf = scp_ecf + self.az_scale_factor = az_scale_factor + + def _grid_specific_projection(self, xrow_ycol, coa_time, arp_position, arp_velocity) -> Tuple[np.ndarray, np.ndarray]: + """ + These are the calculations for the precise computation of the R/Rdot contour unique to these grid and + image formation algorithm types. See SICD Volume 3 Section 4.2 + + :param xrow_ycol: the [xrow, ycol] location as an array + :param coa_time: Center Of Aperture (COA) time + :param arp_position: Aperture Reference Point (ARP) position + :param arp_velocity: Aperture Reference Point (ARP) velocity + :return: the tuple containing range and range rate relative to the ARP at COA time + """ + # For the RGAZIM grid, the image coordinates are range and azimuth. The row coordinate is the range + # coordinate, xrow = rg. The column coordinate is the azimuth coordinate, ycol = az. + rg = xrow_ycol[0] + az = xrow_ycol[1] + + # (2) Compute the range and range rate to the SCP at COA. + arp_minus_scp = arp_position - self.scp_ecf.coordinate + range_to_scp = np.linalg.norm(arp_minus_scp, axis=-1) + rdot_to_scp = np.sum(arp_velocity * arp_minus_scp, axis=-1) / range_to_scp + + # (3) Compute the increment in cosine of the DCA at COA of the target (delta_cos_dca_tgt_coa) by + # scaling the azimuth coordinate by the azimuth to DCA scale factor. Compute the increment + # in range rate (delta_rdot_tgt_coa) by scaling by the magnitude of the velocity vector at COA. + delta_cos_dca_tgt_coa = self.az_scale_factor * az + delta_r_dot_tgt_coa = -np.linalg.norm(arp_velocity, axis=-1) * delta_cos_dca_tgt_coa + + # (4) Compute the range and range rate to the target at COA as follows. + r_tgt_coa = range_to_scp + rg + rdot_tgt_coa = rdot_to_scp + delta_r_dot_tgt_coa + + return r_tgt_coa, rdot_tgt_coa + + +class INCAProjectionSet(COAProjectionSet): + def __init__( + self, + r_ca_scp: float, + inca_time_coa_poly: np.polynomial.Polynomial, + drate_sf_poly: Polynomial2D, + coa_time_poly: Polynomial2D, + arp_poly: PolynomialXYZ, + delta_arp: np.ndarray = np.array([0.0, 0.0, 0.0], dtype="float64"), + delta_varp: np.ndarray = np.array([0.0, 0.0, 0.0], dtype="float64"), + range_bias: float = 0.0, + ): + """ + Constructor for this projection set. + + :param r_ca_scp: Range at Closest Approach for the SCP (m) + :param inca_time_coa_poly: Time of Closest Approach polynomial coefficients + :param drate_sf_poly: Doppler Rate Scale Factor polynomial coefficients + :param coa_time_poly: Center Of Aperture (COA) time polynomial + :param arp_poly: Aperture Reference Point (ARP) position polynomial coefficients + :param delta_arp: the ARP position offset + :param delta_varp: the ARP velocity offset + :param range_bias: the range bias offset + """ + super().__init__(coa_time_poly, arp_poly, delta_arp, delta_varp, range_bias) + self.r_ca_scp = r_ca_scp + self.inca_time_coa_poly = inca_time_coa_poly + self.drate_sf_poly = drate_sf_poly + + def _grid_specific_projection(self, xrow_ycol, coa_time, arp_position, arp_velocity) -> Tuple[np.ndarray, np.ndarray]: + """ + These are the calculations for the precise computation of the R/Rdot contour unique to these grid and + image formation algorithm types. See SICD Volume 3 Section 4.3 + + :param xrow_ycol: the [xrow, ycol] location as an array + :param coa_time: Center Of Aperture (COA) time + :param arp_position: Aperture Reference Point (ARP) position + :param arp_velocity: Aperture Reference Point (ARP) velocity + :return: the tuple containing range and range rate relative to the ARP at COA time + """ + # For the RGZERO grid, the image coordinates are range and azimuth. The row coordinate is the range + # coordinate, xrow = rg. The column coordinates is the azimuth coordinate, ycol = az. + rg = xrow_ycol[0] + az = xrow_ycol[1] + + # (2) Compute the range at closest approach and the time of closest approach for the image + # grid location. The range at closest approach, R TGT , is computed from the range coordinate. + # The time of closest approach, tTGT , is computed from the azimuth coordinate. CA + range_ca_tgt = self.r_ca_scp + rg + time_ca_tgt = self.inca_time_coa_poly(az) + + # (2 repeated in v1.3.0 of the spec) Compute the ARP velocity at the time of closest approach + # and the magnitude of the vector. + arp_velocity_ca_tgt = self.varp_poly(time_ca_tgt) + mag_arp_velocity_ca_tgt = np.sum(arp_velocity_ca_tgt, axis=-1) + + # (3) Compute the Doppler Rate Scale Factor (drsf_tgt) for image grid location (rg, az). + drsf_tgt = self.drate_sf_poly(rg, az) + + # (4) Compute the time difference between the COA time and the CA time (delta_coa_tgt). + delta_coa_tgt = coa_time - time_ca_tgt + + # (5) Compute the range and range rate relative to the ARP at COA ( RTGT and RdotTGT ). + r_tgt_coa = np.sqrt(range_ca_tgt**2 + drsf_tgt * mag_arp_velocity_ca_tgt**2 * delta_coa_tgt**2) + r_dot_tgt_coa = (drsf_tgt / r_tgt_coa) * mag_arp_velocity_ca_tgt**2 * delta_coa_tgt + + return r_tgt_coa, r_dot_tgt_coa + + +class PlaneProjectionSet(COAProjectionSet): + def __init__( + self, + scp_ecf: WorldCoordinate, + image_plane_urow: np.ndarray, + image_plane_ucol: np.ndarray, + coa_time_poly: Polynomial2D, + arp_poly: PolynomialXYZ, + delta_arp: np.ndarray = np.array([0.0, 0.0, 0.0], dtype="float64"), + delta_varp: np.ndarray = np.array([0.0, 0.0, 0.0], dtype="float64"), + range_bias: float = 0.0, + ): + """ + Constructor for this projection set. + + :param scp_ecf: Scene Center Point position in ECF coordinates + :param image_plane_urow: Unit vector in the increasing row direction in ECF coordinates (uRow) + :param image_plane_ucol: Unit vector in the increasing column direction in ECF coordinates (uCol) + :param coa_time_poly: Center Of Aperture (COA) time polynomial + :param arp_poly: Aperture Reference Point (ARP) position polynomial coefficients + :param delta_arp: the ARP position offset + :param delta_varp: the ARP velocity offset + :param range_bias: the range bias offset + """ + super().__init__(coa_time_poly, arp_poly, delta_arp, delta_varp, range_bias) + self.scp_ecf = scp_ecf + self.image_plane_urow = image_plane_urow + self.image_plane_ucol = image_plane_ucol + + def _grid_specific_projection(self, xrow_ycol, coa_time, arp_position, arp_velocity) -> Tuple[np.ndarray, np.ndarray]: + """ + These are the calculations for the precise computation of the R/Rdot contour unique to these grid and + image formation algorithm types. See SICD Volume 3 Sections 4.4, 4.5, and 4.6. + + Note that the calculations in sections 4.4, 4.5, and 4.6 are the same with the only difference being the + interpretation of the xrow and ycol gird positions. To share this one implementation for all three grid + planes assume: xrow = xrg = xct and ycol = ycr = yat + + :param xrow_ycol: the [xrow, ycol] location as an array + :param coa_time: Center Of Aperture (COA) time + :param arp_position: Aperture Reference Point (ARP) position + :param arp_velocity: Aperture Reference Point (ARP) velocity + :return: the tuple containing range and range rate relative to the ARP at COA time + """ + + # xrow = xrg = xct and ycol = ycr = yat + + # (2) The samples of an XRGYCR, XCTYAT, or PLANE grid are uniformly spaced locations in the image plane + # formed by the SCP, and image plane vectors uRow and uCol. Vectors uRow and uCol are orthogonal. Compute + # the point the image plane point for image grid location (xrgTGT, ycrTGT). + image_plane_point = ( + self.scp_ecf.coordinate + xrow_ycol[0] * self.image_plane_urow + xrow_ycol[1] * self.image_plane_ucol + ) + + # (3) Compute the range and range rate relative to the ARP at COA (r_tgt_coa and rdot_tgt_coa) for image plane + # point (image_plane_point). + arp_minus_ipp = arp_position - image_plane_point + r_tgt_coa = np.linalg.norm(arp_minus_ipp, axis=-1) + rdot_tgt_coa = np.sum(arp_velocity * arp_minus_ipp, axis=-1) / r_tgt_coa + + return r_tgt_coa, rdot_tgt_coa + + +class RRDotSurfaceProjection: + """ + This is the base class for calculations that project the R/RDot contour onto a surface model. The SICD specification + defines a way to do this for planes, a surface of constant height above an ellipsoid, or a digital elevation model. + """ + + @abstractmethod + def rrdot_to_ground(self, r_tgt_coa, r_dot_tgt_coa, arp_position, arp_velocity) -> np.ndarray: + """ + Subclasses should implement this method to compute the R/RDot Contour Ground Plane intersection with a + specific surface type (e.g. planar, HAE, DEM) + + :param r_tgt_coa: target COA range + :param r_dot_tgt_coa: target COA range rate + :param arp_position: ARP position + :param arp_velocity: ARP velocity + :return: the intersection between the R/Rdot Contour and the ground plane + """ + + +class GroundPlaneRRDotSurfaceProjection(RRDotSurfaceProjection): + """ + This class implements the Precise R/RDot Ground Plane Projection described in Section 5 of the SICD Specification + Volume 3 (v1.3.0). + """ + + class GroundPlaneNormalType(Enum): + SPHERICAL_EARTH = "SPHERICAL_EARTH" + GEODETIC_EARTH = "GEODETIC_EARTH" + + def __init__( + self, + ref_ecf: WorldCoordinate, + gpn: Optional[np.ndarray], + gpn_type: GroundPlaneNormalType = GroundPlaneNormalType.GEODETIC_EARTH, + ): + """ + The ground plane is defined by a reference point in the plane (ref_ect) and the vector normal to the plane + (gpn). The reference point and plane orientation may be based upon specific terrain height and slope + information for the imaged area. When only a reference point is specified, a ground plane normal may be + derived assuming the plane is tangent to a spherical earth model or a surface of constant geodetic height + above the WGS-84 reference ellipsoid passing through (ref_ect). + + :param ref_ecf: reference point in the plane, GREF in the specification + :param gpn: optional vector normal to the ground plane; if missing it will be computed using gpn_type + :param gpn_type: method to derive the ground plan normal + """ + self.ref_ecf = ref_ecf + + if gpn is not None: + self.u_gpn = gpn / np.linalg.norm(gpn) + elif gpn_type == self.GroundPlaneNormalType.SPHERICAL_EARTH: + self.u_gpn = ref_ecf.coordinate / np.linalg.norm(ref_ecf.coordinate) + elif gpn_type == self.GroundPlaneNormalType.GEODETIC_EARTH: + ref_lle = geocentric_to_geodetic(ref_ecf) + self.u_gpn = np.array( + [ + np.cos(ref_lle.latitude) * np.cos(ref_lle.longitude), + np.cos(ref_lle.latitude) * np.sin(ref_lle.longitude), + np.sin(ref_lle.latitude), + ] + ) + else: + raise ValueError(f"Provided gpn_type, {gpn_type}, is invalid.") + + def rrdot_to_ground(self, r_tgt_coa, r_dot_tgt_coa, arp_position, arp_velocity) -> np.ndarray: + """ + This method implements the R/RDot Contour Ground Plane Intersection described in section 5.2 + + :param r_tgt_coa: target COA range + :param r_dot_tgt_coa: target COA range rate + :param arp_position: ARP position + :param arp_velocity: ARP velocity + :return: the intersection between the R/Rdot Contour and the ground plane + """ + # (1) Compute the unit vector in the +Z direction (normal to the ground plane). + uvect_z = self.u_gpn / np.linalg.norm(self.u_gpn) + + # (2) Compute the ARP distance from the plane (arp_z). Also compute the ARP ground plane nadir (agpn). + arp_z = np.sum((arp_position - self.ref_ecf.coordinate) * uvect_z, axis=-1) + if arp_z > r_tgt_coa: + raise ValueError("No solution exists. Distance between ARP and the plane is greater than range.") + + agpn = arp_position - np.outer(arp_z, uvect_z) + + # (3) Compute the ground plane distance (gp_distance) from the ARP nadir to the circle of constant range. Also + # compute the sine and cosine of the grazing angle (sin_graz and cos_graz). + gp_distance = np.sqrt(r_tgt_coa * r_tgt_coa - arp_z * arp_z) + sin_graz = arp_z / r_tgt_coa + cos_graz = gp_distance / r_tgt_coa + + # (4) Compute velocity components normal to the ground plane (v_z) and parallel to the ground plane (v_x). + v_z = np.dot(arp_velocity, uvect_z) + v_mag = np.linalg.norm(arp_velocity, axis=-1) + v_x = np.sqrt(v_mag * v_mag - v_z * v_z) + + # (5) Orient the +X direction in the ground plane such that the v_x > 0. Compute unit vectors uvect_x + # and uvect_y. + uvect_x = (arp_velocity - (v_z * uvect_z)) / v_x + uvect_y = np.cross(uvect_z, uvect_x) + + # (6) Compute the cosine of the azimuth angle to the ground plane point. + cos_az = (-r_dot_tgt_coa + v_z * sin_graz) / (v_x * cos_graz) + if np.abs(cos_az) > 1: + raise ValueError("No solution exists. cos_az < -1 or cos_az > 1.") + + # (7) Compute the sine of the azimuth angle. Use parameter LOOK to establish the correct sign corresponding + # to the correct Side of Track. + look = np.sign(np.dot(np.cross(arp_position - self.ref_ecf.coordinate, arp_velocity), uvect_z)) + sin_az = look * np.sqrt(1 - cos_az * cos_az) + + # (8) Compute GPPTGT at distance G from the AGPN and at the correct azimuth angle. + return agpn + uvect_x * (gp_distance * cos_az) + uvect_y * (gp_distance * sin_az) + + +class SICDSensorModel(SensorModel): + """ + This is an implementation of the SICD sensor model as described by SICD Volume 3 Image Projections Description + NGA.STND.0024-3_1.3.0 (2021-11-30) + """ + + def __init__( + self, + coord_converter: SARImageCoordConverter, + coa_projection_set: COAProjectionSet, + scp_arp: np.ndarray, + scp_varp: np.ndarray, + side_of_track: str, + u_gpn: Optional[np.ndarray] = None, + ): + """ + Constructs a SICD sensor model from the information derived from the XML metadata. + + :param coord_converter: converts coordinates between image grid and image plane + :param coa_projection_set: projects image locations to the r/rdot contour + :param scp_arp: aperture reference point position + :param scp_varp: aperture reference point velocity + :param side_of_track: side of track imaged + :param u_gpn: optional unit normal for ground plane + """ + super().__init__() + self.coa_projection_set = coa_projection_set + self.image_plane = coord_converter + self.uvect_gpn = u_gpn + self.scp_arp = scp_arp + self.scp_varp = scp_varp + self.side_of_track = side_of_track + + self.uvect_spn = np.cross(scp_varp, coord_converter.scp_ecf.coordinate - scp_arp) + if side_of_track == "R": + self.uvect_spn *= -1.0 + self.uvect_spn /= np.linalg.norm(self.uvect_spn) + + # TODO: Add option for HAE ground assumption, does world_to_image always need a GroundPlaneProjection? + self.default_surface_projection = GroundPlaneRRDotSurfaceProjection(self.image_plane.scp_ecf, self.uvect_gpn) + + def image_to_world( + self, + image_coordinate: ImageCoordinate, + elevation_model: Optional[ElevationModel] = None, + options: Optional[Dict[str, Any]] = None, + ) -> GeodeticWorldCoordinate: + """ + This is an implementation of an Image Grid to Scene point projection that first projects the image + location to the R/RDot contour and then intersects the R/RDot contour with the elevation model. + + :param image_coordinate: the x,y image coordinate + :param elevation_model: the optional elevation model, if none supplied a plane tangent to SCP is assumed + :param options: no additional options are supported at this time + :return: the lon, lat, elev geodetic coordinate of the surface matching the image coordinate + """ + row_col = np.array( + [image_coordinate.r + self.image_plane.first_pixel.r, image_coordinate.c + self.image_plane.first_pixel.c] + ) + xrow_ycol = self.image_plane.rowcol_to_xrowycol(row_col=row_col) + r_tgt_coa, r_dot_tgt_coa, time_coa, arp_coa, varp_coa = self.coa_projection_set.precise_rrdot_computation(xrow_ycol) + + if elevation_model is not None: + raise NotImplementedError("SICD sensor model with DEM not yet implemented") + else: + surface_projection = self.default_surface_projection + + # Note that for a DEM the r/rdot contour may intersect the surface at multiple locations + # resulting in an ambiguous location. Here we are arbitrarily selecting the first result. + # TODO: Is there a better way to handle multiple DEM intersections? + coords_ecf = surface_projection.rrdot_to_ground(r_tgt_coa, r_dot_tgt_coa, arp_coa, varp_coa) + + return geocentric_to_geodetic(WorldCoordinate(coords_ecf[0])) + + def world_to_image(self, world_coordinate: GeodeticWorldCoordinate) -> ImageCoordinate: + """ + This is an implementation of Section 6.1 Scene To Image Grid Projection for a single point. + + :param world_coordinate: lon, lat, elevation coordinate of the scene point + :return: the x,y pixel location in this image + """ + ecf_world_coordinate = geodetic_to_geocentric(world_coordinate) + + # TODO: Consider making these options like we have for image_to_world + tolerance = 1e-2 + max_iterations = 10 + + # (2) Ground plane points are projected along straight lines to the image plane to establish points. + # The GP to IP projection direction is along the SCP COA slant plane normal. Also, compute the image + # plane unit normal, uIPN. Compute projection scale factor SF as shown. + uvect_proj = self.uvect_spn + scale_factor = float(np.dot(uvect_proj, self.image_plane.uvect_ipn)) + + # (3) Set initial ground plane position G1 to the scene point position S. + scene_point = np.array([ecf_world_coordinate.x, ecf_world_coordinate.y, ecf_world_coordinate.z]) + g_n = scene_point.copy() + + xrow_ycol_n = None + cont = True + iteration = 0 + while cont: + iteration += 1 + + # (4) Project ground plane point g_n to image plane point i_n. The projection distance is dist_n. Compute + # image coordinates xrown and ycoln. + dist_n = np.dot(self.image_plane.scp_ecf.coordinate - g_n, self.image_plane.uvect_ipn) / scale_factor + i_n = g_n + dist_n * uvect_proj + xrow_ycol_n = self.image_plane.ipp_to_xrowycol(i_n) + + # (5) Compute the precise projection for image grid location (xrown, ycoln) to the ground plane containing + # the scene point S. The result is point p_n. For image grid location (xrown, ycoln), compute COA + # parameters per Section 2. Compute the precise R/Rdot projection contour per Section 4. Compute the + # R/Rdot intersection with the ground plane per Section 5. + r_tgt_coa, r_dot_tgt_coa, time_coa, arp_coa, varp_coa = self.coa_projection_set.precise_rrdot_computation( + xrow_ycol_n + ) + p_n = self.default_surface_projection.rrdot_to_ground(r_tgt_coa, r_dot_tgt_coa, arp_coa, varp_coa) + + # (6) Compute the displacement between ground plane point Pn and the scene point S. + diff_n = scene_point - p_n[0] + delta_gpn = np.linalg.norm(diff_n) + g_n += diff_n + + # If the displacement is greater than the threshold (GP_MAX), compute point Gn+1 and repeat the + # projections in steps (4) and (5) above. If the displacement is less than the threshold, accept image + # grid location (xrown, ycoln) as the precise image grid location for scene point S. + cont = delta_gpn > tolerance and (iteration < max_iterations) + + row_col = self.image_plane.xrowycol_to_rowcol(xrow_ycol_n) + + # Convert the row_col image grid location to an x,y image coordinate. Note that row_col is in reference + # to the full image, so we subtract off the first_pixel offset to make the image coordinate correct if this + # is a chip. + return ImageCoordinate([row_col[1] - self.image_plane.first_pixel.x, row_col[0] - self.image_plane.first_pixel.y]) diff --git a/test/aws/osml/gdal/test_sensor_model_factory.py b/test/aws/osml/gdal/test_sensor_model_factory.py index c3f3e83..f4d0f67 100644 --- a/test/aws/osml/gdal/test_sensor_model_factory.py +++ b/test/aws/osml/gdal/test_sensor_model_factory.py @@ -166,6 +166,35 @@ def test_sensor_model_builder_gcps(self): np.array([radians(121.7518378), radians(13.89145147), 0.0]), ) + def test_sicd_sensor_models(self): + from aws.osml.gdal.sensor_model_factory import SensorModelFactory + from aws.osml.photogrammetry import ImageCoordinate, SICDSensorModel, geocentric_to_geodetic + + test_examples = [ + "./test/data/sicd/capella-sicd121-chip1.ntf", + "./test/data/sicd/capella-sicd121-chip2.ntf", + "./test/data/sicd/umbra-sicd121-chip1.ntf", + ] + for image_path in test_examples: + ds = gdal.Open(image_path) + xml_dess = ds.GetMetadata("xml:DES") + factory = SensorModelFactory(ds.RasterXSize, ds.RasterYSize, xml_dess=xml_dess) + sm = factory.build() + assert sm is not None + assert isinstance(sm, SICDSensorModel) + + scp_image_coord = ImageCoordinate( + [ + sm.image_plane.scp_pixel.x - sm.image_plane.first_pixel.x, + sm.image_plane.scp_pixel.y - sm.image_plane.first_pixel.y, + ] + ) + scp_world_coord = geocentric_to_geodetic(sm.image_plane.scp_ecf) + + assert np.allclose(scp_image_coord.coordinate, sm.world_to_image(scp_world_coord).coordinate, atol=1.0) + + assert np.allclose(scp_world_coord.coordinate, sm.image_to_world(scp_image_coord).coordinate) + if __name__ == "__main__": unittest.main() diff --git a/test/aws/osml/photogrammetry/test_sicd_sensor_model.py b/test/aws/osml/photogrammetry/test_sicd_sensor_model.py new file mode 100644 index 0000000..357e1b0 --- /dev/null +++ b/test/aws/osml/photogrammetry/test_sicd_sensor_model.py @@ -0,0 +1,197 @@ +import unittest +from math import radians +from pathlib import Path + +import numpy as np +from xsdata.formats.dataclass.parsers import XmlParser + +import aws.osml.formats.sicd.models.sicd_v1_2_1 as sicd121 +from aws.osml.gdal.sicd_sensor_model_builder import poly1d_to_native, poly2d_to_native, xyzpoly_to_native, xyztype_to_ndarray +from aws.osml.photogrammetry import ( + GeodeticWorldCoordinate, + ImageCoordinate, + INCAProjectionSet, + PFAProjectionSet, + PlaneProjectionSet, + SARImageCoordConverter, + SICDSensorModel, + WorldCoordinate, + geodetic_to_geocentric, +) + + +class TestSICDSensorModel(unittest.TestCase): + def setUp(self): + pass + + def tearDown(self): + pass + + def test_xrgycr(self): + sicd: sicd121.SICD = XmlParser().from_path(Path("./test/data/sicd/example.sicd121.rma.xml")) + + scp_ecf = WorldCoordinate(xyztype_to_ndarray(sicd.geo_data.scp.ecf)) + scp_pixel = ImageCoordinate([sicd.image_data.scppixel.col, sicd.image_data.scppixel.row]) + + time_coa_poly = poly2d_to_native(sicd.grid.time_coapoly) + arp_poly = xyzpoly_to_native(sicd.position.arppoly) + + first_pixel = ImageCoordinate([sicd.image_data.first_col, sicd.image_data.first_row]) + + coord_converter = SARImageCoordConverter( + scp_pixel=scp_pixel, + scp_ecf=scp_ecf, + u_row=xyztype_to_ndarray(sicd.grid.row.uvect_ecf), + u_col=xyztype_to_ndarray(sicd.grid.col.uvect_ecf), + row_ss=sicd.grid.row.ss, + col_ss=sicd.grid.col.ss, + first_pixel=first_pixel, + ) + + projection_set = PlaneProjectionSet( + scp_ecf=scp_ecf, + image_plane_urow=xyztype_to_ndarray(sicd.grid.row.uvect_ecf), + image_plane_ucol=xyztype_to_ndarray(sicd.grid.col.uvect_ecf), + coa_time_poly=time_coa_poly, + arp_poly=arp_poly, + ) + + sicd_sensor_model = SICDSensorModel( + coord_converter=coord_converter, + coa_projection_set=projection_set, + scp_arp=xyztype_to_ndarray(sicd.scpcoa.arppos), + scp_varp=xyztype_to_ndarray(sicd.scpcoa.arpvel), + side_of_track=str(sicd.scpcoa.side_of_track.value), + ) + + geodetic_world_coordinate = sicd_sensor_model.image_to_world( + ImageCoordinate([sicd.image_data.scppixel.col, sicd.image_data.scppixel.row]) + ) + ecf_world_coordinate = geodetic_to_geocentric(geodetic_world_coordinate) + + assert np.allclose(ecf_world_coordinate.coordinate, scp_ecf.coordinate) + + geo_scp_world_coordinate = GeodeticWorldCoordinate( + [radians(sicd.geo_data.scp.llh.lon), radians(sicd.geo_data.scp.llh.lat), sicd.geo_data.scp.llh.hae] + ) + + assert np.allclose(geo_scp_world_coordinate.coordinate, geodetic_world_coordinate.coordinate) + + calculated_image_scp = sicd_sensor_model.world_to_image(geo_scp_world_coordinate) + + assert np.allclose(calculated_image_scp.coordinate, scp_pixel.coordinate) + + def test_rgzero_inca(self): + sicd: sicd121.SICD = XmlParser().from_path(Path("./test/data/sicd/example.sicd121.capella.xml")) + + scp_ecf = WorldCoordinate(xyztype_to_ndarray(sicd.geo_data.scp.ecf)) + scp_pixel = ImageCoordinate([sicd.image_data.scppixel.col, sicd.image_data.scppixel.row]) + + time_coa_poly = poly2d_to_native(sicd.grid.time_coapoly) + arp_poly = xyzpoly_to_native(sicd.position.arppoly) + + first_pixel = ImageCoordinate([sicd.image_data.first_col, sicd.image_data.first_row]) + + image_plane = SARImageCoordConverter( + scp_pixel=scp_pixel, + scp_ecf=scp_ecf, + u_row=xyztype_to_ndarray(sicd.grid.row.uvect_ecf), + u_col=xyztype_to_ndarray(sicd.grid.col.uvect_ecf), + row_ss=sicd.grid.row.ss, + col_ss=sicd.grid.col.ss, + first_pixel=first_pixel, + ) + + projection_set = INCAProjectionSet( + r_ca_scp=sicd.rma.inca.r_ca_scp, + inca_time_coa_poly=poly1d_to_native(sicd.rma.inca.time_capoly), + drate_sf_poly=poly2d_to_native(sicd.rma.inca.drate_sfpoly), + coa_time_poly=time_coa_poly, + arp_poly=arp_poly, + ) + + sicd_sensor_model = SICDSensorModel( + coord_converter=image_plane, + coa_projection_set=projection_set, + scp_arp=xyztype_to_ndarray(sicd.scpcoa.arppos), + scp_varp=xyztype_to_ndarray(sicd.scpcoa.arpvel), + side_of_track=str(sicd.scpcoa.side_of_track.value), + ) + + geodetic_world_coordinate = sicd_sensor_model.image_to_world( + ImageCoordinate([sicd.image_data.scppixel.col, sicd.image_data.scppixel.row]) + ) + ecf_world_coordinate = geodetic_to_geocentric(geodetic_world_coordinate) + + assert np.allclose(ecf_world_coordinate.coordinate, scp_ecf.coordinate) + + geo_scp_world_coordinate = GeodeticWorldCoordinate( + [radians(sicd.geo_data.scp.llh.lon), radians(sicd.geo_data.scp.llh.lat), sicd.geo_data.scp.llh.hae] + ) + + assert np.allclose(geo_scp_world_coordinate.coordinate, geodetic_world_coordinate.coordinate) + + calculated_image_scp = sicd_sensor_model.world_to_image(geo_scp_world_coordinate) + + assert np.allclose(calculated_image_scp.coordinate, scp_pixel.coordinate) + + def test_rgazim_pfa(self): + sicd: sicd121.SICD = XmlParser().from_path(Path("./test/data/sicd/example.sicd121.pfa.xml")) + + scp_ecf = WorldCoordinate(xyztype_to_ndarray(sicd.geo_data.scp.ecf)) + scp_pixel = ImageCoordinate([sicd.image_data.scppixel.col, sicd.image_data.scppixel.row]) + + polar_ang_poly = poly1d_to_native(sicd.pfa.polar_ang_poly) + spatial_freq_sf_poly = poly1d_to_native(sicd.pfa.spatial_freq_sfpoly) + time_coa_poly = poly2d_to_native(sicd.grid.time_coapoly) + arp_poly = xyzpoly_to_native(sicd.position.arppoly) + + first_pixel = ImageCoordinate([sicd.image_data.first_col, sicd.image_data.first_row]) + + image_plane = SARImageCoordConverter( + scp_pixel=scp_pixel, + scp_ecf=scp_ecf, + u_row=xyztype_to_ndarray(sicd.grid.row.uvect_ecf), + u_col=xyztype_to_ndarray(sicd.grid.col.uvect_ecf), + row_ss=sicd.grid.row.ss, + col_ss=sicd.grid.col.ss, + first_pixel=first_pixel, + ) + + projection_set = PFAProjectionSet( + scp_ecf=scp_ecf, + polar_ang_poly=polar_ang_poly, + spatial_freq_sf_poly=spatial_freq_sf_poly, + coa_time_poly=time_coa_poly, + arp_poly=arp_poly, + ) + + # FPN is the default ground plane normal for a PFA projection otherwise we calculate it as a normal + # from WGS84 ellipsoid + ugpn = xyztype_to_ndarray(sicd.pfa.fpn) + + sicd_sensor_model = SICDSensorModel( + coord_converter=image_plane, + coa_projection_set=projection_set, + scp_arp=xyztype_to_ndarray(sicd.scpcoa.arppos), + scp_varp=xyztype_to_ndarray(sicd.scpcoa.arpvel), + side_of_track=str(sicd.scpcoa.side_of_track.value), + u_gpn=ugpn, + ) + + geodetic_world_coordinate = sicd_sensor_model.image_to_world( + ImageCoordinate([sicd.image_data.scppixel.col, sicd.image_data.scppixel.row]) + ) + ecf_world_coordinate = geodetic_to_geocentric(geodetic_world_coordinate) + + assert np.allclose(ecf_world_coordinate.coordinate, scp_ecf.coordinate) + + geo_scp_world_coordinate = GeodeticWorldCoordinate( + [radians(sicd.geo_data.scp.llh.lon), radians(sicd.geo_data.scp.llh.lat), sicd.geo_data.scp.llh.hae] + ) + + assert np.allclose(geo_scp_world_coordinate.coordinate, geodetic_world_coordinate.coordinate) + + calculated_image_scp = sicd_sensor_model.world_to_image(geo_scp_world_coordinate) + + assert np.allclose(calculated_image_scp.coordinate, scp_pixel.coordinate) diff --git a/test/data/sicd/capella-sicd121-chip1.ntf b/test/data/sicd/capella-sicd121-chip1.ntf new file mode 100644 index 0000000..1516370 --- /dev/null +++ b/test/data/sicd/capella-sicd121-chip1.ntf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f11dbe73eff3a8b55c50a523d634a63eb98966fa0d4cf32a33b7339f725b59f0 +size 1094244 diff --git a/test/data/sicd/capella-sicd121-chip2.ntf b/test/data/sicd/capella-sicd121-chip2.ntf new file mode 100644 index 0000000..478f79a --- /dev/null +++ b/test/data/sicd/capella-sicd121-chip2.ntf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9c6950dad897c1ff4c99e1a1256b99c4b18261e20c43fccca03ac75c17e8b6bf +size 1064611 diff --git a/test/data/sicd/example.sicd121.capella.xml b/test/data/sicd/example.sicd121.capella.xml new file mode 100644 index 0000000..fd24b36 --- /dev/null +++ b/test/data/sicd/example.sicd121.capella.xml @@ -0,0 +1,402 @@ + + + capella-2 + 15JAN21capella-2173921 + MONOSTATIC + + STRIPMAP + + UNCLASSIFIED + + + Capella SAR Processor (2.5.3, 37a73cc02e5a357756980ce065e2b53adeae4e9d) + 2021-09-01T22:48:40.000000Z + Unknown + sarpy 1.2.5 + + + RE16I_IM16I + 5388 + 19083 + 0 + 0 + + 5388 + 19083 + + + 2694 + 9541 + + + + 0 + 0 + + + 0 + 19083 + + + 5388 + 19083 + + + 5388 + 0 + + + 0 + 0 + + + + + WGS_84 + + + 5271232.528561848 + -703918.7036014228 + 3509547.755004264 + + + 33.59934615859317 + -7.606259320191953 + 54.63396231038757 + + + + + 33.57557419233318 + -7.715737959893586 + + + 33.66247968391572 + -7.521776845384764 + + + 33.62304102343928 + -7.496736772717166 + + + 33.53576476994573 + -7.690344834684546 + + + + + 33.57557419233318 + -7.715737959893586 + + + 33.66247968391572 + -7.521776845384764 + + + 33.62304102343928 + -7.496736772717166 + + + 33.53576476994573 + -7.690344834684546 + + + 33.57557419233318 + -7.715737959893586 + + + + + SLANT + RGZERO + + 2.173685700333333 + 0.000150937408161923 + + + + -0.2313169281599637 + 0.3556237170721815 + -0.9055519038699015 + + 0.6245676208333334 + 0.9511988838080884 + -1 + 1.334256380792608 + 64.37786951931926 + -0.667128190396304 + 0.667128190396304 + + 0 + + + AVCI-NACAROGLU-CAPELLA + 1.25 + + + 0.01970287298661711 + 0.07726950936010718 + 0.1318824131826273 + 0.1944252372795882 + 0.2646014515889159 + 0.3412051275652817 + 0.4225343249454487 + 0.5065331681561823 + 0.590894960579544 + 0.6731625984868158 + 0.7508323427242285 + 0.8214596188067258 + 0.8827631847744818 + 0.9327232538826931 + 0.9696690963016896 + 0.9923519872809892 + 1 + 0.9923519872809892 + 0.9696690963016896 + 0.9327232538826931 + 0.8827631847744818 + 0.8214596188067258 + 0.7508323427242285 + 0.6731625984868158 + 0.590894960579544 + 0.5065331681561823 + 0.4225343249454487 + 0.3412051275652817 + 0.2646014515889159 + 0.1944252372795882 + 0.1318824131826273 + 0.07726950936010718 + + + + + -0.1421942494206885 + 0.9084236131422561 + 0.3931250876213012 + + 1.069856275523818 + 1.122553243782685 + -1 + 0.872855015564871 + 0 + -0.4394266826531045 + 0.4334283329117665 + + -0.002999174870669003 + + + ANTENNA-TAPER-CAPELLA + 0.01205268875689288 + + + 0.5038276985319642 + 0.5453410700968516 + 0.5893418917596951 + 0.6347317532132404 + 0.6805044117717426 + 0.7257502175755721 + 0.7696333109610092 + 0.8113906511990557 + 0.8503308500159068 + 0.8857978645240657 + 0.9171536249574779 + 0.9440325772587769 + 0.9660381523818794 + 0.9828498329217592 + 0.9942249153188277 + 0.9999999853762968 + 1 + 0.9942249589755801 + 0.9828499049796148 + 0.966038251797382 + 0.9440327025834828 + 0.917153774346285 + 0.8857980357445312 + 0.8503310404079479 + 0.8113908577480362 + 0.7696335302970161 + 0.7257504459595931 + 0.6805046450904531 + 0.6347319869708252 + 0.5893421210698754 + 0.5453412895181906 + 0.5038279024619354 + + + + + 2021-01-15T17:39:21.684235Z + 4.356605759000001 + + + 0 + 4.356605759000001 + 0 + 26979 + + 0.0 + 6192.6662318038825 + + + + + + + + 5438120.473202774 + -997.4095925011363 + -2.788989728553322 + 0.00023730335867582828 + 2.3545281075582228e-07 + -1.492656957489703e-11 + -3.0570170411356174e-14 + + + -971609.8647421665 + 6583.684605741273 + 0.6568128008751011 + -0.0011846374886725296 + -7.185209123184431e-08 + 5.783598485367062e-11 + 9.744111832411611e-14 + + + 4148423.8430116437 + 2855.80663274287 + -2.5117319050417883 + -0.0005721514871533472 + 2.545856535909912e-07 + 3.20193106149182e-11 + -1.1676099341312116e-14 + + + + + + 9549999872 + 9749999872 + + + + 1.96E-05 + 200000000 + 9549999872 + 10204081632653.06 + CHIRP + 750000000 + 0 + + + H + + + H:H + + + + + + 1 + 1 + 1 + + H:H + 0 + 4.356605759000001 + + 9549999872 + 9749999872 + + OTHER + NO + NO + NO + NO + + Backprojected to DEM + true + + + + 2.173685700333333 + + 5435939.242952521 + -957295.9124464868 + 4154619.595475576 + + + -1009.530993301936 + 6586.523220067197 + 2844.879101663144 + + + -5.574871172770072 + 1.298171362344716 + -5.030911433820477 + + R + 712352.4346112193 + 449850.7034007939 + 89.99999995062271 + 46.9889303602956 + 43.0110696397044 + -0.1700935896001955 + 46.98916589027822 + 331.8370896248286 + 332.0697045793157 + + + + ABSOLUTE + + 39.24201011267091 + 2.27866933042562E-05 + 3.471658456505701E-07 + -6.629346283575849E-17 + + + + 2.598451147663572E-06 + -1.942915018981167E-24 + 1.368407884430401E-27 + 1.378877395375437E-30 + + + 1.499571638005783E-06 + 9.009699530034262E-13 + -8.811557887570633E-19 + 2.225021054564836E-23 + + + 2.203222548581317E-06 + -2.320064743720347E-26 + 9.951539490477308E-28 + 1.305902461190002E-32 + + + 2.046831876543034E-06 + 2.291158712901786E-12 + -4.58441401396291E-19 + 5.497848200436365E-23 + + + + RG_DOP + INCA + + + 2.1736857003333334 + 0.000150937408161923 + + 712352.4341635579 + 9649999872 + + 0.9144184293995976 + + + -19.8703217922726 + + true + + + diff --git a/test/data/sicd/example.sicd121.pfa.xml b/test/data/sicd/example.sicd121.pfa.xml new file mode 100644 index 0000000..fd50ac6 --- /dev/null +++ b/test/data/sicd/example.sicd121.pfa.xml @@ -0,0 +1,1156 @@ + + + Synthetic + SyntheticCore + MONOSTATIC + + SPOTLIGHT + + UNCLASSIFIED + + + Valkyrie Systems Sage | sar_common_kit 1.9.0.0 + 2022-12-05T18:43:30.208726Z + + + RE32F_IM32F + 1494 + 1723 + 0 + 0 + + 1494 + 1723 + + + 747 + 861 + + + + 256 + 343 + + + 256 + 484 + + + 256 + 624 + + + 256 + 765 + + + 256 + 905 + + + 256 + 1046 + + + 256 + 1186 + + + 256 + 1327 + + + 256 + 1468 + + + 379 + 1456 + + + 502 + 1445 + + + 624 + 1434 + + + 747 + 1423 + + + 870 + 1412 + + + 992 + 1401 + + + 1115 + 1390 + + + 1238 + 1378 + + + 1238 + 1238 + + + 1238 + 1097 + + + 1238 + 957 + + + 1238 + 817 + + + 1238 + 676 + + + 1238 + 536 + + + 1238 + 395 + + + 1238 + 255 + + + 1115 + 266 + + + 992 + 277 + + + 870 + 288 + + + 747 + 299 + + + 624 + 310 + + + 502 + 321 + + + 379 + 332 + + + + + WGS_84 + + + 6378137 + 0 + 0 + + + 0 + 0 + 0 + + + + + 0.0080807974971151136 + -0.0061258326901634519 + + + 0.0056733384282420182 + 0.0074368679872295704 + + + -0.008071597406306948 + 0.0061267096368526897 + + + -0.0056641383373949505 + -0.0074359910405444127 + + + + + 0.005238360895824838 + -0.0036433852169764111 + + + 0.0050420582635510016 + -0.0025375503997010318 + + + 0.004845755628902701 + -0.0014317155805202205 + + + 0.0046494529921086835 + -0.00032588076026081428 + + + 0.0044531503533953975 + 0.00077995406025051814 + + + 0.0042568477129873231 + 0.0018857888801836113 + + + 0.004060545071107439 + 0.0029916236987124986 + + + 0.0038642424279800454 + 0.0040974585150061532 + + + 0.003667939783831225 + 0.0052032933282371652 + + + 0.0025546522020080289 + 0.0050083048147242385 + + + 0.0014413646175311253 + 0.0048133163010931164 + + + 0.00032807703126864579 + 0.0046183277873471356 + + + -0.00078521055587245359 + 0.0044233392734964747 + + + -0.0018984981430081194 + 0.0042283507595426628 + + + -0.003011785729254395 + 0.0040333622454942607 + + + -0.0041250733137164937 + 0.0038383737313532821 + + + -0.0052383608955085424 + 0.003643385217128532 + + + -0.0050420582632763646 + 0.0025375503997804791 + + + -0.0048457556287156058 + 0.0014317155805582487 + + + -0.0046494529920602899 + 0.00032588076028108935 + + + -0.0044531503535271385 + -0.00077995406023062997 + + + -0.0042568477133461038 + -0.0018857888801565275 + + + -0.0040605450717476526 + -0.0029916236986777789 + + + -0.0038642424289528294 + -0.004097458514977414 + + + -0.0036679397851883686 + -0.0052032933282338163 + + + -0.0025546522030494749 + -0.0050083048147000261 + + + -0.0014413646182779216 + -0.0048133163010521838 + + + -0.00032807703177041223 + -0.0046183277872955016 + + + 0.00078521055559128701 + -0.0044233392734311441 + + + 0.0018984981429170419 + -0.0042283507594636036 + + + 0.003011785729324451 + -0.0040333622453953642 + + + 0.0041250733139214331 + -0.0038383737312319729 + + + + + [6378137.0, -405.5797876726389, 579.2279653395692] + + + [6378137.0, 86.82408883346518, 492.403876506104] + + + [6378137.0, 579.2279653395692, 405.5797876726388] + + + [6378137.0, -492.40387650610404, 86.8240888334652] + + + [6378137.0, 0.0, 0.0] + + + [6378137.0, 492.40387650610404, -86.8240888334652] + + + [6378137.0, -579.2279653395692, -405.5797876726388] + + + [6378137.0, -86.82408883346518, -492.403876506104] + + + [6378137.0, 405.5797876726389, -579.2279653395692] + + + + + SLANT + RGAZIM + + 1.6800674762530383 + + + + -0.50000122375786304 + -0.15037583977714006 + -0.8528692064148875 + + 0.88229809656554448 + 0.99747529707162585 + -1 + 0.88798408351600244 + 66.712157247222834 + -0.44399204175799412 + 0.44399204175800833 + + -0 + + + + + -0.13518643844872713 + 0.98628938466763816 + -0.094646059985916131 + + 0.8788669876603048 + 0.99666461341322399 + -1 + 0.88870636679539183 + 1.3449549529642717e-08 + -0.44435318339769592 + 0.44435318339769592 + + -0 + + + + + 2022-12-05T18:41:24.051402Z + 3.4668291025146964 + + + 0.0056816659534297907 + 1.734252544716481 + 0 + 1040 + + -3.4200358124461596 + 601.94243049797956 + -2.5957560931224679e-05 + -2.0559365748016132e-08 + 8.5465035653447778e-11 + 1.5613913034987107e-13 + + + + 1.734252544716481 + 3.4628234234795321 + 1041 + 2080 + + -3.4200358124461596 + 601.94243049797956 + -2.5957560931224679e-05 + -2.0559365748016132e-08 + 8.5465035653447778e-11 + 1.5613913034987107e-13 + + + + + + + + 7228127.9124448663 + 352.53242998756502 + -3.5891719134975157 + -5.7694198643316104e-05 + 2.7699968593303768e-07 + 2.1592636134572539e-09 + + + 268129.91744542622 + -7332.3823879634392 + -0.13313219332893028 + 0.0012135963117010783 + 1.0196690368353028e-08 + 1.3607911396273635e-11 + + + 1451527.4824241539 + -401.08990372640221 + -0.72076439428225647 + 6.6511087447480695e-05 + 5.6690990559856781e-08 + 3.2123861103114586e-10 + + + + + 6378136.9999999972 + -2.7603991862673482e-10 + -8.8046691538817019e-10 + 3.6552842678534889e-10 + -4.5501609492503518e-13 + + + 0 + 0 + 0 + 0 + 0 + + + 0 + 0 + 0 + 0 + 0 + + + + + 7228127.9122881154 + 352.53243031729494 + -3.5891718145261389 + -5.7760778794926364e-05 + 2.961407356089768e-07 + 1.5152746784999351e-10 + + + 268129.91754994984 + -7332.3823894408897 + -0.13313219336015877 + 0.0012135939299440443 + 1.0894413139775905e-08 + -6.1574812416329165e-11 + + + 1451527.4820069293 + -401.0899032701904 + -0.72076438617145899 + 6.6502336106517436e-05 + 5.9235211780521735e-08 + 4.8536679801755301e-11 + + + + + + 7228127.9122881237 + 352.53243031084878 + -3.5891718013492584 + -5.7769234785477141e-05 + 2.985788077956373e-07 + -1.4884336849092922e-10 + + + 268129.91754994984 + -7332.3823894398674 + -0.13313219479068839 + 0.0012135948482529309 + 1.0630300780216877e-08 + -3.4535962553841784e-11 + + + 1451527.4820069303 + -401.08990326673984 + -0.72076439093449318 + 6.6505493849440306e-05 + 5.8315612455559405e-08 + 1.3835573401835279e-10 + + + + + + + 9933296178.0950012 + 10066703821.904999 + + + + + V + + + V:V + 1 + + + + + + 0.0052383608956667301 + -0.0036433852170520572 + 0.039373653940856457 + + + 0.0036679397845088379 + 0.0052032933282355155 + 0.039283305406570435 + + + -0.0052383608956667301 + 0.0036433852170520572 + 0.039373653940856457 + + + -0.0036679397845088379 + -0.0052032933282355155 + 0.039283305406570435 + + + + + + 6378137 + 0 + 0 + + 650 + 750 + + + + 0 + -0.17364817766693033 + -0.98480775301220813 + + 0.76980043496519579 + 1301 + 0 + + + + 0 + 0.98480775301220813 + -0.17364817766693033 + + 0.66641108974957253 + 1501 + 0 + + + + + + + 1 + 1 + + V:V + 0.0056816659534327432 + 3.4611621345438324 + + 9933296178.0950298 + 10066703821.905016 + + PFA + NO + NO + NO + NO + + inscription + true + fixed + fixed + + + polar_deterministic_phase + true + true + none + none + one_dimensional + + + + 1.6800674762530383 + + 7228710.0595508879 + 255810.65024467336 + 1450851.5901888732 + + + 340.47184478328006 + -7332.8194533174392 + -403.5112050640754 + + + -7.1789158206813477 + -0.25403049783428427 + -1.4408563791978921 + + L + 1701141.9562064605 + 1282320.3392587577 + 80.000333057346595 + 30.000080950049 + 59.999919049951004 + 8.9805970546123763 + 31.195125856239255 + 9.9994779614198173 + 352.45909403041333 + + + + ABSOLUTE + + -47.698407849729996 + + + + 234.567891 + 0.0123456789 + 3.45678912e-05 + 1.23456789e-09 + 2.34567891e-12 + 1.23456789e-16 + 1.23456789e-19 + -0.023456789 + -5.67891234e-06 + -4.56789123e-09 + -8.91234567e-13 + -4.56789123e-16 + -9.12345678e-20 + -3.45678912e-23 + 5.67891234e-05 + 3.45678912e-09 + 7.89123456e-12 + 4.56789123e-16 + 5.67891234e-19 + 6.78912345e-23 + 5.67891234e-26 + -6.78912345e-09 + -1.23456789e-12 + -1.23456789e-15 + -7.89123456e-20 + -6.78912345e-23 + -5.67891234e-26 + -1.23456789e-29 + 7.89123456e-12 + 5.67891234e-16 + 1.23456789e-18 + 1.23456789e-22 + 1.23456789e-25 + 1.23456789e-29 + 6.78912345e-33 + -1.23456789e-15 + -1.23456789e-19 + -1.23456789e-22 + -8.91234567e-26 + -4.56789123e-29 + 9.12345678e-33 + 2.34567891e-36 + + + + + + + 0.13982986262005959 + -0.0027594341203054122 + -2.642141233211328e-06 + 1.4412928975132546e-08 + 4.9106827976192821e-11 + -1.1406011989724555e-13 + + + -0.985103968766331 + -0.00072022999981332595 + 8.6929909937280073e-06 + 1.7419413461433799e-08 + -7.0195266020811239e-11 + -3.1383419971071391e-13 + + + 0.10008886172036295 + -0.0032336279155612555 + -3.6150726160461875e-06 + 2.4227194540266762e-08 + 6.8535490141060762e-11 + -1.9455706113121084e-13 + + + + + -0.85523535607199153 + -0.00010473716447760117 + 1.0612386361416289e-06 + 1.2191988789775561e-10 + -6.5342561715559025e-13 + 3.2519400278010645e-16 + + + -0.06921308838843146 + 0.00073787526119144643 + 7.399077245060788e-08 + -1.0525875572605681e-09 + -3.3788216228145983e-14 + 7.6241787500235205e-16 + + + 0.51359715158881925 + -7.4969848184029868e-05 + 1.2309351838082699e-06 + 3.5096979204331667e-10 + -2.0820927565561895e-12 + -5.4913780628865013e-16 + + + 10000000000 + + + 0 + + + 0 + + + + + 0 + -4.1430777012935061e-12 + -25810177.686242383 + -0.00014382609695309318 + -13687592749336.885 + 292.19947867443852 + -4.2115648774405212e+18 + -1442527537.8580344 + -4.4559066869820204e+25 + -4.1430777012935061e-12 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + -25810177.686242383 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + -0.00014382609695309318 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + -13687592749336.885 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 292.19947867443852 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + -4.2115648774405212e+18 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + -1442527537.8580344 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + -4.4559066869820204e+25 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + + + 0 + + + + + 0 + + + 0 + + + + 0 + + false + + + + + 0.13982986262005959 + -0.0027594341203054122 + -2.642141233211328e-06 + 1.4412928975132546e-08 + 4.9106827976192821e-11 + -1.1406011989724555e-13 + + + -0.985103968766331 + -0.00072022999981332595 + 8.6929909937280073e-06 + 1.7419413461433799e-08 + -7.0195266020811239e-11 + -3.1383419971071391e-13 + + + 0.10008886172036295 + -0.0032336279155612555 + -3.6150726160461875e-06 + 2.4227194540266762e-08 + 6.8535490141060762e-11 + -1.9455706113121084e-13 + + + + + -0.85523535607199153 + -0.00010473716447760117 + 1.0612386361416289e-06 + 1.2191988789775561e-10 + -6.5342561715559025e-13 + 3.2519400278010645e-16 + + + -0.06921308838843146 + 0.00073787526119144643 + 7.399077245060788e-08 + -1.0525875572605681e-09 + -3.3788216228145983e-14 + 7.6241787500235205e-16 + + + 0.51359715158881925 + -7.4969848184029868e-05 + 1.2309351838082699e-06 + 3.5096979204331667e-10 + -2.0820927565561895e-12 + -5.4913780628865013e-16 + + + 10000000000 + + + 0 + + + 0 + + + + + 0 + -4.1430777012935061e-12 + -25810177.686242383 + -0.00014382609695309318 + -13687592749336.885 + 292.19947867443852 + -4.2115648774405212e+18 + -1442527537.8580344 + -4.4559066869820204e+25 + -4.1430777012935061e-12 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + -25810177.686242383 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + -0.00014382609695309318 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + -13687592749336.885 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 292.19947867443852 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + -4.2115648774405212e+18 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + -1442527537.8580344 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + -4.4559066869820204e+25 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + + + 0 + + + + + 0 + + + 0 + + + + 0 + + false + + + + + 0.13982986262005959 + -0.0027594341203054122 + -2.642141233211328e-06 + + + -0.985103968766331 + -0.00072022999981332595 + 8.6929909937280073e-06 + + + 0.10008886172036295 + -0.0032336279155612555 + -3.6150726160461875e-06 + + + + + -0.85523535607199153 + -0.00010473716447760117 + 1.0612386361416289e-06 + + + -0.06921308838843146 + 0.00073787526119144643 + 7.399077245060788e-08 + + + 0.51359715158881925 + -7.4969848184029868e-05 + 1.2309351838082699e-06 + + + 10000000000 + + + 0 + + + 0 + + + + + 0 + -4.1430777012935061e-12 + -25810177.686242383 + -4.1430777012935061e-12 + 0 + 0 + -25810177.686242383 + 0 + 0 + + + 0 + + + + + 0 + + + 0 + + + + 0 + + false + + + + + 1 + 0 + 0 + + + 0.85540832579135895 + 0.067973204303252321 + -0.51347467325894713 + + 1.6800674762530463 + + -0.0071413060968959627 + 0.004245118151048095 + 3.303261280436797e-06 + -2.152475729568344e-08 + -5.5340201006749593e-11 + 1.6174039129702326e-13 + 1.2038148814517427e-15 + -1.0008410326624715e-16 + 1.6819824323114349e-17 + -1.1931290667377136e-18 + + + 0.99999143699142279 + 2.1389170906735031e-05 + 0.051388964320644458 + 0.0048322065140747042 + -0.020014437732713723 + 0.0023716850734943114 + 0.14153200650672734 + 4.5834686287659396 + -1395.0901983623608 + + 66.268165205464854 + 67.156149288980856 + -0.44524655663963569 + 0.44524655663963569 + + diff --git a/test/data/sicd/example.sicd121.rma.xml b/test/data/sicd/example.sicd121.rma.xml new file mode 100644 index 0000000..2786650 --- /dev/null +++ b/test/data/sicd/example.sicd121.rma.xml @@ -0,0 +1,1577 @@ + + + Synthetic + SyntheticCore + MONOSTATIC + + SPOTLIGHT + + UNCLASSIFIED + + + Valkyrie Systems Sage | sar_common_kit 1.10.0.0 + 2023-03-15T18:45:25.264560Z + + + RE32F_IM32F + 1491 + 1773 + 0 + 0 + + 1491 + 1773 + + + 745 + 886 + + + + 251 + 344 + + + 251 + 368 + + + 251 + 392 + + + 251 + 416 + + + 251 + 440 + + + 251 + 464 + + + 251 + 488 + + + 251 + 512 + + + 251 + 536 + + + 251 + 560 + + + 251 + 584 + + + 251 + 608 + + + 251 + 632 + + + 251 + 656 + + + 251 + 680 + + + 251 + 704 + + + 251 + 728 + + + 251 + 752 + + + 251 + 776 + + + 251 + 800 + + + 251 + 824 + + + 251 + 848 + + + 251 + 872 + + + 251 + 896 + + + 251 + 921 + + + 251 + 945 + + + 251 + 969 + + + 251 + 993 + + + 251 + 1017 + + + 251 + 1041 + + + 251 + 1065 + + + 251 + 1089 + + + 251 + 1113 + + + 251 + 1137 + + + 251 + 1161 + + + 251 + 1185 + + + 251 + 1209 + + + 251 + 1233 + + + 251 + 1257 + + + 251 + 1281 + + + 251 + 1305 + + + 251 + 1329 + + + 251 + 1353 + + + 251 + 1377 + + + 251 + 1401 + + + 251 + 1425 + + + 251 + 1449 + + + 251 + 1473 + + + 251 + 1498 + + + 251 + 1522 + + + 1239 + 1428 + + + 1239 + 250 + + + 1219 + 252 + + + 1199 + 254 + + + 1179 + 256 + + + 1158 + 258 + + + 1138 + 260 + + + 1118 + 262 + + + 1098 + 264 + + + 1078 + 266 + + + 1058 + 268 + + + 1037 + 269 + + + 1017 + 271 + + + 997 + 273 + + + 977 + 275 + + + 957 + 277 + + + 937 + 279 + + + 916 + 281 + + + 896 + 283 + + + 876 + 285 + + + 856 + 287 + + + 836 + 288 + + + 816 + 290 + + + 795 + 292 + + + 775 + 294 + + + 755 + 296 + + + 735 + 298 + + + 715 + 300 + + + 695 + 302 + + + 674 + 304 + + + 654 + 306 + + + 634 + 307 + + + 614 + 309 + + + 594 + 311 + + + 574 + 313 + + + 553 + 315 + + + 533 + 317 + + + 513 + 319 + + + 493 + 321 + + + 473 + 323 + + + 453 + 325 + + + 432 + 326 + + + 412 + 328 + + + 392 + 330 + + + 372 + 332 + + + 352 + 334 + + + 332 + 336 + + + 311 + 338 + + + 291 + 340 + + + 271 + 342 + + + + + WGS_84 + + + 6378137.0 + 0.0 + 0.0 + + + 0.0 + 0.0 + 0.0 + + + + + 0.00799513783337124 + -0.006008128184945283 + + + 0.005631615545468088 + 0.007307024777172993 + + + -0.00799513783337124 + 0.006008128184945283 + + + -0.005631615545468088 + -0.007307024777172993 + + + + + 0.00523836630846847 + -0.00364338148084923 + + + 0.005206316846277236 + -0.0034628370576756814 + + + 0.005174267384009941 + -0.0032822926344316466 + + + 0.005142217921672595 + -0.0031017482111219876 + + + 0.005110168459274313 + -0.002921203787750631 + + + 0.005078118996809532 + -0.002740659364320905 + + + 0.005046069534275856 + -0.0025601149408357384 + + + 0.005014020071677403 + -0.0023795705173000345 + + + 0.0049819706090178245 + -0.002199026093716339 + + + 0.004949921146299129 + -0.0020184816700884903 + + + 0.004917871683515614 + -0.00183793724642093 + + + 0.004885822220679328 + -0.0016573928227165578 + + + 0.004853772757772994 + -0.001476848398978006 + + + 0.004821723294815218 + -0.0012963039752099965 + + + 0.00478967383180142 + -0.0011157595514177244 + + + 0.004757624368719913 + -0.0009352151276003231 + + + 0.004725574905592831 + -0.0007546707037649141 + + + 0.0046935254424053975 + -0.0005741262799149227 + + + 0.004661475979172907 + -0.0003935818560524597 + + + 0.004629426515879852 + -0.00021303743218295168 + + + 0.004597377052536041 + -3.249300830870516e-05 + + + 0.004565327589146371 + 0.00014805141556674793 + + + 0.004533278125709861 + 0.00032859583943927877 + + + 0.004501228662217433 + 0.0005091402633053358 + + + 0.004469179198680784 + 0.0006896846871612296 + + + 0.004437129735094944 + 0.0008702291110032007 + + + 0.004405080271465758 + 0.00105077353482891 + + + 0.004373030807795506 + 0.0012313179586336562 + + + 0.00434098134408188 + 0.001411862382412968 + + + 0.004308931880317015 + 0.001592406806165302 + + + 0.004276882416512852 + 0.0017729512298854911 + + + 0.004244832952669874 + 0.0019534956535704378 + + + 0.004212783488787099 + 0.002134040077217569 + + + 0.004180734024872398 + 0.0023145845008214583 + + + 0.0041486845609137275 + 0.0024951289243789047 + + + 0.004116635096919947 + 0.002675673347886881 + + + 0.004084585632881881 + 0.0028562177713416415 + + + 0.004052536168819116 + 0.003036762194739138 + + + 0.0040204867047156576 + 0.0032173066180771126 + + + 0.003988437240590928 + 0.0033978510413510614 + + + 0.003956387776418934 + 0.0035783954645569166 + + + 0.003924338312221998 + 0.0037589398876915793 + + + 0.0038922888479996152 + 0.003939484310750592 + + + 0.003860239383746406 + 0.0041200287337321805 + + + 0.003828189919460814 + 0.004300573156630903 + + + 0.0037961404551599127 + 0.004481117579442749 + + + 0.00376409099081454 + 0.004661662002167499 + + + 0.0037320415264581962 + 0.0048422064247973 + + + 0.003699992062071886 + 0.005022750847332307 + + + 0.0036679425976707007 + 0.005203295269766109 + + + -0.005238366306873601 + 0.003643381480220648 + + + -0.0036679425961185777 + -0.005203295270113747 + + + -0.003486181190709507 + -0.005171460294868825 + + + -0.003304419785209955 + -0.005139625319622343 + + + -0.0031226583796152003 + -0.005107790344374426 + + + -0.002940896973933543 + -0.005075955369123011 + + + -0.002759135568177835 + -0.005044120393870122 + + + -0.0025773741623351127 + -0.005012285418614279 + + + -0.002395612756418211 + -0.004980450443357304 + + + -0.0022138513504335305 + -0.004948615468098705 + + + -0.0020320899443811236 + -0.004916780492837019 + + + -0.0018503285382714203 + -0.004884945517573347 + + + -0.0016685671320883786 + -0.004853110542308724 + + + -0.0014868057258590529 + -0.004821275567040518 + + + -0.0013050443195772694 + -0.004789440591770919 + + + -0.0011232829132420041 + -0.004757605616500143 + + + -0.0009415215068684879 + -0.004725770641225615 + + + -0.000759760100461352 + -0.004693935665949827 + + + -0.0005779986940034719 + -0.004662100690672747 + + + -0.00039623728752586734 + -0.004630265715393136 + + + -0.00021447588101285652 + -0.0045984307401120954 + + + -3.271447447357881e-05 + -0.004566595764828223 + + + 0.0001490469320847932 + -0.004534760789544004 + + + 0.00033080833866069544 + -0.004502925814256218 + + + 0.0005125697452407668 + -0.004471090838967827 + + + 0.0006943311518425009 + -0.004439255863676882 + + + 0.0008760925584408571 + -0.004407420888384009 + + + 0.001057853965047325 + -0.004375585913090328 + + + 0.0012396153716457189 + -0.004343750937793399 + + + 0.0014213767782441417 + -0.00431191596249584 + + + 0.0016031381848308614 + -0.00428008098719557 + + + 0.0017848995914006443 + -0.004248246011893965 + + + 0.001966660997951133 + -0.004216411036590668 + + + 0.00214842240448203 + -0.004184576061286293 + + + 0.0023301838109927755 + -0.0041527410859788895 + + + 0.0025119452174677966 + -0.004120906110671654 + + + 0.0026937066239156805 + -0.004089071135360193 + + + 0.0028754680303170878 + -0.004057236160048518 + + + 0.003057229436682084 + -0.0040254011847345545 + + + 0.0032389908430040214 + -0.003993566209419595 + + + 0.0034207522492769866 + -0.003961731234102589 + + + 0.0036025136554935326 + -0.00392989625878451 + + + 0.003784275061656479 + -0.003898061283464284 + + + 0.003966036467765342 + -0.0038662263081436234 + + + 0.004147797873798566 + -0.003834391332819248 + + + 0.004329559279767888 + -0.0038025563574956515 + + + 0.0045113206856681595 + -0.0037707213821690814 + + + 0.004693082091491189 + -0.003738886406840987 + + + 0.004874843497234658 + -0.003707051431511723 + + + 0.005056604902895187 + -0.0036752164561818976 + + + + + [6378137.0, -405.5797876726389, 579.2279653395692] + + + [6378137.0, 86.82408883346518, 492.403876506104] + + + [6378137.0, 579.2279653395692, 405.5797876726388] + + + [6378137.0, -492.40387650610404, 86.8240888334652] + + + [6378137.0, 0.0, 0.0] + + + [6378137.0, 492.40387650610404, -86.8240888334652] + + + [6378137.0, -579.2279653395692, -405.5797876726388] + + + [6378137.0, -86.82408883346518, -492.403876506104] + + + [6378137.0, 405.5797876726389, -579.2279653395692] + + + + + OTHER + XRGYCR + + 1.6800674834531517 + + + + -0.4999996777623892 + -0.15037599477345914 + -0.8528700852344376 + + 0.8764718936120963 + 0.9952159410112512 + -1 + 0.8899999999999864 + 66.71307055737934 + -0.4452524991440896 + 0.44474750085589676 + + -0.0002524991440964186 + + + + + -0.1351875076070428 + 0.9862892688060626 + -0.0946457389429345 + + 0.8384934792671196 + 0.9883832746537019 + -1 + 0.8961525454893355 + 0.0 + -0.46897366297262205 + 0.46897404568650136 + + 1.333944744637619e-07 + 3.9214832817582035e-05 + + + + + 2022-12-05T18:41:24.051402Z + 3.4668291025146964 + + + 0.0056816659534297907 + 3.4628234234795321 + 0 + 2080 + + -3.4200358124461596 + 601.94243049797956 + -2.5957560931224679e-05 + -2.0559365748016132e-08 + 8.5465035653447778e-11 + 1.5613913034987107e-13 + + + + + + + + 7228127.912172245 + 352.5324304976341 + -3.589171823565171 + -5.775512441827908e-05 + 2.9439757250673563e-07 + 3.347450914408521e-10 + + + 268129.91754565184 + -7332.382389316185 + -0.1331321942213263 + 0.0012135943340884567 + 1.0781763144046816e-08 + -4.9989135258628886e-11 + + + 1451527.4819836628 + -401.0899032323167 + -0.7207643788301279 + 6.649751510936382e-05 + 6.061667359346962e-08 + -1.0048502370615844e-10 + + + + + 6378136.999999997 + -2.760399186267348e-10 + -8.804669153881702e-10 + 3.655284267853489e-10 + -4.550160949250352e-13 + + + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + + + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + + + + + 7228127.912288115 + 352.53243031729494 + -3.589171814526139 + -5.7760778794926364e-05 + 2.961407356089768e-07 + 1.5152746784999351e-10 + + + 268129.91754994984 + -7332.38238944089 + -0.13313219336015877 + 0.0012135939299440443 + 1.0894413139775905e-08 + -6.157481241632917e-11 + + + 1451527.4820069293 + -401.0899032701904 + -0.720764386171459 + 6.650233610651744e-05 + 5.9235211780521735e-08 + 4.85366798017553e-11 + + + + + + 7228127.912288124 + 352.5324303108488 + -3.5891718013492584 + -5.776923478547714e-05 + 2.985788077956373e-07 + -1.4884336849092922e-10 + + + 268129.91754994984 + -7332.382389439867 + -0.13313219479068839 + 0.001213594848252931 + 1.0630300780216877e-08 + -3.4535962553841784e-11 + + + 1451527.4820069303 + -401.08990326673984 + -0.7207643909344932 + 6.65054938494403e-05 + 5.8315612455559405e-08 + 1.383557340183528e-10 + + + + + + + 9933296178.095001 + 10066703821.904999 + + + + + V + + + V:V + 1 + + + + + + 0.00523836089566673 + -0.003643385217052057 + 0.03937365394085646 + + + 0.003667939784508838 + 0.0052032933282355155 + 0.039283305406570435 + + + -0.00523836089566673 + 0.003643385217052057 + 0.03937365394085646 + + + -0.003667939784508838 + -0.0052032933282355155 + 0.039283305406570435 + + + + + + 6378137.0 + 0.0 + 0.0 + + 650.0 + 750.0 + + + + 0.0 + -0.17364817766693033 + -0.9848077530122081 + + 0.7698004349651958 + 1301 + 0 + + + + 0.0 + 0.9848077530122081 + -0.17364817766693033 + + 0.6664110897495725 + 1501 + 0 + + + + + + + 1 + 1 + + V:V + 0.0 + 3.4668291025146964 + + 9933296178.095 + 10066703821.904999 + + RMA + NO + NO + NO + NO + + + 1.6800674834531517 + + 7228710.059281655 + 255810.65028982106 + 1450851.5897463118 + + + 340.47184528526833 + -7332.819454683194 + -403.5112045857062 + + + -7.178915838727428 + -0.25403050571627894 + -1.4408563921345383 + + L + 1701141.9557011856 + 1282320.338942662 + 80.00033305866761 + 30.000080949403603 + 59.9999190505964 + 8.98059705769101 + 31.195125856427378 + 9.999477966137635 + 352.4590940290721 + + + + ABSOLUTE + + 1 + + + + 234.567891 + 0.0123456789 + 3.45678912e-05 + 1.23456789e-09 + 2.34567891e-12 + 1.23456789e-16 + 1.23456789e-19 + -0.023456789 + -5.67891234e-06 + -4.56789123e-09 + -8.91234567e-13 + -4.56789123e-16 + -9.12345678e-20 + -3.45678912e-23 + 5.67891234e-05 + 3.45678912e-09 + 7.89123456e-12 + 4.56789123e-16 + 5.67891234e-19 + 6.78912345e-23 + 5.67891234e-26 + -6.78912345e-09 + -1.23456789e-12 + -1.23456789e-15 + -7.89123456e-20 + -6.78912345e-23 + -5.67891234e-26 + -1.23456789e-29 + 7.89123456e-12 + 5.67891234e-16 + 1.23456789e-18 + 1.23456789e-22 + 1.23456789e-25 + 1.23456789e-29 + 6.78912345e-33 + -1.23456789e-15 + -1.23456789e-19 + -1.23456789e-22 + -8.91234567e-26 + -4.56789123e-29 + 9.12345678e-33 + 2.34567891e-36 + + + + + + + 0.1398298626200596 + -0.002759434120305412 + -2.642141233211328e-06 + 1.4412928975132546e-08 + 4.910682797619282e-11 + -1.1406011989724555e-13 + + + -0.985103968766331 + -0.000720229999813326 + 8.692990993728007e-06 + 1.74194134614338e-08 + -7.019526602081124e-11 + -3.138341997107139e-13 + + + 0.10008886172036295 + -0.0032336279155612555 + -3.6150726160461875e-06 + 2.4227194540266762e-08 + 6.853549014106076e-11 + -1.9455706113121084e-13 + + + + + -0.8552353560719915 + -0.00010473716447760117 + 1.0612386361416289e-06 + 1.219198878977556e-10 + -6.534256171555903e-13 + 3.2519400278010645e-16 + + + -0.06921308838843146 + 0.0007378752611914464 + 7.399077245060788e-08 + -1.0525875572605681e-09 + -3.378821622814598e-14 + 7.62417875002352e-16 + + + 0.5135971515888192 + -7.496984818402987e-05 + 1.23093518380827e-06 + 3.5096979204331667e-10 + -2.0820927565561895e-12 + -5.491378062886501e-16 + + + 10000000000.0 + + + 0.0 + + + 0.0 + + + + + 0.0 + -4.143077701293506e-12 + -25810177.686242383 + -0.00014382609695309318 + -13687592749336.885 + 292.1994786744385 + -4.211564877440521e+18 + -1442527537.8580344 + -4.4559066869820204e+25 + -4.143077701293506e-12 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + -25810177.686242383 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + -0.00014382609695309318 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + -13687592749336.885 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 292.1994786744385 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + -4.211564877440521e+18 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + -1442527537.8580344 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + -4.4559066869820204e+25 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + + + 0.0 + + + + + 0.0 + + + 0.0 + + + + 0.0 + + false + + + + + 0.1398298626200596 + -0.002759434120305412 + -2.642141233211328e-06 + 1.4412928975132546e-08 + 4.910682797619282e-11 + -1.1406011989724555e-13 + + + -0.985103968766331 + -0.000720229999813326 + 8.692990993728007e-06 + 1.74194134614338e-08 + -7.019526602081124e-11 + -3.138341997107139e-13 + + + 0.10008886172036295 + -0.0032336279155612555 + -3.6150726160461875e-06 + 2.4227194540266762e-08 + 6.853549014106076e-11 + -1.9455706113121084e-13 + + + + + -0.8552353560719915 + -0.00010473716447760117 + 1.0612386361416289e-06 + 1.219198878977556e-10 + -6.534256171555903e-13 + 3.2519400278010645e-16 + + + -0.06921308838843146 + 0.0007378752611914464 + 7.399077245060788e-08 + -1.0525875572605681e-09 + -3.378821622814598e-14 + 7.62417875002352e-16 + + + 0.5135971515888192 + -7.496984818402987e-05 + 1.23093518380827e-06 + 3.5096979204331667e-10 + -2.0820927565561895e-12 + -5.491378062886501e-16 + + + 10000000000.0 + + + 0.0 + + + 0.0 + + + + + 0.0 + -4.143077701293506e-12 + -25810177.686242383 + -0.00014382609695309318 + -13687592749336.885 + 292.1994786744385 + -4.211564877440521e+18 + -1442527537.8580344 + -4.4559066869820204e+25 + -4.143077701293506e-12 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + -25810177.686242383 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + -0.00014382609695309318 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + -13687592749336.885 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 292.1994786744385 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + -4.211564877440521e+18 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + -1442527537.8580344 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + -4.4559066869820204e+25 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + + + 0.0 + + + + + 0.0 + + + 0.0 + + + + 0.0 + + false + + + + OMEGA_K + RMCR + + + 7228706.085943103 + 255810.5096335333 + 1450850.7922670336 + + + 340.48515511874143 + -7332.816628850641 + -403.50838193334255 + + 80.00038893713646 + + + diff --git a/test/data/sicd/umbra-sicd121-chip1.ntf b/test/data/sicd/umbra-sicd121-chip1.ntf new file mode 100644 index 0000000..d628474 --- /dev/null +++ b/test/data/sicd/umbra-sicd121-chip1.ntf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:efc1eaa5e44a25a11ba3d963c9344574b35dac0622c3c349cbdbd2a4dadfb984 +size 2136682