AcousticMetrics.AbstractNarrowbandSpectrumType
AbstractNarrowbandSpectrum{IsEven,IsTonal,Tel} <: AbstractVector{Tel}

Supertype for a generic narrowband acoustic metric which will behave as an immutable AbstractVector of element type Tel.

The IsEven parameter is a Bool indicating if the length of the spectrum is even or not, affecting how the Nyquist frequency is calculated. IsTonal indicates how the acoustic energy is distributed through the frequency bands:

  • IsTonal == false means the acoustic energy is assumed to be evenly distributed thoughout each band
  • IsTonal == true means the acoustic energy is assumed to be concentrated at each band center
AcousticMetrics.AbstractPressureTimeHistoryType
AbstractPressureTimeHistory{IsEven}

Supertype for a pressure time history, i.e., pressure as a function of time defined on evenly-spaced time samples.

The IsEven parameter is a Bool indicating if the length of the pressure time history is even or not.

AcousticMetrics.AbstractProportionalBandsType
AbstractProportionalBands{NO,LCU,TF} <: AbstractVector{TF}

Abstract type representing the exact proportional frequency bands with band fraction NO and eltype TF.

The LCU parameter can take one of three values:

  • :lower: The struct returns the lower edges of each frequency band.
  • :center: The struct returns the center of each frequency band.
  • :upper: The struct returns the upper edges of each frequency band.
AcousticMetrics.ApproximateOctaveBandsType
ApproximateOctaveBands{LCU,TF} <: AbstractProportionalBands{1,LCU,TF}

Representation of the approximate octave proportional frequency bands with eltype TF.

The LCU parameter can take one of three values:

  • :lower: The struct returns the lower edges of each frequency band.
  • :center: The struct returns the center of each frequency band.
  • :upper: The struct returns the upper edges of each frequency band.
AcousticMetrics.ApproximateOctaveBandsMethod
ApproximateOctaveBands{LCU,TF}(bstart::Int, bend::Int)

Construct an ApproximateOctaveBands with eltype TF encomposing band index numbers from bstart to bend.

The "standard" band frequencies will be scaled by scaler, e.g. if scaler = 0.5 then what would normally be the 1000 Hz frequency will be 500 Hz, etc..

AcousticMetrics.ApproximateOctaveBandsMethod
ApproximateOctaveBands{LCU}(fstart::TF, fend::TF, scaler=1)

Construct an ApproximateOctaveBands with eltype TF, scaled by scaler, encomposing the bands needed to completely extend over minimum frequency fstart and maximum frequency fend.

AcousticMetrics.ApproximateThirdOctaveBandsType
ApproximateThirdOctaveBands{LCU,TF} <: AbstractProportionalBands{3,LCU,TF}

Representation of the approximate third-octave proportional frequency bands with eltype TF.

The LCU parameter can take one of three values:

  • :lower: The struct returns the lower edges of each frequency band.
  • :center: The struct returns the center of each frequency band.
  • :upper: The struct returns the upper edges of each frequency band.
AcousticMetrics.ApproximateThirdOctaveBandsMethod
ApproximateThirdOctaveBands{LCU}(TF=Float64, bstart::Int, bend::Int, scaler=1)

Construct an ApproximateThirdOctaveBands with eltype TF encomposing band index numbers from bstart to bend.

The "standard" band frequencies will be scaled by scaler, e.g. if scaler = 0.5 then what would normally be the 1000 Hz frequency will be 500 Hz, etc..

AcousticMetrics.ApproximateThirdOctaveBandsMethod
ApproximateThirdOctaveBands{LCU}(fstart::TF, fend::TF, scaler=1)

Construct an ApproximateThirdOctaveBands with eltype TF, scaled by scaler, encomposing the bands needed to completely extend over minimum frequency fstart and maximum frequency fend.

AcousticMetrics.ExactProportionalBandsType
ExactProportionalBands{NO,LCU,TF} <: AbstractProportionalBands{NO,LCU,TF}

Representation of the exact proportional frequency bands with band fraction NO and eltype TF.

The LCU parameter can take one of three values:

  • :lower: The struct returns the lower edges of each frequency band.
  • :center: The struct returns the center of each frequency band.
  • :upper: The struct returns the upper edges of each frequency band.
AcousticMetrics.ExactProportionalBandsMethod
ExactProportionalBands{NO,LCU}(TF=Float64, bstart::Int, bend::Int, scaler=1)

