-
Hi, I am trying to make a an ML model that could for a ray (with different frequencies, distances, angle of hitting the obstacle etc) predict the angle after hitting, the attenuation, scattering phase etc. I am thinking of making my dataset using sionna. I was wondering is it possible to extract this information for a single ray? And if so how? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 13 replies
-
Hi @itsghaniz, |
Beta Was this translation helpful? Give feedback.
-
Hi, Hope you are well. if for example I print the paths.object.numpy() as print(paths.objects.numpy()), I get the ids of the objects that interacted with all the paths. the object id which are in the paths by reflections and scattering are in the ids of the objects, but the objects in the paths of diffrections have the object ids that are not present in the scene. here is a small piece of code. # here is a dictonarty that I am using to translate the object element id into the object element name
id=[]
material=[]
for i,obj in enumerate(scene.objects.values()):
print(f"{obj.name} : {obj.radio_material.name}: {obj.object_id}")
print(type(obj.object_id))
id.append(obj.object_id)
material.append(obj.radio_material.name)
#if i == 1000:
# break
materials_dict = dict(zip(id, material))
there here I am tyring to observe the paths of objects, in the diffraction paths all the elements are unknown
for i in range(0, len(path_interactions)):
interaction_objs_diffraction.append([])
for j in range(0, num_diff):
material = materials_dict.get(interaction[i][j+num_ref+num_los], None)
if material is None:
if (interaction[i][j+num_ref+1] == -1):
interaction_objs_diffraction[i].append(None)
else: interaction_objs_diffraction[i].append('unknown')
else:
interaction_objs_diffraction[i].append(material)
for i in range(0, num_diff):
row = []
for j in range(0, len(path_interactions)):
row.append(interaction_objs_diffraction[j][i])
path_interaction_route_diff.append(row) the output for all the diffraction elements comes out to be none, where as I get the values for reflection and scattering. I manually tried to search the elements by their id in the scene.objects.id, but there were not there as well. |
Beta Was this translation helpful? Give feedback.
Hi @itsghaniz ,
Currently, there is no built-in feature that directly provides the angles of incidence, reflection, or propagation distances/delays at intersection points. However, you can compute these quantities using the available data.
The trace_paths() function returns a set of Paths and PathsTmpData. The Paths.vertices property gives you access to the intersection points within the scene. Additionally, PathsTmpData.normals, PathsTmpData.k_i, and PathsTmpData.k_r provide the normals, direction of incidence, and direction of reflection at these intersection points, respectively. Using these properties, you can calculate the angles of incidence and reflection, as well as the propagatio…