aws.osml.photogrammetry.sicd_sensor_model module

class aws.osml.photogrammetry.sicd_sensor_model.Polynomial2D(coef: _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes])[source]

Bases: object

This class contains coefficients for a two-dimensional polynomial.

class aws.osml.photogrammetry.sicd_sensor_model.PolynomialXYZ(x_polynomial: Polynomial, y_polynomial: Polynomial, z_polynomial: Polynomial)[source]

Bases: object

This class is an aggregation 3 one-dimensional polynomials all with the same input variable. The result of evaluating this class on the input variable is an [x, y, z] vector.

deriv(m: int = 1)[source]

Create a new PolynomialXYZ that is the derivative of the current PolynomialXYZ.

Parameters:

m – find the derivative of order m

Returns:

the new polynomial derivative

class aws.osml.photogrammetry.sicd_sensor_model.SARImageCoordConverter(scp_pixel: ImageCoordinate, scp_ecf: WorldCoordinate, u_row: ndarray, u_col: ndarray, row_ss: float, col_ss: float, first_pixel: ImageCoordinate = ImageCoordinate(coordinate=array([0., 0.])))[source]

Bases: object

This class contains image grid and image plane coordinate conversions for a provided set of SICD parameters. The equations are mostly defined in Section 2 of the SICD Standard Volume 3.

rowcol_to_xrowycol(row_col: ndarray) ndarray[source]

This function converts the row and column indexes (row, col) in the global image grid to SCP centered image coordinates (xrow, ycol) using equations (2) (3) in Section 2.2 of the SICD Specification Volume 3.

Parameters:

row_col – the [row, col] location as an array

Returns:

the [xrow, ycol] location as an array

xrowycol_to_rowcol(xrow_ycol: ndarray) ndarray[source]

This function converts the SCP centered image coordinates (xrow, ycol) to row and column indexes (row, col) in the global image grid using equations (2) (3) in Section 2.2 of the SICD Specification Volume 3.

Parameters:

xrow_ycol – the [xrow, ycol] location as an array

Returns:

the [row, col] location as an array

xrowycol_to_ipp(xrow_ycol: ndarray) ndarray[source]

This function converts SCP centered image coordinates (xrow, ycol) to a ECF coordinate, image plane point (IPP), on the image plane using equations in Section 2.4 of the SICD Specification Volume 3.

Parameters:

xrow_ycol – the [xrow, ycol] location as an array

Returns:

the image plane point [x, y, z] ECF location on the image plane

ipp_to_xrowycol(ipp: ndarray) ndarray[source]

This function converts an ECF location on the image plane into SCP centered image coordinates (xrow, ycol) using equations in Section 2.4 of the SICD Specification volume 3.

Parameters:

ipp – the image plane point [x, y, z] ECF location on the image plane

Returns:

the [xrow, ycol] location as an array

class aws.osml.photogrammetry.sicd_sensor_model.COAProjectionSet(coa_time_poly: Polynomial2D, arp_poly: PolynomialXYZ, delta_arp: ndarray = array([0., 0., 0.]), delta_varp: ndarray = array([0., 0., 0.]), range_bias: float = 0.0)[source]

Bases: object

This is an abstract base class for R/Rdot projection contour computations described in Section 4 of the SICD Standard Volume 3.

precise_rrdot_computation(xrow_ycol: ndarray) Tuple[ndarray, ndarray, ndarray, ndarray, ndarray][source]

This executes the precise image pixel grid location to R/Rdot projection. This function invokes the _grid_specific_projection() function implemented by subclasses which should handle the portions of the calculation that are dependent on the image grid and image formation algorithm.

Parameters:

xrow_ycol – the [xrow, ycol] location as an array

Returns:

the COA projection set { Rcoa, Rdotcoa, tcoa, arpcoa, varpcoa }

class aws.osml.photogrammetry.sicd_sensor_model.PFAProjectionSet(scp_ecf: WorldCoordinate, polar_ang_poly, spatial_freq_sf_poly, coa_time_poly: Polynomial2D, arp_poly: PolynomialXYZ, delta_arp: ndarray = array([0., 0., 0.]), delta_varp: ndarray = array([0., 0., 0.]), range_bias: float = 0.0)[source]

