SCPCOA object and related elements

The SCPCOAType definition.

class sarpy.io.complex.sicd_elements.SCPCOA.GeometryCalculator(SCP: ndarray, ARPPos: ndarray, ARPVel: ndarray)

Bases: object

Performs the necessary SCPCOA geometry element calculations.

property ROV: float

Range over velocity

Type:

float

class sarpy.io.complex.sicd_elements.SCPCOA.SCPCOAType(SCPTime: float = None, ARPPos: XYZType | ndarray | list | tuple = None, ARPVel: XYZType | ndarray | list | tuple = None, ARPAcc: XYZType | ndarray | list | tuple = None, SideOfTrack: str = None, SlantRange: float = None, GroundRange: float = None, DopplerConeAng: float = None, GrazeAng: float = None, IncidenceAng: float = None, TwistAng: float = None, SlopeAng: float = None, AzimAng: float = None, LayoverAng: float = None, **kwargs)

Bases: Serializable

Center of Aperture (COA) for the Scene Center Point (SCP).

SCPTime: float

Center Of Aperture time for the SCP (t_COA_SCP), relative to collection start in seconds. Required.

Type:

float

ARPPos: XYZType

Aperture position at t_COA_SCP in ECF coordinates. Required.

Type:

XYZType

ARPVel: XYZType

ARP Velocity at t_COA_SCP in ECF coordinates. Required.

Type:

XYZType

ARPAcc: XYZType

ARP Acceleration at t_COA_SCP in ECF coordinates. Required.

Type:

XYZType

SideOfTrack: str

Side of track. Takes values in ('L', 'R'). Required.

Type:

str

SlantRange: float

Slant range from the aperture to the SCP in meters. Required.

Type:

float

GroundRange: float

Ground Range from the aperture nadir to the SCP. Distance measured along spherical earth model passing through the SCP in meters. Required.

Type:

float

DopplerConeAng: float

The Doppler Cone Angle to SCP at t_COA_SCP in degrees. Required.

Type:

float

GrazeAng: float

Grazing Angle between the SCP Line of Sight (LOS) and Earth Tangent Plane (ETP). Must be in the range [0.0, 90.0] Required.

Type:

float

IncidenceAng: float

Incidence Angle between the LOS and ETP normal. Must be in the range [0.0, 90.0] Required.

Type:

float

TwistAng: float

Angle between cross range in the ETP and cross range in the slant plane. Must be in the range [-90.0, 90.0] Required.

Type:

float

SlopeAng: float

Slope Angle from the ETP to the slant plane at t_COA_SCP. Must be in the range [0.0, 90.0] Required.

Type:

float

AzimAng: float

Angle from north to the line from the SCP to the aperture nadir at COA. Measured clockwise in the ETP. Must be in the range [0.0, 360.0] Required.

Type:

float

LayoverAng: float

Angle from north to the layover direction in the ETP at COA. Measured clockwise in the ETP. Must be in the range [0.0, 360.0] Required.

Type:

float

copy()

Create a deep copy.

classmethod from_dict(input_dict)

For json deserialization, from dict instance.

Parameters:

input_dict (dict) – Appropriate parameters dict instance for deserialization

Return type:

Corresponding class instance

classmethod from_node(node, xml_ns, ns_key=None, kwargs=None)

For XML deserialization.

Parameters:
  • node (ElementTree.Element) – dom element for serialized class instance

  • xml_ns (None|dict) – The xml namespace dictionary.

  • ns_key (None|str) – The xml namespace key. If xml_ns is None, then this is ignored. If None and xml_ns is not None, then the string default will be used. This will be recursively passed down, unless overridden by an entry of the cls._child_xml_ns_key dictionary.

  • kwargs (None|dict) – None or dictionary of previously serialized attributes. For use in inheritance call, when certain attributes require specific deserialization.

Return type:

Corresponding class instance

is_valid(recursive=False, stack=False)

Returns the validity of this object according to the schema. This is done by inspecting that all required fields (i.e. entries of _required) are not None.

Parameters:
  • recursive (bool) – True if we recursively check that child are also valid. This may result in verbose (i.e. noisy) logging.

  • stack (bool) – Print a recursive error message?

Returns:

condition for validity of this element

Return type:

bool

log_validity_error(msg)

Log a validity check error message.

Parameters:

msg (str) –

log_validity_info(msg)

Log a validation info message.

Parameters:

msg (str) –

log_validity_warning(msg)

Log a validity check warning message.

