Partial Level
- After calculation the partial levels at receivers can be accessed. For this purpose the iterator
partlev() is available which returns four values: the internal object reference as well as the day, evening and night level spectrum. Each spectrum contains up to nine values (from 31.5 Hz to 8000 Hz). The iterator accepts two optional string parameters: active_only just returns calculated levels being valid (default: all levels) and octave advices the iterator to return octave values. Alternatively, instead of octave the expression lmax can be used to address maximum levels.
- The spectrum
x can be accessed by one of the following methods using the index i for reading: x[i], x.getLinear(i), x.getA(i), where the first two methods return the linear (unweighted) level and the latter the A-weighted level.
- example returning the A-weighted spectrum at receiver
imm:
local function print_spectrumA(imm)
local q,d,e,n
for q,d,e,n in imm:partlev("octave", "active_only") do
for i=1,9,1 do -- 1 = 31.5Hz ... 9 = 8000Hz
cna.print("A: " .. d:getA(i))
end
end
end