torchsig.signals.builders.constellation.constellation_modulator_baseband¶
- torchsig.signals.builders.constellation.constellation_modulator_baseband(constellation_name: str, pulse_shape_name: str, max_num_samples: int, oversampling_rate_nominal: int, alpha_rolloff: float | None = None, rng: Generator | None = None) ndarray[source]¶
Modulates constellation based signals (QAM/PSK/ASK/OOK) at complex baseband.
- Parameters:
constellation_name – Name of the signal to modulate (e.g., ‘qpsk’).
pulse_shape_name – Pulse shaping filter selection (‘rectangular’ or ‘srrc’).
max_num_samples – Maximum number of samples to be produced.
oversampling_rate_nominal – The amount of oversampling (sampling_rate/bandwidth).
alpha_rolloff – The alpha-rolloff value for the SRRC filter (0 < alpha_rolloff < 1).
rng – Random number generator for reproducibility. If None, creates a new default generator.
- Returns:
IQ samples of the constellation-modulated complex baseband signal.
- Return type:
np.ndarray
- Raises:
ValueError – If pulse_shape_name is neither ‘rectangular’ or ‘srrc’.
ValueError – If alpha_rolloff is not defined when selecting ‘srrc’.
ValueError – If max_num_samples or oversampling_rate_nominal are not positive.