Optics
Optic
Bases: TransmissiveLayer
, AberratedLayer
A basic 'Optic' class, which optionally applies a transmission, OPD and phase to the input wavefront, with the option for normalise after.
UML
Attributes:
Name | Type | Description |
---|---|---|
transmission |
Array
|
The Array of transmission values to be applied to the input wavefront. |
opd |
(Array, metres)
|
The Array of OPD values to be applied to the input wavefront. |
phase |
(Array, radians)
|
The Array of phase values to be applied to the input wavefront. |
normalise |
bool
|
Whether to normalise the wavefront after passing through the optic. |
Source code in src/dLux/layers/optics.py
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 |
|
__init__(transmission=None, opd=None, phase=None, normalise=False)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
transmission
|
Array
|
The Array of transmission values to be applied to the input wavefront. |
None
|
opd
|
Array, metres = None
|
The Array of OPD values to be applied to the input wavefront. |
None
|
phase
|
Array, radians = None
|
The Array of phase values to be applied to the input wavefront. |
None
|
normalise
|
bool
|
Whether to normalise the wavefront after passing through the optic. |
False
|
Source code in src/dLux/layers/optics.py
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 |
|
apply(wavefront)
Applies the layer to the wavefront.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
wavefront
|
Wavefront
|
The wavefront to operate on. |
required |
Returns:
Name | Type | Description |
---|---|---|
wavefront |
Wavefront
|
The transformed wavefront. |
Source code in src/dLux/layers/optics.py
80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 |
|
BasisOptic
Bases: TransmissiveLayer
, BasisLayer
A basic 'Optic' class, with a aberrations applied through a set of basis vectors
coefficients. This can be applied either as an opd or phase, using the as_phase
attribute. Also optionally applies a transmission and normalisation.
UML
Attributes:
Name | Type | Description |
---|---|---|
transmission |
Array
|
The Array of transmission values to be applied to the input wavefront. |
basis |
(Array, metres)
|
Arrays holding the pre-calculated basis vectors. |
coefficients |
Array
|
The Array of coefficients to be applied to each basis vector. |
as_phase |
bool
|
Whether to apply the basis as a phase phase or OPD. If True the basis is applied as a phase, else it is applied as an OPD. |
normalise |
bool
|
Whether to normalise the wavefront after passing through the optic. |
Source code in src/dLux/layers/optics.py
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 |
|
__init__(basis, transmission=None, coefficients=None, as_phase=False, normalise=False)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
basis
|
Arrays holding the pre-calculated basis vectors. |
required | |
coefficients
|
The Array of coefficients to be applied to each basis vector. |
None
|
|
transmission
|
The Array of transmission values to be applied to the input wavefront. |
None
|
|
as_phase
|
bool = False
|
Whether to apply the basis as a phase phase or OPD. If True the basis is applied as a phase, else it is applied as an OPD. |
False
|
normalise
|
bool = False
|
Whether to normalise the wavefront after passing through the optic. |
False
|
Source code in src/dLux/layers/optics.py
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 |
|
apply(wavefront)
Applies the layer to the wavefront.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
wavefront
|
Wavefront
|
The wavefront to operate on. |
required |
Returns:
Name | Type | Description |
---|---|---|
wavefront |
Wavefront
|
The transformed wavefront. |
Source code in src/dLux/layers/optics.py
157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 |
|