Skip to content

Conversation

@paganol
Copy link
Member

@paganol paganol commented Jan 29, 2026

Description

This PR introduces an interface with the ducc0 noise generation module, offering a significant performance boost for long timelines. It refactors the noise.py module to support multiple noise generation engines and physical models, while improving documentation and defaulting to the standard FFT-based approach for backward compatibility.

Key Changes

New Noise Engines & Models:

  • Added support for engine="ducc", which uses ducc0.misc.OofaNoise for time-domain filtering. This is faster and more memory-efficient for long simulations.
  • Added support for model="keshner" (native to DUCC) alongside the existing model="toast", which implements the model in toast.
  • Refactored add_one_over_f_noise to dispatch between fft (default) and ducc engines.

API Updates:

  • add_noise_to_observations and underlying functions now accept engine and model arguments.
  • Defaults: The defaults remain engine="fft" and model="toast" to ensure backward compatibility.
  • Validation: Added safety checks to prevent mismatched engine/model combinations (e.g., raising a ValueError if engine="ducc" is used with model="toast").

@paganol paganol added the enhancement New feature or request label Jan 29, 2026
@paganol paganol linked an issue Jan 29, 2026 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ducc0 for noise.py and other applications of FFT

2 participants