Construct an ExactProportionalBands with eltype TF encomposing band index numbers from bstart to bend.

The "standard" band frequencies will be scaled by scaler, e.g. if scaler = 0.5 then what would normally be the 1000 Hz frequency will be 500 Hz, etc..

AcousticMetrics.ExactProportionalBandsMethod
ExactProportionalBands{NO,LCU}(fstart::TF, fend::TF, scaler)

Construct an ExactProportionalBands with eltype TF, scaled by scaler, encomposing the bands needed to completely extend over minimum frequency fstart and maximum frequency fend.

AcousticMetrics.LazyNBProportionalBandSpectrumType
LazyNBProportionalBandSpectrum{NO,IsTonal,TF,TAmp,TBandsC}

Lazy representation of a proportional band spectrum with octave fraction NO and eltype TF constructed from a narrowband (NB) spectrum.

IsTonal indicates how the acoustic energy is distributed through the narrow frequency bands:

  • IsTonal == false means the acoustic energy is assumed to be evenly distributed thoughout each band
  • IsTonal == true means the acoustic energy is assumed to be concentrated at each band center
AcousticMetrics.LazyNBProportionalBandSpectrumMethod
LazyNBProportionalBandSpectrum(sm::AbstractNarrowbandSpectrum, cbands::AbstractProportionalBands{NO,:center})

Construct a LazyNBProportionalBandSpectrum using proportional centerbands cbands and narrowband spectrum sm. The proportional band frequencies will be scaled by scaler.

AcousticMetrics.LazyNBProportionalBandSpectrumMethod
LazyNBProportionalBandSpectrum(TBands::Type{<:AbstractProportionalBands}, sm::AbstractNarrowbandSpectrum, scaler=1)

Construct a LazyNBProportionalBandSpectrum using a proportional band TBands and narrowband spectrum sm, and optional frequency scaler scaler. The proportional band frequencies will be scaled by scaler.

AcousticMetrics.LazyNBProportionalBandSpectrumMethod
LazyNBProportionalBandSpectrum{NO,IsTonal}(f1_nb, df_nb, msp_amp, cbands::AbstractProportionalBands{NO,:center})

Construct a lazy representation of a proportional band spectrum with proportional center bands cbands from a narrowband spectrum.

The narrowband frequencies are defined by the first narrowband frequency f1_nb and the narrowband frequency spacing df_nb. msp_amp is the spectrum of narrowband mean squared pressure amplitude.

IsTonal indicates how the acoustic energy is distributed through the narrow frequency bands:

  • IsTonal == false means the acoustic energy is assumed to be evenly distributed thoughout each band
  • IsTonal == true means the acoustic energy is assumed to be concentrated at each band center
AcousticMetrics.LazyNBProportionalBandSpectrumMethod
LazyNBProportionalBandSpectrum(f1_nb, df_nb, msp_amp, cbands::AbstractProportionalBands{NO,:center}, istonal=false)

Construct a lazy representation of a proportional band spectrum with proportional center bands cbands from a narrowband spectrum.

The narrowband frequencies are defined by the first narrowband frequency f1_nb and the narrowband frequency spacing df_nb. msp_amp is the spectrum of narrowband mean squared pressure amplitude.

istonal indicates how the acoustic energy is distributed through the narrow frequency bands:

  • istonal == false means the acoustic energy is assumed to be evenly distributed thoughout each band
  • istonal == true means the acoustic energy is assumed to be concentrated at each band center
AcousticMetrics.LazyNBProportionalBandSpectrumMethod
LazyNBProportionalBandSpectrum(TBands::Type{<:AbstractProportionalBands}, f1_nb, df_nb, msp_amp, scaler=1, istonal::Bool=false)

Construct a LazyNBProportionalBandSpectrum using proportional bands TBands and narrowband mean squared pressure amplitude vector msp_amp and optional proportional band frequency scaler scaler.

f1_nb is the first non-zero narrowband frequency, and df_nb is the narrowband frequency spacing. The istonal Bool argument, if true, indicates the narrowband spectrum is tonal and thus concentrated at discrete frequencies. If false, the spectrum is assumed to be constant over each narrow frequency band. The proportional band frequencies will be scaled by scaler.

