Lens
Basic Lens object handling
LensCalcMixin
Source code in tfs/lens.py
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 |
|
__init__(*args, **kwargs)
Mixin class to abstract focal length calculation from a variety of lens devices.
Relies on the following methods / attributes from the child class: - self.radius - self.z
Source code in tfs/lens.py
33 34 35 36 37 38 39 40 41 42 |
|
image_from_obj(z_obj, energy)
Method calculates the image distance in meters along the beam pipeline from a point of origin given the focal length of the lens, location of lens, and location of object.
Parameters
z_obj Location of object along the beamline in meters (m)
Returns
image Returns the distance z_im of the image along the beam pipeline from a point of origin in meters (m) Note
If the location of the object (z_obj) is equal to the focal length of the lens, this function will return infinity.
Source code in tfs/lens.py
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 |
|
LensConnect
Data structure for a basic system of lenses
Parameters
args : Lens Lens objects
Source code in tfs/lens.py
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 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 |
|
effective_radius
property
Method calculates the effective radius of the lens array including prefocusing lens
Returns
float returns the effective radius of the lens array.
nlens
property
Method calculates the total number of lenses in the Lens array.
Returns
int Returns the total number of lenses in the array.
tfs_radius
property
Method calculates the effective radius of the lens array excluding prefocusing lens
Returns
float returns the effective radius of the lens array.
__init__(*args)
Parameters
args Variable length argument list of the lenses in the system, their radii, z position, and focal length.
Source code in tfs/lens.py
173 174 175 176 177 178 179 180 181 |
|
connect(array1, array2)
classmethod
Create a new LensConnect from the combination of multiple
Source code in tfs/lens.py
269 270 271 272 273 274 |
|
image(z_obj, energy)
Method recursively calculates the z location of the image of a system of lenses and returns it in meters (m)
Parameters
z_obj Location of the object along the beam pipline from a designated point of origin in meters (m)
Returns
float returns the location z of a system of lenses in meters (m).
Source code in tfs/lens.py
215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 |
|
show_info()
Show a table of information on the lens
Source code in tfs/lens.py
263 264 265 266 267 |
|
LensTripLimits
Bases: Device
Trip limits for a given pre-focus lens (or lack thereof).
Source code in tfs/lens.py
25 26 27 28 29 |
|
MFXLens
Bases: InOutPVStatePositioner
, LensCalcMixin
Data structure for basic Lens object
Parameters
prefix : str Name of the state record that controls the PV
str
Prefix for the PVs that contain focusing information
Source code in tfs/lens.py
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 |
|
radius
property
Method converts the EPICS lens radius signal into a float that can be used for calculations.
Returns
float Returns the radius of the lens
sig_focus
property
Method converts the EPICS focal length signal of the lens into a float
Returns
float Returns the focal length of the lens in meters
z
property
Method converts the z position EPICS signal into a float.
Returns
float Returns the z position of the lens in meters along the beamline