syned 1.0.41__tar.gz → 1.0.42__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.41 → syned-1.0.42}/PKG-INFO +1 -1
- {syned-1.0.41 → syned-1.0.42}/setup.py +1 -1
- syned-1.0.42/syned/beamline/optical_elements/__init__.py +1 -0
- syned-1.0.42/syned/beamline/optical_elements/crystals/__init__.py +1 -0
- syned-1.0.42/syned/beamline/optical_elements/gratings/__init__.py +1 -0
- syned-1.0.42/syned/beamline/optical_elements/ideal_elements/__init__.py +1 -0
- syned-1.0.42/syned/beamline/optical_elements/mirrors/__init__.py +1 -0
- syned-1.0.42/syned/beamline/optical_elements/refractors/__init__.py +1 -0
- syned-1.0.42/syned/storage_ring/__init__.py +1 -0
- syned-1.0.42/syned/storage_ring/magnetic_structures/__init__.py +1 -0
- {syned-1.0.41 → syned-1.0.42}/syned/version.py +4 -4
- {syned-1.0.41 → syned-1.0.42}/syned/widget/widget_decorator.py +20 -2
- {syned-1.0.41 → syned-1.0.42}/syned.egg-info/PKG-INFO +1 -1
- syned-1.0.42/syned.egg-info/SOURCES.txt +60 -0
- syned-1.0.41/examples/example_get_source.py +0 -48
- syned-1.0.41/shadow4/examples/optical_elements/examples_crystal.py +0 -134
- syned-1.0.41/shadow4/examples/optical_elements/examples_crystal_asymmetric.py +0 -134
- syned-1.0.41/shadow4/examples/optical_elements/examples_crystal_yb66.py +0 -124
- syned-1.0.41/shadow4/examples/optical_elements/examples_ideal_lens.py +0 -283
- syned-1.0.41/shadow4/examples/optical_elements/examples_mirror.py +0 -505
- syned-1.0.41/shadow4/examples/optical_elements/examples_screen.py +0 -184
- syned-1.0.41/shadow4/examples/sources/example_bending_magnet_als_infrared.py +0 -64
- syned-1.0.41/shadow4/examples/sources/example_bending_magnet_esrf1.py +0 -60
- syned-1.0.41/shadow4/examples/sources/example_source_undulator.py +0 -96
- syned-1.0.41/shadow4/examples/sources/example_wiggler_als_infrared.py +0 -134
- syned-1.0.41/shadow4/examples/sources/examples_source_gaussian.py +0 -86
- syned-1.0.41/shadow4/examples/sources/examples_source_geometrical.py +0 -91
- syned-1.0.41/shadow4/examples/sources/examples_sources_file_io.py +0 -128
- syned-1.0.41/shadow4/setup.py +0 -95
- syned-1.0.41/shadow4/shadow4/__init__.py +0 -2
- syned-1.0.41/shadow4/shadow4/beam/__init__.py +0 -1
- syned-1.0.41/shadow4/shadow4/beam/s4_beam.py +0 -2350
- syned-1.0.41/shadow4/shadow4/beamline/__init__.py +0 -0
- syned-1.0.41/shadow4/shadow4/beamline/optical_elements/__init__.py +0 -1
- syned-1.0.41/shadow4/shadow4/beamline/optical_elements/absorbers/__init__.py +0 -0
- syned-1.0.41/shadow4/shadow4/beamline/optical_elements/absorbers/s4_screen.py +0 -200
- syned-1.0.41/shadow4/shadow4/beamline/optical_elements/crystals/__init__.py +0 -0
- syned-1.0.41/shadow4/shadow4/beamline/optical_elements/crystals/s4_additional_numerical_mesh_crystal.py +0 -161
- syned-1.0.41/shadow4/shadow4/beamline/optical_elements/crystals/s4_conic_crystal.py +0 -236
- syned-1.0.41/shadow4/shadow4/beamline/optical_elements/crystals/s4_crystal.py +0 -867
- syned-1.0.41/shadow4/shadow4/beamline/optical_elements/crystals/s4_ellipsoid_crystal.py +0 -263
- syned-1.0.41/shadow4/shadow4/beamline/optical_elements/crystals/s4_hyperboloid_crystal.py +0 -263
- syned-1.0.41/shadow4/shadow4/beamline/optical_elements/crystals/s4_numerical_mesh_crystal.py +0 -292
- syned-1.0.41/shadow4/shadow4/beamline/optical_elements/crystals/s4_paraboloid_crystal.py +0 -266
- syned-1.0.41/shadow4/shadow4/beamline/optical_elements/crystals/s4_plane_crystal.py +0 -231
- syned-1.0.41/shadow4/shadow4/beamline/optical_elements/crystals/s4_sphere_crystal.py +0 -253
- syned-1.0.41/shadow4/shadow4/beamline/optical_elements/crystals/s4_toroid_crystal.py +0 -257
- syned-1.0.41/shadow4/shadow4/beamline/optical_elements/gratings/__init__.py +0 -0
- syned-1.0.41/shadow4/shadow4/beamline/optical_elements/gratings/s4_additional_numerical_mesh_grating.py +0 -160
- syned-1.0.41/shadow4/shadow4/beamline/optical_elements/gratings/s4_conic_grating.py +0 -162
- syned-1.0.41/shadow4/shadow4/beamline/optical_elements/gratings/s4_ellipsoid_grating.py +0 -175
- syned-1.0.41/shadow4/shadow4/beamline/optical_elements/gratings/s4_grating.py +0 -289
- syned-1.0.41/shadow4/shadow4/beamline/optical_elements/gratings/s4_hyperboloid_grating.py +0 -175
- syned-1.0.41/shadow4/shadow4/beamline/optical_elements/gratings/s4_numerical_mesh_grating.py +0 -161
- syned-1.0.41/shadow4/shadow4/beamline/optical_elements/gratings/s4_paraboloid_grating.py +0 -180
- syned-1.0.41/shadow4/shadow4/beamline/optical_elements/gratings/s4_plane_grating.py +0 -156
- syned-1.0.41/shadow4/shadow4/beamline/optical_elements/gratings/s4_sphere_grating.py +0 -176
- syned-1.0.41/shadow4/shadow4/beamline/optical_elements/gratings/s4_toroid_grating.py +0 -171
- syned-1.0.41/shadow4/shadow4/beamline/optical_elements/ideal_elements/__init__.py +0 -0
- syned-1.0.41/shadow4/shadow4/beamline/optical_elements/ideal_elements/s4_beam_movement.py +0 -108
- syned-1.0.41/shadow4/shadow4/beamline/optical_elements/ideal_elements/s4_empty.py +0 -78
- syned-1.0.41/shadow4/shadow4/beamline/optical_elements/ideal_elements/s4_ideal_lens.py +0 -176
- syned-1.0.41/shadow4/shadow4/beamline/optical_elements/mirrors/__init__.py +0 -0
- syned-1.0.41/shadow4/shadow4/beamline/optical_elements/mirrors/s4_additional_numerical_mesh_mirror.py +0 -183
- syned-1.0.41/shadow4/shadow4/beamline/optical_elements/mirrors/s4_conic_mirror.py +0 -89
- syned-1.0.41/shadow4/shadow4/beamline/optical_elements/mirrors/s4_ellipsoid_mirror.py +0 -121
- syned-1.0.41/shadow4/shadow4/beamline/optical_elements/mirrors/s4_hyperboloid_mirror.py +0 -126
- syned-1.0.41/shadow4/shadow4/beamline/optical_elements/mirrors/s4_mirror.py +0 -442
- syned-1.0.41/shadow4/shadow4/beamline/optical_elements/mirrors/s4_numerical_mesh_mirror.py +0 -98
- syned-1.0.41/shadow4/shadow4/beamline/optical_elements/mirrors/s4_paraboloid_mirror.py +0 -116
- syned-1.0.41/shadow4/shadow4/beamline/optical_elements/mirrors/s4_plane_mirror.py +0 -90
- syned-1.0.41/shadow4/shadow4/beamline/optical_elements/mirrors/s4_sphere_mirror.py +0 -101
- syned-1.0.41/shadow4/shadow4/beamline/optical_elements/mirrors/s4_toroid_mirror.py +0 -108
- syned-1.0.41/shadow4/shadow4/beamline/optical_elements/refractors/__init__.py +0 -0
- syned-1.0.41/shadow4/shadow4/beamline/optical_elements/refractors/s4_conic_interface.py +0 -254
- syned-1.0.41/shadow4/shadow4/beamline/optical_elements/refractors/s4_crl.py +0 -219
- syned-1.0.41/shadow4/shadow4/beamline/optical_elements/refractors/s4_interface.py +0 -227
- syned-1.0.41/shadow4/shadow4/beamline/optical_elements/refractors/s4_lens.py +0 -315
- syned-1.0.41/shadow4/shadow4/beamline/s4_beamline.py +0 -76
- syned-1.0.41/shadow4/shadow4/beamline/s4_beamline_element.py +0 -36
- syned-1.0.41/shadow4/shadow4/beamline/s4_beamline_element_movements.py +0 -24
- syned-1.0.41/shadow4/shadow4/beamline/s4_optical_element_decorators.py +0 -725
- syned-1.0.41/shadow4/shadow4/optical_surfaces/__init__.py +0 -1
- syned-1.0.41/shadow4/shadow4/optical_surfaces/s4_conic.py +0 -1379
- syned-1.0.41/shadow4/shadow4/optical_surfaces/s4_mesh.py +0 -523
- syned-1.0.41/shadow4/shadow4/optical_surfaces/s4_mesh_old.py +0 -629
- syned-1.0.41/shadow4/shadow4/optical_surfaces/s4_optical_surface.py +0 -141
- syned-1.0.41/shadow4/shadow4/optical_surfaces/s4_toroid.py +0 -459
- syned-1.0.41/shadow4/shadow4/physical_models/__init__.py +0 -0
- syned-1.0.41/shadow4/shadow4/physical_models/bragg/__init__.py +0 -0
- syned-1.0.41/shadow4/shadow4/physical_models/bragg/bragg.py +0 -281
- syned-1.0.41/shadow4/shadow4/physical_models/mlayer/__init__.py +0 -1
- syned-1.0.41/shadow4/shadow4/physical_models/mlayer/mlayer.py +0 -1078
- syned-1.0.41/shadow4/shadow4/physical_models/prerefl/__init__.py +0 -1
- syned-1.0.41/shadow4/shadow4/physical_models/prerefl/prerefl.py +0 -748
- syned-1.0.41/shadow4/shadow4/sources/__init__.py +0 -0
- syned-1.0.41/shadow4/shadow4/sources/bending_magnet/__init__.py +0 -1
- syned-1.0.41/shadow4/shadow4/sources/bending_magnet/s4_bending_magnet.py +0 -252
- syned-1.0.41/shadow4/shadow4/sources/bending_magnet/s4_bending_magnet_light_source.py +0 -720
- syned-1.0.41/shadow4/shadow4/sources/s4_electron_beam.py +0 -88
- syned-1.0.41/shadow4/shadow4/sources/s4_light_source.py +0 -159
- syned-1.0.41/shadow4/shadow4/sources/s4_light_source_base.py +0 -120
- syned-1.0.41/shadow4/shadow4/sources/source_geometrical/__init__.py +0 -1
- syned-1.0.41/shadow4/shadow4/sources/source_geometrical/probability_distributions.py +0 -707
- syned-1.0.41/shadow4/shadow4/sources/source_geometrical/source_gaussian.py +0 -405
- syned-1.0.41/shadow4/shadow4/sources/source_geometrical/source_geometrical.py +0 -1006
- syned-1.0.41/shadow4/shadow4/sources/source_geometrical/source_grid_cartesian.py +0 -460
- syned-1.0.41/shadow4/shadow4/sources/source_geometrical/source_grid_polar.py +0 -424
- syned-1.0.41/shadow4/shadow4/sources/undulator/hankel_example_srio.py +0 -186
- syned-1.0.41/shadow4/shadow4/sources/undulator/s4_undulator.py +0 -338
- syned-1.0.41/shadow4/shadow4/sources/undulator/s4_undulator_light_source.py +0 -1499
- syned-1.0.41/shadow4/shadow4/sources/undulator/source_undulator_factory.py +0 -297
- syned-1.0.41/shadow4/shadow4/sources/undulator/source_undulator_factory_pysru.py +0 -525
- syned-1.0.41/shadow4/shadow4/sources/undulator/source_undulator_factory_srw.py +0 -484
- syned-1.0.41/shadow4/shadow4/sources/undulator/source_undulator_input_output.py +0 -421
- syned-1.0.41/shadow4/shadow4/sources/wiggler/__init__.py +0 -1
- syned-1.0.41/shadow4/shadow4/sources/wiggler/s4_wiggler.py +0 -454
- syned-1.0.41/shadow4/shadow4/sources/wiggler/s4_wiggler_light_source.py +0 -1231
- syned-1.0.41/shadow4/shadow4/tools/__init__.py +0 -0
- syned-1.0.41/shadow4/shadow4/tools/arrayofvectors.py +0 -231
- syned-1.0.41/shadow4/shadow4/tools/graphics.py +0 -482
- syned-1.0.41/shadow4/shadow4/tools/sync_f_sigma_and_pi.py +0 -217
- syned-1.0.41/syned/__init__.py +0 -1
- syned-1.0.41/syned/beamline/__init__.py +0 -2
- syned-1.0.41/syned/beamline/optical_elements/__init__.py +0 -2
- syned-1.0.41/syned/beamline/optical_elements/absorbers/__init__.py +0 -1
- syned-1.0.41/syned/beamline/optical_elements/crystals/__init__.py +0 -1
- syned-1.0.41/syned/beamline/optical_elements/gratings/__init__.py +0 -1
- syned-1.0.41/syned/beamline/optical_elements/gratings/tmp1.py +0 -104
- syned-1.0.41/syned/beamline/optical_elements/ideal_elements/__init__.py +0 -1
- syned-1.0.41/syned/beamline/optical_elements/mirrors/__init__.py +0 -1
- syned-1.0.41/syned/beamline/optical_elements/refractors/__init__.py +0 -1
- syned-1.0.41/syned/beamline/optical_elements/tmp.py +0 -23
- syned-1.0.41/syned/storage_ring/__init__.py +0 -2
- syned-1.0.41/syned/storage_ring/magnetic_structures/__init__.py +0 -2
- syned-1.0.41/syned/util/__init__.py +0 -1
- syned-1.0.41/syned/widget/__init__.py +0 -1
- syned-1.0.41/syned.egg-info/SOURCES.txt +0 -175
- {syned-1.0.41 → syned-1.0.42}/LICENSE +0 -0
- {syned-1.0.41 → syned-1.0.42}/MANIFEST.in +0 -0
- {syned-1.0.41 → syned-1.0.42}/README.rst +0 -0
- {syned-1.0.41 → syned-1.0.42}/examples/__init__.py +0 -0
- {syned-1.0.41 → syned-1.0.42}/examples/example_beamline.py +0 -0
- {syned-1.0.41 → syned-1.0.42}/examples/example_double_slit.py +0 -0
- {syned-1.0.41 → syned-1.0.42}/examples/example_json_input_output.py +0 -0
- {syned-1.0.41 → syned-1.0.42}/setup.cfg +0 -0
- {syned-1.0.41/shadow4 → syned-1.0.42/syned}/__init__.py +0 -0
- {syned-1.0.41/shadow4/shadow4/sources/undulator → syned-1.0.42/syned/beamline}/__init__.py +0 -0
- {syned-1.0.41 → syned-1.0.42}/syned/beamline/beamline.py +0 -0
- {syned-1.0.41 → syned-1.0.42}/syned/beamline/beamline_element.py +0 -0
- {syned-1.0.41 → syned-1.0.42}/syned/beamline/element_coordinates.py +0 -0
- {syned-1.0.41 → syned-1.0.42}/syned/beamline/optical_element.py +0 -0
- {syned-1.0.41 → syned-1.0.42}/syned/beamline/optical_element_with_surface_shape.py +0 -0
- {syned-1.0.41/shadow4/examples → syned-1.0.42/syned/beamline/optical_elements/absorbers}/__init__.py +0 -0
- {syned-1.0.41 → syned-1.0.42}/syned/beamline/optical_elements/absorbers/absorber.py +0 -0
- {syned-1.0.41 → syned-1.0.42}/syned/beamline/optical_elements/absorbers/beam_stopper.py +0 -0
- {syned-1.0.41 → syned-1.0.42}/syned/beamline/optical_elements/absorbers/filter.py +0 -0
- {syned-1.0.41 → syned-1.0.42}/syned/beamline/optical_elements/absorbers/holed_filter.py +0 -0
- {syned-1.0.41 → syned-1.0.42}/syned/beamline/optical_elements/absorbers/slit.py +0 -0
- {syned-1.0.41 → syned-1.0.42}/syned/beamline/optical_elements/crystals/crystal.py +0 -0
- {syned-1.0.41 → syned-1.0.42}/syned/beamline/optical_elements/gratings/grating.py +0 -0
- {syned-1.0.41 → syned-1.0.42}/syned/beamline/optical_elements/ideal_elements/ideal_element.py +0 -0
- {syned-1.0.41 → syned-1.0.42}/syned/beamline/optical_elements/ideal_elements/ideal_fzp.py +0 -0
- {syned-1.0.41 → syned-1.0.42}/syned/beamline/optical_elements/ideal_elements/ideal_lens.py +0 -0
- {syned-1.0.41 → syned-1.0.42}/syned/beamline/optical_elements/ideal_elements/screen.py +0 -0
- {syned-1.0.41 → syned-1.0.42}/syned/beamline/optical_elements/mirrors/mirror.py +0 -0
- {syned-1.0.41 → syned-1.0.42}/syned/beamline/optical_elements/refractors/crl.py +0 -0
- {syned-1.0.41 → syned-1.0.42}/syned/beamline/optical_elements/refractors/interface.py +0 -0
- {syned-1.0.41 → syned-1.0.42}/syned/beamline/optical_elements/refractors/lens.py +0 -0
- {syned-1.0.41 → syned-1.0.42}/syned/beamline/shape.py +0 -0
- {syned-1.0.41 → syned-1.0.42}/syned/storage_ring/electron_beam.py +0 -0
- {syned-1.0.41 → syned-1.0.42}/syned/storage_ring/empty_light_source.py +0 -0
- {syned-1.0.41 → syned-1.0.42}/syned/storage_ring/light_source.py +0 -0
- {syned-1.0.41 → syned-1.0.42}/syned/storage_ring/magnetic_structure.py +0 -0
- {syned-1.0.41 → syned-1.0.42}/syned/storage_ring/magnetic_structures/bending_magnet.py +0 -0
- {syned-1.0.41 → syned-1.0.42}/syned/storage_ring/magnetic_structures/insertion_device.py +0 -0
- {syned-1.0.41 → syned-1.0.42}/syned/storage_ring/magnetic_structures/undulator.py +0 -0
- {syned-1.0.41 → syned-1.0.42}/syned/storage_ring/magnetic_structures/wiggler.py +0 -0
- {syned-1.0.41 → syned-1.0.42}/syned/syned_object.py +0 -0
- {syned-1.0.41/shadow4/examples/optical_elements → syned-1.0.42/syned/util}/__init__.py +0 -0
- {syned-1.0.41 → syned-1.0.42}/syned/util/json_tools.py +0 -0
- {syned-1.0.41/shadow4/examples/sources → syned-1.0.42/syned/widget}/__init__.py +0 -0
- {syned-1.0.41 → syned-1.0.42}/syned.egg-info/dependency_links.txt +0 -0
- {syned-1.0.41 → syned-1.0.42}/syned.egg-info/not-zip-safe +0 -0
- {syned-1.0.41 → syned-1.0.42}/syned.egg-info/requires.txt +0 -0
- {syned-1.0.41 → syned-1.0.42}/syned.egg-info/top_level.txt +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
|
|
2
2
|
# THIS FILE IS GENERATED FROM syned SETUP.PY
|
|
3
|
-
short_version = '1.0.
|
|
4
|
-
version = '1.0.
|
|
5
|
-
full_version = '1.0.
|
|
6
|
-
git_revision = '
|
|
3
|
+
short_version = '1.0.38'
|
|
4
|
+
version = '1.0.38'
|
|
5
|
+
full_version = '1.0.38'
|
|
6
|
+
git_revision = ''
|
|
7
7
|
release = True
|
|
8
8
|
|
|
9
9
|
if not release:
|
|
@@ -8,7 +8,7 @@ class WidgetDecorator(object):
|
|
|
8
8
|
"""
|
|
9
9
|
|
|
10
10
|
@classmethod
|
|
11
|
-
def syned_input_data(cls):
|
|
11
|
+
def syned_input_data(cls, multi_input=False):
|
|
12
12
|
"""
|
|
13
13
|
A string to help defining SYNED data in OASYS.
|
|
14
14
|
|
|
@@ -18,7 +18,25 @@ class WidgetDecorator(object):
|
|
|
18
18
|
[("SynedData", Beamline, "receive_syned_data")]
|
|
19
19
|
|
|
20
20
|
"""
|
|
21
|
-
|
|
21
|
+
try: # OASYS2
|
|
22
|
+
import oasys2
|
|
23
|
+
|
|
24
|
+
if not multi_input:
|
|
25
|
+
from orangewidget.widget import Input
|
|
26
|
+
|
|
27
|
+
return Input(name="SynedData",
|
|
28
|
+
type=Beamline,
|
|
29
|
+
id="SynedData",
|
|
30
|
+
default=True, auto_summary=False)
|
|
31
|
+
else:
|
|
32
|
+
from orangewidget.widget import MultiInput
|
|
33
|
+
|
|
34
|
+
return MultiInput(name="SynedData",
|
|
35
|
+
type=Beamline,
|
|
36
|
+
id="SynedData",
|
|
37
|
+
default=True, auto_summary=False)
|
|
38
|
+
except:
|
|
39
|
+
return [("SynedData", Beamline, "receive_syned_data")]
|
|
22
40
|
|
|
23
41
|
@classmethod
|
|
24
42
|
def append_syned_input_data(cls, inputs):
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
LICENSE
|
|
2
|
+
MANIFEST.in
|
|
3
|
+
README.rst
|
|
4
|
+
setup.py
|
|
5
|
+
examples/__init__.py
|
|
6
|
+
examples/example_beamline.py
|
|
7
|
+
examples/example_double_slit.py
|
|
8
|
+
examples/example_json_input_output.py
|
|
9
|
+
syned/__init__.py
|
|
10
|
+
syned/syned_object.py
|
|
11
|
+
syned/version.py
|
|
12
|
+
syned.egg-info/PKG-INFO
|
|
13
|
+
syned.egg-info/SOURCES.txt
|
|
14
|
+
syned.egg-info/dependency_links.txt
|
|
15
|
+
syned.egg-info/not-zip-safe
|
|
16
|
+
syned.egg-info/requires.txt
|
|
17
|
+
syned.egg-info/top_level.txt
|
|
18
|
+
syned/beamline/__init__.py
|
|
19
|
+
syned/beamline/beamline.py
|
|
20
|
+
syned/beamline/beamline_element.py
|
|
21
|
+
syned/beamline/element_coordinates.py
|
|
22
|
+
syned/beamline/optical_element.py
|
|
23
|
+
syned/beamline/optical_element_with_surface_shape.py
|
|
24
|
+
syned/beamline/shape.py
|
|
25
|
+
syned/beamline/optical_elements/__init__.py
|
|
26
|
+
syned/beamline/optical_elements/absorbers/__init__.py
|
|
27
|
+
syned/beamline/optical_elements/absorbers/absorber.py
|
|
28
|
+
syned/beamline/optical_elements/absorbers/beam_stopper.py
|
|
29
|
+
syned/beamline/optical_elements/absorbers/filter.py
|
|
30
|
+
syned/beamline/optical_elements/absorbers/holed_filter.py
|
|
31
|
+
syned/beamline/optical_elements/absorbers/slit.py
|
|
32
|
+
syned/beamline/optical_elements/crystals/__init__.py
|
|
33
|
+
syned/beamline/optical_elements/crystals/crystal.py
|
|
34
|
+
syned/beamline/optical_elements/gratings/__init__.py
|
|
35
|
+
syned/beamline/optical_elements/gratings/grating.py
|
|
36
|
+
syned/beamline/optical_elements/ideal_elements/__init__.py
|
|
37
|
+
syned/beamline/optical_elements/ideal_elements/ideal_element.py
|
|
38
|
+
syned/beamline/optical_elements/ideal_elements/ideal_fzp.py
|
|
39
|
+
syned/beamline/optical_elements/ideal_elements/ideal_lens.py
|
|
40
|
+
syned/beamline/optical_elements/ideal_elements/screen.py
|
|
41
|
+
syned/beamline/optical_elements/mirrors/__init__.py
|
|
42
|
+
syned/beamline/optical_elements/mirrors/mirror.py
|
|
43
|
+
syned/beamline/optical_elements/refractors/__init__.py
|
|
44
|
+
syned/beamline/optical_elements/refractors/crl.py
|
|
45
|
+
syned/beamline/optical_elements/refractors/interface.py
|
|
46
|
+
syned/beamline/optical_elements/refractors/lens.py
|
|
47
|
+
syned/storage_ring/__init__.py
|
|
48
|
+
syned/storage_ring/electron_beam.py
|
|
49
|
+
syned/storage_ring/empty_light_source.py
|
|
50
|
+
syned/storage_ring/light_source.py
|
|
51
|
+
syned/storage_ring/magnetic_structure.py
|
|
52
|
+
syned/storage_ring/magnetic_structures/__init__.py
|
|
53
|
+
syned/storage_ring/magnetic_structures/bending_magnet.py
|
|
54
|
+
syned/storage_ring/magnetic_structures/insertion_device.py
|
|
55
|
+
syned/storage_ring/magnetic_structures/undulator.py
|
|
56
|
+
syned/storage_ring/magnetic_structures/wiggler.py
|
|
57
|
+
syned/util/__init__.py
|
|
58
|
+
syned/util/json_tools.py
|
|
59
|
+
syned/widget/__init__.py
|
|
60
|
+
syned/widget/widget_decorator.py
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
from syned.storage_ring.magnetic_structures.undulator import Undulator
|
|
4
|
-
from syned.storage_ring.magnetic_structures.wiggler import Wiggler
|
|
5
|
-
from syned.storage_ring.magnetic_structures.bending_magnet import BendingMagnet
|
|
6
|
-
from syned.storage_ring.light_source import LightSource
|
|
7
|
-
from syned.storage_ring.electron_beam import ElectronBeam
|
|
8
|
-
|
|
9
|
-
from syned.beamline.beamline import Beamline
|
|
10
|
-
|
|
11
|
-
if __name__ == "__main__":
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
src1 = ElectronBeam.initialize_as_pencil_beam(energy_in_GeV=6.0,current=0.2)
|
|
16
|
-
src2 = Undulator()
|
|
17
|
-
src = LightSource("test",src1,src2)
|
|
18
|
-
magnetic_structure = src.get_magnetic_structure()
|
|
19
|
-
|
|
20
|
-
print(magnetic_structure)
|
|
21
|
-
if isinstance(magnetic_structure, Undulator):
|
|
22
|
-
print(" I am undulator")
|
|
23
|
-
elif isinstance(magnetic_structure, Wiggler):
|
|
24
|
-
print("I am wiggler")
|
|
25
|
-
elif isinstance(magnetic_structure, BendingMagnet):
|
|
26
|
-
print("I am a Bending Magnet")
|
|
27
|
-
else:
|
|
28
|
-
print("I do not know what I am...")
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
#
|
|
32
|
-
#
|
|
33
|
-
#
|
|
34
|
-
|
|
35
|
-
a = Beamline()
|
|
36
|
-
magnetic_structure = a.get_light_source().get_magnetic_structure()
|
|
37
|
-
|
|
38
|
-
print(magnetic_structure)
|
|
39
|
-
if isinstance(magnetic_structure, Undulator):
|
|
40
|
-
print(" I am undulator")
|
|
41
|
-
elif isinstance(magnetic_structure, Wiggler):
|
|
42
|
-
print("I am wiggler")
|
|
43
|
-
elif isinstance(magnetic_structure, BendingMagnet):
|
|
44
|
-
print("I am a Bending Magnet")
|
|
45
|
-
else:
|
|
46
|
-
print("I do not know what I am...")
|
|
47
|
-
|
|
48
|
-
|
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import numpy
|
|
3
|
-
|
|
4
|
-
from shadow4.sources.source_geometrical.source_geometrical import SourceGeometrical
|
|
5
|
-
from shadow4.beamline.optical_elements.crystals.s4_plane_crystal import S4PlaneCrystal, S4PlaneCrystalElement
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
from shadow4.tools.graphics import plotxy
|
|
9
|
-
|
|
10
|
-
from syned.beamline.element_coordinates import ElementCoordinates
|
|
11
|
-
|
|
12
|
-
from syned.beamline.optical_elements.crystals.crystal import Crystal, DiffractionGeometry
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
def get_sigmas_radiation(photon_energy,undulator_length):
|
|
16
|
-
import scipy.constants as codata
|
|
17
|
-
lambdan = 1e-10 * codata.h*codata.c/codata.e*1e10 / photon_energy # in m
|
|
18
|
-
print("wavelength in m",lambdan)
|
|
19
|
-
return 1e6*2.740/4/numpy.pi*numpy.sqrt(lambdan*undulator_length),1e6*0.69*numpy.sqrt(lambdan/undulator_length)
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
def crystal_diffraction_with_collimated_beam(do_plot=True):
|
|
23
|
-
|
|
24
|
-
#
|
|
25
|
-
# collimated source
|
|
26
|
-
#
|
|
27
|
-
|
|
28
|
-
if True:
|
|
29
|
-
src = SourceGeometrical()
|
|
30
|
-
src.set_energy_distribution_singleline(value=8000, unit='eV')
|
|
31
|
-
src.set_spatial_type_rectangle(width=1e-3, height=1e-3)
|
|
32
|
-
src.set_angular_distribution_uniform(0,0,-100e-6,100e-6)
|
|
33
|
-
src.set_polarization(polarization_degree= 0.5, phase_diff=numpy.pi/4, coherent_beam=True)
|
|
34
|
-
beam = src.get_beam()
|
|
35
|
-
|
|
36
|
-
print(beam.info())
|
|
37
|
-
SX, SZ = (1e6*beam.get_standard_deviation(1),1e6*beam.get_standard_deviation(3))
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
#
|
|
41
|
-
# crystal definition
|
|
42
|
-
#
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
if False:
|
|
46
|
-
crystal1 = S4PlaneCrystalElement(
|
|
47
|
-
optical_element=S4PlaneCrystal(
|
|
48
|
-
name="Plane crystal",
|
|
49
|
-
boundary_shape=None,
|
|
50
|
-
material="Si",
|
|
51
|
-
diffraction_geometry=DiffractionGeometry.BRAGG, # ?? not supposed to be in syned...
|
|
52
|
-
miller_index_h=1,
|
|
53
|
-
miller_index_k=1,
|
|
54
|
-
miller_index_l=1,
|
|
55
|
-
asymmetry_angle=0.0,
|
|
56
|
-
thickness=0.010, # this is thick crystal approximation
|
|
57
|
-
f_central=True,
|
|
58
|
-
f_phot_cent=0,
|
|
59
|
-
phot_cent=8000.0,
|
|
60
|
-
file_refl="",
|
|
61
|
-
f_bragg_a=False,
|
|
62
|
-
# a_bragg=0.0,
|
|
63
|
-
f_johansson=False,
|
|
64
|
-
r_johansson=1.0,
|
|
65
|
-
f_mosaic=False,
|
|
66
|
-
spread_mos=0.4 * numpy.pi / 180,
|
|
67
|
-
f_ext=0, ),
|
|
68
|
-
coordinates=ElementCoordinates(p=0.0, q=5000.0e-3,
|
|
69
|
-
angle_radial=0.0, angle_azimuthal=0.0, angle_radial_out=0.0),
|
|
70
|
-
input_beam=beam)
|
|
71
|
-
else:
|
|
72
|
-
crystal1 = S4PlaneCrystalElement()
|
|
73
|
-
optical_element = S4PlaneCrystal(
|
|
74
|
-
name="Plane crystal",
|
|
75
|
-
boundary_shape=None,
|
|
76
|
-
material="Si",
|
|
77
|
-
diffraction_geometry=DiffractionGeometry.BRAGG, # ?? not supposed to be in syned...
|
|
78
|
-
miller_index_h=1,
|
|
79
|
-
miller_index_k=1,
|
|
80
|
-
miller_index_l=1,
|
|
81
|
-
asymmetry_angle=0.0,
|
|
82
|
-
thickness=0.010, # this is thick crystal approximation
|
|
83
|
-
f_central=True,
|
|
84
|
-
f_phot_cent=0,
|
|
85
|
-
phot_cent=8000.0,
|
|
86
|
-
file_refl="",
|
|
87
|
-
f_bragg_a=False,
|
|
88
|
-
# a_bragg=0.0,
|
|
89
|
-
f_johansson=False,
|
|
90
|
-
r_johansson=1.0,
|
|
91
|
-
f_mosaic=False,
|
|
92
|
-
spread_mos=0.4 * numpy.pi / 180,
|
|
93
|
-
f_ext=0, )
|
|
94
|
-
|
|
95
|
-
crystal1.set_optical_element(optical_element)
|
|
96
|
-
crystal1.set_coordinates(
|
|
97
|
-
ElementCoordinates(p=0.0, q=5000.0e-3,
|
|
98
|
-
angle_radial=0.0, angle_azimuthal=0.0, angle_radial_out=0.0))
|
|
99
|
-
crystal1.set_input_beam(beam)
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
# print(crystal1.info())
|
|
103
|
-
# print(crystal1.get_optical_element().get_surface_shape().get_conic_coefficients())
|
|
104
|
-
#
|
|
105
|
-
# trace
|
|
106
|
-
#
|
|
107
|
-
|
|
108
|
-
beam2, mirr2 = crystal1.trace_beam()
|
|
109
|
-
|
|
110
|
-
if do_plot:
|
|
111
|
-
plotxy(beam2, 6, 23, nbins=100, title="INTENSITY VS Z'")
|
|
112
|
-
|
|
113
|
-
#
|
|
114
|
-
# #
|
|
115
|
-
# if do_plot:
|
|
116
|
-
# plotxy(beam2, 1, 3, nbins=100, title="FOCAL PLANE")
|
|
117
|
-
# plotxy(mirr2, 1, 3, nbins=100, title="LENS HEIGHT")
|
|
118
|
-
# # plotxy(mirr2, 4, 5, nbins=100, title="FOOT DIV")
|
|
119
|
-
#
|
|
120
|
-
# FX, FZ = (1e6*beam2.get_standard_deviation(1),1e6*beam2.get_standard_deviation(3))
|
|
121
|
-
# print("Source dimensions: %f %f um"%(SX,SZ))
|
|
122
|
-
# print("Focal dimensions: %f %f um"%(FX,FZ))
|
|
123
|
-
# print("Demagnification: %g %g"%(SX/FX,SX/FZ))
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
if __name__ == "__main__":
|
|
129
|
-
from srxraylib.plot.gol import set_qt
|
|
130
|
-
set_qt()
|
|
131
|
-
|
|
132
|
-
crystal_diffraction_with_collimated_beam(do_plot=True)
|
|
133
|
-
|
|
134
|
-
|
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import numpy
|
|
3
|
-
|
|
4
|
-
from shadow4.sources.source_geometrical.source_geometrical import SourceGeometrical
|
|
5
|
-
from shadow4.beamline.optical_elements.crystals.s4_plane_crystal import S4PlaneCrystal, S4PlaneCrystalElement
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
from shadow4.tools.graphics import plotxy
|
|
9
|
-
|
|
10
|
-
from syned.beamline.element_coordinates import ElementCoordinates
|
|
11
|
-
|
|
12
|
-
from syned.beamline.optical_elements.crystals.crystal import Crystal, DiffractionGeometry
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
def get_sigmas_radiation(photon_energy,undulator_length):
|
|
16
|
-
import scipy.constants as codata
|
|
17
|
-
lambdan = 1e-10 * codata.h*codata.c/codata.e*1e10 / photon_energy # in m
|
|
18
|
-
print("wavelength in m",lambdan)
|
|
19
|
-
return 1e6*2.740/4/numpy.pi*numpy.sqrt(lambdan*undulator_length),1e6*0.69*numpy.sqrt(lambdan/undulator_length)
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
def crystal_diffraction_with_collimated_beam(do_plot=True):
|
|
23
|
-
|
|
24
|
-
#
|
|
25
|
-
# collimated source
|
|
26
|
-
#
|
|
27
|
-
|
|
28
|
-
if True:
|
|
29
|
-
src = SourceGeometrical(nrays=300)
|
|
30
|
-
src.set_energy_distribution_singleline(value=8000, unit='eV')
|
|
31
|
-
src.set_spatial_type_rectangle(width=1e-3, height=1e-3)
|
|
32
|
-
src.set_angular_distribution_uniform(0,0,-100e-6,100e-6)
|
|
33
|
-
src.set_polarization(polarization_degree= 0.5, phase_diff=numpy.pi/4, coherent_beam=True)
|
|
34
|
-
beam = src.get_beam()
|
|
35
|
-
|
|
36
|
-
print(beam.info())
|
|
37
|
-
SX, SZ = (1e6*beam.get_standard_deviation(1),1e6*beam.get_standard_deviation(3))
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
#
|
|
41
|
-
# crystal definition
|
|
42
|
-
#
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
if False:
|
|
46
|
-
crystal1 = S4PlaneCrystalElement(
|
|
47
|
-
optical_element=S4PlaneCrystal(
|
|
48
|
-
name="Plane crystal",
|
|
49
|
-
boundary_shape=None,
|
|
50
|
-
material="Si",
|
|
51
|
-
diffraction_geometry=DiffractionGeometry.BRAGG, # ?? not supposed to be in syned...
|
|
52
|
-
miller_index_h=1,
|
|
53
|
-
miller_index_k=1,
|
|
54
|
-
miller_index_l=1,
|
|
55
|
-
asymmetry_angle=0.0,
|
|
56
|
-
thickness=0.010, # this is thick crystal approximation
|
|
57
|
-
f_central=True,
|
|
58
|
-
f_phot_cent=0,
|
|
59
|
-
phot_cent=8000.0,
|
|
60
|
-
file_refl="",
|
|
61
|
-
f_bragg_a=False,
|
|
62
|
-
# a_bragg=0.0,
|
|
63
|
-
f_johansson=False,
|
|
64
|
-
r_johansson=1.0,
|
|
65
|
-
f_mosaic=False,
|
|
66
|
-
spread_mos=0.4 * numpy.pi / 180,
|
|
67
|
-
f_ext=0, ),
|
|
68
|
-
coordinates=ElementCoordinates(p=0.0, q=5000.0e-3,
|
|
69
|
-
angle_radial=0.0, angle_azimuthal=0.0, angle_radial_out=0.0),
|
|
70
|
-
input_beam=beam)
|
|
71
|
-
else:
|
|
72
|
-
crystal1 = S4PlaneCrystalElement()
|
|
73
|
-
optical_element = S4PlaneCrystal(
|
|
74
|
-
name="Plane crystal",
|
|
75
|
-
boundary_shape=None,
|
|
76
|
-
material="Si",
|
|
77
|
-
diffraction_geometry=DiffractionGeometry.BRAGG, # ?? not supposed to be in syned...
|
|
78
|
-
miller_index_h=1,
|
|
79
|
-
miller_index_k=1,
|
|
80
|
-
miller_index_l=1,
|
|
81
|
-
asymmetry_angle=numpy.radians(10.0),
|
|
82
|
-
thickness=0.010, # this is thick crystal approximation
|
|
83
|
-
f_central=True,
|
|
84
|
-
f_phot_cent=0,
|
|
85
|
-
phot_cent=8000.0,
|
|
86
|
-
file_refl="",
|
|
87
|
-
f_bragg_a=False,
|
|
88
|
-
# a_bragg=0.0,
|
|
89
|
-
f_johansson=False,
|
|
90
|
-
r_johansson=1.0,
|
|
91
|
-
f_mosaic=False,
|
|
92
|
-
spread_mos=0.4 * numpy.pi / 180,
|
|
93
|
-
f_ext=0, )
|
|
94
|
-
|
|
95
|
-
crystal1.set_optical_element(optical_element)
|
|
96
|
-
crystal1.set_coordinates(
|
|
97
|
-
ElementCoordinates(p=0.0, q=5000.0e-3,
|
|
98
|
-
angle_radial=0.0, angle_azimuthal=0.0, angle_radial_out=0.0))
|
|
99
|
-
crystal1.set_input_beam(beam)
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
# print(crystal1.info())
|
|
103
|
-
# print(crystal1.get_optical_element().get_surface_shape().get_conic_coefficients())
|
|
104
|
-
#
|
|
105
|
-
# trace
|
|
106
|
-
#
|
|
107
|
-
|
|
108
|
-
beam2, mirr2 = crystal1.trace_beam()
|
|
109
|
-
|
|
110
|
-
if do_plot:
|
|
111
|
-
plotxy(beam2, 6, 23, nbins=100, title="INTENSITY VS Z'")
|
|
112
|
-
|
|
113
|
-
#
|
|
114
|
-
# #
|
|
115
|
-
# if do_plot:
|
|
116
|
-
# plotxy(beam2, 1, 3, nbins=100, title="FOCAL PLANE")
|
|
117
|
-
# plotxy(mirr2, 1, 3, nbins=100, title="LENS HEIGHT")
|
|
118
|
-
# # plotxy(mirr2, 4, 5, nbins=100, title="FOOT DIV")
|
|
119
|
-
#
|
|
120
|
-
# FX, FZ = (1e6*beam2.get_standard_deviation(1),1e6*beam2.get_standard_deviation(3))
|
|
121
|
-
# print("Source dimensions: %f %f um"%(SX,SZ))
|
|
122
|
-
# print("Focal dimensions: %f %f um"%(FX,FZ))
|
|
123
|
-
# print("Demagnification: %g %g"%(SX/FX,SX/FZ))
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
if __name__ == "__main__":
|
|
129
|
-
from srxraylib.plot.gol import set_qt
|
|
130
|
-
set_qt()
|
|
131
|
-
|
|
132
|
-
crystal_diffraction_with_collimated_beam(do_plot=True)
|
|
133
|
-
|
|
134
|
-
|
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import numpy
|
|
3
|
-
|
|
4
|
-
from shadow4.sources.source_geometrical.source_geometrical import SourceGeometrical
|
|
5
|
-
from shadow4.beamline.optical_elements.crystals.s4_plane_crystal import S4PlaneCrystal, S4PlaneCrystalElement
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
from shadow4.tools.graphics import plotxy
|
|
9
|
-
|
|
10
|
-
from syned.beamline.element_coordinates import ElementCoordinates
|
|
11
|
-
|
|
12
|
-
from syned.beamline.optical_elements.crystals.crystal import Crystal, DiffractionGeometry
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
def get_sigmas_radiation(photon_energy,undulator_length):
|
|
16
|
-
import scipy.constants as codata
|
|
17
|
-
lambdan = 1e-10 * codata.h*codata.c/codata.e*1e10 / photon_energy # in m
|
|
18
|
-
print("wavelength in m",lambdan)
|
|
19
|
-
return 1e6*2.740/4/numpy.pi*numpy.sqrt(lambdan*undulator_length),1e6*0.69*numpy.sqrt(lambdan/undulator_length)
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
def crystal_diffraction_with_collimated_beam(do_plot=True):
|
|
23
|
-
|
|
24
|
-
#
|
|
25
|
-
# collimated source
|
|
26
|
-
#
|
|
27
|
-
|
|
28
|
-
if True:
|
|
29
|
-
src = SourceGeometrical()
|
|
30
|
-
src.set_energy_distribution_singleline(value=8000, unit='eV')
|
|
31
|
-
src.set_spatial_type_rectangle(width=1e-3, height=1e-3)
|
|
32
|
-
src.set_angular_distribution_uniform(0,0,-100e-6,100e-6)
|
|
33
|
-
src.set_polarization(polarization_degree=0.5, phase_diff=numpy.pi/4, coherent_beam=True)
|
|
34
|
-
|
|
35
|
-
beam = src.get_beam()
|
|
36
|
-
|
|
37
|
-
print(beam.info())
|
|
38
|
-
SX, SZ = (1e6*beam.get_standard_deviation(1),1e6*beam.get_standard_deviation(3))
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
#
|
|
42
|
-
# crystal definition
|
|
43
|
-
#
|
|
44
|
-
|
|
45
|
-
if True: # create preprocessor file
|
|
46
|
-
descriptor = 'YB66'
|
|
47
|
-
SCANFROM = 0 # in microradiants
|
|
48
|
-
SCANTO = 100 # in microradiants
|
|
49
|
-
TEMPER = 1.0
|
|
50
|
-
ENERGY = 8040.0
|
|
51
|
-
SCANPOINTS = 200
|
|
52
|
-
|
|
53
|
-
print("Using crystal descriptor: ", descriptor)
|
|
54
|
-
from xoppylib.crystals.tools import bragg_calc2
|
|
55
|
-
from dabax.dabax_xraylib import DabaxXraylib
|
|
56
|
-
bragg_dictionary = bragg_calc2(descriptor=descriptor,
|
|
57
|
-
hh=4, kk=0, ll=0,
|
|
58
|
-
temper=1.0,
|
|
59
|
-
emin=ENERGY - 100.0, emax=ENERGY + 100.0,
|
|
60
|
-
estep=(SCANTO - SCANFROM) / SCANPOINTS, fileout="xcrystal.bra",
|
|
61
|
-
material_constants_library=DabaxXraylib())
|
|
62
|
-
|
|
63
|
-
crystal1 = S4PlaneCrystalElement(
|
|
64
|
-
optical_element=S4PlaneCrystal(
|
|
65
|
-
name="Plane crystal",
|
|
66
|
-
boundary_shape=None,
|
|
67
|
-
material="YB66",
|
|
68
|
-
diffraction_geometry=DiffractionGeometry.BRAGG, # ?? not supposed to be in syned...
|
|
69
|
-
miller_index_h=4,
|
|
70
|
-
miller_index_k=4,
|
|
71
|
-
miller_index_l=0,
|
|
72
|
-
asymmetry_angle=0.0,
|
|
73
|
-
thickness=0.010, ###########################
|
|
74
|
-
f_central=True,
|
|
75
|
-
f_phot_cent=0,
|
|
76
|
-
phot_cent=8000.0,
|
|
77
|
-
file_refl="xcrystal.bra",
|
|
78
|
-
f_bragg_a=False,
|
|
79
|
-
# a_bragg=0.0,
|
|
80
|
-
f_johansson=False,
|
|
81
|
-
r_johansson=1.0,
|
|
82
|
-
f_mosaic=False,
|
|
83
|
-
spread_mos=0.4 * numpy.pi / 180,
|
|
84
|
-
f_ext=0,
|
|
85
|
-
material_constants_library_flag=3, # 0=xraylib, 1=dabax
|
|
86
|
-
# 2=shadow preprocessor file v1
|
|
87
|
-
# 3=shadow preprocessor file v2
|
|
88
|
-
),
|
|
89
|
-
coordinates=ElementCoordinates(p=0.0, q=5000.0e-3,
|
|
90
|
-
angle_radial=0.0, angle_azimuthal=0.0, angle_radial_out=0.0),
|
|
91
|
-
input_beam=beam)
|
|
92
|
-
|
|
93
|
-
# print(crystal1.info())
|
|
94
|
-
# print(crystal1.get_optical_element().get_surface_shape().get_conic_coefficients())
|
|
95
|
-
#
|
|
96
|
-
# trace
|
|
97
|
-
#
|
|
98
|
-
|
|
99
|
-
beam2, mirr2 = crystal1.trace_beam()
|
|
100
|
-
|
|
101
|
-
if do_plot:
|
|
102
|
-
plotxy(beam2, 6, 23, nbins=100, title="INTENSITY VS Z'")
|
|
103
|
-
#
|
|
104
|
-
# #
|
|
105
|
-
# if do_plot:
|
|
106
|
-
# plotxy(beam2, 1, 3, nbins=100, title="FOCAL PLANE")
|
|
107
|
-
# plotxy(mirr2, 1, 3, nbins=100, title="LENS HEIGHT")
|
|
108
|
-
# # plotxy(mirr2, 4, 5, nbins=100, title="FOOT DIV")
|
|
109
|
-
#
|
|
110
|
-
# FX, FZ = (1e6*beam2.get_standard_deviation(1),1e6*beam2.get_standard_deviation(3))
|
|
111
|
-
# print("Source dimensions: %f %f um"%(SX,SZ))
|
|
112
|
-
# print("Focal dimensions: %f %f um"%(FX,FZ))
|
|
113
|
-
# print("Demagnification: %g %g"%(SX/FX,SX/FZ))
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
if __name__ == "__main__":
|
|
119
|
-
from srxraylib.plot.gol import set_qt
|
|
120
|
-
set_qt()
|
|
121
|
-
|
|
122
|
-
crystal_diffraction_with_collimated_beam(do_plot=True)
|
|
123
|
-
|
|
124
|
-
|