sage.data.waveform.distributions.snr_rescaling

Filename : snr_rescaling.py Description : Short description of the file

Created on 2026-03-10 03:59:41

__author__ = Narenraju Nagarajan __copyright__ = Copyright 2026, ProjectName __license__ = MIT Licence __version__ = 0.0.1 __maintainer__ = Narenraju Nagarajan __affiliation__ = N/A __email__ = N/A __status__ = [‘inProgress’, ‘Archived’, ‘inUsage’, ‘Debugging’]

GitHub Repository: NULL

Documentation: NULL

Classes

HalfNorm

Half-normal SNR sampler.

Module Contents

class HalfNorm(scale=1.0, loc=0.0, seed=None)[source]

Bases: torch.nn.Module

Half-normal SNR sampler.

Draws target network SNR values from a half-normal distribution |N(loc, scale²)|. Used as the target_snr_sampler argument to OptimalSNRRescaler.

The generator is seeded once at construction so SNR draws are reproducible across runs with the same seed.

Parameters:
  • scale (float) – Scale parameter of the half-normal (default 1.0).

  • loc (float) – Location shift added after folding (default 0.0).

  • seed (int or None) – Seed for the internal torch.Generator.

  • state (Initialize internal Module)

  • ScriptModule. (shared by both nn.Module and)

gen[source]
forward(batch_size)[source]
Parameters:

batch_size (int)