Bases: COAProjectionSet

This Center Of Aperture (COA) Projection set is to be used with a range azimuth image grid (RGAZIM) and polar formatted (PFA) phase history data. See section 4.1 of the SICD Specification Volume 3.

class aws.osml.photogrammetry.sicd_sensor_model.RGAZCOMPProjectionSet(scp_ecf: WorldCoordinate, az_scale_factor: float, coa_time_poly: Polynomial2D, arp_poly: PolynomialXYZ, delta_arp: ndarray = array([0., 0., 0.]), delta_varp: ndarray = array([0., 0., 0.]), range_bias: float = 0.0)[source]

Bases: COAProjectionSet

class aws.osml.photogrammetry.sicd_sensor_model.INCAProjectionSet(r_ca_scp: float, inca_time_coa_poly: Polynomial, drate_sf_poly: Polynomial2D, coa_time_poly: Polynomial2D, arp_poly: PolynomialXYZ, delta_arp: ndarray = array([0., 0., 0.]), delta_varp: ndarray = array([0., 0., 0.]), range_bias: float = 0.0)[source]

Bases: COAProjectionSet

class aws.osml.photogrammetry.sicd_sensor_model.PlaneProjectionSet(scp_ecf: WorldCoordinate, image_plane_urow: ndarray, image_plane_ucol: ndarray, coa_time_poly: Polynomial2D, arp_poly: PolynomialXYZ, delta_arp: ndarray = array([0., 0., 0.]), delta_varp: ndarray = array([0., 0., 0.]), range_bias: float = 0.0)[source]

Bases: COAProjectionSet

class aws.osml.photogrammetry.sicd_sensor_model.RRDotSurfaceProjection[source]

Bases: object

This is the base class for calculations that project the R/RDot contour onto a surface model. The SICD specification defines a way to do this for planes, a surface of constant height above an ellipsoid, or a digital elevation model.

abstract rrdot_to_ground(r_tgt_coa, r_dot_tgt_coa, arp_position, arp_velocity) ndarray[source]

Subclasses should implement this method to compute the R/RDot Contour Ground Plane intersection with a specific surface type (e.g. planar, HAE, DEM)

Parameters:
  • r_tgt_coa – target COA range

  • r_dot_tgt_coa – target COA range rate

  • arp_position – ARP position

  • arp_velocity – ARP velocity

Returns:

the intersection between the R/Rdot Contour and the ground plane

class aws.osml.photogrammetry.sicd_sensor_model.GroundPlaneRRDotSurfaceProjection(ref_ecf: WorldCoordinate, gpn: ndarray | None, gpn_type: GroundPlaneNormalType = GroundPlaneNormalType.GEODETIC_EARTH)[source]

Bases: RRDotSurfaceProjection

This class implements the Precise R/RDot Ground Plane Projection described in Section 5 of the SICD Specification Volume 3 (v1.3.0).

class GroundPlaneNormalType(value)[source]

Bases: Enum

An enumeration.

SPHERICAL_EARTH = 'SPHERICAL_EARTH'
GEODETIC_EARTH = 'GEODETIC_EARTH'
rrdot_to_ground(r_tgt_coa, r_dot_tgt_coa, arp_position, arp_velocity) ndarray[source]

This method implements the R/RDot Contour Ground Plane Intersection described in section 5.2

Parameters:
  • r_tgt_coa – target COA range

  • r_dot_tgt_coa – target COA range rate

  • arp_position – ARP position

  • arp_velocity – ARP velocity

Returns:

the intersection between the R/Rdot Contour and the ground plane

class aws.osml.photogrammetry.sicd_sensor_model.HAERRDotSurfaceProjection(scp_ecf: WorldCoordinate, side_of_track: str, hae: float, height_threshold: float = 1.0, max_number_iterations: int = 3)[source]

Bases: RRDotSurfaceProjection

This class implements the Precise R/RDot Height Above Ellipsioid (HAE) Projection described in Section 9 of the SICD Specification Volume 3 (v1.3.0).

rrdot_to_ground(r_tgt_coa, r_dot_tgt_coa, arp_position, arp_velocity) ndarray[source]

