diff --git a/CHANGELOG.md b/CHANGELOG.md
index 41fcd539..1a329915 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,6 +4,21 @@ SarPy follows a continuous release process, so there are fairly frequent release
Since essentially every (squash merge) commit corresponds to a release, specific
release points are not being annotated in GitHub.
+## [1.3.55] - 2023-07-19
+### Added
+- Added test for SARPY to/from XML logic.
+### Fixed
+- Fixed AntGPid typo to AntGPId.
+- Fixed SARPY correctly finding TxAntenna/RcvAntenna PVPs using from_file in cphd_consistency.py.
+- Fixed SARPY correctly specifying EBFreqShiftSF in AntPatternType.
+- Fixed SARPY correctly handling AddedParameters as a single element with repeated Parameter children.
+- Fixed EndPoint type to Endpoint.
+- Fixed SARPY correctly including index as a child element instead of an attribute in LSVertexType.
+
+## [1.3.54] - 2023-07-19
+### Added
+- Added RadarModeType class to SIDD with SCANSAR option.
+
## [1.3.53] - 2023-07-11
### Added
- Added 3db contours to transmit and receive beam footprints for CPHD kmzs.
diff --git a/sarpy/__about__.py b/sarpy/__about__.py
index 744a88c1..6e1a422c 100644
--- a/sarpy/__about__.py
+++ b/sarpy/__about__.py
@@ -27,7 +27,7 @@
'__license__', '__copyright__']
from sarpy.__details__ import __classification__, _post_identifier
-_version_number = '1.3.53'
+_version_number = '1.3.55'
__version__ = _version_number + _post_identifier
diff --git a/sarpy/consistency/cphd_consistency.py b/sarpy/consistency/cphd_consistency.py
index 6a11ce20..16a012a6 100644
--- a/sarpy/consistency/cphd_consistency.py
+++ b/sarpy/consistency/cphd_consistency.py
@@ -279,7 +279,7 @@ def from_file(cls, filename, schema=None, check_signal_data=False):
pvp_block = infile.read(header['PVP_BLOCK_SIZE'])
cphdroot_no_ns = strip_namespace(etree.fromstring(etree.tostring(cphdroot)))
- fields = [parse_pvp_elem(field) for field in list(cphdroot_no_ns.find('./PVP'))]
+ fields = [parse_pvp_elem(field) for field in list(cphdroot_no_ns.findall('./PVP//Offset/..'))]
dtype = np.dtype({'names': [name for name, _ in fields],
'formats': [info['dtype'] for _, info in fields],
'offsets': [info['offset']*8 for _, info in fields]}).newbyteorder('B')
diff --git a/sarpy/io/phase_history/cphd1_elements/Antenna.py b/sarpy/io/phase_history/cphd1_elements/Antenna.py
index 509241d7..2d323f5c 100644
--- a/sarpy/io/phase_history/cphd1_elements/Antenna.py
+++ b/sarpy/io/phase_history/cphd1_elements/Antenna.py
@@ -372,7 +372,7 @@ def version_required(self) -> Tuple[int, int, int]:
class GainPhasePolyType(Serializable):
"""A container for the Gain and Phase Polygon definitions."""
- _fields = ('GainPoly', 'PhasePoly', 'AntGPid')
+ _fields = ('GainPoly', 'PhasePoly', 'AntGPId')
_required = ('GainPoly', 'PhasePoly')
# descriptors
GainPoly = SerializableDescriptor(
@@ -385,17 +385,18 @@ class GainPhasePolyType(Serializable):
docstring='One-way signal phase (in cycles) as a function of DCX (variable 1) and '
'DCY (variable 2). Phase relative to phase at DCX = 0 and DCY = 0, '
'so constant coefficient is always 0.0.') # type: Poly2DType
- AntGPid = StringDescriptor(
- 'AntGPid', _required, strict=DEFAULT_STRICT,
- docstring='') # type: Optional[str]
+ AntGPId = StringDescriptor(
+ 'AntGPId', _required, strict=DEFAULT_STRICT,
+ docstring='Identifier of the Antenna Gain/Phase support array that specifies the '
+ 'one-way pattern.') # type: Optional[str]
- def __init__(self, GainPoly=None, PhasePoly=None, AntGPid=None, **kwargs):
+ def __init__(self, GainPoly=None, PhasePoly=None, AntGPId=None, **kwargs):
"""
Parameters
----------
GainPoly : Poly2DType|numpy.ndarray|list|tuple
PhasePoly : Poly2DType|numpy.ndarray|list|tuple
- AntGPid : None|str
+ AntGPId : None|str
kwargs
"""
@@ -405,7 +406,7 @@ def __init__(self, GainPoly=None, PhasePoly=None, AntGPid=None, **kwargs):
self._xml_ns_key = kwargs['_xml_ns_key']
self.GainPoly = GainPoly
self.PhasePoly = PhasePoly
- self.AntGPid = AntGPid
+ self.AntGPId = AntGPId
super(GainPhasePolyType, self).__init__(**kwargs)
def __call__(self, x, y):
@@ -444,7 +445,7 @@ def minimize_order(self):
def version_required(self) -> Tuple[int, int, int]:
required = (1, 0, 1)
- if self.AntGPid is not None:
+ if self.AntGPId is not None:
required = max(required, (1, 1, 0))
return required
@@ -455,7 +456,7 @@ class AntPatternType(Serializable):
"""
_fields = (
- 'Identifier', 'FreqZero', 'GainZero', 'EBFreqShift', 'EBFreqShift',
+ 'Identifier', 'FreqZero', 'GainZero', 'EBFreqShift', 'EBFreqShiftSF',
'MLFreqDilation', 'MLFreqDilationSF', 'GainBSPoly', 'AntPolRef',
'EB', 'Array', 'Element', 'GainPhaseArray')
_required = (
diff --git a/sarpy/io/phase_history/cphd1_elements/Channel.py b/sarpy/io/phase_history/cphd1_elements/Channel.py
index ac8e3651..c25fec49 100644
--- a/sarpy/io/phase_history/cphd1_elements/Channel.py
+++ b/sarpy/io/phase_history/cphd1_elements/Channel.py
@@ -10,11 +10,11 @@
import numpy
from .base import DEFAULT_STRICT, FLOAT_FORMAT
-from .blocks import POLARIZATION_TYPE, AreaType
-from sarpy.io.xml.base import Serializable, SerializableArray, ParametersCollection, \
+from .blocks import POLARIZATION_TYPE, AreaType, AddedParametersType
+from sarpy.io.xml.base import Serializable, SerializableArray, \
Arrayable
from sarpy.io.xml.descriptors import StringDescriptor, StringEnumDescriptor, StringListDescriptor, \
- IntegerDescriptor, FloatDescriptor, BooleanDescriptor, ParametersDescriptor, \
+ IntegerDescriptor, FloatDescriptor, BooleanDescriptor, \
SerializableDescriptor, SerializableListDescriptor, SerializableArrayDescriptor
@@ -71,7 +71,7 @@ def get_array(self, dtype=numpy.float64) -> numpy.ndarray:
@classmethod
def from_array(cls, array: numpy.ndarray):
"""
- Construct from a iterable.
+ Construct from an iterable.
Parameters
----------
@@ -295,7 +295,7 @@ def version_required(self) -> Tuple[int, int, int]:
class AntennaType(Serializable):
- """"
+ """
Antenna Phase Center and Antenna Pattern identifiers for
the antenna(s) used to collect and form the signal array data.
"""
@@ -656,8 +656,7 @@ class ChannelType(Serializable):
_required = (
'RefChId', 'FXFixedCPHD', 'TOAFixedCPHD', 'SRPFixedCPHD', 'Parameters')
_collections_tags = {
- 'Parameters': {'array': False, 'child_tag': 'Parameters'},
- 'AddedParameters': {'array': False, 'child_tag': 'AddedParameters'}}
+ 'Parameters': {'array': False, 'child_tag': 'Parameters'}}
# descriptors
RefChId = StringDescriptor(
'RefChId', _required, strict=DEFAULT_STRICT,
@@ -679,9 +678,10 @@ class ChannelType(Serializable):
'Parameters', ChannelParametersType, _collections_tags, _required, strict=DEFAULT_STRICT,
docstring='Parameter Set that describes a CPHD data '
'channel.') # type: List[ChannelParametersType]
- AddedParameters = ParametersDescriptor(
- 'AddedParameters', _collections_tags, _required, strict=DEFAULT_STRICT,
- docstring='Additional free form parameters.') # type: Union[None, ParametersCollection]
+ AddedParameters = SerializableDescriptor(
+ 'AddedParameters', AddedParametersType, _required, strict=DEFAULT_STRICT,
+ docstring='Block for including additional parameters that describe '
+ 'the channels and/or signal arrays.') # type: Union[None, AddedParametersType]
def __init__(
self,
@@ -690,7 +690,7 @@ def __init__(
TOAFixedCPHD: bool = None,
SRPFixedCPHD: bool = None,
Parameters: List[ChannelParametersType] = None,
- AddedParameters: Optional[ParametersCollection] = None,
+ AddedParameters: Optional[AddedParametersType] = None,
**kwargs):
"""
@@ -701,7 +701,7 @@ def __init__(
TOAFixedCPHD : bool
SRPFixedCPHD : bool
Parameters : List[ChannelParametersType]
- AddedParameters : None|ParametersCollection
+ AddedParameters : None|AddedParametersType
kwargs
"""
diff --git a/sarpy/io/phase_history/cphd1_elements/ErrorParameters.py b/sarpy/io/phase_history/cphd1_elements/ErrorParameters.py
index 8a404a44..eb9226ed 100644
--- a/sarpy/io/phase_history/cphd1_elements/ErrorParameters.py
+++ b/sarpy/io/phase_history/cphd1_elements/ErrorParameters.py
@@ -7,13 +7,13 @@
from typing import Union, Tuple, Optional
-from sarpy.io.xml.base import Serializable, ParametersCollection
-from sarpy.io.xml.descriptors import FloatDescriptor, SerializableDescriptor, \
- ParametersDescriptor
+from sarpy.io.xml.base import Serializable
+from sarpy.io.xml.descriptors import FloatDescriptor, SerializableDescriptor
from sarpy.io.complex.sicd_elements.blocks import ErrorDecorrFuncType
from sarpy.io.complex.sicd_elements.ErrorStatistics import PosVelErrType, TropoErrorType
from .base import DEFAULT_STRICT, FLOAT_FORMAT
+from .blocks import AddedParametersType
class RadarSensorType(Serializable):
@@ -71,7 +71,8 @@ class IonoErrorType(Serializable):
_fields = ('IonoRangeVertical', 'IonoRangeRateVertical', 'IonoRgRgRateCC', 'IonoRangeVertDecorr')
_required = ('IonoRgRgRateCC', )
- _numeric_format = {'IonoRangeVertical': FLOAT_FORMAT, 'IonoRangeRateVertical': FLOAT_FORMAT, 'IonoRgRgRateCC': FLOAT_FORMAT}
+ _numeric_format = {'IonoRangeVertical': FLOAT_FORMAT, 'IonoRangeRateVertical': FLOAT_FORMAT,
+ 'IonoRgRgRateCC': FLOAT_FORMAT}
# descriptors
IonoRangeVertical = FloatDescriptor(
'IonoRangeVertical', _required, strict=DEFAULT_STRICT, bounds=(0, None),
@@ -169,7 +170,6 @@ class MonostaticType(Serializable):
_fields = ('PosVelErr', 'RadarSensor', 'TropoError', 'IonoError', 'AddedParameters')
_required = ('PosVelErr', 'RadarSensor')
- _collections_tags = {'AddedParameters': {'array': False, 'child_tag': 'Parameter'}}
# descriptors
PosVelErr = SerializableDescriptor(
'PosVelErr', PosVelErrType, _required, strict=DEFAULT_STRICT,
@@ -184,9 +184,9 @@ class MonostaticType(Serializable):
IonoError = SerializableDescriptor(
'IonoError', IonoErrorType, _required, strict=DEFAULT_STRICT,
docstring='Ionosphere delay error statistics.') # type: IonoErrorType
- AddedParameters = ParametersDescriptor(
- 'AddedParameters', _collections_tags, _required, strict=DEFAULT_STRICT,
- docstring='Additional error parameters.') # type: ParametersCollection
+ AddedParameters = SerializableDescriptor(
+ 'AddedParameters', AddedParametersType, _required, strict=DEFAULT_STRICT,
+ docstring='Additional error parameters that may be added') # type: Union[None, AddedParametersType]
def __init__(self, PosVelErr=None, RadarSensor=None, TropoError=None, IonoError=None,
AddedParameters=None, **kwargs):
@@ -198,7 +198,7 @@ def __init__(self, PosVelErr=None, RadarSensor=None, TropoError=None, IonoError=
RadarSensor : RadarSensorType
TropoError : None|TropoErrorType
IonoError : None|IonoErrorType
- AddedParameters : None|ParametersCollection|dict
+ AddedParameters : None|AddedParametersType
kwargs
"""
@@ -261,7 +261,6 @@ class BistaticType(Serializable):
_fields = ('TxPlatform', 'RcvPlatform', 'AddedParameters')
_required = ('TxPlatform', )
- _collections_tags = {'AddedParameters': {'array': False, 'child_tag': 'Parameter'}}
# descriptors
TxPlatform = SerializableDescriptor(
'TxPlatform', PlatformType, _required, strict=DEFAULT_STRICT,
@@ -269,9 +268,9 @@ class BistaticType(Serializable):
RcvPlatform = SerializableDescriptor(
'RcvPlatform', PlatformType, _required, strict=DEFAULT_STRICT,
docstring='Error statistics for the receive platform.') # type: PlatformType
- AddedParameters = ParametersDescriptor(
- 'AddedParameters', _collections_tags, _required, strict=DEFAULT_STRICT,
- docstring='Additional error parameters.') # type: ParametersCollection
+ AddedParameters = SerializableDescriptor(
+ 'AddedParameters', AddedParametersType, _required, strict=DEFAULT_STRICT,
+ docstring='Additional error parameters that may be added') # type: Union[None, AddedParametersType]
def __init__(self, TxPlatform=None, RcvPlatform=None, AddedParameters=None, **kwargs):
"""
@@ -280,7 +279,7 @@ def __init__(self, TxPlatform=None, RcvPlatform=None, AddedParameters=None, **kw
----------
TxPlatform : PlatformType
RcvPlatform : PlatformType
- AddedParameters : None|ParametersCollection|dict
+ AddedParameters : None|AddedParametersType|dict
kwargs
"""
diff --git a/sarpy/io/phase_history/cphd1_elements/GeoInfo.py b/sarpy/io/phase_history/cphd1_elements/GeoInfo.py
index 7b29ef12..067cb2a7 100644
--- a/sarpy/io/phase_history/cphd1_elements/GeoInfo.py
+++ b/sarpy/io/phase_history/cphd1_elements/GeoInfo.py
@@ -20,15 +20,15 @@
class LineType(Serializable):
- _fields = ('EndPoint', 'size')
- _required = ('EndPoint', 'size')
+ _fields = ('Endpoint', 'size')
+ _required = ('Endpoint', 'size')
- def __init__(self, EndPoint=None, **kwargs):
+ def __init__(self, Endpoint=None, **kwargs):
"""
Parameters
----------
- EndPoint : List[LatLonArrayElementType]|numpy.ndarray|list|tuple
+ Endpoint : List[LatLonArrayElementType]|numpy.ndarray|list|tuple
kwargs
"""
@@ -37,7 +37,7 @@ def __init__(self, EndPoint=None, **kwargs):
self._xml_ns = kwargs['_xml_ns']
if '_xml_ns_key' in kwargs:
self._xml_ns_key = kwargs['_xml_ns_key']
- self.EndPoint = EndPoint
+ self.Endpoint = Endpoint
super(LineType, self).__init__(**kwargs)
@property
@@ -49,15 +49,15 @@ def size(self):
return 0 if self._array is None else self._array.size
@property
- def EndPoint(self):
+ def Endpoint(self):
"""
numpy.ndarray: The array of points.
"""
return numpy.array([], dtype='object') if self._array is None else self._array
- @EndPoint.setter
- def EndPoint(self, value):
+ @Endpoint.setter
+ def Endpoint(self, value):
if value is None:
self._array = None
return
@@ -83,10 +83,10 @@ def EndPoint(self, value):
elif isinstance(entry, (numpy.ndarray, list, tuple)):
use_value.append(LatLonArrayElementType.from_array(entry, index=i+1))
else:
- raise TypeError('Got unexpected type for element of EndPoint array `{}`'.format(type(entry)))
+ raise TypeError('Got unexpected type for element of Endpoint array `{}`'.format(type(entry)))
self._array = numpy.array(use_value, dtype='object')
else:
- raise TypeError('Got unexpected type for EndPoint array `{}`'.format(type(value)))
+ raise TypeError('Got unexpected type for Endpoint array `{}`'.format(type(value)))
def __getitem__(self, item):
return self._array.__getitem__(item)
@@ -109,11 +109,11 @@ def from_node(cls, node, xml_ns, ns_key=None, kwargs=None):
LineType
"""
- end_point_key = cls._child_xml_ns_key.get('EndPoint', ns_key)
+ end_point_key = cls._child_xml_ns_key.get('Endpoint', ns_key)
end_points = []
- for cnode in find_children(node, 'EndPoint', xml_ns, end_point_key):
+ for cnode in find_children(node, 'Endpoint', xml_ns, end_point_key):
end_points.append(LatLonArrayElementType.from_node(cnode, xml_ns, ns_key=end_point_key))
- return cls(EndPoint=end_points)
+ return cls(Endpoint=end_points)
def to_node(self, doc, tag, ns_key=None, parent=None, check_validity=False, strict=DEFAULT_STRICT, exclude=()):
if parent is None:
@@ -125,16 +125,16 @@ def to_node(self, doc, tag, ns_key=None, parent=None, check_validity=False, stri
node = create_new_node(doc, '{}:{}'.format(ns_key, tag), parent=parent)
node.attrib['size'] = str(self.size)
- end_point_key = self._child_xml_ns_key.get('EndPoint', ns_key)
+ end_point_key = self._child_xml_ns_key.get('Endpoint', ns_key)
- for entry in self.EndPoint:
- entry.to_node(doc, 'EndPoint', ns_key=end_point_key, parent=node,
+ for entry in self.Endpoint:
+ entry.to_node(doc, 'Endpoint', ns_key=end_point_key, parent=node,
check_validity=check_validity, strict=strict)
return node
def to_dict(self, check_validity=False, strict=DEFAULT_STRICT, exclude=()):
return OrderedDict([
- ('EndPoint', [entry.to_dict() for entry in self.EndPoint]),
+ ('Endpoint', [entry.to_dict() for entry in self.Endpoint]),
('size', self.size)])
diff --git a/sarpy/io/phase_history/cphd1_elements/blocks.py b/sarpy/io/phase_history/cphd1_elements/blocks.py
index a0c093d9..c86ee32a 100644
--- a/sarpy/io/phase_history/cphd1_elements/blocks.py
+++ b/sarpy/io/phase_history/cphd1_elements/blocks.py
@@ -6,13 +6,13 @@
__author__ = "Thomas McCullough"
-from typing import Union, List
+from typing import Union, List, Dict
import numpy
-from sarpy.io.xml.base import Serializable, Arrayable, SerializableArray
+from sarpy.io.xml.base import Serializable, Arrayable, SerializableArray, ParametersCollection
from sarpy.io.xml.descriptors import SerializableDescriptor, SerializableArrayDescriptor, \
- IntegerDescriptor, FloatDescriptor
+ IntegerDescriptor, FloatDescriptor, ParametersDescriptor
from .base import DEFAULT_STRICT
@@ -80,7 +80,7 @@ def get_array(self, dtype=numpy.float64):
@classmethod
def from_array(cls, array):
"""
- Construct from a iterable.
+ Construct from an iterable.
Parameters
----------
@@ -107,6 +107,7 @@ class LSVertexType(LSType):
_fields = ('Line', 'Sample', 'index')
_required = _fields
+ _set_as_attribute = ('index', )
# descriptors
index = IntegerDescriptor(
'index', _required, strict=DEFAULT_STRICT, bounds=(1, None),
@@ -327,3 +328,34 @@ def __init__(self, X1Y1=None, X2Y2=None, Polygon=None, **kwargs):
self.X2Y2 = X2Y2
self.Polygon = Polygon
super(AreaType, self).__init__(**kwargs)
+
+
+class AddedParametersType(Serializable):
+ _collections_tags = {
+ 'Parameters': {'array': False, 'child_tag': 'Parameter'},
+ }
+ _fields = ('Parameters',)
+ _required = _fields
+
+ Parameters = ParametersDescriptor(
+ 'Parameters', _collections_tags, _required, strict=DEFAULT_STRICT,
+ docstring='Free form parameters object collection.') # type: ParametersCollection
+
+ def __init__(
+ self,
+ Parameters: Union[ParametersCollection, Dict] = None,
+ **kwargs):
+ """
+
+ Parameters
+ ----------
+ Parameters : ParametersCollection|dict
+ kwargs
+ """
+
+ if '_xml_ns' in kwargs:
+ self._xml_ns = kwargs['_xml_ns']
+ if '_xml_ns_key' in kwargs:
+ self._xml_ns_key = kwargs['_xml_ns_key']
+ self.Parameters = Parameters
+ super().__init__(**kwargs)
diff --git a/sarpy/io/product/sidd2_elements/blocks.py b/sarpy/io/product/sidd2_elements/blocks.py
index abff9713..6f7565e1 100644
--- a/sarpy/io/product/sidd2_elements/blocks.py
+++ b/sarpy/io/product/sidd2_elements/blocks.py
@@ -313,7 +313,17 @@ class GeoInfoType(GeoInfoTypeBase):
class RadarModeType(RadarModeTypeBase):
+ """
+ Radar mode type container class
+ """
+
_child_xml_ns_key = {'ModeType': 'sicommon', 'ModeID': 'sicommon'}
+ # other class variable
+ _MODE_TYPE_VALUES = RadarModeTypeBase._MODE_TYPE_VALUES + ('SCANSAR',)
+ # descriptors
+ ModeType = StringEnumDescriptor(
+ 'ModeType', _MODE_TYPE_VALUES, RadarModeTypeBase._required, strict=True,
+ docstring="The Radar imaging mode.") # type: str
class ReferencePointType(Serializable):
diff --git a/sarpy/io/product/sidd3_elements/ExploitationFeatures.py b/sarpy/io/product/sidd3_elements/ExploitationFeatures.py
index 0a142057..3a5a039d 100644
--- a/sarpy/io/product/sidd3_elements/ExploitationFeatures.py
+++ b/sarpy/io/product/sidd3_elements/ExploitationFeatures.py
@@ -21,9 +21,7 @@
from .base import DEFAULT_STRICT, FLOAT_FORMAT
from sarpy.io.product.sidd2_elements.ExploitationFeatures import ExploitationCalculator as BaseExploitationCalculator
-from sarpy.io.product.sidd2_elements.blocks import RowColDoubleType, RangeAzimuthType, \
- RadarModeType
-from .blocks import AngleZeroToExclusive360MagnitudeType
+from .blocks import AngleZeroToExclusive360MagnitudeType, RadarModeType, RangeAzimuthType, RowColDoubleType
from sarpy.io.product.sidd2_elements.ExploitationFeatures import (
InputROIType,
diff --git a/sarpy/io/product/sidd3_elements/blocks.py b/sarpy/io/product/sidd3_elements/blocks.py
index 489ec8c4..f57a15ec 100644
--- a/sarpy/io/product/sidd3_elements/blocks.py
+++ b/sarpy/io/product/sidd3_elements/blocks.py
@@ -26,7 +26,10 @@
PredefinedFilterType,
PredefinedLookupType,
Poly2DType,
+ RadarModeType,
+ RangeAzimuthType,
ReferencePointType,
+ RowColDoubleType,
XYZPolyType,
XYZType,
)
@@ -40,7 +43,10 @@
PredefinedFilterType,
PredefinedLookupType,
Poly2DType,
+ RadarModeType,
+ RangeAzimuthType,
ReferencePointType,
+ RowColDoubleType,
XYZPolyType,
XYZType,
)
diff --git a/tests/conftest.py b/tests/conftest.py
new file mode 100644
index 00000000..181ee7e6
--- /dev/null
+++ b/tests/conftest.py
@@ -0,0 +1,8 @@
+import pathlib
+
+import pytest
+
+
+@pytest.fixture
+def tests_path():
+ return pathlib.Path(__file__).parent
diff --git a/tests/data/syntax-only-cphd-1.1.0-bistatic.xml b/tests/data/syntax-only-cphd-1.1.0-bistatic.xml
new file mode 100644
index 00000000..d8672bb3
--- /dev/null
+++ b/tests/data/syntax-only-cphd-1.1.0-bistatic.xml
@@ -0,0 +1,1274 @@
+
+
+ SyntheticCollector
+ SyntheticIlluminator
+ SyntheticCore
+ BISTATIC
+
+ SPOTLIGHT
+ MadeUpId
+
+ UNCLASSIFIED
+ UNRESTRICTED
+ ABC
+ param 1 value
+ 1.23
+
+
+ FX
+ -1
+
+ 2023-07-03T20:21:27.195084Z
+ 2023-07-03T20:21:27.195084Z
+ 0.0
+ 1.8704813474941957
+
+
+ 9966648089.0475
+ 10033351910.952501
+
+
+ -1.470465382071991e-06
+ 1.470465382071991e-06
+
+
+ 320.3
+ ZERO
+
+
+ 1.234
+ 5.678
+
+
+
+ WGS_84
+
+
+ 6378137.0
+ 0.0
+ 0.0
+
+
+ 0.0
+ 0.0
+ 0.0
+
+
+
+
+
+ 0.123
+ 0.456
+
+
+ -0.123
+ -0.456
+
+
+
+
+
+ -250.0
+ -250.0
+
+
+ 250.0
+ 250.0
+
+
+
+ -250.0
+ -250.0
+
+
+ -250.0
+ 250.0
+
+
+ 250.0
+ 250.0
+
+
+ 250.0
+ -250.0
+
+
+
+
+
+ 0.0026191804573599776
+ -0.001821692610367564
+
+
+ 0.0018339698998625154
+ 0.0026016466694818927
+
+
+ -0.0026191804573599776
+ 0.001821692610367564
+
+
+ -0.0018339698998625154
+ -0.0026016466694818927
+
+
+
+
+ -250.0
+ -250.0
+
+
+ 250.0
+ 250.0
+
+
+
+ -250.0
+ -250.0
+
+
+ -250.0
+ 250.0
+
+
+ 250.0
+ 250.0
+
+
+ 250.0
+ -250.0
+
+
+
+
+ Image-Grid-Identifier
+
+ 162.0
+ 188.0
+
+
+ 1.5396008719969378
+ 0
+ 325
+
+
+ 1.3328221795055135
+ 0
+ 377
+
+
+ 1
+
+ SegID
+ 0
+ 1
+ 2
+ 3
+
+
+ 1.234
+ 5.678
+
+
+ 11.234
+ 15.678
+
+
+ -11.234
+ -15.678
+
+
+
+
+
+
+
+ CF8
+ 344
+ 1
+ NODATA
+
+ 1
+ 560
+ 246
+ 0
+ 0
+ 12345678
+
+ 8
+
+ iaz_id0
+ 214
+ 215
+ 4
+ 34567
+
+
+ transmit_array
+ 21
+ 21
+ 8
+ 0
+
+
+ transmit_element
+ 2
+ 2
+ 8
+ 3528
+
+
+ receive_array
+ 21
+ 21
+ 8
+ 3560
+
+
+ receive_element
+ 2
+ 2
+ 8
+ 7088
+
+
+ dta_id0
+ 234
+ 567
+ 8
+ 23456
+
+
+ added_support_array0
+ 234
+ 567
+ 8
+ 45678
+
+
+ added_support_array1
+ 234
+ 567
+ 8
+ 56789
+
+
+
+ 1
+ true
+ true
+ true
+
+ 1
+ 280
+ true
+ true
+ true
+ false
+
+ V
+ V
+
+ 0.123
+ 0.987
+ 0.432
+
+
+ 0.234
+ 0.876
+ -0.432
+
+
+ 10000000000.0
+ 66703821.90500069
+ 67803821.90500069
+ 2.940930764143982e-06
+
+ 3.940930764143982e-06
+
+ 9866648089.5
+ 10023351910.5
+ 9896648089.5
+ 10020351910.5
+
+
+
+ 1
+ 1
+ dta_id0
+ false
+
+
+
+ -250.0
+ -250.0
+
+
+ 250.0
+ 250.0
+
+
+
+ -250.0
+ -250.0
+
+
+ -250.0
+ 250.0
+
+
+ 250.0
+ 250.0
+
+
+ 250.0
+ -250.0
+
+
+
+
+ transmit
+ transmit
+ receive
+ receive
+
+
+ txwf_id#1
+ rcv_id#1
+
+
+ 1.0001680850982666
+
+
+ 1.0
+ 1.0
+
+
+ 9966648089.5
+ 0.123
+
+
+ 10033351910.5
+ 0.456
+
+
+
+
+
+ that conveys the value of the parameter
+ that conveys the value of the parameter2
+
+
+
+
+ 0
+ 1
+ F8
+
+
+ 1
+ 3
+ X=F8;Y=F8;Z=F8;
+
+
+ 4
+ 3
+ X=F8;Y=F8;Z=F8;
+
+
+ 24
+ 1
+ F8
+
+
+ 25
+ 3
+ X=F8;Y=F8;Z=F8;
+
+
+ 28
+ 3
+ X=F8;Y=F8;Z=F8;
+
+
+ 7
+ 3
+ X=F8;Y=F8;Z=F8;
+
+
+ 45
+ 1
+ F8
+
+
+ 32
+ 1
+ F8
+
+
+ 33
+ 1
+ F8
+
+
+ 34
+ 1
+ F8
+
+
+ 12
+ 1
+ F8
+
+
+ 13
+ 1
+ F8
+
+
+ 46
+ 1
+ F8
+
+
+ 47
+ 1
+ F8
+
+
+ 10
+ 1
+ F8
+
+
+ 11
+ 1
+ F8
+
+
+ 48
+ 1
+ F8
+
+
+ 49
+ 1
+ F8
+
+
+ 31
+ 1
+ F8
+
+
+ 48
+ 1
+ F8
+
+
+ 14
+ 1
+ F8
+
+
+ 15
+ 1
+ F8
+
+
+ 50
+ 1
+ I8
+
+
+
+ 16
+ 3
+ X=F8;Y=F8;Z=F8;
+
+
+ 19
+ 3
+ X=F8;Y=F8;Z=F8;
+
+
+ 22
+ 2
+ DCX=F8;DCY=F8;
+
+
+
+
+ 35
+ 3
+ X=F8;Y=F8;Z=F8;
+
+
+ 38
+ 3
+ X=F8;Y=F8;Z=F8;
+
+
+ 41
+ 2
+ DCX=F8;DCY=F8;
+
+
+
+ added-pvp0
+ 51
+ 2
+ DCX=F8;DCY=F8;
+
+
+ added-pvp1
+ 51
+ 1
+ I8
+
+
+
+
+ iaz_id0
+ IAZ=F4;
+ -1.234
+ -2.345
+ 7.89
+ 6.87
+ 3f3c6d78
+
+
+ transmit_array
+ Gain=F4;Phase=F4;
+ -0.0003830770078408768
+ -0.0003830770078408768
+ 3.8307700784087685e-05
+ 3.8307700784087685e-05
+
+
+ transmit_element
+ Gain=F4;Phase=F4;
+ -1.0
+ -1.0
+ 2.0
+ 2.0
+
+
+ receive_array
+ Gain=F4;Phase=F4;
+ -0.0003830770078408768
+ -0.0003830770078408768
+ 3.8307700784087685e-05
+ 3.8307700784087685e-05
+
+
+ receive_element
+ Gain=F4;Phase=F4;
+ -1.0
+ -1.0
+ 2.0
+ 2.0
+
+
+ dta_id0
+ COD=F4;DT=F4;
+ -1.1
+ -1.2
+ 2.3
+ 2.4
+ deadbeef12345678
+
+
+ added_support_array0
+ COD=F4;DT=F4;
+ -1.1
+ -1.2
+ 2.3
+ 2.4
+ deadbeef12345678
+ units-of-x
+ units-of-y
+ units-of-z
+ further
+ description
+
+
+ added_support_array1
+ ABC=F4;DEF=F4;
+ -1.1
+ -1.2
+ 2.3
+ 2.4
+ deadbeef12345678
+ units-of-x2
+ units-of-y2
+ units-of-z2
+ more
+ description
+
+
+
+ 1
+
+ 1
+
+ 0.8863722900782136
+
+
+ 1
+
+ 1
+
+ 1.5727452910305109
+
+
+
+
+
+
+ 6378137.0
+ 0.0
+ 0.0
+
+
+ 0.0
+ 0.0
+ 0.0
+
+
+ 0.9425879416269674
+ 0.8863722900782136
+ 1.5727452910305109
+
+ 123.456
+ 0.123
+ 54.321
+ -0.321
+ 32.1
+ 76.54
+ 54.32
+ 234.567
+
+
+
+ 7228728.557469463
+ 255412.1358540885
+ 1450829.6595842484
+
+
+ 340.0816683698231
+ -7332.833245191265
+ -403.589514541315
+
+ L
+ 1701072.6198223345
+ 1282240.272109871
+ 80.01149733418877
+ 30.002148755182244
+ 59.99785124481775
+ 9.984361845235355
+
+
+
+
+ -7228728.557469463
+ -255412.1358540885
+ -1450829.6595842484
+
+
+ -340.0816683698231
+ 7332.833245191265
+ 403.589514541315
+
+ R
+ 701072.6198223345
+ 282240.272109871
+ 0.01149733418877
+ 0.002148755182244
+ 5.99785124481775
+ 0.984361845235355
+
+
+
+
+ 2
+ 2
+ 2
+
+ transmit
+
+
+ 0.13764321890021955
+ -0.0027635912682118335
+ -2.6077190099131196e-06
+ 1.4567745902234885e-08
+ 4.865742524228261e-11
+ -1.1402130963623948e-13
+
+
+ -0.9856688069354743
+ -0.0007064307032887539
+ 8.734104904441573e-06
+ 1.7195122366822893e-08
+ -7.144059057220175e-11
+ -3.135754899285545e-13
+
+
+ 0.09752613662596331
+ -0.0032393071390103725
+ -3.557264731067866e-06
+ 2.4443030270474043e-08
+ 6.776981912132812e-11
+ -1.9480334114097713e-13
+
+
+
+
+ -0.8553176234417822
+ -0.00010305632117395388
+ 1.0615261021791165e-06
+ 1.198498057643773e-10
+ -6.505531130077462e-13
+ -1.2860269963265887e-16
+
+
+ -0.06862877106590179
+ 0.0007379905959069417
+ 7.148985037478334e-08
+ -1.0526951156242107e-09
+ -3.044037210191322e-14
+ 6.868773269998989e-16
+
+
+ 0.5135385621468816
+ -7.301983300826752e-05
+ 1.2317613037694207e-06
+ 3.4437883312020226e-10
+ -2.088437283363715e-12
+ 3.304991701509156e-16
+
+
+ true
+
+
+ receive
+
+
+ 0.13764321890021955
+ -0.0027635912682118335
+ -2.6077190099131196e-06
+ 1.4567745902234885e-08
+ 4.865742524228261e-11
+ -1.1402130963623948e-13
+
+
+ -0.9856688069354743
+ -0.0007064307032887539
+ 8.734104904441573e-06
+ 1.7195122366822893e-08
+ -7.144059057220175e-11
+ -3.135754899285545e-13
+
+
+ 0.09752613662596331
+ -0.0032393071390103725
+ -3.557264731067866e-06
+ 2.4443030270474043e-08
+ 6.776981912132812e-11
+ -1.9480334114097713e-13
+
+
+
+
+ -0.8553176234417822
+ -0.00010305632117395388
+ 1.0615261021791165e-06
+ 1.198498057643773e-10
+ -6.505531130077462e-13
+ -1.2860269963265887e-16
+
+
+ -0.06862877106590179
+ 0.0007379905959069417
+ 7.148985037478334e-08
+ -1.0526951156242107e-09
+ -3.044037210191322e-14
+ 6.868773269998989e-16
+
+
+ 0.5135385621468816
+ -7.301983300826752e-05
+ 1.2317613037694207e-06
+ 3.4437883312020226e-10
+ -2.088437283363715e-12
+ 3.304991701509156e-16
+
+
+
+
+ transmit
+ transmit
+
+ 0.0
+ 0.0
+ 0.0
+
+
+
+ receive
+ receive
+
+ 0.0
+ 0.0
+ 0.0
+
+
+
+ transmit
+ 10000000000.0
+ 12.34
+ true
+
+ 0.123
+ 0.456
+
+ true
+
+ 0.123
+ 0.456
+
+
+ 0.0
+
+
+ 0.234
+ 0.765
+ -0.234
+
+
+
+ 0.0
+
+
+ 0.0
+
+ false
+
+
+
+ 0.0
+ 1.6627094328667606e-11
+ -103924410.0046764
+ -0.0012148119513946834
+ -221911710773338.2
+ 31799.14878166242
+ -2.7493068550011067e+20
+ -264824033012.70624
+ -1.1712305192856571e+28
+ 1.6627094328667606e-11
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ -103924410.0046764
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ -0.0012148119513946834
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ -221911710773338.2
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 31799.14878166242
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ -2.7493068550011067e+20
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ -264824033012.70624
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ -1.1712305192856571e+28
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+
+
+ 0.0
+
+ transmit_array
+
+
+
+ 0.0
+
+
+ 0.0
+
+ transmit_element
+
+
+ 10000000000.0
+ transmit_array
+ transmit_element
+
+
+
+ receive
+ 10000000000.0
+ false
+
+ 0.0
+
+
+
+ 0.0
+
+
+ 0.0
+
+
+
+
+ 0.0
+ 1.6627094328667606e-11
+ -103924410.0046764
+ -0.0012148119513946834
+ -221911710773338.2
+ 31799.14878166242
+ -2.7493068550011067e+20
+ -264824033012.70624
+ -1.1712305192856571e+28
+ 1.6627094328667606e-11
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ -103924410.0046764
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ -0.0012148119513946834
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ -221911710773338.2
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 31799.14878166242
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ -2.7493068550011067e+20
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ -264824033012.70624
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ -1.1712305192856571e+28
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+
+
+ 0.0
+
+ receive_array
+
+
+
+ 0.0
+
+
+ 0.0
+
+ receive_element
+
+
+ 10000000000.0
+ receive_array
+ receive_element
+
+
+
+
+ 1
+
+ txwf_id#1
+ 2.6681528762000275e-06
+ 66703821.90500069
+ 10000000000.0
+ 25000000000000.0
+ V
+ 1.23456789
+
+ 1
+
+ rcv_id#1
+ 5.60908364034401e-06
+ 88227922.92431946
+ 80875596.01395951
+ 10036761634.5518
+ 25000000000000.0
+ V
+ 5.678
+
+
+
+
+
+
+ RIC_ECF
+ 1.1
+ 1.2
+ 1.3
+ 1.4
+ 1.5
+ 1.6
+
+ 0.01
+ 0.02
+ 0.03
+ 0.04
+ 0.05
+ 0.06
+ 0.07
+ 0.08
+ 0.09
+ 0.10
+ 0.11
+ 0.12
+ 0.13
+ 0.14
+ 0.15
+
+
+ 0.123
+ 0.456
+
+
+
+ 1.23456
+ 2.345
+ 3.456
+
+
+
+
+ RIC_ECI
+ 1.9
+ 1.8
+ 1.7
+ 1.6
+ 1.5
+ 1.4
+
+ 0.012
+ 0.022
+ 0.032
+ 0.042
+ 0.052
+ 0.062
+ 0.072
+ 0.082
+ 0.092
+ 0.102
+ 0.112
+ 0.122
+ 0.132
+ 0.142
+ 0.152
+
+
+ 0.123
+ 0.456
+
+
+
+ 1.23456
+ 2.345
+ 3.456
+
+
+
+ addedparam0
+ addedparam1
+
+
+
+
+ profile-identifier
+
+ application0
+ 2023-07-03T20:21:27.585982Z
+ site0
+ ci0-value0
+ ci0-value1
+
+
+ application1
+ 2023-07-03T20:21:37.585982Z
+ site1
+ ci1-value0
+ ci1-value1
+
+ pi-value0
+ pi-value1
+
+
+ outer description
+
+ 1.23
+ 2.34
+
+
+
+ 1.23
+ 2.34
+
+
+ 13.23
+ 23.34
+
+
+
+
+ 1.23
+ 2.34
+
+
+ -1.23
+ 2.34
+
+
+ 1.23
+ -2.34
+
+
+
+ [6378137.0, -202.78989383631944, 289.6139826697846]
+
+ 1.23
+ 2.34
+
+
+
+
+ 2
+
+ COHERENT
+ 24
+ 2
+
+ MC0
+ 1
+ mc0-val0
+ mc0-val1
+
+
+ MC1
+ 2
+ mc1-val0
+ mc1-val1
+
+
+ MC2
+ 3
+ mc2-val0
+ mc2-val1
+
+
+
+ STEREO
+ 8
+ 0
+
+
+
diff --git a/tests/data/syntax-only-cphd-1.1.0-monostatic.xml b/tests/data/syntax-only-cphd-1.1.0-monostatic.xml
new file mode 100644
index 00000000..a6beb29f
--- /dev/null
+++ b/tests/data/syntax-only-cphd-1.1.0-monostatic.xml
@@ -0,0 +1,1230 @@
+
+
+ Synthetic
+ Synthetic
+ SyntheticCore
+ MONOSTATIC
+
+ SPOTLIGHT
+ MadeUpId
+
+ UNCLASSIFIED
+ UNRESTRICTED
+ ABC
+ param 1 value
+ 1.23
+
+
+ FX
+ -1
+
+ 2023-07-03T20:21:27.195084Z
+ 2023-07-03T20:21:27.195084Z
+ 0.0
+ 1.8704813474941957
+
+
+ 9966648089.0475
+ 10033351910.952501
+
+
+ -1.470465382071991e-06
+ 1.470465382071991e-06
+
+
+ 320.3
+ ZERO
+
+
+ 1.234
+ 5.678
+
+
+
+ WGS_84
+
+
+ 6378137.0
+ 0.0
+ 0.0
+
+
+ 0.0
+ 0.0
+ 0.0
+
+
+
+
+
+ 0.0
+ -0.17364817766693033
+ -0.9848077530122081
+
+
+ 0.0
+ 0.9848077530122081
+ -0.17364817766693033
+
+
+
+
+
+ -250.0
+ -250.0
+
+
+ 250.0
+ 250.0
+
+
+
+ -250.0
+ -250.0
+
+
+ -250.0
+ 250.0
+
+
+ 250.0
+ 250.0
+
+
+ 250.0
+ -250.0
+
+
+
+
+
+ 0.0026191804573599776
+ -0.001821692610367564
+
+
+ 0.0018339698998625154
+ 0.0026016466694818927
+
+
+ -0.0026191804573599776
+ 0.001821692610367564
+
+
+ -0.0018339698998625154
+ -0.0026016466694818927
+
+
+
+
+ -250.0
+ -250.0
+
+
+ 250.0
+ 250.0
+
+
+
+ -250.0
+ -250.0
+
+
+ -250.0
+ 250.0
+
+
+ 250.0
+ 250.0
+
+
+ 250.0
+ -250.0
+
+
+
+
+ Image-Grid-Identifier
+
+ 162.0
+ 188.0
+
+
+ 1.5396008719969378
+ 0
+ 325
+
+
+ 1.3328221795055135
+ 0
+ 377
+
+
+ 1
+
+ SegID
+ 0
+ 1
+ 2
+ 3
+
+
+ 1.234
+ 5.678
+
+
+ 11.234
+ 15.678
+
+
+ -11.234
+ -15.678
+
+
+
+
+
+
+
+ CF8
+ 344
+ 1
+ NODATA
+
+ 1
+ 560
+ 246
+ 0
+ 0
+ 12345678
+
+ 8
+
+ iaz_id0
+ 214
+ 215
+ 4
+ 34567
+
+
+ transmit_array
+ 21
+ 21
+ 8
+ 0
+
+
+ transmit_element
+ 2
+ 2
+ 8
+ 3528
+
+
+ receive_array
+ 21
+ 21
+ 8
+ 3560
+
+
+ receive_element
+ 2
+ 2
+ 8
+ 7088
+
+
+ dta_id0
+ 234
+ 567
+ 8
+ 23456
+
+
+ added_support_array0
+ 234
+ 567
+ 8
+ 45678
+
+
+ added_support_array1
+ 234
+ 567
+ 8
+ 56789
+
+
+
+ 1
+ true
+ true
+ true
+
+ 1
+ 280
+ true
+ true
+ true
+ false
+
+ V
+ V
+
+ 0.123
+ 0.987
+ 0.432
+
+
+ 0.234
+ 0.876
+ -0.432
+
+
+ 10000000000.0
+ 66703821.90500069
+ 67803821.90500069
+ 2.940930764143982e-06
+
+ 3.940930764143982e-06
+
+ 9866648089.5
+ 10023351910.5
+ 9896648089.5
+ 10020351910.5
+
+
+
+ 1
+ 1
+ dta_id0
+ false
+
+
+
+ -250.0
+ -250.0
+
+
+ 250.0
+ 250.0
+
+
+
+ -250.0
+ -250.0
+
+
+ -250.0
+ 250.0
+
+
+ 250.0
+ 250.0
+
+
+ 250.0
+ -250.0
+
+
+
+
+ transmit
+ transmit
+ receive
+ receive
+
+
+ txwf_id#1
+ rcv_id#1
+
+
+ 1.0001680850982666
+
+
+ 1.0
+ 1.0
+
+
+ 9966648089.5
+ 0.123
+
+
+ 10033351910.5
+ 0.456
+
+
+
+
+
+ that conveys the value of the parameter
+ that conveys the value of the parameter2
+
+
+
+
+ 0
+ 1
+ F8
+
+
+ 1
+ 3
+ X=F8;Y=F8;Z=F8;
+
+
+ 4
+ 3
+ X=F8;Y=F8;Z=F8;
+
+
+ 24
+ 1
+ F8
+
+
+ 25
+ 3
+ X=F8;Y=F8;Z=F8;
+
+
+ 28
+ 3
+ X=F8;Y=F8;Z=F8;
+
+
+ 7
+ 3
+ X=F8;Y=F8;Z=F8;
+
+
+ 45
+ 1
+ F8
+
+
+ 32
+ 1
+ F8
+
+
+ 33
+ 1
+ F8
+
+
+ 34
+ 1
+ F8
+
+
+ 12
+ 1
+ F8
+
+
+ 13
+ 1
+ F8
+
+
+ 46
+ 1
+ F8
+
+
+ 47
+ 1
+ F8
+
+
+ 10
+ 1
+ F8
+
+
+ 11
+ 1
+ F8
+
+
+ 48
+ 1
+ F8
+
+
+ 49
+ 1
+ F8
+
+
+ 31
+ 1
+ F8
+
+
+ 48
+ 1
+ F8
+
+
+ 14
+ 1
+ F8
+
+
+ 15
+ 1
+ F8
+
+
+ 50
+ 1
+ I8
+
+
+
+ 16
+ 3
+ X=F8;Y=F8;Z=F8;
+
+
+ 19
+ 3
+ X=F8;Y=F8;Z=F8;
+
+
+ 22
+ 2
+ DCX=F8;DCY=F8;
+
+
+
+
+ 35
+ 3
+ X=F8;Y=F8;Z=F8;
+
+
+ 38
+ 3
+ X=F8;Y=F8;Z=F8;
+
+
+ 41
+ 2
+ DCX=F8;DCY=F8;
+
+
+
+ added-pvp0
+ 51
+ 2
+ DCX=F8;DCY=F8;
+
+
+ added-pvp1
+ 51
+ 1
+ I8
+
+
+
+
+ iaz_id0
+ IAZ=F4;
+ -1.234
+ -2.345
+ 7.89
+ 6.87
+ 3f3c6d78
+
+
+ transmit_array
+ Gain=F4;Phase=F4;
+ -0.0003830770078408768
+ -0.0003830770078408768
+ 3.8307700784087685e-05
+ 3.8307700784087685e-05
+
+
+ transmit_element
+ Gain=F4;Phase=F4;
+ -1.0
+ -1.0
+ 2.0
+ 2.0
+
+
+ receive_array
+ Gain=F4;Phase=F4;
+ -0.0003830770078408768
+ -0.0003830770078408768
+ 3.8307700784087685e-05
+ 3.8307700784087685e-05
+
+
+ receive_element
+ Gain=F4;Phase=F4;
+ -1.0
+ -1.0
+ 2.0
+ 2.0
+
+
+ dta_id0
+ COD=F4;DT=F4;
+ -1.1
+ -1.2
+ 2.3
+ 2.4
+ deadbeef12345678
+
+
+ added_support_array0
+ COD=F4;DT=F4;
+ -1.1
+ -1.2
+ 2.3
+ 2.4
+ deadbeef12345678
+ units-of-x
+ units-of-y
+ units-of-z
+ further
+ description
+
+
+ added_support_array1
+ ABC=F4;DEF=F4;
+ -1.1
+ -1.2
+ 2.3
+ 2.4
+ deadbeef12345678
+ units-of-x2
+ units-of-y2
+ units-of-z2
+ more
+ description
+
+
+
+ 1
+
+ 1
+
+ 0.8863722900782136
+
+
+ 1
+
+ 1
+
+ 1.5727452910305109
+
+
+
+
+
+
+ 6378137.0
+ 0.0
+ 0.0
+
+
+ 0.0
+ 0.0
+ 0.0
+
+
+ 0.9425879416269674
+ 0.8863722900782136
+ 1.5727452910305109
+
+
+ 7228728.557469463
+ 255412.1358540885
+ 1450829.6595842484
+
+
+ 340.0816683698231
+ -7332.833245191265
+ -403.589514541315
+
+ L
+ 1701072.6198223345
+ 1282240.272109871
+ 80.01149733418877
+ 30.002148755182244
+ 59.99785124481775
+ 9.984361845235355
+ 8.970708323523684
+ 31.19451807159041
+ 352.4634376297167
+
+
+
+ 2
+ 2
+ 2
+
+ transmit
+
+
+ 0.13764321890021955
+ -0.0027635912682118335
+ -2.6077190099131196e-06
+ 1.4567745902234885e-08
+ 4.865742524228261e-11
+ -1.1402130963623948e-13
+
+
+ -0.9856688069354743
+ -0.0007064307032887539
+ 8.734104904441573e-06
+ 1.7195122366822893e-08
+ -7.144059057220175e-11
+ -3.135754899285545e-13
+
+
+ 0.09752613662596331
+ -0.0032393071390103725
+ -3.557264731067866e-06
+ 2.4443030270474043e-08
+ 6.776981912132812e-11
+ -1.9480334114097713e-13
+
+
+
+
+ -0.8553176234417822
+ -0.00010305632117395388
+ 1.0615261021791165e-06
+ 1.198498057643773e-10
+ -6.505531130077462e-13
+ -1.2860269963265887e-16
+
+
+ -0.06862877106590179
+ 0.0007379905959069417
+ 7.148985037478334e-08
+ -1.0526951156242107e-09
+ -3.044037210191322e-14
+ 6.868773269998989e-16
+
+
+ 0.5135385621468816
+ -7.301983300826752e-05
+ 1.2317613037694207e-06
+ 3.4437883312020226e-10
+ -2.088437283363715e-12
+ 3.304991701509156e-16
+
+
+ true
+
+
+ receive
+
+
+ 0.13764321890021955
+ -0.0027635912682118335
+ -2.6077190099131196e-06
+ 1.4567745902234885e-08
+ 4.865742524228261e-11
+ -1.1402130963623948e-13
+
+
+ -0.9856688069354743
+ -0.0007064307032887539
+ 8.734104904441573e-06
+ 1.7195122366822893e-08
+ -7.144059057220175e-11
+ -3.135754899285545e-13
+
+
+ 0.09752613662596331
+ -0.0032393071390103725
+ -3.557264731067866e-06
+ 2.4443030270474043e-08
+ 6.776981912132812e-11
+ -1.9480334114097713e-13
+
+
+
+
+ -0.8553176234417822
+ -0.00010305632117395388
+ 1.0615261021791165e-06
+ 1.198498057643773e-10
+ -6.505531130077462e-13
+ -1.2860269963265887e-16
+
+
+ -0.06862877106590179
+ 0.0007379905959069417
+ 7.148985037478334e-08
+ -1.0526951156242107e-09
+ -3.044037210191322e-14
+ 6.868773269998989e-16
+
+
+ 0.5135385621468816
+ -7.301983300826752e-05
+ 1.2317613037694207e-06
+ 3.4437883312020226e-10
+ -2.088437283363715e-12
+ 3.304991701509156e-16
+
+
+
+
+ transmit
+ transmit
+
+ 0.0
+ 0.0
+ 0.0
+
+
+
+ receive
+ receive
+
+ 0.0
+ 0.0
+ 0.0
+
+
+
+ transmit
+ 10000000000.0
+ 12.34
+ true
+
+ 0.123
+ 0.456
+
+ true
+
+ 0.123
+ 0.456
+
+
+ 0.0
+
+
+ 0.234
+ 0.765
+ -0.234
+
+
+
+ 0.0
+
+
+ 0.0
+
+ false
+
+
+
+ 0.0
+ 1.6627094328667606e-11
+ -103924410.0046764
+ -0.0012148119513946834
+ -221911710773338.2
+ 31799.14878166242
+ -2.7493068550011067e+20
+ -264824033012.70624
+ -1.1712305192856571e+28
+ 1.6627094328667606e-11
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ -103924410.0046764
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ -0.0012148119513946834
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ -221911710773338.2
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 31799.14878166242
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ -2.7493068550011067e+20
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ -264824033012.70624
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ -1.1712305192856571e+28
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+
+
+ 0.0
+
+ transmit_array
+
+
+
+ 0.0
+
+
+ 0.0
+
+ transmit_element
+
+
+ 10000000000.0
+ transmit_array
+ transmit_element
+
+
+
+ receive
+ 10000000000.0
+ false
+
+ 0.0
+
+
+
+ 0.0
+
+
+ 0.0
+
+
+
+
+ 0.0
+ 1.6627094328667606e-11
+ -103924410.0046764
+ -0.0012148119513946834
+ -221911710773338.2
+ 31799.14878166242
+ -2.7493068550011067e+20
+ -264824033012.70624
+ -1.1712305192856571e+28
+ 1.6627094328667606e-11
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ -103924410.0046764
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ -0.0012148119513946834
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ -221911710773338.2
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 31799.14878166242
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ -2.7493068550011067e+20
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ -264824033012.70624
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ -1.1712305192856571e+28
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+
+
+ 0.0
+
+ receive_array
+
+
+
+ 0.0
+
+
+ 0.0
+
+ receive_element
+
+
+ 10000000000.0
+ receive_array
+ receive_element
+
+
+
+
+ 1
+
+ txwf_id#1
+ 2.6681528762000275e-06
+ 66703821.90500069
+ 10000000000.0
+ 25000000000000.0
+ V
+ 1.23456789
+
+ 1
+
+ rcv_id#1
+ 5.60908364034401e-06
+ 88227922.92431946
+ 80875596.01395951
+ 10036761634.5518
+ 25000000000000.0
+ V
+ 5.678
+
+
+
+
+
+ ECF
+ 1.1
+ 1.2
+ 1.3
+ 1.4
+ 1.5
+ 1.6
+
+ 0.01
+ 0.02
+ 0.03
+ 0.04
+ 0.05
+ 0.06
+ 0.07
+ 0.08
+ 0.09
+ 0.10
+ 0.11
+ 0.12
+ 0.13
+ 0.14
+ 0.15
+
+
+ 0.123
+ 0.456
+
+
+
+ 1.23456
+ 2.345
+ 3.456
+
+ 0.123
+ 0.456
+
+
+
+ 1.111
+ 2.222
+
+ 0.123
+ 0.456
+
+
+
+ 1.234
+ 2.234
+ 0.234
+
+ 0.123
+ 0.456
+
+
+
+ addedparam0
+ addedparam1
+
+
+
+
+ profile-identifier
+
+ application0
+ 2023-07-03T20:21:27.585982Z
+ site0
+ ci0-value0
+ ci0-value1
+
+
+ application1
+ 2023-07-03T20:21:37.585982Z
+ site1
+ ci1-value0
+ ci1-value1
+
+ pi-value0
+ pi-value1
+
+
+ outer description
+
+ 1.23
+ 2.34
+
+
+
+ 1.23
+ 2.34
+
+
+ 13.23
+ 23.34
+
+
+
+
+ 1.23
+ 2.34
+
+
+ -1.23
+ 2.34
+
+
+ 1.23
+ -2.34
+
+
+
+ [6378137.0, -202.78989383631944, 289.6139826697846]
+
+ 1.23
+ 2.34
+
+
+
+
+ 2
+
+ COHERENT
+ 24
+ 2
+
+ MC0
+ 1
+ mc0-val0
+ mc0-val1
+
+
+ MC1
+ 2
+ mc1-val0
+ mc1-val1
+
+
+ MC2
+ 3
+ mc2-val0
+ mc2-val1
+
+
+
+ STEREO
+ 8
+ 0
+
+
+
diff --git a/tests/io/complex/sicd_elements/conftest.py b/tests/io/complex/sicd_elements/conftest.py
index 80641dde..debfe95e 100644
--- a/tests/io/complex/sicd_elements/conftest.py
+++ b/tests/io/complex/sicd_elements/conftest.py
@@ -3,24 +3,22 @@
#
# Licensed under MIT License. See LICENSE.
#
-import pathlib
-
import pytest
from sarpy.io.complex.sicd_elements import SICD
@pytest.fixture()
-def sicd():
- xml_file = pathlib.Path(pathlib.Path.cwd(), 'tests/data/example.sicd.xml')
+def sicd(tests_path):
+ xml_file = tests_path / 'data/example.sicd.xml'
structure = SICD.SICDType().from_xml_file(xml_file)
return structure
@pytest.fixture()
-def rma_sicd():
- xml_file = pathlib.Path(pathlib.Path.cwd(), 'tests/data/example.sicd.rma.xml')
+def rma_sicd(tests_path):
+ xml_file = tests_path / 'data/example.sicd.rma.xml'
structure = SICD.SICDType().from_xml_file(xml_file)
return structure
diff --git a/tests/io/phase_history/cphd1_elements/test_cphd.py b/tests/io/phase_history/cphd1_elements/test_cphd.py
new file mode 100644
index 00000000..e2ebaedb
--- /dev/null
+++ b/tests/io/phase_history/cphd1_elements/test_cphd.py
@@ -0,0 +1,39 @@
+#
+# Copyright 2023 Valkyrie Systems Corporation
+#
+# Licensed under MIT License. See LICENSE.
+#
+import lxml.etree
+import pytest
+
+from sarpy.consistency import cphd_consistency
+import sarpy.io.phase_history.cphd1_elements.CPHD as sarpy_cphd1
+
+
+@pytest.fixture(
+ params=[
+ "data/syntax-only-cphd-1.1.0-monostatic.xml",
+ "data/syntax-only-cphd-1.1.0-bistatic.xml",
+ ]
+)
+def cphd_xml(request, tests_path):
+ cphd_path = tests_path / request.param
+ cphd_con = cphd_consistency.CphdConsistency.from_file(cphd_path)
+ cphd_con.check("check_against_schema")
+ assert not cphd_con.failures()
+ assert cphd_con.passes()
+ return cphd_path
+
+
+def test_cphdtype_to_from_xml(cphd_xml, tmp_path):
+ """Ensure that XML nodes are preserved when going from XML, through SarPy, then back to XML."""
+ original_tree = lxml.etree.parse(str(cphd_xml))
+ original_read = sarpy_cphd1.CPHDType.from_xml_file(cphd_xml)
+
+ out_file = tmp_path / "read_then_write.xml"
+ out_file.write_text(original_read.to_xml_string(check_validity=True))
+ reread_tree = lxml.etree.parse(str(out_file))
+
+ original_nodes = {original_tree.getelementpath(x) for x in original_tree.iter()}
+ new_nodes = {reread_tree.getelementpath(x) for x in reread_tree.iter()}
+ assert original_nodes == new_nodes