AcousticMetrics.LazyNBProportionalBandSpectrumMethod
LazyNBProportionalBandSpectrum{NO,IsTonal}(TBands::Type{<:AbstractProportionalBands{NO}}, f1_nb, df_nb, msp_amp, scaler=1)

Construct a lazy representation of a proportional band spectrum with proportional band type TBands from a narrowband spectrum.

The narrowband frequencies are defined by the first narrowband frequency f1_nb and the narrowband frequency spacing df_nb. msp_amp is the spectrum of narrowband mean squared pressure amplitude. The proportional band frequencies will be scaled by scaler.

IsTonal is a Bool indicating how the acoustic energy is distributed through the narrow frequency bands:

  • IsTonal == false means the acoustic energy is assumed to be evenly distributed thoughout each band
  • IsTonal == true means the acoustic energy is assumed to be concentrated at each band center
AcousticMetrics.LazyPBSProportionalBandSpectrumType
LazyPBSProportionalBandSpectrum{NO,TF} <: AbstractProportionalBandSpectrum{NO,TF}

Lazy representation of a proportional band spectrum with octave fraction NO and eltype TF constructed from a different proportional band spectrum.

AcousticMetrics.MSPSpectrumAmplitudeType
MSPSpectrumAmplitude(pth::AbstractPressureTimeHistory, istonal::Bool=false, hc=similar(pressure(pth)))

Construct a narrowband spectrum of the mean-squared pressure amplitude from a pressure time history.

The optional argument hc will be used to store the discrete Fourier transform of the pressure time history, and should have length of inputlength(pth). The istonal Bool argument, if true, indicates the pressure spectrum is tonal and thus concentrated at discrete frequencies. If false, the spectrum is assumed to be constant over each frequency band.

AcousticMetrics.MSPSpectrumAmplitudeType
MSPSpectrumAmplitude{IsEven,IsTonal,Tel} <: AbstractNarrowbandSpectrum{IsEven,IsTonal,Tel}

Representation of mean-squared pressure amplitude as a function of narrowband frequency.

The IsEven parameter is a Bool indicating if the length of the spectrum is even or not, affecting how the Nyquist frequency is calculated. The IsTonal Bool parameter, if true, indicates the mean-squared pressure spectrum is tonal and thus concentrated at discrete frequencies. If false, the pressure spectrum is assumed to be constant over each frequency band.

AcousticMetrics.MSPSpectrumAmplitudeType
MSPSpectrumAmplitude(hc, dt, t0=zero(dt), istonal::Bool=false)

Construct a narrowband spectrum of the mean-squared pressure amplitude from the discrete Fourier transform in half-complex format hc, time step size dt, and initial time t0. The istonal Bool argument, if true, indicates the pressure spectrum is tonal and thus concentrated at discrete frequencies. If false, the spectrum is assumed to be constant over each frequency band.

AcousticMetrics.MSPSpectrumAmplitudeMethod
MSPSpectrumAmplitude(sm::AbstractNarrowbandSpectrum)

Construct a narrowband spectrum of the mean-squared pressure amplitude from another narrowband spectrum.

AcousticMetrics.PowerSpectralDensityAmplitudeType
PowerSpectralDensityAmplitude(hc, dt, t0=zero(dt))

Construct a narrowband spectrum of the power spectral density amplitude from the discrete Fourier transform in half-complex format hc, time step size dt, and initial time t0.

AcousticMetrics.PowerSpectralDensityAmplitudeType
PowerSpectralDensityAmplitude(pth::AbstractPressureTimeHistory, hc=similar(pressure(pth)))

Construct a narrowband spectrum of the power spectral density amplitude from a pressure time history.

The optional argument hc will be used to store the discrete Fourier transform of the pressure time history, and should have length of inputlength(pth).

AcousticMetrics.PowerSpectralDensityAmplitudeType
PowerSpectralDensityAmplitude{IsEven,Tel} <: AbstractNarrowbandSpectrum{IsEven,false,Tel}

Representation of acoustic power spectral density amplitude as a function of narrowband frequency.

The IsEven parameter is a Bool indicating if the length of the spectrum is even or not, affecting how the Nyquist frequency is calculated. As the power spectral density is not well-defined for tones, the IsTonal parameter is always false.

AcousticMetrics.PressureSpectrumAmplitudeType
PressureSpectrumAmplitude(pth::AbstractPressureTimeHistory, istonal::Bool=false, hc=similar(pressure(pth)))

Construct a narrowband spectrum of the pressure amplitude from a pressure time history.

