Detectors
LayeredDetector
Bases: BaseDetector
Applies a series of detector layers to some input psf.
UML
Attributes:
Name | Type | Description |
---|---|---|
layers |
OrderedDict
|
A series of |
Source code in src/dLux/detectors.py
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 |
|
__getattr__(key)
Raises the individual layers via their keys.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
key
|
str
|
The key of the item to be searched for in the layers dictionary. |
required |
Returns:
Name | Type | Description |
---|---|---|
item |
object
|
The item corresponding to the supplied key in the layers dictionary. |
Source code in src/dLux/detectors.py
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 |
|
__init__(layers)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
layers
|
list[DetectorLayer, tuple]
|
A list of DetectorLayer objects to apply to the input psf. List entries can be tuples of (key, layer) to specify a key, else the key is taken as the class name of the layer. |
required |
Source code in src/dLux/detectors.py
37 38 39 40 41 42 43 44 45 46 47 |
|
insert_layer(layer, index)
Inserts a layer into the layers dictionary at a specified index. This function calls the list2dictionary function to ensure all keys remain unique. Note that this can result in some keys being modified if they are duplicates. The input 'layer' can be a tuple of (key, layer) to specify a key, else the key is taken as the class name of the layer.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
layer
|
Any
|
The layer to be inserted. |
required |
index
|
int
|
The index at which to insert the layer. |
required |
Returns:
Name | Type | Description |
---|---|---|
detector |
LayeredDetector
|
The updated detector. |
Source code in src/dLux/detectors.py
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 |
|
model(psf, return_psf=False)
Applied the detector layers to the input psf.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
psf
|
PSF
|
The input psf to be transformed. |
required |
Returns:
Name | Type | Description |
---|---|---|
psf |
PSF
|
The output psf after being transformed by the detector layers. |
Source code in src/dLux/detectors.py
71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 |
|
remove_layer(key)
Removes a layer from the layers dictionary, specified by its key.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
key
|
str
|
The key of the layer to be removed. |
required |
Returns:
Name | Type | Description |
---|---|---|
detector |
LayeredDetector
|
The updated detector. |
Source code in src/dLux/detectors.py
120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 |
|