This method implements the R/RDot Contour Ground Plane Intersection described in section 9.2.

The precise projection to a surface of constant height above the WGS-84 reference ellipsoid along an R/Rdot contour. The R/Rdot contour is relative to an ARP Center Of Aperture position and velocity. The algorithm computes the R/Rdot projection to one or more ground planes that are tangent to the constant height surface. Each ground plane projection point computed is slightly above the constant HAE surface. The final surface position is computed by projecting from the final ground plane projection point down to the HAE surface.

Parameters:
  • r_tgt_coa – target COA range

  • r_dot_tgt_coa – target COA range rate

  • arp_position – ARP position

  • arp_velocity – ARP velocity

Returns:

the intersection between the R/Rdot Contour and the ground plane

class aws.osml.photogrammetry.sicd_sensor_model.DEMRRDotSurfaceProjection(scp_ecf: WorldCoordinate, side_of_track: str, elevation_model: ElevationModel, max_adjacent_point_distance: float = 10.0, height_threshold: float = 0.001)[source]

Bases: RRDotSurfaceProjection

This class implements the Precise R/RDot Height Above a Digital Elevation Model (DEM) Projection described in Section 10 of the SICD Specification Volume 3 (v1.3.0).

rrdot_to_ground(r_tgt_coa, r_dot_tgt_coa, arp_position, arp_velocity) ndarray[source]

This method implements the R/RDot Contour Ground Plane Intersection described in section 10.3

The R/Rdot contour is relative to an ARP Center Of Aperture position and velocity. The earth surface is described by a Digital Elevation Model (DEM) that defines a unique surface height as a function of two horizontal coordinates. The projection computation may yield one or more surface points that lie along the R/Rdot contour.

Parameters:
  • r_tgt_coa – target COA range

  • r_dot_tgt_coa – target COA range rate

  • arp_position – ARP position

  • arp_velocity – ARP velocity

Returns:

the intersection between the R/Rdot Contour and the DEM, if multiple intersections occur they will be returned in order of increasing height above the WGS-84 ellipsoid.

class aws.osml.photogrammetry.sicd_sensor_model.SICDSensorModel(coord_converter: SARImageCoordConverter, coa_projection_set: COAProjectionSet, u_spn: ndarray, side_of_track: str = 'L', u_gpn: ndarray | None = None)[source]

Bases: SensorModel

This is an implementation of the SICD sensor model as described by SICD Volume 3 Image Projections Description NGA.STND.0024-3_1.3.0 (2021-11-30)

static compute_u_spn(scp_ecf: WorldCoordinate, scp_arp: ndarray, scp_varp: ndarray, side_of_track: str) ndarray[source]

This helper function computes the slant plane normal.

Parameters:
  • scp_ecf – Scene Center Point position in ECF coordinates

  • scp_arp – aperture reference point position

  • scp_varp – aperture reference point velocity

  • side_of_track – side of track imaged

Returns:

unit vector for the slant plane normal

static compute_u_gpn(scp_ecf: WorldCoordinate, u_row: ndarray, u_col: ndarray) ndarray[source]
image_to_world(image_coordinate: ImageCoordinate, elevation_model: ElevationModel | None = None, options: Dict[str, Any] | None = None) GeodeticWorldCoordinate[source]

This is an implementation of an Image Grid to Scene point projection that first projects the image location to the R/RDot contour and then intersects the R/RDot contour with the elevation model. If an elevation model is provided then this routine intersects the R/Rdot contour with the DEM surface which may result in multiple solutions. In that case the solution with the lowest HAE is returned.

Parameters:
  • image_coordinate – the x,y image coordinate

  • elevation_model – the optional elevation model, if none supplied a plane tangent to SCP is assumed

  • options – no additional options are supported at this time

Returns:

the lon, lat, elev geodetic coordinate of the surface matching the image coordinate

world_to_image(world_coordinate: GeodeticWorldCoordinate) ImageCoordinate[source]

This is an implementation of Section 6.1 Scene To Image Grid Projection for a single point.

Parameters:

world_coordinate – lon, lat, elevation coordinate of the scene point

Returns:

the x,y pixel location in this image