The optional argument hc will be used to store the discrete Fourier transform of the pressure time history, and should have length of inputlength(pth). The istonal Bool argument, if true, indicates the pressure spectrum is tonal and thus concentrated at discrete frequencies. If false, the spectrum is assumed to be constant over each frequency band.

AcousticMetrics.PressureSpectrumAmplitudeType
PressureSpectrumAmplitude{IsEven,IsTonal,Tel} <: AbstractNarrowbandSpectrum{IsEven,IsTonal,Tel}

Representation of acoustic pressure amplitude as a function of narrowband frequency.

The IsEven parameter is a Bool indicating if the length of the spectrum is even or not, affecting how the Nyquist frequency is calculated. The IsTonal Bool parameter, if true, indicates the pressure spectrum is tonal and thus concentrated at discrete frequencies. If false, the spectrum is assumed to be constant over each frequency band.

AcousticMetrics.PressureSpectrumAmplitudeType
PressureSpectrumAmplitude(hc, dt, t0=zero(dt), istonal::Bool=false)

Construct a narrowband spectrum of the pressure amplitude from the discrete Fourier transform in half-complex format hc, time step size dt, and initial time t0. The istonal Bool argument, if true, indicates the pressure spectrum is tonal and thus concentrated at discrete frequencies. If false, the spectrum is assumed to be constant over each frequency band.

AcousticMetrics.PressureSpectrumPhaseType
PressureSpectrumPhase(pth::AbstractPressureTimeHistory, istonal::Bool=false, hc=similar(pressure(pth)))

Construct a narrowband spectrum of the pressure phase from a pressure time history.

The optional argument hc will be used to store the discrete Fourier transform of the pressure time history, and should have length of inputlength(pth). The istonal Bool argument, if true, indicates the pressure spectrum is tonal and thus concentrated at discrete frequencies. If false, the spectrum is assumed to be constant over each frequency band.

AcousticMetrics.PressureSpectrumPhaseType
PressureSpectrumPhase{IsEven,IsTonal,Tel} <: AbstractNarrowbandSpectrum{IsEven,IsTonal,Tel}

Representation of acoustic pressure phase as a function of narrowband frequency.

The IsEven parameter is a Bool indicating if the length of the spectrum is even or not, affecting how the Nyquist frequency is calculated. The IsTonal Bool parameter, if true, indicates the phase spectrum is tonal and thus concentrated at discrete frequencies. If false, the spectrum is assumed to be constant over each frequency band.

AcousticMetrics.PressureSpectrumPhaseType
PressureSpectrumPhase(hc, dt, t0=zero(dt), istonal::Bool=false)

Construct a narrowband spectrum of the pressure phase from the discrete Fourier transform in half-complex format hc, time step size dt, and initial time t0.

AcousticMetrics.PressureSpectrumPhaseMethod
PressureSpectrumPhase(sm::AbstractNarrowbandSpectrum)

Construct a narrowband spectrum of the pressure phase from another narrowband spectrum.

AcousticMetrics.PressureTimeHistoryType
PressureTimeHistory(p, dt, t0=zero(dt))

Construct a PressureTimeHistory from a vector of pressures p, time spacing dt, and initial time t0.

AcousticMetrics.PressureTimeHistoryType
PressureTimeHistory(sm::AbstractNarrowbandSpectrum, p=similar(halfcomplex(sm)))

Construct a pressure time history from a narrowband spectrum sm.

The optional p argument will be used to store the pressure vector of the pressure time history, and should have length inputlength(sm).

AcousticMetrics.PressureTimeHistoryType
PressureTimeHistory{IsEven} <: AbstractPressureTimeHistory{IsEven}

Pressure as a function of time defined on evenly-spaced time samples.

The IsEven parameter is a Bool indicating if the length of the pressure time history is even or not.

AcousticMetrics.ProportionalBandSpectrumMethod
ProportionalBandSpectrum(TBandsC, cfreq_start, pbs, scaler=1)

Construct a ProportionalBandSpectrum from an array of proportional band amplitudes and proportional band type TBandsC.

cfreq_start is the centerband frequency corresponding to the first entry of pbs. The proportional band frequencies indicated by TBandsC are multiplied by scaler.

AcousticMetrics.ProportionalBandSpectrumWithTimeMethod
ProportionalBandSpectrumWithTime(pbs, cbands::AbstractProportionalBands{NO,:center}, dt, t)

