# deepinv.physics

This module provides a set of forward operators for various imaging modalities.
Please refer to the [Operators & Noise](https://deepinv.org/user_guide/physics/physics.html.md#physics) section for more details.

## Base Classes

**User Guide:** refer to [Introduction](https://deepinv.org/user_guide/physics/intro.html.md#physics-intro) for more information.

| [`deepinv.physics.Physics`](https://deepinv.org/api/stubs/deepinv.physics.Physics.html.md#deepinv.physics.Physics)                                   | Parent class for forward operators                                 |
|------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------|
| [`deepinv.physics.LinearPhysics`](https://deepinv.org/api/stubs/deepinv.physics.LinearPhysics.html.md#deepinv.physics.LinearPhysics)                       | Parent class for linear operators.                                 |
| [`deepinv.physics.DecomposablePhysics`](https://deepinv.org/api/stubs/deepinv.physics.DecomposablePhysics.html.md#deepinv.physics.DecomposablePhysics)           | Parent class for linear operators with SVD decomposition.          |
| [`deepinv.physics.StackedPhysics`](https://deepinv.org/api/stubs/deepinv.physics.StackedPhysics.html.md#deepinv.physics.StackedPhysics)                     | Stacks multiple physics operators into a single operator.          |
| [`deepinv.physics.StackedLinearPhysics`](https://deepinv.org/api/stubs/deepinv.physics.StackedLinearPhysics.html.md#deepinv.physics.StackedLinearPhysics)         | Stacks multiple linear physics operators into a single operator.   |
| [`deepinv.physics.ComposedPhysics`](https://deepinv.org/api/stubs/deepinv.physics.ComposedPhysics.html.md#deepinv.physics.ComposedPhysics)                   | Composes multiple physics operators into a single operator.        |
| [`deepinv.physics.ComposedLinearPhysics`](https://deepinv.org/api/stubs/deepinv.physics.ComposedLinearPhysics.html.md#deepinv.physics.ComposedLinearPhysics)       | Composes multiple linear physics operators into a single operator. |
| [`deepinv.physics.VirtualLinearPhysics`](https://deepinv.org/api/stubs/deepinv.physics.VirtualLinearPhysics.html.md#deepinv.physics.VirtualLinearPhysics)         | Virtual linear operator                                            |
| [`deepinv.physics.PhysicsMultiScaler`](https://deepinv.org/api/stubs/deepinv.physics.PhysicsMultiScaler.html.md#deepinv.physics.PhysicsMultiScaler)             | Multi-scale wrapper for physics operators.                         |
| [`deepinv.physics.LinearPhysicsMultiScaler`](https://deepinv.org/api/stubs/deepinv.physics.LinearPhysicsMultiScaler.html.md#deepinv.physics.LinearPhysicsMultiScaler) | Multi-scale wrapper for linear physics operators.                  |
| [`deepinv.physics.PhysicsCropper`](https://deepinv.org/api/stubs/deepinv.physics.PhysicsCropper.html.md#deepinv.physics.PhysicsCropper)                     | Cropping for linear physics operators.                             |
| [`deepinv.physics.NoiseModel`](https://deepinv.org/api/stubs/deepinv.physics.NoiseModel.html.md#deepinv.physics.NoiseModel)                             | Base class for noise model.                                        |

## Operators

**User Guide:** refer to [Operators](https://deepinv.org/user_guide/physics/physics.html.md#physics-list) for more information.

| [`deepinv.physics.Denoising`](https://deepinv.org/api/stubs/deepinv.physics.Denoising.html.md#deepinv.physics.Denoising)                                           | Forward operator for denoising problems.                                               |
|------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------|
| [`deepinv.physics.Inpainting`](https://deepinv.org/api/stubs/deepinv.physics.Inpainting.html.md#deepinv.physics.Inpainting)                                         | Inpainting forward operator, keeps a subset of entries.                                |
| [`deepinv.physics.Decolorize`](https://deepinv.org/api/stubs/deepinv.physics.Decolorize.html.md#deepinv.physics.Decolorize)                                         | Converts n-channel images to grayscale.                                                |
| [`deepinv.physics.Demosaicing`](https://deepinv.org/api/stubs/deepinv.physics.Demosaicing.html.md#deepinv.physics.Demosaicing)                                       | Demosaicing operator.                                                                  |
| [`deepinv.physics.Blur`](https://deepinv.org/api/stubs/deepinv.physics.Blur.html.md#deepinv.physics.Blur)                                                     | Blur operator.                                                                         |
| [`deepinv.physics.BlurFFT`](https://deepinv.org/api/stubs/deepinv.physics.BlurFFT.html.md#deepinv.physics.BlurFFT)                                               | FFT-based blur operator.                                                               |
| [`deepinv.physics.SpaceVaryingBlur`](https://deepinv.org/api/stubs/deepinv.physics.SpaceVaryingBlur.html.md#deepinv.physics.SpaceVaryingBlur)                             | Space varying blur via product-convolution.                                            |
| [`deepinv.physics.TiledSpaceVaryingBlur`](https://deepinv.org/api/stubs/deepinv.physics.TiledSpaceVaryingBlur.html.md#deepinv.physics.TiledSpaceVaryingBlur)                   | Space varying blur via tiled-convolution.                                              |
| [`deepinv.physics.Downsampling`](https://deepinv.org/api/stubs/deepinv.physics.Downsampling.html.md#deepinv.physics.Downsampling)                                     | Downsampling operator for super-resolution problems.                                   |
| [`deepinv.physics.Upsampling`](https://deepinv.org/api/stubs/deepinv.physics.Upsampling.html.md#deepinv.physics.Upsampling)                                         | Upsampling operator.                                                                   |
| [`deepinv.physics.DownsamplingMatlab`](https://deepinv.org/api/stubs/deepinv.physics.DownsamplingMatlab.html.md#deepinv.physics.DownsamplingMatlab)                         | Downsampling with MATLAB imresize                                                      |
| [`deepinv.physics.MRI`](https://deepinv.org/api/stubs/deepinv.physics.MRI.html.md#deepinv.physics.MRI)                                                       | Single-coil accelerated 2D or 3D magnetic resonance imaging.                           |
| [`deepinv.physics.DynamicMRI`](https://deepinv.org/api/stubs/deepinv.physics.DynamicMRI.html.md#deepinv.physics.DynamicMRI)                                         | Single-coil accelerated dynamic magnetic resonance imaging.                            |
| [`deepinv.physics.MultiCoilMRI`](https://deepinv.org/api/stubs/deepinv.physics.MultiCoilMRI.html.md#deepinv.physics.MultiCoilMRI)                                     | Multi-coil 2D or 3D MRI operator.                                                      |
| [`deepinv.physics.SequentialMRI`](https://deepinv.org/api/stubs/deepinv.physics.SequentialMRI.html.md#deepinv.physics.SequentialMRI)                                   | Single-coil accelerated magnetic resonance imaging using sequential sampling.          |
| [`deepinv.physics.NonCartesianMRI`](https://deepinv.org/api/stubs/deepinv.physics.NonCartesianMRI.html.md#deepinv.physics.NonCartesianMRI)                               | Non-Cartesian (multi-coil) MRI via `mri-nufft`.                                        |
| [`deepinv.physics.Tomography`](https://deepinv.org/api/stubs/deepinv.physics.Tomography.html.md#deepinv.physics.Tomography)                                         | (Computed) Tomography operator.                                                        |
| [`deepinv.physics.TomographyWithAstra`](https://deepinv.org/api/stubs/deepinv.physics.TomographyWithAstra.html.md#deepinv.physics.TomographyWithAstra)                       | Computed Tomography operator with [astra-toolbox](https://astra-toolbox.com/) backend. |
| [`deepinv.physics.PET`](https://deepinv.org/api/stubs/deepinv.physics.PET.html.md#deepinv.physics.PET)                                                       | Non time-of-flight Positron emission tomography (PET) physics model.                   |
| [`deepinv.physics.Pansharpen`](https://deepinv.org/api/stubs/deepinv.physics.Pansharpen.html.md#deepinv.physics.Pansharpen)                                         | Pansharpening forward operator.                                                        |
| [`deepinv.physics.CompressiveSpectralImaging`](https://deepinv.org/api/stubs/deepinv.physics.CompressiveSpectralImaging.html.md#deepinv.physics.CompressiveSpectralImaging)         | Compressive Hyperspectral Imaging operator.                                            |
| [`deepinv.physics.HyperSpectralUnmixing`](https://deepinv.org/api/stubs/deepinv.physics.HyperSpectralUnmixing.html.md#deepinv.physics.HyperSpectralUnmixing)                   | Hyperspectral Unmixing operator.                                                       |
| [`deepinv.physics.CompressedSensing`](https://deepinv.org/api/stubs/deepinv.physics.CompressedSensing.html.md#deepinv.physics.CompressedSensing)                           | Compressed Sensing forward operator.                                                   |
| [`deepinv.physics.StructuredRandom`](https://deepinv.org/api/stubs/deepinv.physics.StructuredRandom.html.md#deepinv.physics.StructuredRandom)                             | Structured random linear operator model corresponding to the operator                  |
| [`deepinv.physics.SinglePixelCamera`](https://deepinv.org/api/stubs/deepinv.physics.SinglePixelCamera.html.md#deepinv.physics.SinglePixelCamera)                           | Single pixel imaging camera.                                                           |
| [`deepinv.physics.RadioInterferometry`](https://deepinv.org/api/stubs/deepinv.physics.RadioInterferometry.html.md#deepinv.physics.RadioInterferometry)                       | Radio Interferometry measurement operator.                                             |
| [`deepinv.physics.SinglePhotonLidar`](https://deepinv.org/api/stubs/deepinv.physics.SinglePhotonLidar.html.md#deepinv.physics.SinglePhotonLidar)                           | Single photon lidar operator for depth ranging.                                        |
| [`deepinv.physics.Haze`](https://deepinv.org/api/stubs/deepinv.physics.Haze.html.md#deepinv.physics.Haze)                                                     | Standard haze model                                                                    |
| [`deepinv.physics.PhaseRetrieval`](https://deepinv.org/api/stubs/deepinv.physics.PhaseRetrieval.html.md#deepinv.physics.PhaseRetrieval)                                 | Phase Retrieval base class corresponding to the operator                               |
| [`deepinv.physics.RandomPhaseRetrieval`](https://deepinv.org/api/stubs/deepinv.physics.RandomPhaseRetrieval.html.md#deepinv.physics.RandomPhaseRetrieval)                     | Random Phase Retrieval forward operator.                                               |
| [`deepinv.physics.SpatialUnwrapping`](https://deepinv.org/api/stubs/deepinv.physics.SpatialUnwrapping.html.md#deepinv.physics.SpatialUnwrapping)                           | Spatial unwrapping forward operator.                                                   |
| [`deepinv.physics.StructuredRandomPhaseRetrieval`](https://deepinv.org/api/stubs/deepinv.physics.StructuredRandomPhaseRetrieval.html.md#deepinv.physics.StructuredRandomPhaseRetrieval) | Structured random phase retrieval model corresponding to the operator                  |
| [`deepinv.physics.Ptychography`](https://deepinv.org/api/stubs/deepinv.physics.Ptychography.html.md#deepinv.physics.Ptychography)                                     | Ptychography forward operator.                                                         |
| [`deepinv.physics.PtychographyLinearOperator`](https://deepinv.org/api/stubs/deepinv.physics.PtychographyLinearOperator.html.md#deepinv.physics.PtychographyLinearOperator)         | Forward linear operator for phase retrieval in ptychography.                           |
| [`deepinv.physics.Scattering`](https://deepinv.org/api/stubs/deepinv.physics.Scattering.html.md#deepinv.physics.Scattering)                                         | Inverse scattering physics model in 2 dimensions.                                      |
| [`deepinv.physics.to_multiscale`](https://deepinv.org/api/stubs/deepinv.physics.to_multiscale.html.md#deepinv.physics.to_multiscale)                                   | Convert a single-scale physics operator to a multi-scale physics operator              |
| [`deepinv.physics.UltrasoundPlaneWave`](https://deepinv.org/api/stubs/deepinv.physics.UltrasoundPlaneWave.html.md#deepinv.physics.UltrasoundPlaneWave)                       | 2D plane-wave ultrafast ultrasound imaging operator.                                   |

## Generators

**User Guide:** refer to [Physics Generators](https://deepinv.org/user_guide/physics/intro.html.md#physics-generators) for more information.

| [`deepinv.physics.generator.PhysicsGenerator`](https://deepinv.org/api/stubs/deepinv.physics.generator.PhysicsGenerator.html.md#deepinv.physics.generator.PhysicsGenerator)                                               | Base class for parameter generation of physics parameters.                                                                                                         |
|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [`deepinv.physics.generator.GeneratorMixture`](https://deepinv.org/api/stubs/deepinv.physics.generator.GeneratorMixture.html.md#deepinv.physics.generator.GeneratorMixture)                                               | Base class for mixing multiple [`physics generators`](https://deepinv.org/api/stubs/deepinv.physics.generator.PhysicsGenerator.html.md#deepinv.physics.generator.PhysicsGenerator).                     |
| [`deepinv.physics.generator.BernoulliSplittingMaskGenerator`](https://deepinv.org/api/stubs/deepinv.physics.generator.BernoulliSplittingMaskGenerator.html.md#deepinv.physics.generator.BernoulliSplittingMaskGenerator)                 | Base generator for splitting/inpainting masks.                                                                                                                     |
| [`deepinv.physics.generator.GaussianSplittingMaskGenerator`](https://deepinv.org/api/stubs/deepinv.physics.generator.GaussianSplittingMaskGenerator.html.md#deepinv.physics.generator.GaussianSplittingMaskGenerator)                   | Randomly generate Gaussian splitting/inpainting masks.                                                                                                             |
| [`deepinv.physics.generator.MultiplicativeSplittingMaskGenerator`](https://deepinv.org/api/stubs/deepinv.physics.generator.MultiplicativeSplittingMaskGenerator.html.md#deepinv.physics.generator.MultiplicativeSplittingMaskGenerator)       | Multiplicative splitting mask generator.                                                                                                                           |
| [`deepinv.physics.generator.Phase2PhaseSplittingMaskGenerator`](https://deepinv.org/api/stubs/deepinv.physics.generator.Phase2PhaseSplittingMaskGenerator.html.md#deepinv.physics.generator.Phase2PhaseSplittingMaskGenerator)             | Phase2Phase splitting mask generator for dynamic data.                                                                                                             |
| [`deepinv.physics.generator.Artifact2ArtifactSplittingMaskGenerator`](https://deepinv.org/api/stubs/deepinv.physics.generator.Artifact2ArtifactSplittingMaskGenerator.html.md#deepinv.physics.generator.Artifact2ArtifactSplittingMaskGenerator) | Artifact2Artifact splitting mask generator for dynamic data.                                                                                                       |
| [`deepinv.physics.generator.PSFGenerator`](https://deepinv.org/api/stubs/deepinv.physics.generator.PSFGenerator.html.md#deepinv.physics.generator.PSFGenerator)                                                       | Base class for generating Point Spread Functions (PSFs).                                                                                                           |
| [`deepinv.physics.generator.GaussianBlurGenerator`](https://deepinv.org/api/stubs/deepinv.physics.generator.GaussianBlurGenerator.html.md#deepinv.physics.generator.GaussianBlurGenerator)                                     | Random Gaussian blur generator.                                                                                                                                    |
| [`deepinv.physics.generator.MotionBlurGenerator`](https://deepinv.org/api/stubs/deepinv.physics.generator.MotionBlurGenerator.html.md#deepinv.physics.generator.MotionBlurGenerator)                                         | Random motion blur generator.                                                                                                                                      |
| [`deepinv.physics.generator.DownsamplingGenerator`](https://deepinv.org/api/stubs/deepinv.physics.generator.DownsamplingGenerator.html.md#deepinv.physics.generator.DownsamplingGenerator)                                     | Random downsampling generator.                                                                                                                                     |
| [`deepinv.physics.generator.DiffractionBlurGenerator`](https://deepinv.org/api/stubs/deepinv.physics.generator.DiffractionBlurGenerator.html.md#deepinv.physics.generator.DiffractionBlurGenerator)                               | Diffraction limited blur generator.                                                                                                                                |
| [`deepinv.physics.generator.DiffractionBlurGenerator3D`](https://deepinv.org/api/stubs/deepinv.physics.generator.DiffractionBlurGenerator3D.html.md#deepinv.physics.generator.DiffractionBlurGenerator3D)                           | 3D diffraction limited kernels using Zernike decomposition of the phase mask (Fresnel/Fraunhoffer diffraction theory).                                             |
| [`deepinv.physics.generator.ProductConvolutionBlurGenerator`](https://deepinv.org/api/stubs/deepinv.physics.generator.ProductConvolutionBlurGenerator.html.md#deepinv.physics.generator.ProductConvolutionBlurGenerator)                 | Generates parameters of space-varying blurs.                                                                                                                       |
| [`deepinv.physics.generator.TiledBlurGenerator`](https://deepinv.org/api/stubs/deepinv.physics.generator.TiledBlurGenerator.html.md#deepinv.physics.generator.TiledBlurGenerator)                                           | Generates parameters of the [`deepinv.physics.TiledSpaceVaryingBlur`](https://deepinv.org/api/stubs/deepinv.physics.TiledSpaceVaryingBlur.html.md#deepinv.physics.TiledSpaceVaryingBlur) operator. |
| [`deepinv.physics.generator.ConfocalBlurGenerator3D`](https://deepinv.org/api/stubs/deepinv.physics.generator.ConfocalBlurGenerator3D.html.md#deepinv.physics.generator.ConfocalBlurGenerator3D)                                 | Generates the 3D point spread function (PSF) of a confocal laser scanning microscope.                                                                              |
| [`deepinv.physics.generator.Zernike`](https://deepinv.org/api/stubs/deepinv.physics.generator.Zernike.html.md#deepinv.physics.generator.Zernike)                                                                 | Static utility class for Zernike polynomials (ANSI/Noll Nomenclature).                                                                                             |
| [`deepinv.physics.generator.BaseMaskGenerator`](https://deepinv.org/api/stubs/deepinv.physics.generator.BaseMaskGenerator.html.md#deepinv.physics.generator.BaseMaskGenerator)                                             | Base generator for MRI acceleration masks.                                                                                                                         |
| [`deepinv.physics.generator.GaussianMaskGenerator`](https://deepinv.org/api/stubs/deepinv.physics.generator.GaussianMaskGenerator.html.md#deepinv.physics.generator.GaussianMaskGenerator)                                     | Generator for MRI Cartesian acceleration masks using Gaussian undersampling.                                                                                       |
| [`deepinv.physics.generator.RandomMaskGenerator`](https://deepinv.org/api/stubs/deepinv.physics.generator.RandomMaskGenerator.html.md#deepinv.physics.generator.RandomMaskGenerator)                                         | Generator for MRI Cartesian acceleration masks using random uniform undersampling.                                                                                 |
| [`deepinv.physics.generator.EquispacedMaskGenerator`](https://deepinv.org/api/stubs/deepinv.physics.generator.EquispacedMaskGenerator.html.md#deepinv.physics.generator.EquispacedMaskGenerator)                                 | Generator for MRI Cartesian acceleration masks using uniform (equispaced) non-random undersampling with random offset.                                             |
| [`deepinv.physics.generator.PolyOrderMaskGenerator`](https://deepinv.org/api/stubs/deepinv.physics.generator.PolyOrderMaskGenerator.html.md#deepinv.physics.generator.PolyOrderMaskGenerator)                                   | Generator for MRI Cartesian acceleration masks using polynomial variable density.                                                                                  |

| [`deepinv.physics.phase_retrieval.build_probe`](https://deepinv.org/api/stubs/deepinv.physics.phase_retrieval.build_probe.html.md#deepinv.physics.phase_retrieval.build_probe)                                         | Builds a probe based on the specified type and radius.                    |
|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------|
| [`deepinv.physics.phase_retrieval.generate_shifts`](https://deepinv.org/api/stubs/deepinv.physics.phase_retrieval.generate_shifts.html.md#deepinv.physics.phase_retrieval.generate_shifts)                                 | Generates the array of probe shifts across the image.                     |
| [`deepinv.physics.scattering.circular_sensors`](https://deepinv.org/api/stubs/deepinv.physics.scattering.circular_sensors.html.md#deepinv.physics.scattering.circular_sensors)                                         | Generate equispaced sensors on a circle.                                  |
| [`deepinv.physics.functional.tomography_subsets.get_subset_tensor`](https://deepinv.org/api/stubs/deepinv.physics.functional.tomography_subsets.get_subset_tensor.html.md#deepinv.physics.functional.tomography_subsets.get_subset_tensor) | Return indices that interleave a tensor into equal subsets.               |
| [`deepinv.physics.split_measurements`](https://deepinv.org/api/stubs/deepinv.physics.split_measurements.html.md#deepinv.physics.split_measurements)                                                           | Splits tomography measurements into angular subsets.                      |
| [`deepinv.physics.split_physics`](https://deepinv.org/api/stubs/deepinv.physics.split_physics.html.md#deepinv.physics.split_physics)                                                                     | Builds a stacked tomography physics with one operator per angular subset. |

## Noise distributions

**User Guide:** refer to [Noise distributions](https://deepinv.org/user_guide/physics/physics.html.md#noise-list) for more information.

| [`deepinv.physics.NoiseModel`](https://deepinv.org/api/stubs/deepinv.physics.NoiseModel.html.md#deepinv.physics.NoiseModel)                             | Base class for noise model.                                                                                                                                  |
|------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [`deepinv.physics.ZeroNoise`](https://deepinv.org/api/stubs/deepinv.physics.ZeroNoise.html.md#deepinv.physics.ZeroNoise)                               | Zero noise model $y=x$, serves as a placeholder.                                                                                                             |
| [`deepinv.physics.GaussianNoise`](https://deepinv.org/api/stubs/deepinv.physics.GaussianNoise.html.md#deepinv.physics.GaussianNoise)                       | Gaussian noise $y=z+\epsilon$ where $\epsilon\sim \mathcal{N}(0,I\sigma^2)$.                                                                                 |
| [`deepinv.physics.LogPoissonNoise`](https://deepinv.org/api/stubs/deepinv.physics.LogPoissonNoise.html.md#deepinv.physics.LogPoissonNoise)                   | Log-Poisson noise $y = -\frac{1}{\mu} \log(\frac{\mathcal{P}(\exp(-\mu x) N_0)}{N_0})$.                                                                      |
| [`deepinv.physics.PoissonNoise`](https://deepinv.org/api/stubs/deepinv.physics.PoissonNoise.html.md#deepinv.physics.PoissonNoise)                         | Poisson noise $y = \mathcal{P}(\frac{x}{\gamma})$ with gain $\gamma>0$.                                                                                      |
| [`deepinv.physics.PoissonGaussianNoise`](https://deepinv.org/api/stubs/deepinv.physics.PoissonGaussianNoise.html.md#deepinv.physics.PoissonGaussianNoise)         | Poisson-Gaussian noise $y = \gamma z + \epsilon$ where $z\sim\mathcal{P}(\frac{x}{\gamma})$ and $\epsilon\sim\mathcal{N}(0, I \sigma^2)$.                    |
| [`deepinv.physics.LaplaceNoise`](https://deepinv.org/api/stubs/deepinv.physics.LaplaceNoise.html.md#deepinv.physics.LaplaceNoise)                         | Laplace noise $y = z + \epsilon$ where $\epsilon\sim\text{Laplace}(0,b)$.                                                                                    |
| [`deepinv.physics.UniformNoise`](https://deepinv.org/api/stubs/deepinv.physics.UniformNoise.html.md#deepinv.physics.UniformNoise)                         | Uniform noise $y = x + \epsilon$ where $\epsilon\sim\mathcal{U}(-a,a)$.                                                                                      |
| [`deepinv.physics.UniformGaussianNoise`](https://deepinv.org/api/stubs/deepinv.physics.UniformGaussianNoise.html.md#deepinv.physics.UniformGaussianNoise)         | Gaussian noise $y=z+\epsilon$ where $\epsilon\sim \mathcal{N}(0,I\sigma^2)$ and $\sigma \sim\mathcal{U}(\sigma_{\text{min}}, \sigma_{\text{max}})$           |
| [`deepinv.physics.GammaNoise`](https://deepinv.org/api/stubs/deepinv.physics.GammaNoise.html.md#deepinv.physics.GammaNoise)                             | Gamma noise $y = \mathcal{G}(\ell, x/\ell)$                                                                                                                  |
| [`deepinv.physics.SaltPepperNoise`](https://deepinv.org/api/stubs/deepinv.physics.SaltPepperNoise.html.md#deepinv.physics.SaltPepperNoise)                   | SaltPepper noise $y = \begin{cases} 0 & \text{if } z < p\\ z & \text{if } z \in [p, 1-s]\\ 1 & \text{if } z > 1 - s\end{cases}$ with $z\sim\mathcal{U}(0,1)$ |
| [`deepinv.physics.FisherTippettNoise`](https://deepinv.org/api/stubs/deepinv.physics.FisherTippettNoise.html.md#deepinv.physics.FisherTippettNoise)             | Fisher-Tippett noise $p(y\vert x) = \frac{\ell^{\ell}}{\Gamma(\ell)}\mathrm{e}^{\ell(y-x)}\mathrm{e}^{-\ell\mathrm{e}^{(y-x)}}$                              |
| [`deepinv.physics.RicianNoise`](https://deepinv.org/api/stubs/deepinv.physics.RicianNoise.html.md#deepinv.physics.RicianNoise)                           | Rician noise: $y = \sqrt{(x + \sigma \epsilon_1)^2 + (\sigma \epsilon_2)^2}$                                                                                 |
| [`deepinv.physics.generator.SigmaGenerator`](https://deepinv.org/api/stubs/deepinv.physics.generator.SigmaGenerator.html.md#deepinv.physics.generator.SigmaGenerator) | Generator for the noise level $\sigma$ in the [`Gaussian noise model`](https://deepinv.org/api/stubs/deepinv.physics.GaussianNoise.html.md#deepinv.physics.GaussianNoise).           |
| [`deepinv.physics.generator.GainGenerator`](https://deepinv.org/api/stubs/deepinv.physics.generator.GainGenerator.html.md#deepinv.physics.generator.GainGenerator)   | Generator for the noise level $\gamma$ in the [`Poisson noise model`](https://deepinv.org/api/stubs/deepinv.physics.PoissonNoise.html.md#deepinv.physics.PoissonNoise).             |

| [`deepinv.physics.adjoint_function`](https://deepinv.org/api/stubs/deepinv.physics.adjoint_function.html.md#deepinv.physics.adjoint_function)   | Provides the adjoint function of a linear operator $A$, i.e., $A^{\top}$.                                   |
|----------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------|
| [`deepinv.physics.stack`](https://deepinv.org/api/stubs/deepinv.physics.stack.html.md#deepinv.physics.stack)                         | Stacks multiple forward operators $A = \begin{bmatrix} A_1(x) \\ A_2(x) \\ \vdots \\ A_n(x) \end{bmatrix}$. |
| [`deepinv.physics.compose`](https://deepinv.org/api/stubs/deepinv.physics.compose.html.md#deepinv.physics.compose)                     | Composes multiple forward operators $A = A_1\circ A_2\circ \dots \circ A_n$.                                |

## Functional

**User Guide:** refer to [Functional](https://deepinv.org/user_guide/physics/functional.html.md#physics-functional) for more information.

| [`deepinv.physics.functional.conv2d`](https://deepinv.org/api/stubs/deepinv.physics.functional.conv2d.html.md#deepinv.physics.functional.conv2d)                                           | A helper function performing the 2d convolution of images `x` and `filter`.                                                                             |
|----------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------|
| [`deepinv.physics.functional.conv_transpose2d`](https://deepinv.org/api/stubs/deepinv.physics.functional.conv_transpose2d.html.md#deepinv.physics.functional.conv_transpose2d)                       | A helper function performing the 2d transposed convolution 2d of x and filter.                                                                          |
| [`deepinv.physics.functional.conv2d_fft`](https://deepinv.org/api/stubs/deepinv.physics.functional.conv2d_fft.html.md#deepinv.physics.functional.conv2d_fft)                                   | A helper function performing the 2d convolution of images `x` and `filter` using FFT.                                                                   |
| [`deepinv.physics.functional.conv_transpose2d_fft`](https://deepinv.org/api/stubs/deepinv.physics.functional.conv_transpose2d_fft.html.md#deepinv.physics.functional.conv_transpose2d_fft)               | A helper function performing the 2d transposed convolution 2d of `x` and `filter` using FFT.                                                            |
| [`deepinv.physics.functional.conv3d`](https://deepinv.org/api/stubs/deepinv.physics.functional.conv3d.html.md#deepinv.physics.functional.conv3d)                                           | A helper function to perform 3D convolution of images `x` and `filter`.                                                                                 |
| [`deepinv.physics.functional.conv_transpose3d`](https://deepinv.org/api/stubs/deepinv.physics.functional.conv_transpose3d.html.md#deepinv.physics.functional.conv_transpose3d)                       | A helper function to perform 3D transpose convolution.                                                                                                  |
| [`deepinv.physics.functional.conv3d_fft`](https://deepinv.org/api/stubs/deepinv.physics.functional.conv3d_fft.html.md#deepinv.physics.functional.conv3d_fft)                                   | A helper function performing the 3d convolution of `x` and `filter` using FFT.                                                                          |
| [`deepinv.physics.functional.conv_transpose3d_fft`](https://deepinv.org/api/stubs/deepinv.physics.functional.conv_transpose3d_fft.html.md#deepinv.physics.functional.conv_transpose3d_fft)               | A helper function performing the 3d transposed convolution of `y` and `filter` using FFT.                                                               |
| [`deepinv.physics.functional.product_convolution2d`](https://deepinv.org/api/stubs/deepinv.physics.functional.product_convolution2d.html.md#deepinv.physics.functional.product_convolution2d)             | Product-convolution operator in 2d.                                                                                                                     |
| [`deepinv.physics.functional.multiplier`](https://deepinv.org/api/stubs/deepinv.physics.functional.multiplier.html.md#deepinv.physics.functional.multiplier)                                   | Implements diagonal matrices or multipliers $x$ and `mult`.                                                                                             |
| [`deepinv.physics.functional.multiplier_adjoint`](https://deepinv.org/api/stubs/deepinv.physics.functional.multiplier_adjoint.html.md#deepinv.physics.functional.multiplier_adjoint)                   | Implements the adjoint of diagonal matrices or multipliers $x$ and `mult`.                                                                              |
| [`deepinv.physics.functional.histogramdd`](https://deepinv.org/api/stubs/deepinv.physics.functional.histogramdd.html.md#deepinv.physics.functional.histogramdd)                                 | Computes the multidimensional histogram of a tensor.                                                                                                    |
| [`deepinv.physics.functional.histogram`](https://deepinv.org/api/stubs/deepinv.physics.functional.histogram.html.md#deepinv.physics.functional.histogram)                                     | Computes the histogram of a tensor.                                                                                                                     |
| [`deepinv.physics.functional.dst1`](https://deepinv.org/api/stubs/deepinv.physics.functional.dst1.html.md#deepinv.physics.functional.dst1)                                               | Compute the one-dimensional [discrete sine transform](https://en.wikipedia.org/wiki/Discrete_sine_transform) of type I (DST-I) or its inverse (IDST-I). |
| [`deepinv.physics.functional.dct`](https://deepinv.org/api/stubs/deepinv.physics.functional.dct.html.md#deepinv.physics.functional.dct)                                                 | Discrete Cosine Transform, Type II (a.k.a.                                                                                                              |
| [`deepinv.physics.functional.idct`](https://deepinv.org/api/stubs/deepinv.physics.functional.idct.html.md#deepinv.physics.functional.idct)                                               | The inverse to DCT-II, which is a scaled Discrete Cosine Transform, Type III                                                                            |
| [`deepinv.physics.functional.dct_2d`](https://deepinv.org/api/stubs/deepinv.physics.functional.dct_2d.html.md#deepinv.physics.functional.dct_2d)                                           | 2-dimensional Discrete Cosine Transform, Type II (a.k.a.                                                                                                |
| [`deepinv.physics.functional.idct_2d`](https://deepinv.org/api/stubs/deepinv.physics.functional.idct_2d.html.md#deepinv.physics.functional.idct_2d)                                         | The inverse to 2D DCT-II, which is a scaled Discrete Cosine Transform, Type III                                                                         |
| [`deepinv.physics.functional.imresize_matlab`](https://deepinv.org/api/stubs/deepinv.physics.functional.imresize_matlab.html.md#deepinv.physics.functional.imresize_matlab)                         | MATLAB imresize reimplementation.                                                                                                                       |
| [`deepinv.physics.functional.random_choice`](https://deepinv.org/api/stubs/deepinv.physics.functional.random_choice.html.md#deepinv.physics.functional.random_choice)                             | PyTorch equivalent of [`numpy.random.choice()`](https://numpy.org/doc/stable/reference/random/generated/numpy.random.choice.html#numpy.random.choice)   |
| [`deepinv.physics.functional.power_method`](https://deepinv.org/api/stubs/deepinv.physics.functional.power_method.html.md#deepinv.physics.functional.power_method)                               | Runs the power iteration method to estimate the largest singular value of a linear operator.                                                            |
| [`deepinv.physics.functional.gaussian_blur`](https://deepinv.org/api/stubs/deepinv.physics.functional.gaussian_blur.html.md#deepinv.physics.functional.gaussian_blur)                             | Creates a batch of N-dimensional anisotropic Gaussian kernels (1D, 2D, or 3D) with independent sigma ranges and rotation angles for each kernel.        |
| [`deepinv.physics.functional.bilinear_filter`](https://deepinv.org/api/stubs/deepinv.physics.functional.bilinear_filter.html.md#deepinv.physics.functional.bilinear_filter)                         | Bilinear filter.                                                                                                                                        |
| [`deepinv.physics.functional.bicubic_filter`](https://deepinv.org/api/stubs/deepinv.physics.functional.bicubic_filter.html.md#deepinv.physics.functional.bicubic_filter)                           | Bicubic filter.                                                                                                                                         |
| [`deepinv.physics.functional.sinc_filter`](https://deepinv.org/api/stubs/deepinv.physics.functional.sinc_filter.html.md#deepinv.physics.functional.sinc_filter)                                 | Anti-aliasing sinc filter, optionally multiplied by a Kaiser window.                                                                                    |
| [`deepinv.physics.functional.liu_jia_pad`](https://deepinv.org/api/stubs/deepinv.physics.functional.liu_jia_pad.html.md#deepinv.physics.functional.liu_jia_pad)                                 | Liu-Jia Padding                                                                                                                                         |
| [`deepinv.physics.functional.conv_filter_transpose2d`](https://deepinv.org/api/stubs/deepinv.physics.functional.conv_filter_transpose2d.html.md#deepinv.physics.functional.conv_filter_transpose2d)         | Apply the adjoint of 2D convolution with respect to its filter.                                                                                         |
| [`deepinv.physics.functional.conv_filter_transpose2d_fft`](https://deepinv.org/api/stubs/deepinv.physics.functional.conv_filter_transpose2d_fft.html.md#deepinv.physics.functional.conv_filter_transpose2d_fft) | Apply the adjoint of 2D convolution with respect to its filter using FFTs.                                                                              |

| [`deepinv.physics.functional.Radon`](https://deepinv.org/api/stubs/deepinv.physics.functional.Radon.html.md#deepinv.physics.functional.Radon)                 | Sparse Radon transform operator.                       |
|------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------|
| [`deepinv.physics.functional.IRadon`](https://deepinv.org/api/stubs/deepinv.physics.functional.IRadon.html.md#deepinv.physics.functional.IRadon)               | Inverse sparse Radon transform operator.               |
| [`deepinv.physics.functional.XrayTransform`](https://deepinv.org/api/stubs/deepinv.physics.functional.XrayTransform.html.md#deepinv.physics.functional.XrayTransform) | X-ray Transform operator with `astra-toolbox` backend. |
