Optical Layers¤
ApplyBasisCLIMB
dLuxToliman.layers.optical_layers.ApplyBasisCLIMB
¤
Bases: BasisLayer()
Adds an array of binary phase values to the input wavefront from a set of continuous basis vectors. This uses the CLIMB algorithm in order to generate the binary values in a continuous manner as described in the paper Wong et al. 2021. The basis vectors are taken as an Optical Path Difference (OPD), and applied to the phase of the wavefront. The ideal wavelength parameter described the wavelength that will have a perfect anti-phase relationship given by the Optical Path Difference.
TODO: Many of the methods in the class still need doccumentation. TODO: This currently only outputs 256 pixel arrays and uses a 3x oversample, therefore requiring a 768 pixel basis array.
"This class is the crazy lady we keep in the attic, but turns out her name is actually Ben." - L. Desdoigts, 2023.
Attributes:
| Name | Type | Description |
|---|---|---|
basis |
Array
|
Arrays holding the continous pre-calculated basis vectors. |
coefficients |
Array
|
The Array of coefficients to be applied to each basis vector. |
ideal_wavelength |
Array
|
The target wavelength at which a perfect anti-phase relationship is applied via the OPD. |
Source code in dLuxToliman/layers/optical_layers.py
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 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 82 83 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 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 | |
__call__(wavefront)
¤
Generates and applies the binary OPD array to the wavefront in a differentiable manner.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
wavefront
|
Wavefront
|
The wavefront to operate on. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
wavefront |
Wavefront
|
The wavefront with the binary OPD applied. |
Source code in dLuxToliman/layers/optical_layers.py
89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 | |
__init__(basis, ideal_wavelength, coefficients=None)
¤
Constructor for the ApplyBasisCLIMB class.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
basis
|
Array
|
Arrays holding the continous pre-calculated basis vectors. This must be a 3d array of shape (nterms, npixels, npixels), with the final two dimensions matching that of the wavefront at time of application. This is currently required to be a nx768x768 shaped array. |
required |
ideal_wavelength
|
Array
|
The target wavelength at which a perfect anti-phase relationship is applied via the OPD. |
required |
coefficients
|
Array = None
|
The Array of coefficients to be applied to each basis vector. This must be a one dimensional array with leading dimension equal to the leading dimension of the basis vectors. Default is None which initialises an array of zeros. |
None
|
Source code in dLuxToliman/layers/optical_layers.py
45 46 47 48 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 | |