Skip to content
Snippets Groups Projects
Commit c985ffba authored by Stefano Di Frischia's avatar Stefano Di Frischia
Browse files

L2SS-1200: improve docs

parent 83280ed5
Branches
Tags
1 merge request!540L2SS-1200: add rcu_id and rcu_version
...@@ -1747,19 +1747,25 @@ class AntennaToRecvMapper(object): ...@@ -1747,19 +1747,25 @@ class AntennaToRecvMapper(object):
mapped_values = numpy.array(default_values) mapped_values = numpy.array(default_values)
# If mapping is based on only one map, then insert the value
# provided by the map
if len(value_mapping) == 1: if len(value_mapping) == 1:
for idx, mapping in enumerate(value_mapping[0]): for idx, mapping in enumerate(value_mapping[0]):
recv = mapping[0] recv = mapping[0]
rcu = mapping[1] rcu = mapping[1]
if recv > 0: if recv > 0:
mapped_values[idx] = recv_results[recv - 1][rcu] mapped_values[idx] = recv_results[recv - 1][rcu]
# If mapping is based on both power and control maps
if len(value_mapping) == 2: if len(value_mapping) == 2:
# Assuming mapper lists are always in the following order: # Assuming mapper lists are always in the following order:
# [Control_Mapping, Power_Mapping] # [Control_Mapping, Power_Mapping]
[control_mapping, power_mapping] = value_mapping [control_mapping, power_mapping] = value_mapping
for idx, mapping in enumerate(control_mapping): for idx, mapping in enumerate(control_mapping):
# Store index and values of both mappings
[recv_control, rcu_control] = mapping [recv_control, rcu_control] = mapping
[recv_power, rcu_power] = power_mapping[idx] [recv_power, rcu_power] = power_mapping[idx]
# Insert the two values in the mapped array
# as (rcu_control_val, rcu_power_val)
if recv_control > 0: if recv_control > 0:
mapped_values[idx][0] = recv_results[recv_control - 1][rcu_control] mapped_values[idx][0] = recv_results[recv_control - 1][rcu_control]
if recv_power > 0: if recv_power > 0:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment