radiocore.analog package

Submodules

radiocore.analog.decimator module

radiocore.analog.mfm module

Defines a broadcast Mono-FM demodulator module.

class radiocore.analog.mfm.MFM(input_size: Union[int, float], output_size: Union[int, float], deemphasis: float = 7.5e-05, cuda: bool = False)

Bases: radiocore._internal.injector.Injector

The MFM class provides a Mono demodulator for FM signals.

For stereo FM-stations, use the WBFM class. For simple FM demodulation, use the FM class.

input_sizeint, float

input signal buffer size

output_sizeint, float

output signal buffer size

deemphasis: float

audio deemphasis rate, 75e-6 for americas, otherwise 50e-6 (default is 75e-6)

cudabool

use the GPU for processing (default is False)

property channels

Return the number of audio channels of the output.

run(input_sig, numpy_output: bool = True)

Demodulate the input signal and output the audio buffer.

input_sigarr

input signal array, size should match the input_size

numpy_output: bool

copy buffer to the cpu if cuda is enabled (default True)

radiocore.analog.pll module

Defines a PLL module.

class radiocore.analog.pll.PLL(cuda: bool = False)

Bases: radiocore._internal.injector.Injector

The PLL class creates a phase-locked signal from an input signal.

This is usefull to change the frequency of a pilot signal. This class is based in the Hilbert transform.

cudabool, optional

use the GPU for processing (default is False)

image(mult: float = 1.0)

Return the imaginary part of the phase-locked signal multiplied by mult.

multint, float

frequency multiplier of the output signal

real(mult: float = 1.0)

Return the real part of the phase-locked signal multiplied by mult.

multint, float

frequency multiplier of the output signal

step(input_sig)

Update the internal state according to the input_sig (arr).

input_sigarr

input signal array

radiocore.analog.wbfm module

Defines a WBFM module.

class radiocore.analog.wbfm.WBFM(input_size: Union[int, float], output_size: Union[int, float], deemphasis: float = 7.5e-05, cuda: bool = False)

Bases: radiocore._internal.injector.Injector

The WBFM class provides a Stereo demodulator for FM signals.

For mono FM-stations, use the MFM class. For simple FM demodulation, use the FM class.

input_sizeint, float

input signal buffer size

output_sizeint, float

output signal buffer size

deemphasis: float

audio deemphasis rate, 75e-6 for americas, otherwise 50e-6 (default is 75e-6)

cudabool

use the GPU for processing (default is False)

property channels

Return the number of audio channels of the output.

run(input_sig, numpy_output: bool = True)

Demodulate the input signal and output the audio buffer.

input_sigarr

input signal array, size should match the input_size

numpy_output: bool

copy buffer to the cpu if cuda is enabled (default True)

Module contents

Imports all modules from radiocore.analog.