How to use the sarpy.io.complex.sicd_elements.base._SerializableDescriptor function in sarpy

To help you get started, we’ve selected a few sarpy examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ngageoint / sarpy / sarpy / io / phase_history / cphd1_elements / Global.py View on Github external
_required = ('DomainType', 'SGN', 'Timeline', 'FxBand', 'TOASwath')
    # descriptors
    DomainType = _StringEnumDescriptor(
        'DomainType', ('FX', 'TOA'), _required, strict=DEFAULT_STRICT,
        docstring='Indicates the domain represented by the sample dimension of the '
                  'CPHD signal array(s), where "FX" denotes Transmit Frequency, and '
                  '"TOA" denotes Difference in Time of Arrival')  # type: str
    SGN = _IntegerEnumDescriptor(
        'SGN', (-1, 1), _required, strict=DEFAULT_STRICT,
        docstring='Phase SGN applied to compute target signal phase as a function of '
                  r'target :math:`\Delta TOA^{TGT}`. Target phase in cycles. '
                  r'For simple phase model :math:`Phase(fx) = SGN \times fx \times \Delta TOA^{TGT}` '
                  r'In TOA domain, phase of the mainlobe peak '
                  r':math:`Phase(\Delta TOA^{TGT}) = SGN \times fx_C \times \Delta TOA^{TGT}`'
                  '.')  # type: int
    Timeline = _SerializableDescriptor(
        'Timeline', TimelineType, _required, strict=DEFAULT_STRICT,
        docstring='Parameters that describe the collection times for the data contained '
                  'in the product')  # type: TimelineType
    FxBand = _SerializableDescriptor(
        'FxBand', FxBandType, _required, strict=DEFAULT_STRICT,
        docstring='Parameters that describe the FX frequency limits for the signal array(s) '
                  'contained in the product.')  # type: FxBandType
    TOASwath = _SerializableDescriptor(
        'TOASwath', TOASwathType, _required, strict=DEFAULT_STRICT,
        docstring='Parameters that describe the time-of-arrival (TOA) swath limits for the '
                  'signal array(s) contained in the product.')  # type: TOASwathType
    TropoParameters = _SerializableDescriptor(
        'TropoParameters', TropoParametersType, _required, strict=DEFAULT_STRICT,
        docstring='Parameters used to compute the propagation delay due to the '
                  'troposphere.')  # type: Union[None, TropoParametersType]
    IonoParameters = _SerializableDescriptor(
github ngageoint / sarpy / sarpy / io / phase_history / cphd1_elements / PVP.py View on Github external
FXN2 = _SerializableDescriptor(
        'FXN2', PerVectorParameterF8, _required, strict=DEFAULT_STRICT,
        docstring='')  # type: PerVectorParameterF8
    TOA1 = _SerializableDescriptor(
        'TOA1', PerVectorParameterF8, _required, strict=DEFAULT_STRICT,
        docstring='')  # type: PerVectorParameterF8
    TOA2 = _SerializableDescriptor(
        'TOA2', PerVectorParameterF8, _required, strict=DEFAULT_STRICT,
        docstring='')  # type: PerVectorParameterF8
    TOAE1 = _SerializableDescriptor(
        'TOAE1', PerVectorParameterF8, _required, strict=DEFAULT_STRICT,
        docstring='')  # type: PerVectorParameterF8
    TOAE2 = _SerializableDescriptor(
        'TOAE2', PerVectorParameterF8, _required, strict=DEFAULT_STRICT,
        docstring='')  # type: PerVectorParameterF8
    TDTropoSRP = _SerializableDescriptor(
        'TDTropoSRP', PerVectorParameterF8, _required, strict=DEFAULT_STRICT,
        docstring='')  # type: PerVectorParameterF8
    TDIonoSRP = _SerializableDescriptor(
        'TDIonoSRP', PerVectorParameterF8, _required, strict=DEFAULT_STRICT,
        docstring='')  # type: PerVectorParameterF8
    SC0 = _SerializableDescriptor(
        'SC0', PerVectorParameterF8, _required, strict=DEFAULT_STRICT,
        docstring='')  # type: PerVectorParameterF8
    SCSS = _SerializableDescriptor(
        'SCSS', PerVectorParameterF8, _required, strict=DEFAULT_STRICT,
        docstring='')  # type: PerVectorParameterF8
    SIGNAL = _SerializableDescriptor(
        'SIGNAL', PerVectorParameterI8, _required, strict=DEFAULT_STRICT,
        docstring='')  # type: PerVectorParameterI8
    AddedPVP = _SerializableListDescriptor(
        'AddedPVP', UserDefinedPVPType, _collections_tags, _required, strict=DEFAULT_STRICT,
github ngageoint / sarpy / sarpy / io / product / sidd2_elements / DigitalElevationData.py View on Github external
self.Verticals = Verticals
        super(AccuracyType, self).__init__(**kwargs)


class PositionalAccuracyType(Serializable):
    """
    Describes the horizontal and vertical point and regional information for the DED.
    """

    _fields = ('NumRegions', 'AbsoluteAccuracy', 'PointToPointAccuracy')
    _required = ('NumRegions', 'AbsoluteAccuracy', 'PointToPointAccuracy')
    # Descriptor
    NumRegions = _IntegerDescriptor(
        'NumRegions', _required, strict=DEFAULT_STRICT,
        docstring='Number of positional accuracy regions.')  # type: int
    AbsoluteAccuracy = _SerializableDescriptor(
        'AbsoluteAccuracy', AccuracyType, _required, strict=DEFAULT_STRICT,
        docstring='')  # type: AccuracyType
    PointToPointAccuracy = _SerializableDescriptor(
        'PointToPointAccuracy', AccuracyType, _required, strict=DEFAULT_STRICT,
        docstring='')  # type: AccuracyType

    def __init__(self, NumRegions=None, AbsoluteAccuracy=None, PointToPointAccuracy=None, **kwargs):
        """

        Parameters
        ----------
        NumRegions : int
        AbsoluteAccuracy : AccuracyType
        PointToPointAccuracy : AccuracyType
        kwargs
        """
github ngageoint / sarpy / sarpy / io / phase_history / cphd1_elements / SceneCoordinates.py View on Github external
'EarthModel', 'IARP', 'ReferenceSurface', 'ImageArea', 'ImageAreaCornerPoints',
        'ExtendedArea', 'ImageGrid')
    _required = ('EarthModel', 'IARP', 'ReferenceSurface', 'ImageArea', 'ImageAreaCornerPoints')
    _collections_tags = {
        'ImageAreaCornerPoints': {'array': True, 'child_tag': 'IACP'}}
    # descriptors
    EarthModel = _StringEnumDescriptor(
        'EarthModel', ('WGS_84', ), _required, strict=DEFAULT_STRICT, default_value='WGS_84',
        docstring='Specifies the earth model used for specifying geodetic coordinates. All heights are '
                  'Height Above the Ellipsoid (HAE) unless specifically '
                  'noted.')  # type: str
    IARP = _SerializableDescriptor(
        'IARP', IARPType, _required, strict=DEFAULT_STRICT,
        docstring='Image Area Reference Point (IARP). The IARP is the origin of '
                  'the Image Area Coordinate system.')  # type: IARPType
    ReferenceSurface = _SerializableDescriptor(
        'ReferenceSurface', ReferenceSurfaceType, _required, strict=DEFAULT_STRICT,
        docstring='Parameters that define the Reference Surface used for the '
                  'product.')  # type: ReferenceSurfaceType
    ImageArea = _SerializableDescriptor(
        'ImageArea', AreaType, _required, strict=DEFAULT_STRICT,
        docstring='Image Area is defined by a rectangle aligned with Image Area coordinates (IAX, IAY). '
                  'May be reduced by the optional polygon.')  # type: AreaType
    ImageAreaCornerPoints = _SerializableCPArrayDescriptor(
        'ImageAreaCornerPoints', LatLonCornerType, _collections_tags, _required, strict=DEFAULT_STRICT,
        docstring='Image Area Corner Points (IACPs) that bound the full resolution '
                  'image area.')  # type: Union[SerializableCPArray, List[LatLonCornerType]]
    ExtendedArea = _SerializableDescriptor(
        'ExtendedArea', AreaType, _required, strict=DEFAULT_STRICT,
        docstring='Extended Area is defined by a rectangle aligned with Image Area coordinates '
                  '(IAX, IAY). May be reduced by the optional polygon.')  # type: Union[None, AreaType]
    ImageGrid = _SerializableDescriptor(
github ngageoint / sarpy / sarpy / io / phase_history / cphd1_elements / SceneCoordinates.py View on Github external
self.uIAYLL = uIAYLL
        super(LLPlanarType, self).__init__(**kwargs)


class ReferenceSurfaceType(Serializable):
    """
    Parameters that define the Reference Surface used for the product.
    """
    _fields = ('Planar', 'HAE')
    _required = ()
    _choice = ({'required': True, 'collection': _fields}, )
    # descriptors
    Planar = _SerializableDescriptor(
        'Planar', ECFPlanarType, _required, strict=DEFAULT_STRICT,
        docstring='The ECF planar surface definition.')  # type: Union[None, ECFPlanarType]
    HAE = _SerializableDescriptor(
        'HAE', LLPlanarType, _required, strict=DEFAULT_STRICT,
        docstring='The HAE surface definition.')  # type: Union[None, LLPlanarType]

    def __init__(self, Planar=None, HAE=None, **kwargs):
        """

        Parameters
        ----------
        Planar : ECFPlanarType|None
        HAE : LLPlanarType|None
        kwargs
        """

        if '_xml_ns' in kwargs:
            self._xml_ns = kwargs['_xml_ns']
        if '_xml_ns_key' in kwargs:
github ngageoint / sarpy / sarpy / io / product / sidd1_elements / ExploitationFeatures.py View on Github external
docstring='The name of the sensor.')  # str
    RadarMode = _SerializableDescriptor(
        'RadarMode', RadarModeType, _required, strict=DEFAULT_STRICT,
        docstring='Radar collection mode.')  # type: RadarModeType
    CollectionDateTime = _DateTimeDescriptor(
        'CollectionDateTime', _required, strict=DEFAULT_STRICT,
        docstring='Collection date and time defined in Coordinated Universal Time (UTC). The seconds '
                  'should be followed by a Z to indicate UTC.')  # type: numpy.datetime64
    CollectionDuration = _FloatDescriptor(
        'CollectionDuration', _required, strict=DEFAULT_STRICT,
        docstring='The duration of the collection (units = seconds).')  # type: float
    Resolution = _SerializableDescriptor(
        'Resolution', RangeAzimuthType, _required, strict=DEFAULT_STRICT,
        docstring='Uniformly-weighted resolution (range and azimuth) processed in '
                  'the slant plane.')  # type: Union[None, RangeAzimuthType]
    InputROI = _SerializableDescriptor(
        'InputROI', InputROIType, _required, strict=DEFAULT_STRICT,
        docstring='ROI representing portion of input data used to make '
                  'this product.')  # type: Union[None, InputROIType]
    Polarizations = _SerializableListDescriptor(
        'Polarizations', TxRcvPolarizationType, _collections_tags, _required, strict=DEFAULT_STRICT,
        docstring='Transmit and receive polarization(s).')  # type: Union[None, List[TxRcvPolarizationType]]

    def __init__(self, SensorName=None, RadarMode=None, CollectionDateTime=None, LocalDateTime=None,
                 CollectionDuration=None, Resolution=None, Polarizations=None, **kwargs):
        """

        Parameters
        ----------
        SensorName : str
        RadarMode : RadarModeType
        CollectionDateTime : numpy.datetime64|datetime.datetime|datetime.date|str
github ngageoint / sarpy / sarpy / io / product / sidd2_elements / Annotations.py View on Github external
self.Parameter = Parameter
        self.LinearUnit = LinearUnit
        super(ProjectedCoordinateSystemType, self).__init__(**kwargs)


class GeocentricCoordinateSystemType(Serializable):
    """

    """
    _fields = ('Name', 'Datum', 'PrimeMeridian', 'LinearUnit')
    _required = ('Name', 'Datum', 'PrimeMeridian', 'LinearUnit')
    # Descriptor
    Name = _StringDescriptor(
        'Name', _required, strict=DEFAULT_STRICT,
        docstring='')  # type: str
    Datum = _SerializableDescriptor(
        'Datum', DatumType, _required, strict=DEFAULT_STRICT,
        docstring='')  # type: DatumType
    PrimeMeridian = _SerializableDescriptor(
        'PrimeMeridian', PrimeMeridianType, _required, strict=DEFAULT_STRICT,
        docstring='')  # type: PrimeMeridianType
    LinearUnit = _StringDescriptor(
        'LinearUnit', _required, strict=DEFAULT_STRICT,
        docstring='')  # type: str

    def __init__(self, Name=None, Datum=None, PrimeMeridian=None, LinearUnit=None, **kwargs):
        """

        Parameters
        ----------
        Name : str
        Datum : DatumType
github ngageoint / sarpy / sarpy / io / phase_history / cphd0_3_elements / Global.py View on Github external
class PlaneType(Serializable):
    """
    The reference plane.
    """

    _fields = ('RefPt', 'XDir', 'YDir', 'DwellTime')
    _required = ('RefPt', 'XDir', 'YDir')
    # other class variable
    # descriptors
    RefPt = _SerializableDescriptor(
        'RefPt', ReferencePointType, _required, strict=DEFAULT_STRICT,
        docstring='The reference point.')  # type: ReferencePointType
    XDir = _SerializableDescriptor(
        'XDir', XDirectionType, _required, strict=DEFAULT_STRICT,
        docstring='The X direction collection plane parameters.')  # type: XDirectionType
    YDir = _SerializableDescriptor(
        'YDir', YDirectionType, _required, strict=DEFAULT_STRICT,
        docstring='The Y direction collection plane parameters.')  # type: YDirectionType
    DwellTime = _SerializableDescriptor(
        'DwellTime', DwellTimeType, _required, strict=DEFAULT_STRICT,
        docstring='The dwell time parameters.')  # type: DwellTimeType

    def __init__(self, RefPt=None, XDir=None, YDir=None, DwellTime=None, **kwargs):
        """

        Parameters
        ----------
        RefPt : ReferencePointType
        XDir : XDirectionType
        YDir : YDirectionType
        DwellTime : DwellTimeType
        kwargs
github ngageoint / sarpy / sarpy / io / phase_history / cphd1_elements / PVP.py View on Github external
'TOA1', 'TOA2', 'TDTropoSRP', 'SC0', 'SCSS')
    _collections_tags = {'AddedPVP': {'array': False, 'child_tag': 'AddedPVP'}}
    # descriptors
    TxTime = _SerializableDescriptor(
        'TxTime', PerVectorParameterF8, _required, strict=DEFAULT_STRICT,
        docstring='')  # type: PerVectorParameterF8
    TxPos = _SerializableDescriptor(
        'TxPos', PerVectorParameterXYZ, _required, strict=DEFAULT_STRICT,
        docstring='')  # type: PerVectorParameterXYZ
    TxVel = _SerializableDescriptor(
        'TxVel', PerVectorParameterXYZ, _required, strict=DEFAULT_STRICT,
        docstring='')  # type: PerVectorParameterXYZ
    RcvTime = _SerializableDescriptor(
        'RcvTime', PerVectorParameterF8, _required, strict=DEFAULT_STRICT,
        docstring='')  # type: PerVectorParameterF8
    RcvPos = _SerializableDescriptor(
        'RcvPos', PerVectorParameterXYZ, _required, strict=DEFAULT_STRICT,
        docstring='')  # type: PerVectorParameterXYZ
    RcvVel = _SerializableDescriptor(
        'RcvVel', PerVectorParameterXYZ, _required, strict=DEFAULT_STRICT,
        docstring='')  # type: PerVectorParameterXYZ
    SRPPos = _SerializableDescriptor(
        'SRPPos', PerVectorParameterXYZ, _required, strict=DEFAULT_STRICT,
        docstring='')  # type: PerVectorParameterXYZ
    AmpSF = _SerializableDescriptor(
        'AmpSF', PerVectorParameterF8, _required, strict=DEFAULT_STRICT,
        docstring='')  # type: PerVectorParameterF8
    aFDOP = _SerializableDescriptor(
        'aFDOP', PerVectorParameterF8, _required, strict=DEFAULT_STRICT,
        docstring='')  # type: PerVectorParameterF8
    aFRR1 = _SerializableDescriptor(
        'aFRR1', PerVectorParameterF8, _required, strict=DEFAULT_STRICT,
github ngageoint / sarpy / sarpy / io / complex / sicd_elements / Grid.py View on Github external
* `RGAZIM` - Grid for a simple range, Doppler image. Also, the natural grid for images formed with the Polar 
          Format Algorithm.

        * `RGZERO` - A grid for images formed with the Range Migration Algorithm. Used only for imaging near closest 
          approach (i.e. near zero Doppler).

        * `XRGYCR` - Orthogonal slant plane grid oriented range and cross range relative to the ARP at a 
          reference time.

        * `XCTYAT` - Orthogonal slant plane grid with X oriented cross track.

        * `PLANE` - Arbitrary plane with orientation other than the specific `XRGYCR` or `XCTYAT`.
        \n\n
        """)  # type: str
    TimeCOAPoly = _SerializableDescriptor(
        'TimeCOAPoly', Poly2DType, _required, strict=DEFAULT_STRICT,
        docstring="*Time of Center Of Aperture* as a polynomial function of image coordinates. "
                  "The polynomial is a function of image row coordinate ``(variable 1)`` and column coordinate "
                  "``(variable 2)``.")  # type: Poly2DType
    Row = _SerializableDescriptor(
        'Row', DirParamType, _required, strict=DEFAULT_STRICT,
        docstring="Row direction parameters.")  # type: DirParamType
    Col = _SerializableDescriptor(
        'Col', DirParamType, _required, strict=DEFAULT_STRICT,
        docstring="Column direction parameters.")  # type: DirParamType

    def __init__(self, ImagePlane=None, Type=None, TimeCOAPoly=None, Row=None, Col=None, **kwargs):
        """

        Parameters
        ----------