prepare_shape

giant.coverage.utilities.prepare_shape:

giant.coverage.utilities.prepare_shape.prepare_shape(shape)[source]

This function can prepare requisite data for coverage analysis and visualization of coverage analysis from a shape model.

You can use this to get both the ignore indices you should use for a shape model (to avoid self shadowing) and the projection of the shape model’s triangles into a 2d lat/lon spherical projection.

Note that you can easily use this function to compute these things once (they can take a while, particularly for large shape models) and then save the results to a pickle file to load in future analysis to speed things up.

Parameters:

shape (KDTree | RawSurface) – the shape you want to get the requisite information for

Returns:

a tuple where the first element is a sequence of NDArrays containing the ignore indices for each vertice of the shape model, and the second element is a tuple of nx3 double arrays containing the projected triangles as lat, lon in degrees.

Return type:

tuple[Sequence[ndarray[tuple[Any, …], dtype[integer]]], tuple[ndarray[tuple[Any, …], dtype[float64]], ndarray[tuple[Any, …], dtype[float64]]]]