Skip to content

Commit e7eb463

Browse files
committed
v 1.5.0
1 parent a4a47a5 commit e7eb463

File tree

5 files changed

+82
-97
lines changed

5 files changed

+82
-97
lines changed

doc/conf.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
class Mock(MagicMock):
1717
@classmethod
1818
def __getattr__(cls, name):
19-
return MagicMock()
19+
return MagicMock()
2020

2121
MOCK_MODULES = ['OpenGL', 'OpenGL.GL', 'OpenGL.GLU', 'OpenGL.GLUT',
2222
'OpenGL.arrays', 'pyopencl',
@@ -141,9 +141,9 @@ def load_res():
141141
# built documents.
142142
#
143143
# The short X.Y version.
144-
version = '1.4.0'
144+
version = '1.5.0'
145145
# The full version, including alpha/beta/rc tags.
146-
release = '1.4.0'
146+
release = '1.5.0'
147147

148148
# The language for content autogenerated by Sphinx. Refer to documentation
149149
# for a list of supported languages.

setup.py

+34-42
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
# import importLongDescription
55
# long_description = importLongDescription.output()
66
long_description = u"""
7-
Package xrt (XRayTracer) is a python software library for ray tracing and wave
8-
propagation in x-ray regime. It is primarily meant for modeling synchrotron
9-
sources, beamlines and beamline elements. Includes a GUI for creating a
10-
beamline and interactively viewing it in 3D.
7+
Package xrt is a python software library for ray tracing and wave propagation
8+
in x-ray regime. It is primarily meant for modeling synchrotron sources,
9+
beamlines and beamline elements. Includes a GUI for creating a beamline and
10+
interactively viewing it in 3D.
1111
1212
Features of xrt
1313
---------------
@@ -17,6 +17,8 @@
1717
lens or paraxial. The optical surfaces may have figure errors, analytical or
1818
measured. In wave propagation, partially coherent radiation is treated by
1919
incoherent addition of coherently diffracted fields generated per electron.
20+
Propagation of _individual_ coherent source modes is possible as waves,
21+
hybrid waves (i.e. partially as rays and then as waves) and only rays.
2022
2123
* *Publication quality graphics*. 1D and 2D position histograms are
2224
*simultaneously* coded by hue and brightness. Typically, colors represent
@@ -42,34 +44,31 @@
4244
throughout the series.
4345
4446
* *Synchrotron sources*. Bending magnet, wiggler, undulator and elliptic
45-
undulator are calculated internally within xrt. There is also a legacy
46-
approach to sampling synchrotron sources using the codes `ws` and `urgent`
47-
which are parts of XOP package. Please look the section "Comparison of
48-
synchrotron source codes" for the comparison between the implementations. If
49-
the photon source is one of the synchrotron sources, the total flux in the
50-
beam is reported not just in number of rays but in physical units of ph/s.
51-
The total power or absorbed power can be opted instead of flux and is
47+
undulator are calculated internally within xrt. Please look the section
48+
"Comparison of synchrotron source codes" for the comparison other popular
49+
codes. If the photon source is one of the synchrotron sources, the total flux
50+
in the beam is reported not just in number of rays but in physical units of
51+
ph/s. The total power or absorbed power can be opted instead of flux and is
5252
reported in W. The power density can be visualized by isolines. The magnetic
5353
gap of undulators can be tapered. Undulators can be calculated in near field.
5454
Custom magnetic field is also possible. Undulators can be calculated on GPU,
5555
with a high gain in computation speed, which is important for tapering and
5656
near field calculations.
5757
5858
* *Shapes*. There are several predefined shapes of optical elements implemented
59-
as python classes. The inheritance mechanism simplifies creation of other
60-
shapes. The user specifies methods for the surface height and the surface
61-
normal. For asymmetric crystals, the normal to the atomic planes can be
62-
additionally given. The surface and the normals are defined either in local
63-
(x, y) coordinates or in user-defined parametric coordinates. Parametric
59+
as python classes. The python inheritance mechanism simplifies creation of
60+
other shapes: the user specifies methods for surface height and surface
61+
normal. The surface and the normal are defined either in local Cartesian
62+
coordinates or in user-defined parametric coordinates. Parametric
6463
representation enables closed shapes such as capillaries or wave guides. It
65-
also enables exact solutions for complex shapes (e.g. a logarithmic spiral)
66-
without any expansion. The methods of finding the intersections of rays with
67-
the surface are very robust and can cope with pathological cases as sharp
68-
surface kinks. Notice that the search for intersection points does not
69-
involve any approximation and has only numerical inaccuracy which is set by
70-
default as 1 fm. Any surface can be combined with a (differently and variably
71-
oriented) crystal structure and/or (variable) grating vector. Surfaces can be
72-
faceted.
64+
also enables exact solutions for complex shapes (e.g. a logarithmic spiral or
65+
an ellipsoid) without any expansion. The methods of finding the intersections
66+
of rays with the surface are very robust and can cope with pathological cases
67+
such as sharp surface kinks. Notice that the search for intersection points
68+
does not involve any approximation and has only numerical inaccuracy which is
69+
set by default as 1 fm. Any surface can be combined with a (differently and
70+
variably oriented) crystal structure and/or (variable) grating vector.
71+
Surfaces can be faceted.
7372
7473
* *Energy dispersive elements*. Implemented are crystals in dynamical
7574
diffraction, gratings (also with efficiency calculations), Fresnel zone
@@ -118,17 +117,16 @@
118117
-------------------------------------
119118
120119
The main interface to xrt is through a python script. Many examples of such
121-
scripts can be found in the supplied folder 'examples'. The script imports the
122-
modules of xrt, instantiates beamline parts, such as synchrotron or geometric
123-
sources, various optical elements, apertures and screens, specifies required
124-
materials for reflection, refraction or diffraction, defines plots and sets job
125-
parameters.
126-
127-
The Qt tool xrtQook takes these ingredients and prepares a ready to use script
128-
that can be run within the tool itself or in an external Python context.
129-
xrtQook features a parallelly updated help panel that, unlike the main
130-
documentation, provides a complete list of parameters for the used classes,
131-
also including those from the parental classes. xrtQook writes/reads the
120+
scripts can be found in the supplied folders 'examples' and 'tests'. The script
121+
imports the modules of xrt, instantiates beamline parts, such as synchrotron or
122+
geometric sources, various optical elements, apertures and screens, specifies
123+
required materials for reflection, refraction or diffraction, defines plots and
124+
sets job parameters.
125+
126+
The Qt tool xrtQook takes these ingredients as GUI elements and prepares a
127+
ready to use script that can be run within the tool itself or in an external
128+
Python context. xrtQook has a parallelly updated help panel that provides a
129+
complete list of parameters for the used objects. xrtQook writes/reads the
132130
recipes of beamlines into/from xml files.
133131
134132
xrtGlow -- an interactive 3D beamline viewer
@@ -154,12 +152,6 @@
154152
for xrtQook. Spyder (as library of Spyder IDE) is highly recommended for nicer
155153
view of xrtQook. OpenGL is required for xrtGlow.
156154
157-
Python 2 and 3
158-
--------------
159-
160-
The code should run in both Python branches without any modification, although
161-
compatibility with Python 2 is not checked any longer.
162-
163155
Get xrt
164156
-------
165157
@@ -180,7 +172,7 @@
180172

181173
setup(
182174
name='xrt',
183-
version='1.4.0',
175+
version='1.5.0',
184176
description='Ray tracing and wave propagation in x-ray regime, primarily '
185177
'meant for modeling synchrotron sources, beamlines and '
186178
'beamline elements. Includes a GUI for creating a beamline '

xrt/__init__.py

+32-38
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
# -*- coding: utf-8 -*-
2-
u"""Package xrt (XRayTracer) is a python software library for ray tracing and
3-
wave propagation in x-ray regime. It is primarily meant for modeling
4-
synchrotron sources, beamlines and beamline elements. Includes a GUI for
5-
creating a beamline and interactively viewing it in 3D.
2+
u"""
3+
Package xrt is a python software library for ray tracing and wave propagation
4+
in x-ray regime. It is primarily meant for modeling synchrotron sources,
5+
beamlines and beamline elements. Includes a GUI for creating a beamline and
6+
interactively viewing it in 3D.
67
78
+----------------+---------------+-----------+
89
| |Itot| | |vcmSi-P| | |VortexB| |
@@ -34,7 +35,9 @@
3435
such as thin lens or paraxial. The optical surfaces may have :ref:`figure
3536
errors, analytical or measured<warping>`. In wave propagation, partially
3637
coherent radiation is treated by incoherent addition of coherently diffracted
37-
fields generated per electron.
38+
fields generated per electron. Propagation of :ref:`individual coherent
39+
source modes<modes>` is possible as waves, hybrid waves (i.e. partially as
40+
rays and then as waves) and only rays.
3841
3942
* *Publication quality graphics*. 1D and 2D position histograms are
4043
*simultaneously* coded by hue and brightness. Typically, colors represent
@@ -61,36 +64,33 @@
6164
throughout the series.
6265
6366
* :ref:`Synchrotron sources <synchrotron-sources>`. Bending magnet, wiggler,
64-
undulator and elliptic undulator are calculated internally within xrt. There
65-
is also a legacy approach to sampling synchrotron sources using the codes
66-
`ws` and `urgent` which are parts of XOP package. Please look the section
67-
:ref:`comparison-synchrotron-sources` for the comparison between the
68-
implementations. If the photon source is one of the synchrotron sources, the
69-
total flux in the beam is reported not just in number of rays but in physical
70-
units of ph/s. The total power or absorbed power can be opted instead of flux
71-
and is reported in W. The power density can be visualized by isolines. The
72-
magnetic gap of undulators can be :ref:`tapered <tapering_comparison>`.
73-
Undulators can be calculated in :ref:`near field <near_field_comparison>`.
74-
:ref:`Custom magnetic field <undulator_custom>` is also possible. Undulators
75-
can be :ref:`calculated on GPU <calculations_on_GPU>`, with a high gain in
76-
computation speed, which is important for tapering and near field
77-
calculations.
67+
undulator and elliptic undulator are calculated internally within xrt.
68+
Please look the section :ref:`comparison-synchrotron-sources` for the
69+
comparison with other popular codes. If the photon source is one of the
70+
synchrotron sources, the total flux in the beam is reported not just in
71+
number of rays but in physical units of ph/s. The total power or absorbed
72+
power can be opted instead of flux and is reported in W. The power density
73+
can be visualized by isolines. The magnetic gap of undulators can be
74+
:ref:`tapered <tapering_comparison>`. Undulators can be calculated in
75+
:ref:`near field <near_field_comparison>`. :ref:`Custom magnetic field
76+
<undulator_custom>` is also possible. Undulators can be :ref:`calculated on
77+
GPU <calculations_on_GPU>`, with a high gain in computation speed, which is
78+
important for tapering and near field calculations.
7879
7980
* *Shapes*. There are several predefined shapes of optical elements implemented
80-
as python classes. The inheritance mechanism simplifies creation of other
81-
shapes. The user specifies methods for the surface height and the surface
82-
normal. For asymmetric crystals, the normal to the atomic planes can be
83-
additionally given. The surface and the normals are defined either in local
84-
(x, y) coordinates or in user-defined parametric coordinates. Parametric
81+
as python classes. The python inheritance mechanism simplifies creation of
82+
other shapes: the user specifies methods for surface height and surface
83+
normal. The surface and the normal are defined either in local Cartesian
84+
coordinates or in user-defined parametric coordinates. Parametric
8585
representation enables closed shapes such as capillaries or wave guides. It
86-
also enables exact solutions for complex shapes (e.g. a logarithmic spiral)
87-
without any expansion. The methods of finding the intersections of rays with
88-
the surface are very robust and can cope with pathological cases as sharp
89-
surface kinks. Notice that the search for intersection points does not
90-
involve any approximation and has only numerical inaccuracy which is set by
91-
default as 1 fm. Any surface can be combined with a (differently and variably
92-
oriented) crystal structure and/or (variable) grating vector. Surfaces can be
93-
faceted.
86+
also enables exact solutions for complex shapes (e.g. a logarithmic spiral or
87+
an ellipsoid) without any expansion. The methods of finding the intersections
88+
of rays with the surface are very robust and can cope with pathological cases
89+
such as sharp surface kinks. Notice that the search for intersection points
90+
does not involve any approximation and has only numerical inaccuracy which is
91+
set by default as 1 fm. Any surface can be combined with a (differently and
92+
variably oriented) crystal structure and/or (variable) grating vector.
93+
Surfaces can be faceted.
9494
9595
* *Energy dispersive elements*. Implemented are :meth:`crystals in dynamical
9696
diffraction <xrt.backends.raycing.materials.Crystal.get_amplitude>`,
@@ -143,12 +143,6 @@
143143
:ref:`undulators <mesh-methods>`, :ref:`optical elements <test_oes>`,
144144
:ref:`materials <test_materials>` and :ref:`wave propagation <test_waves>`.
145145
146-
Python 2 and 3
147-
--------------
148-
149-
The code should run in both Python branches without any modification, although
150-
compatibility with Python 2 is not checked any longer.
151-
152146
Dependencies
153147
------------
154148

xrt/gui/xrtQook/__init__.py

+11-12
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,17 @@
66
----------------------------------------
77
88
The main interface to xrt is through a python script. Many examples of such
9-
scripts can be found in the supplied folder ‘examples’. The script imports the
10-
modules of xrt, instantiates beamline parts, such as synchrotron or geometric
11-
sources, various optical elements, apertures and screens, specifies required
12-
materials for reflection, refraction or diffraction, defines plots and sets job
13-
parameters.
14-
15-
The Qt tool :mod:`xrtQook` takes these ingredients and prepares a ready to use
16-
script that can be run within the tool itself or in an external Python context.
17-
:mod:`xrtQook` features a parallelly updated help panel that provides a
18-
complete list of parameters for the used classes, also including those from the
19-
parental classes. :mod:`xrtQook` writes/reads the recipes of beamlines
20-
into/from xml files.
9+
scripts can be found in the supplied folders `examples` and `tests`. The script
10+
imports the modules of xrt, instantiates beamline parts, such as synchrotron or
11+
geometric sources, various optical elements, apertures and screens, specifies
12+
required materials for reflection, refraction or diffraction, defines plots and
13+
sets job parameters.
14+
15+
The Qt tool :mod:`xrtQook` takes these ingredients as GUI elements and prepares
16+
a ready to use script that can be run within the tool itself or in an external
17+
Python context. :mod:`xrtQook` has a parallelly updated help panel that
18+
provides a complete list of parameters for the used objects. :mod:`xrtQook`
19+
writes/reads the recipes of beamlines into/from xml files.
2120
2221
In the present version, :mod:`xrtQook` does not provide automated generation of
2322
*scans* and does not create *wave propagation* sequences. For these two tasks,

xrt/version.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# -*- coding: utf-8 -*-
2-
__versioninfo__ = (1, 4, 0)
2+
__versioninfo__ = (1, 5, 0)
33
__version__ = '.'.join(map(str, __versioninfo__))
4-
__date__ = "22 Sep 2021"
4+
__date__ = "8 Sep 2022"

0 commit comments

Comments
 (0)