differt.geometry.LaunchedPaths#
- class LaunchedPaths(vertices, objects, masks, interaction_types, confidence_threshold=0.5)[source]#
Bases:
ModulePaths method generated with ray launching methods.
Holds information of lower-order paths too, and holds multi-order mask information. Not a subclass of TracedPaths.
Attributes
A threshold used to decide whether a given path is valid or not.
Alias property to the highest-order mask for backwards compatibility.
The array of masked objects of the highest-order paths, with batched dimensions flattened into one.
The array of masked vertices of the highest-order paths, with batched dimensions flattened into one.
The length (i.e., number of vertices) of each individual path, excluding start and end vertices.
The length (i.e., number of vertices) of each individual path.
The batch shape of the paths.
The array of path vertices.
The array of object indices.
An array of masks.
An array to indicate the type of each interaction.
Methods
get_paths(order)Return the
TracedPathsclass instance corresponding to the given path order.masked()Return a flattened
TracedPathsinstance keeping only valid highest-order paths.plot(**kwargs)Plot the paths on a 3D scene.
reshape(*batch)Return a new paths instance with reshaped paths' batch dimensions to match a given shape.
squeeze([axis])Return a new paths instance by squeezing one or more axes of paths' batch dimensions.
Detailed documentation
-
confidence_threshold:
Float[ArrayLike, '']= 0.5# A threshold used to decide whether a given path is valid or not.
- get_paths(order)[source]#
Return the
TracedPathsclass instance corresponding to the given path order.- Parameters:
order (
int) – The order of the path to index.- Return type:
- Returns:
The corresponding trace paths class.
- Raises:
ValueError – If the provided order is out-of-bounds.
-
interaction_types:
Int[Array, '*batch path_length-2']# An array to indicate the type of each interaction.
Values match
InteractionType. A value of-1indicates an inactive or padded interaction.
- property mask: Bool[Array, '*batch'][source]#
Alias property to the highest-order mask for backwards compatibility.
- masked()[source]#
Return a flattened
TracedPathsinstance keeping only valid highest-order paths.- Return type:
- Returns:
A flattened trace paths instance with only valid paths.
- property masked_objects: Int[Array, 'num_valid_paths path_length'][source]#
The array of masked objects of the highest-order paths, with batched dimensions flattened into one.
- property masked_vertices: Float[Array, 'num_valid_paths path_length 3'][source]#
The array of masked vertices of the highest-order paths, with batched dimensions flattened into one.
-
masks:
Bool[Array, '*batch path_length-1']# An array of masks.
Holds one mask for each path order.
-
objects:
Int[Array, '*batch path_length']# The array of object indices.
To every path vertex corresponds one object (e.g., a triangle). A placeholder value of
-1can be used in specific cases, like for transmitter and receiver positions.
- property order: int[source]#
The length (i.e., number of vertices) of each individual path, excluding start and end vertices.
- reshape(*batch)[source]#
Return a new paths instance with reshaped paths’ batch dimensions to match a given shape.
- Parameters:
batch (
int) – New batch shape.- Return type:
Self- Returns:
A new paths instance with specified batch dimensions.
- squeeze(axis=None)[source]#
Return a new paths instance by squeezing one or more axes of paths’ batch dimensions.
- Parameters:
axis (
int|Sequence[int] |None) – Seejax.numpy.squeezefor allowed values.- Return type:
Self- Returns:
A new paths instance with squeezed batch dimensions.
- Raises:
ValueError – If one of the provided axes is out-of-bounds, or if trying to squeeze a 0-dimensional batch.
-
vertices:
Float[Array, '*batch path_length 3']# The array of path vertices.
-
confidence_threshold: