예제 #1
0
class DwellTimeType(Serializable):
    """
    The dwell time object.
    """
    _fields = ('DwellTimePoly', 'CODTimePoly')
    _required = _fields
    # descriptors
    DwellTimePoly = _SerializableDescriptor(
        'DwellTimePoly', Poly2DType, _required, strict=DEFAULT_STRICT,
        docstring='The dwell time polynomial.')  # type: Poly2DType
    CODTimePoly = _SerializableDescriptor(
        'CODTimePoly', Poly2DType, _required, strict=DEFAULT_STRICT,
        docstring='The cod time polynomial.')  # type: Poly2DType

    def __init__(self, DwellTimePoly=None, CODTimePoly=None, **kwargs):
        """

        Parameters
        ----------
        DwellTimePoly : Poly2DType|numpy.ndarray|list|tuple
        CODTimePoly : Poly2DType|numpy.ndarray|list|tuple
        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.DwellTimePoly = DwellTimePoly
        self.CODTimePoly = CODTimePoly
        super(DwellTimeType, self).__init__(**kwargs)
예제 #2
0
class InputROIType(Serializable):
    """
    ROI representing portion of input data used to make this product.
    """

    _fields = ('Size', 'UpperLeft')
    _required = ('Size', 'UpperLeft')
    # Descriptor
    Size = _SerializableDescriptor(
        'Size', RowColIntType, _required, strict=DEFAULT_STRICT,
        docstring='Number of rows and columns extracted from the input.')  # type: RowColIntType
    UpperLeft = _SerializableDescriptor(
        'UpperLeft', RowColIntType, _required, strict=DEFAULT_STRICT,
        docstring='The upper-left pixel extracted from the input.')  # type: RowColIntType

    def __init__(self, Size=None, UpperLeft=None, **kwargs):
        """

        Parameters
        ----------
        Size : RowColIntType|numpy.ndarray|list|tuple
        UpperLeft : RowColIntType|numpy.ndarray|list|tuple
        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.Size = Size
        self.UpperLeft = UpperLeft
        super(InputROIType, self).__init__(**kwargs)