Construct a proportional band spectrum from mean-squared pressure amplitudes pbs and centerband frequencies cbands, defined to exist over time range dt and at observer time t.

AcousticMetrics.OASPLMethod
OASPL(ap::AbstractNarrowbandSpectrum)

Return the overall sound pressure level of a narrowband spectrum.

AcousticMetrics.OASPLMethod
OASPL(ap::AbstractPressureTimeHistory)

Return the overall sound pressure level of a pressure time history.

AcousticMetrics.W_AMethod
W_A(f::AbstractFloat)

Calculate the A-weighting factor for a frequency f in Hertz.

Taken from the ANOPP2 Acoustics Analysis API Reference Manual.

AcousticMetrics.amplitudeMethod
amplitude(pbs::AbstractProportionalBandSpectrum)

Return the underlying Vector containing the proportional band spectrum amplitudes contained in pbs.

AcousticMetrics.band_endMethod
band_end(bands::AbstractProportionalBands)

Return the standard band index number for the last band in bands.

For example, it happens that the approximate octave center bands includes 1000 Hz, and that particular band is numbered 10. So if the last band contained in bands happens to be 1000 Hz (and freq_scaler(bands) == 1.0), then band_end(bands) == 10. Not particularly useful to a user.

AcousticMetrics.band_startMethod
band_start(bands::AbstractProportionalBands)

Return the standard band index number for the first band in bands.

For example, it happens that the approximate octave center bands includes 1000 Hz, and that particular band is numbered 10. So if the first band contained in bands happens to be 1000 Hz (and freq_scaler(bands) == 1.0), then band_start(bands) == 10. Not particularly useful to a user.

AcousticMetrics.cband_numberMethod
cband_number(bands::AbstractProportionalBands, fc)

Return the standard band index number of the band with center frequency fc for proportional bands bands.

For example, if bands is a subtype of ApproximateOctaveBands and freq_scaler(bands) == 1.0, then cband_number(bands, 1000.0) == 10.

AcousticMetrics.center_bandsMethod
center_bands(pbs::AbstractProportionalBandSpectrum)

Return the centers of the proportional bands associated with the proportional band spectrum pbs.

AcousticMetrics.center_bandsMethod
center_bands(bands::ApproximateOctaveBands{LCU,TF}, scaler=freq_scaler(bands))

Construct and return the centers of the proportional bands bands scaled by scaler.

AcousticMetrics.center_bandsMethod

centerbands(bands::ApproximateThirdOctaveBands{LCU,TF}, scaler=freqscaler(bands)) where {LCU,TF}

Construct and return the centers of the proportional bands bands scaled by scaler.

AcousticMetrics.center_bandsMethod

centerbands(bands::ExactProportionalBands{NO,LCU,TF}, scaler=freqscaler(bands)) where {NO,TF}

Construct and return the centers of the proportional bands bands scaled by scaler.

AcousticMetrics.center_bandsMethod

center_bands(TBands::Type{<:AbstractProportionalBands{NO}}, fstart::TF, fend::TF, scaler=1) where {NO,TF}

Construct and return the centers of the proportional bands TBands, scaled by scaler, that would fully encompass a frequency range beginning with fstart and ending with fend.

AcousticMetrics.combineMethod
combine(pbs::AbstractArray{<:AbstractProportionalBandSpectrum}, outcbands::AbstractProportionalBands{NO,:center}, time_axis=1) where {NO}

Combine each input proportional band spectrum of pbs into one output proportional band spectrum using the proportional center bands indicated by outcbands.

time_axis is an integer indicating the axis of the pbs array along which time varies. For example, if time_axis == 1 and pbs is a three-dimensional array, then apth[:, i, j] would be proportional band spectrum of source i, j for all time. But if time_axis == 3, then pbs[i, j, :] would be the proportional band spectrum of source i, j for all time.

AcousticMetrics.freq_scalerMethod
freq_scaler(pbs::AbstractProportionalBandSpectrum)

Return the factor each "standard" frequency band associated with the proportional band spectrum pbs is scaled by.

For example, the approximate octave center bands include 1000 Hz, 2000 Hz, and 4000 Hz. If freq_scaler(pbs) == 1.0, then these frequencies would be unchanged. If freq_scaler(pbs) == 1.5, then bands would include 1500 Hz, 3000 Hz, and 6000 Hz instead. If freq_scaler(pbs) == 0.5, then bands would include 500 Hz, 1000 Hz, and 2000 Hz in place of 1000 Hz, 2000 Hz, and 4000 Hz.

