Source code for ran.phy.numpy.pusch.measure_rssi
# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""
RSSI measurements for DMRS (NumPy translation of measureRssi.m).
Implements the MATLAB logic used in detPusch.m to compute:
- rssiDb: per-symbol, per-antenna RSSI over allocated PRBs (linear->dB)
- rssiReportedDb: aggregated RSSI across symbols and antennas (dB)
Inputs follow MATLAB naming converted to snake_case and 0-based indexing
conventions are handled internally.
"""
import numpy as np
from ran.types import ComplexArrayNP, FloatArrayNP, FloatNP
from ran.utils import db
__all__ = ["measure_rssi"]