예제 #3
0
class GeographicCoordinateSystemType(Serializable):
    """

    """
    _fields = ('Csname', 'Datum', 'PrimeMeridian', 'AngularUnit', 'LinearUnit')
    _required = ('Csname', 'Datum', 'PrimeMeridian', 'AngularUnit')
    # Descriptor
    Csname = _StringDescriptor('Csname',
                               _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
    AngularUnit = _StringDescriptor('AngularUnit',
                                    _required,
                                    strict=DEFAULT_STRICT,
                                    docstring='')  # type: str
    LinearUnit = _StringDescriptor('LinearUnit',
                                   _required,
                                   strict=DEFAULT_STRICT,
                                   docstring='')  # type: str

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

        Parameters
        ----------
        Csname : str
        Datum : DatumType
        PrimeMeridian : PrimeMeridianType
        AngularUnit : str
        LinearUnit : str
        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.Csname = Csname
        self.Datum = Datum
        self.PrimeMeridian = PrimeMeridian
        self.AngularUnit = AngularUnit
        self.LinearUnit = LinearUnit
        super(GeographicCoordinateSystemType, self).__init__(**kwargs)
예제 #4
0
class J2KType(Serializable):
    """
    Jpeg 2000 parameters.
    """

    _fields = ('Original', 'Parsed')
    _required = ('Original', )
    # Descriptor
    Original = _SerializableDescriptor('Original',
                                       J2KSubtype,
                                       _required,
                                       strict=DEFAULT_STRICT,
                                       docstring='')  # type: J2KSubtype
    Parsed = _SerializableDescriptor(
        'Parsed',
        J2KSubtype,
        _required,
        strict=DEFAULT_STRICT,
        docstring='Conditional fields that exist only for parsed images.'
    )  # type: Union[None, J2KSubtype]

    def __init__(self, Original=None, Parsed=None, **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.Original = Original
        self.Parsed = Parsed
        super(J2KType, self).__init__(**kwargs)
예제 #5
0
class BistaticType(Serializable):
    """
    Error parameters for bistatic parameters.
    """

    _fields = ('TxPlatform', 'RcvPlatform', 'AddedParameters')
    _required = ('TxPlatform', )
    _collections_tags = {
        'AddedParameters': {
            'array': False,
            'child_tag': 'Parameter'
        }
    }
    # descriptors
    TxPlatform = _SerializableDescriptor(
        'TxPlatform',
        PlatformType,
        _required,
        strict=DEFAULT_STRICT,
        docstring='Error statistics for the transmit platform.'
    )  # type: PlatformType
    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

    def __init__(self,
                 TxPlatform=None,
                 RcvPlatform=None,
                 AddedParameters=None,
                 **kwargs):
        """

        Parameters
        ----------
        TxPlatform : PlatformType
        RcvPlatform : PlatformType
        AddedParameters : None|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.TxPlatform = TxPlatform
        self.RcvPlatform = RcvPlatform
        self.AddedParameters = AddedParameters
        super(BistaticType, self).__init__(**kwargs)
예제 #6
0
파일: Display.py 프로젝트: LordHui/sarpy
class ProductGenerationOptionsType(Serializable):
    """

    """
    _fields = ('BandEqualization', 'ModularTransferFunctionRestoration',
               'DataRemapping', 'AsymmetricPixelCorrection')
    _required = ('DataRemapping', )
    # Descriptor
    BandEqualization = _SerializableDescriptor(
        'BandEqualization',
        BandEqualizationType,
        _required,
        strict=DEFAULT_STRICT,
        docstring=
        'Band equalization ensures that real-world neutral colors have equal digital count values '
        '(i.e. are represented as neutral colors) across the dynamic range '
        'of the imaged scene.')  # type: BandEqualizationType
    ModularTransferFunctionRestoration = _SerializableDescriptor(
        'ModularTransferFunctionRestoration',
        FilterType,
        _required,
        strict=DEFAULT_STRICT,
        docstring=r'If present, the filter must not exceed :math:`15 \times 15`.'
    )  # type: FilterType
    DataRemapping = _SerializableDescriptor(
        'DataRemapping',
        NewLookupTableType,
        _required,
        strict=DEFAULT_STRICT,
        docstring=
        'Data remapping refers to the specific need to convert the data of incoming, expanded or '
        'uncompressed image band data to non-mapped image data.'
    )  # type: NewLookupTableType
    AsymmetricPixelCorrection = _SerializableDescriptor(
        'AsymmetricPixelCorrection',
        FilterType,
        _required,
        strict=DEFAULT_STRICT,
        docstring='The asymmetric pixel correction.')  # type: FilterType

    def __init__(self,
                 BandEqualization=None,
                 ModularTransferFunctionRestoration=None,
                 DataRemapping=None,
                 **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.BandEqualization = BandEqualization
        self.ModularTransferFunctionRestoration = ModularTransferFunctionRestoration
        self.DataRemapping = DataRemapping
        super(ProductGenerationOptionsType, self).__init__(**kwargs)
예제 #7
0
파일: Display.py 프로젝트: LordHui/sarpy
class RRDSType(Serializable):
    """
    RRDS type.
    """

    _fields = ('DownsamplingMethod', 'AntiAlias', 'Interpolation')
    _required = ('DownsamplingMethod', )
    # Descriptor
    DownsamplingMethod = _StringEnumDescriptor(
        'DownsamplingMethod', ('DECIMATE', 'MAX PIXEL', 'AVERAGE',
                               'NEAREST NEIGHBOR', 'BILINEAR', 'LAGRANGE'),
        _required,
        strict=DEFAULT_STRICT,
        docstring='Algorithm used to perform RRDS downsampling')  # type: str
    AntiAlias = _SerializableDescriptor(
        'AntiAlias',
        FilterType,
        _required,
        strict=DEFAULT_STRICT,
        docstring='The anti-aliasing filter. Should only be included if '
        '`DownsamplingMethod= "DECIMATE"`')  # type: FilterType
    Interpolation = _SerializableDescriptor(
        'Interpolation',
        FilterType,
        _required,
        strict=DEFAULT_STRICT,
        docstring='The interpolation filter. Should only be included if '
        '`DownsamplingMethod= "DECIMATE"`')  # type: FilterType

    def __init__(self,
                 DownsamplingMethod=None,
                 AntiAlias=None,
                 Interpolation=None,
                 **kwargs):
        """

        Parameters
        ----------
        DownsamplingMethod : str
        AntiAlias : None|FilterType
        Interpolation : None|FilterType
        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.DownsamplingMethod = DownsamplingMethod
        self.AntiAlias = AntiAlias
        self.Interpolation = Interpolation
        super(RRDSType, self).__init__(**kwargs)
예제 #8
0
파일: Antenna.py 프로젝트: nyulacska/sarpy
class AntCoordFrameType(Serializable):
    """
    Unit vectors that describe the orientation of an Antenna Coordinate Frame
    (ACF) as function of time.
    """

    _fields = ('Identifier', 'XAxisPoly', 'YAxisPoly')
    _required = _fields
    # descriptors
    Identifier = _StringDescriptor(
        'Identifier',
        _required,
        strict=DEFAULT_STRICT,
        docstring='String that uniquely identifies this ACF.')  # type: str
    XAxisPoly = _SerializableDescriptor(
        'XAxisPoly',
        XYZPolyType,
        _required,
        strict=DEFAULT_STRICT,
        docstring='Antenna X-Axis unit vector in ECF coordinates as a function '
        'of time.')  # type: XYZPolyType
    YAxisPoly = _SerializableDescriptor(
        'YAxisPoly',
        XYZPolyType,
        _required,
        strict=DEFAULT_STRICT,
        docstring='Antenna Y-Axis unit vector in ECF coordinates as a function '
        'of time.')  # type: XYZPolyType

    def __init__(self,
                 Identifier=None,
                 XAxisPoly=None,
                 YAxisPoly=None,
                 **kwargs):
        """

        Parameters
        ----------
        Identifier : str
        XAxisPoly : XYZPolyType
        YAxisPoly : XYZPolyType
        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.Identifier = Identifier
        self.XAxisPoly = XAxisPoly
        self.YAxisPoly = YAxisPoly
        super(AntCoordFrameType, self).__init__(**kwargs)
예제 #9
0
class AreaType(Serializable):
    """
    An area object.
    """

    _fields = ('X1Y1', 'X2Y2', 'Polygon')
    _required = _fields
    _collections_tags = {'Polygon': {'array': True, 'child_tag': 'Vertex'}}
    # descriptors
    X1Y1 = _SerializableDescriptor(
        'X1Y1',
        XYType,
        _required,
        strict=DEFAULT_STRICT,
        docstring='*"Minimum"* corner of the rectangle in Image '
        'coordinates.')  # type: XYType
    X2Y2 = _SerializableDescriptor(
        'X2Y2',
        XYType,
        _required,
        strict=DEFAULT_STRICT,
        docstring='*"Maximum"* corner of the rectangle in Image '
        'coordinates.')  # type: XYType
    Polygon = _SerializableArrayDescriptor(
        'Polygon',
        XYVertexType,
        _collections_tags,
        _required,
        strict=DEFAULT_STRICT,
        minimum_length=3,
        docstring='Polygon further reducing the bounding box, in Image '
        'coordinates.')  # type: Union[SerializableArray, List[XYVertexType]]

    def __init__(self, X1Y1=None, X2Y2=None, Polygon=None, **kwargs):
        """

        Parameters
        ----------
        X1Y1 : XYType|numpy.ndarray|list|tuple
        X2Y2 : XYType|numpy.ndarray|list|tuple
        Polygon : SerializableArray|List[XYVertexType]|numpy.ndarray|list|tuple
        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.X1Y1 = X1Y1
        self.X2Y2 = X2Y2
        self.Polygon = Polygon
        super(AreaType, self).__init__(**kwargs)
예제 #10
0
파일: Display.py 프로젝트: LordHui/sarpy
class SharpnessEnhancementType(Serializable):
    """
    Sharpness enhancement filter parameters.
    """
    _fields = ('ModularTransferFunctionCompensation',
               'ModularTransferFunctionEnhancement')
    _required = _fields
    _choice = ({
        'required':
        True,
        'collection': ('ModularTransferFunctionCompensation',
                       'ModularTransferFunctionEnhancement')
    }, )
    # Descriptor
    ModularTransferFunctionCompensation = _SerializableDescriptor(
        'ModularTransferFunctionCompensation',
        FilterType,
        _required,
        strict=DEFAULT_STRICT,
        docstring=
        r'If defining a custom Filter, it must be no larger than :math:`5\times 5`.'
    )  # type: FilterType
    ModularTransferFunctionEnhancement = _SerializableDescriptor(
        'ModularTransferFunctionEnhancement',
        FilterType,
        _required,
        strict=DEFAULT_STRICT,
        docstring=
        r'If defining a custom Filter, it must be no larger than :math:`5\times 5`.'
    )  # type: FilterType

    def __init__(self,
                 ModularTransferFunctionCompensation=None,
                 ModularTransferFunctionEnhancement=None,
                 **kwargs):
        """

        Parameters
        ----------
        ModularTransferFunctionCompensation : FilterType
        ModularTransferFunctionEnhancement : FilterType
        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.ModularTransferFunctionCompensation = ModularTransferFunctionCompensation
        self.ModularTransferFunctionEnhancement = ModularTransferFunctionEnhancement
        super(SharpnessEnhancementType, self).__init__(**kwargs)
예제 #11
0
class ReferencePointType(Serializable):
    """
    A reference point.
    """

    _fields = ('ECEF', 'Point', 'name')
    _required = ('ECEF', 'Point')
    _set_as_attribute = ('name', )
    _child_xml_ns_key = {'ECEF': 'sicommon', 'Point': 'sicommon'}
    # Descriptor
    ECEF = _SerializableDescriptor(
        'ECEF',
        XYZType,
        _required,
        strict=DEFAULT_STRICT,
        docstring='The ECEF coordinates of the reference point.'
    )  # type: XYZType
    Point = _SerializableDescriptor(
        'Point',
        RowColDoubleType,
        _required,
        strict=DEFAULT_STRICT,
        docstring='The pixel coordinates of the reference point.'
    )  # type: RowColDoubleType
    name = _StringDescriptor(
        'name',
        _required,
        strict=DEFAULT_STRICT,
        docstring=
        'Used for implementation specific signifier for the reference point.'
    )  # type: Union[None, str]

    def __init__(self, ECEF=None, Point=None, name=None, **kwargs):
        """

        Parameters
        ----------
        ECEF : XYZType|numpy.ndarray|list|tuple
        Point : RowColDoubleType|numpy.ndarray|list|tuple
        name : None|str
        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.ECEF = ECEF
        self.Point = Point
        self.name = name
        super(ReferencePointType, self).__init__(**kwargs)
예제 #12
0
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
        """

        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.NumRegions = NumRegions
        self.AbsoluteAccuracy = AbsoluteAccuracy
        self.PointToPointAccuracy = PointToPointAccuracy
        super(PositionalAccuracyType, self).__init__(**kwargs)
예제 #13
0
class GeographicAndTargetType(Serializable):
    """
    Container specifying the image coverage area in geographic coordinates, as
    well as optional data about the target of the collection/product.
    """

    _fields = ('GeographicCoverage', 'TargetInformations')
    _required = ('GeographicCoverage', )
    _collections_tags = {'TargetInformations': {'array': False, 'child_tag': 'TargetInformation'}}
    # Descriptors
    GeographicCoverage = _SerializableDescriptor(
        'GeographicCoverage', GeographicCoverageType, _required, strict=DEFAULT_STRICT,
        docstring='Provides geographic coverage information.')  # type: GeographicCoverageType
    TargetInformations = _SerializableListDescriptor(
        'TargetInformations', TargetInformationType, _collections_tags, _required, strict=DEFAULT_STRICT,
        docstring='Provides target specific geographic '
                  'information.')  # type: Union[None, List[TargetInformationType]]

    def __init__(self, GeographicCoverage=None, TargetInformations=None, **kwargs):
        """

        Parameters
        ----------
        GeographicCoverage : GeographicCoverageType
        TargetInformations : None|List[TargetInformationType]
        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.GeographicCoverage = GeographicCoverage
        self.TargetInformations = TargetInformations
        super(GeographicAndTargetType, self).__init__(**kwargs)
예제 #14
0
class ImageAreaType(Serializable):
    """
    The collection area.
    """

    _fields = ('Corner', 'Plane')
    _required = ('Corner', )
    _collections_tags = {
        'Corner': {'array': True, 'child_tag': 'ACP'}, }
    # descriptors
    Corner = _SerializableCPArrayDescriptor(
        'Corner', LatLonHAECornerRestrictionType, _collections_tags, _required, strict=DEFAULT_STRICT,
        docstring='The collection area corner point definition array.'
    )  # type: Union[SerializableCPArray, List[LatLonHAECornerRestrictionType]]
    Plane = _SerializableDescriptor(
        'Plane', PlaneType, _required, strict=DEFAULT_STRICT,
        docstring='A rectangular area in a geo-located display plane.')  # type: PlaneType

    def __init__(self, Corner=None, Plane=None, **kwargs):
        """

        Parameters
        ----------
        Corner : SerializableCPArray|List[LatLonHAECornerRestrictionType]|numpy.ndarray|list|tuple
        Plane : PlaneType
        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.Corner = Corner
        self.Plane = Plane
        super(ImageAreaType, self).__init__(**kwargs)
예제 #15
0
class CompressionType(Serializable):
    """
    Contains information regarding any compression that has occurred to the image data.
    """

    _fields = ('J2K', )
    _required = ('J2K', )
    # Descriptor
    J2K = _SerializableDescriptor(
        'J2K', J2KType, _required, strict=DEFAULT_STRICT,
        docstring='Block describing details of JPEG 2000 compression.')  # type: J2KType

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

        Parameters
        ----------
        J2K : J2KType
        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.J2K = J2K
        super(CompressionType, self).__init__(**kwargs)
예제 #16
0
class CustomLookupType(Serializable):
    """
    A custom lookup table.
    """

    _fields = ('LUTInfo', )
    _required = ('LUTInfo', )
    # Descriptor
    LUTInfo = _SerializableDescriptor(
        'LUTInfo',
        LUTInfoType,
        _required,
        strict=DEFAULT_STRICT,
        docstring='The lookup table.')  # type: LUTInfoType

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

        Parameters
        ----------
        LUTInfo: LUTInfoType|numpy.ndarray|list|tuple
        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.LUTInfo = LUTInfo
        super(CustomLookupType, self).__init__(**kwargs)
예제 #17
0
class BaseProjectionType(Serializable):
    """
    The base geometric projection system.
    """

    _fields = ('ReferencePoint', )
    _required = ('ReferencePoint', )
    # Descriptor
    ReferencePoint = _SerializableDescriptor(
        'ReferencePoint',
        ReferencePointType,
        _required,
        strict=DEFAULT_STRICT,
        docstring='Reference point for the geometrical system.'
    )  # type: ReferencePointType

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

        Parameters
        ----------
        ReferencePoint : ReferencePointType
        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.ReferencePoint = ReferencePoint
        super(BaseProjectionType, self).__init__(**kwargs)
예제 #18
0
class DatumType(Serializable):
    """

    """
    _fields = ('Spheroid', )
    _required = ('Spheroid', )
    # Descriptor
    Spheroid = _SerializableDescriptor(
        'Spheroid', SpheroidType, _required, strict=DEFAULT_STRICT,
        docstring='')  # type: SpheroidType

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

        Parameters
        ----------
        Spheroid : SpheroidType
        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.Spheroid = Spheroid
        super(DatumType, self).__init__(**kwargs)
예제 #19
0
파일: Display.py 프로젝트: LordHui/sarpy
class ColorSpaceTransformType(Serializable):
    """
    Parameters describing any color transformation.
    """
    _fields = ('ColorManagementModule', )
    _required = _fields
    # Descriptor
    ColorManagementModule = _SerializableDescriptor(
        'ColorManagementModule',
        ColorManagementModuleType,
        _required,
        strict=DEFAULT_STRICT,
        docstring='Parameters describing the Color Management Module (CMM).'
    )  # type: ColorManagementModuleType

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

        Parameters
        ----------
        ColorManagementModule : ColorManagementModuleType
        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.ColorManagementModule = ColorManagementModule
        super(ColorSpaceTransformType, self).__init__(**kwargs)
예제 #20
0
class ProjectedCoordinateSystemType(Serializable):
    """

    """
    _fields = ('Csname', 'GeographicCoordinateSystem', 'Projection', 'Parameter', 'LinearUnit')
    _required = ('Csname', 'GeographicCoordinateSystem', 'Projection', 'LinearUnit')
    # Descriptor
    Csname = _StringDescriptor(
        'Csname', _required, strict=DEFAULT_STRICT,
        docstring='')  # type: str
    GeographicCoordinateSystem = _SerializableDescriptor(
        'GeographicCoordinateSystem', GeographicCoordinateSystemType, _required, strict=DEFAULT_STRICT,
        docstring='')  # type: GeographicCoordinateSystemType
    Projection = _SerializableDescriptor(
        'Projection', ProjectionType, _required, strict=DEFAULT_STRICT,
        docstring='')  # type: ProjectionType
    Parameter = _SerializableDescriptor(
        'Parameter', ParameterType, _required, strict=DEFAULT_STRICT,
        docstring='')  # type: Union[None, ParameterType]
    LinearUnit = _StringDescriptor(
        'LinearUnit', _required, strict=DEFAULT_STRICT,
        docstring='')  # type: str

    def __init__(self, Csname=None, GeographicCoordinateSystem=None, Projection=None, Parameter=None,
                 LinearUnit=None, **kwargs):
        """

        Parameters
        ----------
        Csname : str
        GeographicCoordinateSystem : GeographicCoordinateSystemType
        Projection : ProjectionType
        Parameter : None|ParameterType
        LinearUnit : str
        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.Csname = Csname
        self.GeographicCoordinateSystem = GeographicCoordinateSystem
        self.Projection = Projection
        self.Parameter = Parameter
        self.LinearUnit = LinearUnit
        super(ProjectedCoordinateSystemType, self).__init__(**kwargs)
예제 #21
0
파일: Display.py 프로젝트: nyulacska/sarpy
class RemapChoiceType(Serializable):
    """
    The remap choice type.
    """

    _fields = ('ColorDisplayRemap', 'MonochromeDisplayRemap')
    _required = ()
    _choice = ({
        'required': False,
        'collection': ('ColorDisplayRemap', 'MonochromeDisplayRemap')
    }, )
    # Descriptor
    ColorDisplayRemap = _SerializableDescriptor(
        'ColorDisplayRemap',
        ColorDisplayRemapType,
        _required,
        strict=DEFAULT_STRICT,
        docstring='Information for proper color display of the '
        'data.')  # type: Union[None, ColorDisplayRemapType]
    MonochromeDisplayRemap = _SerializableDescriptor(
        'MonochromeDisplayRemap',
        MonochromeDisplayRemapType,
        _required,
        strict=DEFAULT_STRICT,
        docstring='Information for proper monochrome display of the '
        'data.')  # type: Union[None, MonochromeDisplayRemapType]

    def __init__(self,
                 ColorDisplayRemap=None,
                 MonochromeDisplayRemap=None,
                 **kwargs):
        """

        Parameters
        ----------
        ColorDisplayRemap : None|ColorDisplayRemapType|numpy.ndarray|list|type
        MonochromeDisplayRemap : None|MonochromeDisplayRemapType
        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.ColorDisplayRemap = ColorDisplayRemap
        self.MonochromeDisplayRemap = MonochromeDisplayRemap
        super(RemapChoiceType, self).__init__(**kwargs)
예제 #22
0
class MeasurableProjectionType(BaseProjectionType):
    """
    A physical base projection.
    """

    _fields = ('ReferencePoint', 'SampleSpacing', 'TimeCOAPoly')
    _required = ('ReferencePoint', 'SampleSpacing', 'TimeCOAPoly')
    # Descriptor
    SampleSpacing = _SerializableDescriptor(
        'SampleSpacing',
        RowColDoubleType,
        _required,
        strict=DEFAULT_STRICT,
        docstring='Sample spacing in row and column.'
    )  # type: RowColDoubleType
    TimeCOAPoly = _SerializableDescriptor(
        'TimeCOAPoly',
        Poly2DType,
        _required,
        strict=DEFAULT_STRICT,
        docstring=
        'Time (units = seconds) at which center of aperture for a given pixel '
        'coordinate in the product occurs.')  # type: Poly2DType

    def __init__(self,
                 ReferencePoint=None,
                 SampleSpacing=None,
                 TimeCOAPoly=None,
                 **kwargs):
        """

        Parameters
        ----------
        ReferencePoint : ReferencePointType
        SampleSpacing : RowColDoubleType|numpy.ndarray|list|tuple
        TimeCOAPoly : Poly2DType|numpy.ndarray|list|tuple
        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']
        super(MeasurableProjectionType,
              self).__init__(ReferencePoint=ReferencePoint, **kwargs)
        self.SampleSpacing = SampleSpacing
        self.TimeCOAPoly = TimeCOAPoly
예제 #23
0
파일: Display.py 프로젝트: LordHui/sarpy
class NonInteractiveProcessingType(Serializable):
    """
    The non-interactive processing information.
    """

    _fields = ('ProductGenerationOptions', 'RRDS', 'band')
    _required = ('ProductGenerationOptions', 'RRDS', 'band')
    _set_as_attribute = ('band', )
    # Descriptor
    ProductGenerationOptions = _SerializableDescriptor(
        'ProductGenerationOptions',
        ProductGenerationOptionsType,
        _required,
        strict=DEFAULT_STRICT,
        docstring=
        'Performs several key actions on an image to prepare it for necessary additional processing to '
        'achieve the desired output product.'
    )  # type: ProductGenerationOptionsType
    RRDS = _SerializableDescriptor(
        'RRDS',
        RRDSType,
        _required,
        strict=DEFAULT_STRICT,
        docstring=
        'Creates a set of sub-sampled versions of an image to provide processing chains '
        'with quick access to lower magnification values for faster computation '
        'speeds and performance.')  # type: RRDSType
    band = _IntegerDescriptor(
        'band',
        _required,
        strict=DEFAULT_STRICT,
        docstring='The image band to which this applies.')  # type: int

    def __init__(self,
                 ProductGenerationOptions=None,
                 RRDS=None,
                 band=1,
                 **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.ProductGenerationOptions = ProductGenerationOptions
        self.RRDS = RRDS
        self.band = band
        super(NonInteractiveProcessingType, self).__init__(**kwargs)
예제 #24
0
class LLPlanarType(Serializable):
    """
    Parameters for Lat/Lon planar surface of constant HAE, implicitly assumed to be
    the HAE at the `IARP`.
    """

    _fields = ('uIAXLL', 'uIAYLL')
    _required = _fields
    # descriptors
    uIAXLL = _SerializableDescriptor(
        'uIAXLL',
        LatLonType,
        _required,
        strict=DEFAULT_STRICT,
        docstring=
        'Image coordinate IAX *"unit vector"* expressed as an increment '
        'in latitude and longitude corresponding to a 1.0 meter increment '
        'in image coordinate `IAX`.')  # type: LatLonType
    uIAYLL = _SerializableDescriptor(
        'uIAYLL',
        LatLonType,
        _required,
        strict=DEFAULT_STRICT,
        docstring=
        'Image coordinate IAY *"unit vector"* expressed as an increment '
        'in latitude and longitude corresponding to a 1.0 meter increment '
        'in image coordinate `IAY`.')  # type: LatLonType

    def __init__(self, uIAXLL=None, uIAYLL=None, **kwargs):
        """

        Parameters
        ----------
        uIAXLL : LatLonType|numpy.ndarray|list|tuple
        uIAYLL : LatLonType|numpy.ndarray|list|tuple
        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.uIAXLL = uIAXLL
        self.uIAYLL = uIAYLL
        super(LLPlanarType, self).__init__(**kwargs)
예제 #25
0
class NewLookupTableType(Serializable):
    """
    The lookup table. Allows **either** a reference to a prefined lookup table, or
    custom lookup table array.
    """

    _fields = ('LUTName', 'Predefined', 'Custom')
    _required = ('LUTName', )
    _choice = ({'required': True, 'collection': ('Predefined', 'Custom')}, )
    # Descriptor
    LUTName = _StringDescriptor('LUTName',
                                _required,
                                strict=DEFAULT_STRICT,
                                docstring='The lookup table name')  # type: str
    Predefined = _SerializableDescriptor(
        'Predefined',
        PredefinedLookupType,
        _required,
        strict=DEFAULT_STRICT,
        docstring='')  # type: PredefinedLookupType
    Custom = _SerializableDescriptor('Custom',
                                     CustomLookupType,
                                     _required,
                                     strict=DEFAULT_STRICT,
                                     docstring='')  # type: CustomLookupType

    def __init__(self, LUTName=None, Predefined=None, Custom=None, **kwargs):
        """

        Parameters
        ----------
        LUTName : str
        Predefined : None|PredefinedLookupType
        Custom : None|CustomLookupType
        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.LUTName = LUTName
        self.Predefined = Predefined
        self.Custom = Custom
        super(NewLookupTableType, self).__init__(**kwargs)
예제 #26
0
class CylindricalProjectionType(MeasurableProjectionType):
    """
    Cylindrical mapping of the pixel grid.
    """

    _fields = ('ReferencePoint', 'SampleSpacing', 'TimeCOAPoly',
               'StripmapDirection', 'CurvatureRadius')
    _required = ('ReferencePoint', 'SampleSpacing', 'TimeCOAPoly',
                 'StripmapDirection')
    _numeric_format = {'CurvatureRadius': '0.16G'}
    # Descriptor
    StripmapDirection = _SerializableDescriptor(
        'StripmapDirection',
        XYZType,
        _required,
        strict=DEFAULT_STRICT,
        docstring='Along stripmap direction.')  # type: XYZType
    CurvatureRadius = _FloatDescriptor(
        'CurvatureRadius',
        _required,
        strict=DEFAULT_STRICT,
        docstring=
        'Radius of Curvature defined at scene center.  If not present, the radius of '
        'curvature will be derived based upon the equations provided in the '
        'Design and Exploitation Document')  # type: Union[None, float]

    def __init__(self,
                 ReferencePoint=None,
                 SampleSpacing=None,
                 TimeCOAPoly=None,
                 StripmapDirection=None,
                 CurvatureRadius=None,
                 **kwargs):
        """

        Parameters
        ----------
        ReferencePoint : ReferencePointType
        SampleSpacing : RowColDoubleType|numpy.ndarray|list|tuple
        TimeCOAPoly : Poly2DType|numpy.ndarray|list|tuple
        StripmapDirection : XYZType|numpy.ndarray|list|tuple
        CurvatureRadius : None|float
        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']
        super(CylindricalProjectionType,
              self).__init__(ReferencePoint=ReferencePoint,
                             SampleSpacing=SampleSpacing,
                             TimeCOAPoly=TimeCOAPoly,
                             **kwargs)
        self.StripmapDirection = StripmapDirection
        self.CurvatureRadius = CurvatureRadius
예제 #27
0
class ReferenceSystemType(Serializable):
    """
    The reference system.
    """
    _fields = ('ProjectedCoordinateSystem', 'GeographicCoordinateSystem', 'GeocentricCoordinateSystem', 'AxisNames')
    _required = ('ProjectedCoordinateSystem', 'GeographicCoordinateSystem', 'GeocentricCoordinateSystem', 'AxisNames')
    _collections_tags = {'AxisNames': {'array': False, 'child_tag': 'AxisName'}}
    # Descriptor
    ProjectedCoordinateSystem = _SerializableDescriptor(
        'ProjectedCoordinateSystem', ProjectedCoordinateSystemType, _required, strict=DEFAULT_STRICT,
        docstring='')  # type: ProjectedCoordinateSystemType
    GeographicCoordinateSystem = _SerializableDescriptor(
        'GeographicCoordinateSystem', GeographicCoordinateSystemType, _required, strict=DEFAULT_STRICT,
        docstring='')  # type: GeographicCoordinateSystemType
    GeocentricCoordinateSystem = _SerializableDescriptor(
        'GeocentricCoordinateSystem', GeocentricCoordinateSystemType, _required, strict=DEFAULT_STRICT,
        docstring='')  # type: GeocentricCoordinateSystemType
    AxisNames = _StringListDescriptor(
        'AxisNames', _required, strict=DEFAULT_STRICT,
        docstring='')  # type: List[str]

    def __init__(self, ProjectedCoordinateSystem=None, GeographicCoordinateSystem=None,
                 GeocentricCoordinateSystem=None, AxisNames=None, **kwargs):
        """

        Parameters
        ----------
        ProjectedCoordinateSystem : ProjectedCoordinateSystemType
        GeographicCoordinateSystem : GeographicCoordinateSystemType
        GeocentricCoordinateSystem : GeocentricCoordinateSystemType
        AxisNames : List[str]
        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.ProjectedCoordinateSystem = ProjectedCoordinateSystem
        self.GeographicCoordinateSystem = GeographicCoordinateSystem
        self.GeocentricCoordinateSystem = GeocentricCoordinateSystem
        self.AxisNames = AxisNames
        super(ReferenceSystemType, self).__init__(**kwargs)
예제 #28
0
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
        """

        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.RefPt = RefPt
        self.XDir = XDir
        self.YDir = YDir
        self.DwellTime = DwellTime
        super(PlaneType, self).__init__(**kwargs)
예제 #29
0
class ErrorParametersType(Serializable):
    """
    Parameters that describe the statistics of errors in measured or estimated
    parameters that describe the collection.
    """

    _fields = ('Monostatic', 'Bistatic')
    _required = ()
    _choice = ({'required': True, 'collection': _fields}, )

    # descriptors
    Monostatic = _SerializableDescriptor('Monostatic',
                                         MonostaticType,
                                         _required,
                                         strict=DEFAULT_STRICT,
                                         docstring='The monstatic parameters.'
                                         )  # type: Union[None, MonostaticType]
    Bistatic = _SerializableDescriptor('Bistatic',
                                       BistaticType,
                                       _required,
                                       strict=DEFAULT_STRICT,
                                       docstring='The bistatic parameters.'
                                       )  # type: Union[None, BistaticType]

    def __init__(self, Monostatic=None, Bistatic=None, **kwargs):
        """

        Parameters
        ----------
        Monostatic : None|MonostaticType
        Bistatic : None|BistaticType
        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.Monostatic = Monostatic
        self.Bistatic = Bistatic
        super(ErrorParametersType, self).__init__(**kwargs)
예제 #30
0
파일: Display.py 프로젝트: LordHui/sarpy
class ScalingType(Serializable):
    """
    Scaling for geometric transformation
    """
    _fields = ('AntiAlias', 'Interpolation')
    _required = _fields
    # Descriptor
    AntiAlias = _SerializableDescriptor(
        'AntiAlias',
        FilterType,
        _required,
        strict=DEFAULT_STRICT,
        docstring=
        'The Anti-Alias Filter used for scaling. Refer to program-specific '
        'documentation for population guidance.')  # type: FilterType
    Interpolation = _SerializableDescriptor(
        'Interpolation',
        FilterType,
        _required,
        strict=DEFAULT_STRICT,
        docstring=
        'The Interpolation Filter used for scaling. Refer to program-specific '
        'documentation for population guidance.')  # type: FilterType

    def __init__(self, AntiAlias=None, Interpolation=None, **kwargs):
        """

        Parameters
        ----------
        AntiAlias : FilterType
        Interpolation : FilterType
        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.AntiAlias = AntiAlias
        self.Interpolation = Interpolation
        super(ScalingType, self).__init__(**kwargs)