comnum.OwcImpulseResponse#

class comnum.OwcImpulseResponse#

The received optical power of an indoor channel, bin by bin (see OwcIllumination.impulse_responses).

bandwidth_3db_hz(step_hz=100000.0, max_hz=1000000000.0)#

The −3 dB bandwidth (Hz): the first frequency at which |H(f)|/H(0) falls to 10^(-3/20).

Parameters:
  • step_hz (float) – the step of the search (Hz), refined by bisection.

  • max_hz (float) – the largest frequency searched (Hz).

Returns:

the bandwidth, or None if |H| does not fall within max_hz.

Return type:

float | None

bit_split(bit_s, origin_s)#

The power of on–off keying with rectangular pulses of bit_s received inside the bit started at origin_s and after it (Komine & Nakagawa 2004, eqs. (17), (19)).

Parameters:
  • bit_s (float) – the duration of a bit (s).

  • origin_s (float) – the start of the bit (s), usually first_arrival_s().

Returns:

(signal, intersymbol interference) (W).

Return type:

tuple[float, float]

first_arrival_s()#

The start of the first bin that holds power (s); None for no power.

Returns:

the time (s).

Return type:

float | None

frequency_response(f_hz)#

The frequency response H(f) = Σ P_i exp(-j2πf(i + ½)Δt) (Barry et al. 1993, eq. (15)).

Parameters:

f_hz (array_like) – the frequencies (Hz).

Returns:

H(f) (complex128).

Return type:

numpy.ndarray

Raises:

ValueError – for an input that is not an array of numbers of the expected shape.

total_w()#

The total received power (W), the DC gain for an emitter of 1 W.

Returns:

the power (W).

Return type:

float

bin_s#

The width of the time bins (s).

Type:

float

power_w#

The power received in each bin (W), for the powers of the emitters.

Type:

numpy.ndarray