SpectralNoiseFactoryMultiscale

class hcipy.util.SpectralNoiseFactoryMultiscale(psd, output_grid, oversampling)

Bases: SpectralNoiseFactory

A spectral noise factory based on multiscale Fourier transforms.

This factory should provide similar-looking noise compared to SpectralNoiseFactoryFFT, at a fraction of the computational cost. It does this by performing multiscale FTs rather than full-scale FTs. This means that the noise entropy is slightly reduced, however in the vast majority of cases completely invisibly so.

Parameters:
psdField generator

The power spectral density of the noise.

output_gridGrid

The grid on which to compute the noise.

oversamplinginteger

The amount by which to oversample to grid. For values higher than one, the spectral noise can be shifted by that fraction of the grid extent without wrapping.

Methods Summary

make_random([seed])

Make a single realization of the spectral noise.

Methods Documentation

make_random(seed=None)

Make a single realization of the spectral noise.

Parameters:
seedNone, int, array of ints, SeedSequence, BitGenerator, Generator

A seed to initialize the spectral noise. If None, then fresh, unpredictable entry will be pulled from the OS. If an int or array of ints, then it will be passed to a numpy.SeedSequency to derive the initial BitGenerator state. If a BitGenerator or Generator are passed, these will be wrapped and used instead. Default: None.

Returns:
SpectralNoiseMultiscale

A realization of the spectral noise, that can be shifted and evaluated.