syned 1.0.45__tar.gz → 1.0.46__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.45/syned.egg-info → syned-1.0.46}/PKG-INFO +1 -1
- {syned-1.0.45 → syned-1.0.46}/setup.py +1 -1
- {syned-1.0.45 → syned-1.0.46}/syned/storage_ring/electron_beam.py +11 -9
- {syned-1.0.45 → syned-1.0.46/syned.egg-info}/PKG-INFO +1 -1
- {syned-1.0.45 → syned-1.0.46}/LICENSE +0 -0
- {syned-1.0.45 → syned-1.0.46}/MANIFEST.in +0 -0
- {syned-1.0.45 → syned-1.0.46}/README.rst +0 -0
- {syned-1.0.45 → syned-1.0.46}/setup.cfg +0 -0
- {syned-1.0.45 → syned-1.0.46}/syned/__init__.py +0 -0
- {syned-1.0.45 → syned-1.0.46}/syned/__test/__init__.py +0 -0
- {syned-1.0.45 → syned-1.0.46}/syned/__test/test.py +0 -0
- {syned-1.0.45 → syned-1.0.46}/syned/beamline/__init__.py +0 -0
- {syned-1.0.45 → syned-1.0.46}/syned/beamline/beamline.py +0 -0
- {syned-1.0.45 → syned-1.0.46}/syned/beamline/beamline_element.py +0 -0
- {syned-1.0.45 → syned-1.0.46}/syned/beamline/element_coordinates.py +0 -0
- {syned-1.0.45 → syned-1.0.46}/syned/beamline/optical_element.py +0 -0
- {syned-1.0.45 → syned-1.0.46}/syned/beamline/optical_element_with_surface_shape.py +0 -0
- {syned-1.0.45 → syned-1.0.46}/syned/beamline/optical_elements/__init__.py +0 -0
- {syned-1.0.45 → syned-1.0.46}/syned/beamline/optical_elements/absorbers/__init__.py +0 -0
- {syned-1.0.45 → syned-1.0.46}/syned/beamline/optical_elements/absorbers/absorber.py +0 -0
- {syned-1.0.45 → syned-1.0.46}/syned/beamline/optical_elements/absorbers/beam_stopper.py +0 -0
- {syned-1.0.45 → syned-1.0.46}/syned/beamline/optical_elements/absorbers/filter.py +0 -0
- {syned-1.0.45 → syned-1.0.46}/syned/beamline/optical_elements/absorbers/holed_filter.py +0 -0
- {syned-1.0.45 → syned-1.0.46}/syned/beamline/optical_elements/absorbers/slit.py +0 -0
- {syned-1.0.45 → syned-1.0.46}/syned/beamline/optical_elements/crystals/__init__.py +0 -0
- {syned-1.0.45 → syned-1.0.46}/syned/beamline/optical_elements/crystals/crystal.py +0 -0
- {syned-1.0.45 → syned-1.0.46}/syned/beamline/optical_elements/gratings/__init__.py +0 -0
- {syned-1.0.45 → syned-1.0.46}/syned/beamline/optical_elements/gratings/grating.py +0 -0
- {syned-1.0.45 → syned-1.0.46}/syned/beamline/optical_elements/ideal_elements/__init__.py +0 -0
- {syned-1.0.45 → syned-1.0.46}/syned/beamline/optical_elements/ideal_elements/ideal_element.py +0 -0
- {syned-1.0.45 → syned-1.0.46}/syned/beamline/optical_elements/ideal_elements/ideal_fzp.py +0 -0
- {syned-1.0.45 → syned-1.0.46}/syned/beamline/optical_elements/ideal_elements/ideal_lens.py +0 -0
- {syned-1.0.45 → syned-1.0.46}/syned/beamline/optical_elements/ideal_elements/screen.py +0 -0
- {syned-1.0.45 → syned-1.0.46}/syned/beamline/optical_elements/mirrors/__init__.py +0 -0
- {syned-1.0.45 → syned-1.0.46}/syned/beamline/optical_elements/mirrors/mirror.py +0 -0
- {syned-1.0.45 → syned-1.0.46}/syned/beamline/optical_elements/refractors/__init__.py +0 -0
- {syned-1.0.45 → syned-1.0.46}/syned/beamline/optical_elements/refractors/crl.py +0 -0
- {syned-1.0.45 → syned-1.0.46}/syned/beamline/optical_elements/refractors/interface.py +0 -0
- {syned-1.0.45 → syned-1.0.46}/syned/beamline/optical_elements/refractors/lens.py +0 -0
- {syned-1.0.45 → syned-1.0.46}/syned/beamline/shape.py +0 -0
- {syned-1.0.45 → syned-1.0.46}/syned/storage_ring/__init__.py +0 -0
- {syned-1.0.45 → syned-1.0.46}/syned/storage_ring/empty_light_source.py +0 -0
- {syned-1.0.45 → syned-1.0.46}/syned/storage_ring/light_source.py +0 -0
- {syned-1.0.45 → syned-1.0.46}/syned/storage_ring/magnetic_structure.py +0 -0
- {syned-1.0.45 → syned-1.0.46}/syned/storage_ring/magnetic_structures/__init__.py +0 -0
- {syned-1.0.45 → syned-1.0.46}/syned/storage_ring/magnetic_structures/bending_magnet.py +0 -0
- {syned-1.0.45 → syned-1.0.46}/syned/storage_ring/magnetic_structures/insertion_device.py +0 -0
- {syned-1.0.45 → syned-1.0.46}/syned/storage_ring/magnetic_structures/undulator.py +0 -0
- {syned-1.0.45 → syned-1.0.46}/syned/storage_ring/magnetic_structures/wiggler.py +0 -0
- {syned-1.0.45 → syned-1.0.46}/syned/syned_object.py +0 -0
- {syned-1.0.45 → syned-1.0.46}/syned/util/__init__.py +0 -0
- {syned-1.0.45 → syned-1.0.46}/syned/util/json_tools.py +0 -0
- {syned-1.0.45 → syned-1.0.46}/syned/widget/__init__.py +0 -0
- {syned-1.0.45 → syned-1.0.46}/syned/widget/widget_decorator.py +0 -0
- {syned-1.0.45 → syned-1.0.46}/syned.egg-info/SOURCES.txt +0 -0
- {syned-1.0.45 → syned-1.0.46}/syned.egg-info/dependency_links.txt +0 -0
- {syned-1.0.45 → syned-1.0.46}/syned.egg-info/not-zip-safe +0 -0
- {syned-1.0.45 → syned-1.0.46}/syned.egg-info/requires.txt +0 -0
- {syned-1.0.45 → syned-1.0.46}/syned.egg-info/top_level.txt +0 -0
|
@@ -130,16 +130,18 @@ class ElectronBeam(SynedObject):
|
|
|
130
130
|
|
|
131
131
|
@classmethod
|
|
132
132
|
def _emittance_without_dispersion(cls, moment_ss, moment_sa, moment_aa):
|
|
133
|
-
return numpy.sqrt(moment_ss * moment_aa - moment_sa**2)
|
|
133
|
+
return float(numpy.sqrt(moment_ss * moment_aa - moment_sa**2))
|
|
134
134
|
|
|
135
135
|
@classmethod
|
|
136
136
|
def _emittance_with_dispersion(cls, moment_ss, moment_sa, moment_aa, energy_spread, dispersion_s, dispersion_a):
|
|
137
|
-
return numpy.sqrt((moment_ss + (dispersion_s * energy_spread) ** 2) *
|
|
138
|
-
|
|
137
|
+
return float(numpy.sqrt((moment_ss + (dispersion_s * energy_spread) ** 2) *
|
|
138
|
+
(moment_aa + (dispersion_a * energy_spread) ** 2) -
|
|
139
|
+
(moment_sa + dispersion_s * dispersion_a * energy_spread ** 2) ** 2))
|
|
139
140
|
|
|
140
141
|
@classmethod
|
|
141
142
|
def _get_twiss_from_moments(cls, moment_ss, moment_sa, moment_aa):
|
|
142
143
|
emittance = cls._emittance_without_dispersion(moment_ss, moment_sa, moment_aa)
|
|
144
|
+
|
|
143
145
|
if emittance == 0.0:
|
|
144
146
|
warnings.warn(message="All moments are 0.0 and the calculation is not possible. \u03b5 = \u03b1 = \u03b2 = \u03b3 = 0.0 is returned.",
|
|
145
147
|
category=UserWarning, stacklevel=2)
|
|
@@ -168,7 +170,7 @@ class ElectronBeam(SynedObject):
|
|
|
168
170
|
|
|
169
171
|
moment_sa = 0.0 if moment_sa == 0 else moment_sa # to avoid -0.0
|
|
170
172
|
|
|
171
|
-
return moment_ss, moment_sa, moment_aa
|
|
173
|
+
return float(moment_ss), float(moment_sa), float(moment_aa)
|
|
172
174
|
|
|
173
175
|
@classmethod
|
|
174
176
|
def _get_moments_with_dispersion(cls, moment_ss, moment_sa, moment_aa, energy_spread, dispersion_s, dispersion_a):
|
|
@@ -176,7 +178,7 @@ class ElectronBeam(SynedObject):
|
|
|
176
178
|
moment_sa_disp = moment_sa + dispersion_s * dispersion_a * (energy_spread ** 2)
|
|
177
179
|
moment_aa_disp = moment_aa + (dispersion_a * energy_spread) ** 2
|
|
178
180
|
|
|
179
|
-
return moment_ss_disp, moment_sa_disp, moment_aa_disp
|
|
181
|
+
return float(moment_ss_disp), float(moment_sa_disp), float(moment_aa_disp)
|
|
180
182
|
|
|
181
183
|
|
|
182
184
|
# --- GETTERS
|
|
@@ -195,7 +197,7 @@ class ElectronBeam(SynedObject):
|
|
|
195
197
|
|
|
196
198
|
moment_xx, _, moment_xpxp = self.get_moments_horizontal(dispersion)
|
|
197
199
|
|
|
198
|
-
return numpy.sqrt(moment_xx), numpy.sqrt(moment_xpxp)
|
|
200
|
+
return float(numpy.sqrt(moment_xx)), float(numpy.sqrt(moment_xpxp))
|
|
199
201
|
|
|
200
202
|
def get_sigmas_vertical(self, dispersion=True):
|
|
201
203
|
"""
|
|
@@ -209,7 +211,7 @@ class ElectronBeam(SynedObject):
|
|
|
209
211
|
"""
|
|
210
212
|
moment_yy, _, moment_ypyp = self.get_moments_vertical(dispersion)
|
|
211
213
|
|
|
212
|
-
return numpy.sqrt(moment_yy), numpy.sqrt(moment_ypyp)
|
|
214
|
+
return float(numpy.sqrt(moment_yy)), float(numpy.sqrt(moment_ypyp))
|
|
213
215
|
|
|
214
216
|
def get_sigmas_all(self, dispersion=True):
|
|
215
217
|
"""
|
|
@@ -237,7 +239,7 @@ class ElectronBeam(SynedObject):
|
|
|
237
239
|
( <x^2>, <x x'>, <x'^2>)
|
|
238
240
|
|
|
239
241
|
"""
|
|
240
|
-
if not dispersion: return self._moment_xx, self._moment_xxp, self._moment_xpxp
|
|
242
|
+
if not dispersion: return float(self._moment_xx), float(self._moment_xxp), float(self._moment_xpxp)
|
|
241
243
|
else: return self._get_moments_with_dispersion(self._moment_xx,
|
|
242
244
|
self._moment_xxp,
|
|
243
245
|
self._moment_xpxp,
|
|
@@ -256,7 +258,7 @@ class ElectronBeam(SynedObject):
|
|
|
256
258
|
|
|
257
259
|
"""
|
|
258
260
|
|
|
259
|
-
if not dispersion: return self._moment_yy, self._moment_yyp, self._moment_ypyp
|
|
261
|
+
if not dispersion: return float(self._moment_yy), float(self._moment_yyp), float(self._moment_ypyp)
|
|
260
262
|
else: return self._get_moments_with_dispersion(self._moment_yy,
|
|
261
263
|
self._moment_yyp,
|
|
262
264
|
self._moment_ypyp,
|
|
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.45 → syned-1.0.46}/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
|
|
File without changes
|
|
File without changes
|