Interpolation Utility Functions
This module contains basic paraxial interpolation functions.
scale
Paraxially interpolates a square array based on the sampling ratio, and npixels_out.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
array
|
Array
|
The input field to interpolate, either in amplitude and phase, or real and imaginary. |
required |
npixels
|
int
|
The number of pixel in the output array. |
required |
ratio
|
float
|
The scale of the input relative to the output |
required |
method
|
str = "linear"
|
The interpolation method. |
'linear'
|
Returns:
| Name | Type | Description |
|---|---|---|
array |
Array
|
The interpolated array. |
Source code in src/dLux/utils/interpolation.py
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 | |
rotate
Rotates a square array by the angle, using interpolation.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
array
|
Array
|
The array to rotate. |
required |
angle
|
(Array, radians)
|
The angle to rotate the array by. |
required |
method
|
str = "linear"
|
The interpolation method. |
'linear'
|
Returns:
| Name | Type | Description |
|---|---|---|
array |
Array
|
The rotated array. |
Source code in src/dLux/utils/interpolation.py
84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 | |