AcousticMetrics.freq_scalerMethod
freq_scaler(bands::AbstractProportionalBands)

Return the factor each "standard" frequency band is scaled by.

For example, the approximate octave center bands include 1000 Hz, 2000 Hz, and 4000 Hz. If freq_scaler(bands) == 1.0, then these frequencies would be unchanged. If freq_scaler(bands) == 1.5, then bands would include 1500 Hz, 3000 Hz, and 6000 Hz instead. If freq_scaler(bands) == 0.5, then bands would include 500 Hz, 1000 Hz, and 2000 Hz in place of 1000 Hz, 2000 Hz, and 4000 Hz.

AcousticMetrics.frequencyMethod
frequency(sm::AbstractNarrowbandSpectrum)

Return a vector of frequencies associated with the narrowband spectrum.

The frequencies are calculated using the rfftfreq function in the FFTW.jl package.

AcousticMetrics.frequency_nbMethod
frequency_nb(pbs::LazyNBProportionalBandSpectrum)

Return the narrowband frequencies associated with the underlying narrowband spectrum contained in pbs.

AcousticMetrics.frequencystepMethod
frequencystep(sm::AbstractNarrowbandSpectrum)

Return the frequency step size Δf associated with the narrowband spectrum.

AcousticMetrics.halfcomplexMethod
halfcomplex(sm::AbstractNarrowbandSpectrum)

Return a vector of the discrete Fourier transform of the pressure time history in half-complex format.

See the FFTW docs for the definition of the halfcomplex format.

AcousticMetrics.has_observer_timeMethod
has_observer_time(pbs::AbstractProportionalBandSpectrum)

Return true if the proportional band spectrum is defined to exist over a limited time, false otherwise.

AcousticMetrics.inputlengthMethod
inputlength(sm::AbstractNarrowbandSpectrum)

Return a number of pressure time samples associated with a narrowband spectrum.

This is also the length of the discrete Fourier transform associated with the spectrum in half-complex format.

AcousticMetrics.inputlengthMethod
inputlength(pth::AbstractPressureTimeHistory)

Return a number of pressure samples associated with a pressure time history.

AcousticMetrics.irfft!Function
irfft!(y, x, cache=nothing)

Calculate the inverse FFT of `x` and store the result in in `y`, where `x` is in the half-complex format.

Just a wrapper of `FFTW.r2r!(y, FFTW.HC2R)`. The `cache` argument is
optional and not used, and is included to keep the function signiture the
same as the method that takes `Vector`s of `Dual`s.
AcousticMetrics.istonalMethod
istonal(sm::AbstractNarrowbandSpectrum)

Return true if the spectrum is tonal, false otherwise.

AcousticMetrics.lazy_pbsFunction
lazy_pbs(pbs, cbands::AbstractProportionalBands{NO,:center})

Construct a lazy proportional band spectrum on proportional center bands cbands using the proportional band spectrum pbs.

AcousticMetrics.lower_bandsMethod
lower_bands(pbs::AbstractProportionalBandSpectrum)

Return the lower edges of the proportional bands associated with the proportional band spectrum pbs.

AcousticMetrics.lower_bandsMethod
lower_bands(bands::ApproximateOctaveBands{LCU,TF}, scaler=freq_scaler(bands))

Construct and return the lower edges of the proportional bands bands scaled by scaler.

AcousticMetrics.lower_bandsMethod

lowerbands(bands::ApproximateThirdOctaveBands{LCU,TF}, scaler=freqscaler(bands)) where {LCU,TF}

Construct and return the lower edges of the proportional bands bands scaled by scaler.

AcousticMetrics.lower_bandsMethod

lowerbands(bands::ExactProportionalBands{NO,LCU,TF}, scaler=freqscaler(bands)) where {NO,TF}

Construct and return the lower edges of the proportional bands bands scaled by scaler.

AcousticMetrics.lower_bandsMethod

lower_bands(TBands::Type{<:AbstractProportionalBands{NO}}, fstart::TF, fend::TF, scaler=1) where {NO,TF}

Construct and return the lower edges of the proportional bands TBands, scaled by scaler, that would fully encompass a frequency range beginning with fstart and ending with fend.

