Coordinates¤
Spec
dLux.coordinates.Spec
¤
Bases: Base
Abstract base class for coordinate/sampling specifications.
UML

Source code in dLux/coordinates.py
7 8 9 10 11 12 13 14 15 | |
PadSpec
dLux.coordinates.PadSpec
¤
Bases: Spec
Coordinate specification defined via integer padding and cropping factors relative to an input grid size.
UML

Attributes:
| Name | Type | Description |
|---|---|---|
pad |
int
|
Factor by which to increase the grid size. The padded grid will have
|
crop |
int
|
Factor by which to reduce the grid size after processing. The cropped
grid will have |
c |
float
|
Centre coordinate of the grid, in metres. |
Source code in dLux/coordinates.py
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 | |
__init__(pad=1, crop=1, c=0.0)
¤
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
pad
|
int = 1
|
Grid size increase factor. |
1
|
crop
|
int = 1
|
Grid size reduction factor applied after processing. |
1
|
c
|
float = 0.0
|
Centre coordinate of the grid, in metres. |
0.0
|
Source code in dLux/coordinates.py
42 43 44 45 46 47 48 49 50 51 52 53 54 55 | |
CoordSpec
dLux.coordinates.CoordSpec
¤
Bases: Spec
Coordinate specification defined explicitly by number of pixels, pixel scale, and centre offset.
UML

Attributes:
| Name | Type | Description |
|---|---|---|
n |
int
|
Number of pixels along each axis. |
d |
float
|
Pixel scale (spacing between adjacent pixels), in metres. |
c |
float
|
Centre coordinate of the grid, in metres. |
Source code in dLux/coordinates.py
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 | |
extent
property
¤
Coordinate range (min, max) of the grid edges.
Returns:
| Name | Type | Description |
|---|---|---|
extent |
tuple[float, float]
|
|
fov
property
¤
Total field of view of the grid.
Returns:
| Name | Type | Description |
|---|---|---|
fov |
float
|
Field of view in metres, equal to |
xs
property
¤
1D array of pixel centre coordinates along one axis.
Returns:
| Name | Type | Description |
|---|---|---|
xs |
Array
|
Coordinates of pixel centres, in metres, centred on |
__init__(n=None, d=None, c=0.0)
¤
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
n
|
int = None
|
Number of pixels along each axis. |
None
|
d
|
float = None
|
Pixel scale in metres. |
None
|
c
|
float = 0.0
|
Centre coordinate of the grid, in metres. |
0.0
|
Source code in dLux/coordinates.py
80 81 82 83 84 85 86 87 88 89 90 91 92 93 | |