torchsig.signals.builders.fsk.fsk_modulator¶
- torchsig.signals.builders.fsk.fsk_modulator(constellation_size: int, fsk_type: str, bandwidth: float, sample_rate: float, num_samples: int, rng: Generator | None = None) ndarray[source]¶
FSK modulator.
- Parameters:
constellation_size – Number of points in the constellation.
fsk_type – Type of FSK modulation (‘fsk’, ‘gfsk’, ‘msk’, ‘gmsk’).
bandwidth – Desired 3 dB bandwidth of the signal (Hz).
sample_rate – Sampling rate for the IQ signal (Hz).
num_samples – Number of IQ samples to produce.
rng – Random number generator for reproducibility. If None, creates a new default generator.
- Returns:
FSK modulated signal at the appropriate bandwidth.
- Return type:
np.ndarray
- Raises:
ValueError – If bandwidth or sample_rate are not positive.
ValueError – If bandwidth exceeds sample_rate/2.
ValueError – If num_samples is not positive.