AcousticMetrics.lower_center_upperMethod
lower_center_upper(bands::AbstractProportionalBands{NO,LCU,TF}) where {NO,LCU,TF}

Return LCU, which can be either :lower, :center, :upper, indicating if bands represents the lower edges, centers, or upper edges of proportional bands, respectively.

AcousticMetrics.observer_timeMethod
observer_time(pbs::AbstractProportionalBandSpectrum)

Return the observer time at which the proportional band spectrum is defined to exist.

AcousticMetrics.octave_fractionMethod
octave_fraction(pbs::AbstractProportionalBandSpectrum{NO}) where {NO}

Return NO, the "octave fraction," e.g. 1 for octave bands, 3 for third-octave, 12 for twelfth-octave.

AcousticMetrics.octave_fractionMethod
octave_fraction(bands::AbstractProportionalBands{NO}) where {NO}

Return NO, the "octave fraction," e.g. 1 for octave bands, 3 for third-octave, 12 for twelfth-octave.

AcousticMetrics.pressureMethod
pressure(pth::AbstractPressureTimeHistory)

Return a vector of pressures associated with a pressure time history.

AcousticMetrics.rfft!Function
rfft!(y, x, cache=nothing)

Calculate the real-input FFT of `x` and store the result in half-complex format in `y`.

Just a wrapper of `FFTW.r2r!(y, FFTW.R2HC)`. The `cache` argument is
optional and not used, and is included to keep the function signiture the
same as the method that takes `Vector`s of `Dual`s.
AcousticMetrics.samplerateMethod
samplerate(sm::AbstractNarrowbandSpectrum)

Return the sample rate (aka the inverse of the time step size) associated with a narrowband spectrum.

AcousticMetrics.starttimeMethod
starttime(sm::AbstractNarrowbandSpectrum)

Return the initial time t0 associated with a pressure time history.

AcousticMetrics.starttimeMethod
starttime(pth::AbstractPressureTimeHistory)

Return the initial time t0 associated with a pressure time history.

AcousticMetrics.timeMethod
time(pth::AbstractPressureTimeHistory)

Return a vector of times associated with a pressure time history.

AcousticMetrics.time_periodMethod
time_period(pbs::AbstractArray{<:AbstractProportionalBandSpectrum})

Find the period of time over which the collection of proportional band spectrum pbs exists.

AcousticMetrics.time_scalerMethod
time_scaler(pbs::AbstractProportionalBandSpectrum{NO,TF}, period)

Find the scaling factor appropriate to multiply the proportional band spectrum pbs by that accounts for the duration of time the spectrum exists.

This is used when combining multiple proportional band spectra with the combine function.

AcousticMetrics.timestepMethod
timestep(sm::AbstractNarrowbandSpectrum)

Return the time step size dt associated with a narrowband spectrum.

AcousticMetrics.timestepMethod
timestep(pth::AbstractPressureTimeHistory)

Return the time step size dt associated with a pressure time history.

AcousticMetrics.timestepMethod
timestep(pbs::AbstractProportionalBandSpectrum)

Return the time range over which the proportional band spectrum is defined to exist.

AcousticMetrics.upper_bandsMethod
upper_bands(pbs::AbstractProportionalBandSpectrum)

Return the upper edges of the proportional bands associated with the proportional band spectrum pbs.

AcousticMetrics.upper_bandsMethod
upper_bands(bands::ApproximateOctaveBands{LCU,TF}, scaler=freq_scaler(bands))

Construct and return the upper edges of the proportional bands bands scaled by scaler.

AcousticMetrics.upper_bandsMethod

upperbands(bands::ApproximateThirdOctaveBands{LCU,TF}, scaler=freqscaler(bands)) where {LCU,TF}

Construct and return the upper edges of the proportional bands bands scaled by scaler.

AcousticMetrics.upper_bandsMethod

upperbands(bands::ExactProportionalBands{NO,LCU,TF}, scaler=freqscaler(bands)) where {NO,TF}

Construct and return the upper edges of the proportional bands bands scaled by scaler.

AcousticMetrics.upper_bandsMethod

upper_bands(TBands::Type{<:AbstractProportionalBands{NO}}, fstart::TF, fend::TF, scaler=1) where {NO,TF}

Construct and return the upper edges of the proportional bands TBands, scaled by scaler, that would fully encompass a frequency range beginning with fstart and ending with fend.