Parameters:

msg (str) –

property look: int | None

An integer version of SideOfTrack:

  • None if SideOfTrack is not defined

  • -1 if SideOfTrack == ‘R’

  • 1 if SideOftrack == ‘L’

Type:

int

set_numeric_format(attribute, format_string)

Sets the numeric format string for the given attribute.

Parameters:
  • attribute (str) – attribute for which the format applies - must be in _fields.

  • format_string (str) – format string to be applied

Return type:

None

to_dict(check_validity=False, strict=False, exclude=())

For json serialization.

Parameters:
  • check_validity (bool) – Check whether the element is valid before serializing, by calling is_valid().

  • strict (bool) – Only used if check_validity = True. In that case, if True then raise an Exception (of appropriate type) if the structure is not valid, if False then log a hopefully helpful message.

  • exclude (tuple) – Attribute names to exclude from this generic serialization. This allows for child classes to provide specific serialization for special properties, after using this super method.

Returns:

dict representation of class instance appropriate for direct json serialization.

Return type:

OrderedDict

to_node(doc, tag, ns_key=None, parent=None, check_validity=False, strict=False, exclude=())

For XML serialization, to a dom element.

Parameters:
  • doc (ElementTree.ElementTree) – The xml Document

  • tag (None|str) – The tag name. Defaults to the value of self._tag and then the class name if unspecified.

  • ns_key (None|str) – The namespace prefix. This will be recursively passed down, unless overridden by an entry in the _child_xml_ns_key dictionary.

  • parent (None|ElementTree.Element) – The parent element. Defaults to the document root element if unspecified.

  • check_validity (bool) – Check whether the element is valid before serializing, by calling is_valid().

  • strict (bool) – Only used if check_validity = True. In that case, if True then raise an Exception (of appropriate type) if the structure is not valid, if False then log a hopefully helpful message.

  • exclude (tuple) – Attribute names to exclude from this generic serialization. This allows for child classes to provide specific serialization for special properties, after using this super method.

Returns:

The constructed dom element, already assigned to the parent element.

Return type:

ElementTree.Element

to_xml_bytes(urn=None, tag=None, check_validity=False, strict=False)

Gets a bytes array, which corresponds to the xml string in utf-8 encoding, identified as using the namespace given by urn (if given).

Parameters:
  • urn (None|str|dict) – The xml namespace string or dictionary describing the xml namespace.

  • tag (None|str) – The root node tag to use. If not given, then the class name will be used.

  • check_validity (bool) – Check whether the element is valid before serializing, by calling is_valid().

  • strict (bool) – Only used if check_validity = True. In that case, if True then raise an Exception (of appropriate type) if the structure is not valid, if False then log a hopefully helpful message.

Returns:

bytes array from ElementTree.tostring() call.

Return type:

bytes

to_xml_string(urn=None, tag=None, check_validity=False, strict=False)

Gets a xml string with utf-8 encoding, identified as using the namespace given by urn (if given).

Parameters:
  • urn (None|str|dict) – The xml namespace or dictionary describing the xml namespace.

  • tag (None|str) – The root node tag to use. If not given, then the class name will be used.

  • check_validity (bool) – Check whether the element is valid before serializing, by calling is_valid().

  • strict (bool) – Only used if check_validity = True. In that case, if True then raise an Exception (of appropriate type) if the structure is not valid, if False then log a hopefully helpful message.

Returns:

xml string from ElementTree.tostring() call.

Return type:

str

property ROV: float | None

The Ratio of Range to Velocity at Center of Aperture time.

Type:

float

property ThetaDot: float | None

Derivative of Theta as a function of time at Center of Aperture time.

Type:

float

property MultipathGround: float | None

The anticipated angle of multipath features on the ground in degrees.

Type:

float

property Multipath: float | None

The anticipated angle of multipath features in degrees.

Type:

float

property Shadow: float | None

The anticipated angle of shadow features in degrees.

Type:

float

property ShadowMagnitude: float | None

The anticipated relative magnitude of shadow features.

Type:

float

property Squint: float

The squint angle, in degrees.

Type:

float

property LayoverMagnitude: float

The anticipated relative magnitude of layover features.

Type:

float

rederive(Grid, Position, GeoData)

Rederive all derived quantities.

Parameters:
Return type:

None

check_values(GeoData) bool

Check derived values for validity.

Parameters:

GeoData (sarpy.io.complex.sicd_elements.GeoData.GeoDataType) –

Return type:

bool