syned 1.0.35__tar.gz → 1.0.38__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {syned-1.0.35/syned.egg-info → syned-1.0.38}/PKG-INFO +1 -1
- {syned-1.0.35 → syned-1.0.38}/setup.py +1 -1
- {syned-1.0.35 → syned-1.0.38}/syned/beamline/shape.py +20 -2
- {syned-1.0.35 → syned-1.0.38}/syned/syned_object.py +17 -0
- {syned-1.0.35 → syned-1.0.38}/syned/version.py +3 -3
- {syned-1.0.35 → syned-1.0.38/syned.egg-info}/PKG-INFO +1 -1
- {syned-1.0.35 → syned-1.0.38}/LICENSE +0 -0
- {syned-1.0.35 → syned-1.0.38}/MANIFEST.in +0 -0
- {syned-1.0.35 → syned-1.0.38}/README.rst +0 -0
- {syned-1.0.35 → syned-1.0.38}/examples/__init__.py +0 -0
- {syned-1.0.35 → syned-1.0.38}/examples/example_beamline.py +0 -0
- {syned-1.0.35 → syned-1.0.38}/examples/example_double_slit.py +0 -0
- {syned-1.0.35 → syned-1.0.38}/examples/example_json_input_output.py +0 -0
- {syned-1.0.35 → syned-1.0.38}/setup.cfg +0 -0
- {syned-1.0.35 → syned-1.0.38}/syned/__init__.py +0 -0
- {syned-1.0.35 → syned-1.0.38}/syned/beamline/__init__.py +0 -0
- {syned-1.0.35 → syned-1.0.38}/syned/beamline/beamline.py +0 -0
- {syned-1.0.35 → syned-1.0.38}/syned/beamline/beamline_element.py +0 -0
- {syned-1.0.35 → syned-1.0.38}/syned/beamline/element_coordinates.py +0 -0
- {syned-1.0.35 → syned-1.0.38}/syned/beamline/optical_element.py +0 -0
- {syned-1.0.35 → syned-1.0.38}/syned/beamline/optical_element_with_surface_shape.py +0 -0
- {syned-1.0.35 → syned-1.0.38}/syned/beamline/optical_elements/__init__.py +0 -0
- {syned-1.0.35 → syned-1.0.38}/syned/beamline/optical_elements/absorbers/__init__.py +0 -0
- {syned-1.0.35 → syned-1.0.38}/syned/beamline/optical_elements/absorbers/absorber.py +0 -0
- {syned-1.0.35 → syned-1.0.38}/syned/beamline/optical_elements/absorbers/beam_stopper.py +0 -0
- {syned-1.0.35 → syned-1.0.38}/syned/beamline/optical_elements/absorbers/filter.py +0 -0
- {syned-1.0.35 → syned-1.0.38}/syned/beamline/optical_elements/absorbers/holed_filter.py +0 -0
- {syned-1.0.35 → syned-1.0.38}/syned/beamline/optical_elements/absorbers/slit.py +0 -0
- {syned-1.0.35 → syned-1.0.38}/syned/beamline/optical_elements/crystals/__init__.py +0 -0
- {syned-1.0.35 → syned-1.0.38}/syned/beamline/optical_elements/crystals/crystal.py +0 -0
- {syned-1.0.35 → syned-1.0.38}/syned/beamline/optical_elements/gratings/__init__.py +0 -0
- {syned-1.0.35 → syned-1.0.38}/syned/beamline/optical_elements/gratings/grating.py +0 -0
- {syned-1.0.35 → syned-1.0.38}/syned/beamline/optical_elements/ideal_elements/__init__.py +0 -0
- {syned-1.0.35 → syned-1.0.38}/syned/beamline/optical_elements/ideal_elements/ideal_element.py +0 -0
- {syned-1.0.35 → syned-1.0.38}/syned/beamline/optical_elements/ideal_elements/ideal_lens.py +0 -0
- {syned-1.0.35 → syned-1.0.38}/syned/beamline/optical_elements/ideal_elements/screen.py +0 -0
- {syned-1.0.35 → syned-1.0.38}/syned/beamline/optical_elements/mirrors/__init__.py +0 -0
- {syned-1.0.35 → syned-1.0.38}/syned/beamline/optical_elements/mirrors/mirror.py +0 -0
- {syned-1.0.35 → syned-1.0.38}/syned/beamline/optical_elements/refractors/__init__.py +0 -0
- {syned-1.0.35 → syned-1.0.38}/syned/beamline/optical_elements/refractors/crl.py +0 -0
- {syned-1.0.35 → syned-1.0.38}/syned/beamline/optical_elements/refractors/interface.py +0 -0
- {syned-1.0.35 → syned-1.0.38}/syned/beamline/optical_elements/refractors/lens.py +0 -0
- {syned-1.0.35 → syned-1.0.38}/syned/storage_ring/__init__.py +0 -0
- {syned-1.0.35 → syned-1.0.38}/syned/storage_ring/electron_beam.py +0 -0
- {syned-1.0.35 → syned-1.0.38}/syned/storage_ring/empty_light_source.py +0 -0
- {syned-1.0.35 → syned-1.0.38}/syned/storage_ring/light_source.py +0 -0
- {syned-1.0.35 → syned-1.0.38}/syned/storage_ring/magnetic_structure.py +0 -0
- {syned-1.0.35 → syned-1.0.38}/syned/storage_ring/magnetic_structures/__init__.py +0 -0
- {syned-1.0.35 → syned-1.0.38}/syned/storage_ring/magnetic_structures/bending_magnet.py +0 -0
- {syned-1.0.35 → syned-1.0.38}/syned/storage_ring/magnetic_structures/insertion_device.py +0 -0
- {syned-1.0.35 → syned-1.0.38}/syned/storage_ring/magnetic_structures/undulator.py +0 -0
- {syned-1.0.35 → syned-1.0.38}/syned/storage_ring/magnetic_structures/wiggler.py +0 -0
- {syned-1.0.35 → syned-1.0.38}/syned/util/__init__.py +0 -0
- {syned-1.0.35 → syned-1.0.38}/syned/util/json_tools.py +0 -0
- {syned-1.0.35 → syned-1.0.38}/syned/widget/__init__.py +0 -0
- {syned-1.0.35 → syned-1.0.38}/syned/widget/widget_decorator.py +0 -0
- {syned-1.0.35 → syned-1.0.38}/syned.egg-info/SOURCES.txt +0 -0
- {syned-1.0.35 → syned-1.0.38}/syned.egg-info/dependency_links.txt +0 -0
- {syned-1.0.35 → syned-1.0.38}/syned.egg-info/not-zip-safe +0 -0
- {syned-1.0.35 → syned-1.0.38}/syned.egg-info/requires.txt +0 -0
- {syned-1.0.35 → syned-1.0.38}/syned.egg-info/top_level.txt +0 -0
|
@@ -1241,17 +1241,31 @@ class Paraboloid(SurfaceShape):
|
|
|
1241
1241
|
It is defined with three parameters: the parabola_parameter and two more parameters
|
|
1242
1242
|
defining the position of the origin of the mirror.
|
|
1243
1243
|
|
|
1244
|
-
The parabola_parameter = 2 *
|
|
1244
|
+
The parabola_parameter = 2 * focal_length = - 0.5 * ccc_9 / ccc_2
|
|
1245
1245
|
|
|
1246
1246
|
The additional parameter can be the focal distances
|
|
1247
1247
|
("p" or "q", one is infinity), "x0", "y0" or the grazing angle.
|
|
1248
1248
|
Here, we selected the at_infinity and the finite focal distance p or q or distance from
|
|
1249
1249
|
the mirror pole to focus (pole to focus).
|
|
1250
1250
|
|
|
1251
|
+
The parabola equation is:
|
|
1252
|
+
|
|
1253
|
+
ccc_2 y^2 + ccc_9 z = 0 or
|
|
1254
|
+
|
|
1255
|
+
y^2 = -ccc_9/ccc_2 z = 2 parabola_parameter z = 4 focal_length z
|
|
1256
|
+
|
|
1257
|
+
The focus is at (0, 0, focal_length).
|
|
1258
|
+
|
|
1259
|
+
The directrix is at (0, 0, -focal_length).
|
|
1260
|
+
|
|
1261
|
+
The distance from the directrix to focus is 2 * focal_length.
|
|
1262
|
+
|
|
1263
|
+
The radius of curvature at the vertex is 2 * focal_length.
|
|
1264
|
+
|
|
1251
1265
|
Parameters
|
|
1252
1266
|
----------
|
|
1253
1267
|
parabola_parameter : float, optional
|
|
1254
|
-
parabola_parameter = 2 *
|
|
1268
|
+
parabola_parameter = 2 * focal_length = - 0.5 * ccc_9 / ccc_2. Equation: y^2 = 2 parabola_parameter z.
|
|
1255
1269
|
at_infinity : int (as defined by Side), optional
|
|
1256
1270
|
SOURCE = 0, IMAGE = 1.
|
|
1257
1271
|
pole_to_focus : float, optional
|
|
@@ -1261,6 +1275,10 @@ class Paraboloid(SurfaceShape):
|
|
|
1261
1275
|
|
|
1262
1276
|
References
|
|
1263
1277
|
----------
|
|
1278
|
+
https://en.wikipedia.org/wiki/Parabola
|
|
1279
|
+
|
|
1280
|
+
https://doi.org/10.1107/S1600577522004593
|
|
1281
|
+
|
|
1264
1282
|
Some equations can be found here: https://github.com/srio/shadow3-docs/blob/master/doc/conics.pdf
|
|
1265
1283
|
|
|
1266
1284
|
"""
|
|
@@ -7,6 +7,23 @@ except:
|
|
|
7
7
|
|
|
8
8
|
# TODO: although basic functionality is implemented, the use of exec should be replace by introspection tools
|
|
9
9
|
class SynedObject(object):
|
|
10
|
+
|
|
11
|
+
# ---------------------------------------------------------------------------------------------------------
|
|
12
|
+
# This override is necessary to avoid TypeError: cannot pickle '_thread.lock' object while duplicating
|
|
13
|
+
# that occurs while enabling/disabling connectors
|
|
14
|
+
#
|
|
15
|
+
# When an attribute is an object that contains non pickable attributes, we make a shallow copy of it
|
|
16
|
+
# ---------------------------------------------------------------------------------------------------------
|
|
17
|
+
|
|
18
|
+
def __deepcopy__(self, memodict={}):
|
|
19
|
+
cls = self.__class__
|
|
20
|
+
result = cls.__new__(cls)
|
|
21
|
+
memodict[id(self)] = result
|
|
22
|
+
for k, v in self.__dict__.items():
|
|
23
|
+
try: setattr(result, k, copy.deepcopy(v, memodict))
|
|
24
|
+
except TypeError: setattr(result, k, copy.copy(v))
|
|
25
|
+
return result
|
|
26
|
+
|
|
10
27
|
"""
|
|
11
28
|
This is the base object for SYNED.
|
|
12
29
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{syned-1.0.35 → syned-1.0.38}/syned/beamline/optical_elements/ideal_elements/ideal_element.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|