Skip to content

Commit

Permalink
beamline object dokumentation
Browse files Browse the repository at this point in the history
  • Loading branch information
F Zotter committed Oct 14, 2024
1 parent 98e8216 commit 7e618d7
Show file tree
Hide file tree
Showing 12 changed files with 424 additions and 298 deletions.
33 changes: 32 additions & 1 deletion docs/src/Model/BeamlineObjects/BeamlineObjects.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,34 @@
# Beamline Objects

In the following chaper you will find extensive Information on all the Beamline Obejcts RAYX supports.
In the following chapter, you will find extensive information on all the Beamline Objects supported by RAYX.

# Supported Objects

We divide the objects into two categories: Light Sources and Optical Elements. As the name suggests, the Light Sources are the objects that create the ray information, such as their starting position, the direction of the flight path, and the energy the ray is carrying.

### Light Sources
- [Dipole Source](LightSources/DipoleSource.md)
- [Point Source](LightSources/Point-Source.md)
- [Matrix Source](LightSources/Matrix-Source.md)
- [Simple Undulator Source](LightSources/SimpleUndulatorSource.md)
- [Circle Source](LightSources/Circle-Source.md)
- [Pixel Source](LightSources/Pixel-Source.md)


### Optical Elements

- [Image Plane](OpticalElements/Image-Plane.md)
- [Plane Mirror](OpticalElements/Plane-Mirror.md)
- [Plane Grating](OpticalElements/Plane-Grating.md)
- [Cone Mirror](OpticalElements/Cone-Mirror.md)
- [Cone Grating](OpticalElements/Cone-Mirror.md)
- [Cylindrical Mirror](OpticalElements/Cylinder-Mirror.md)
- [Ellipsoid Mirror](OpticalElements/Ellipsoid-Mirror.md)
- [Spherical Mirror](OpticalElements/Sphere-Mirror.md)
- [Spherical Grating](OpticalElements/Sphere-Grating.md)
- [Toroidal Mirror](OpticalElements/Toroid-Mirror.md)
- [Toroidal Grating](OpticalElements/Toroid-Grating.md)
- [Reflection Zone Plate](OpticalElements/RZP.md)
- [Slit](OpticalElements/Slit.md)
- [Custom Quadric Surface Mirror](../Quad(ric)-function.md)
- Custom Cubic Surface Mirror
230 changes: 117 additions & 113 deletions docs/src/Model/BeamlineObjects/BeamlineParamter/Beamline-Parameter.md

Large diffs are not rendered by default.

27 changes: 12 additions & 15 deletions docs/src/Model/BeamlineObjects/LightSources/Circle-Source.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,29 @@
# Circle Source

TBA

## Light Properties

In RAYX every ray is described by four properties. The values are randomly generated for the given distirubution. This guarantees that minimal systematic errors are impacting the simulation.
In RAYX, every ray is described by four properties. The values are randomly generated according to the given distribution. This ensures that minimal systematic errors impact the simulation.

light properties:
Light properties include:
- Origin
- Direction
- Photonenergy
- Polarisation
- Photon Energy
- Polarization

### Origin

The Origin for each Ray is described by x, y and z Position.

## Tracing Parameter
The origin of each ray is described by its x, y, and z positions.

## Tracing Parameters

- Source Depth
- Source Height
- Source Width
- Linear Pol 0
- Linear Pol 45
- Circular Pol
- numOfEquidistantCircles
- maxOpeningAngle
- numOfEquidistantCircles
- maxOpeningAngle
- minOpeningAngle
- deltaOpeningAngle
- Energy
Expand All @@ -37,9 +34,9 @@ The Origin for each Ray is described by x, y and z Position.

## RML Object

To trace a Circle Source through an RML File, utilize an XML Object to encompass all pertinent information for the light source. The default configuration for the light source from RAY-UI is presented here for your ease of use. It is recommended to include an Imageplane at the end for clearer results.
To trace a Circle Source through an RML file, use an XML object to contain all relevant information for the light source. Below is the default configuration for the light source from RAY-UI for your convenience. It is recommended to include an Image Plane at the end for clearer results.

```XML
```xml
<object name="Circle Source" type="Circle Source">
<param id="numberRays" enabled="T">20000</param>
<param id="sourceWidth" enabled="T">0.065</param>
Expand Down Expand Up @@ -84,5 +81,5 @@ To trace a Circle Source through an RML File, utilize an XML Object to encompass
<param id="circularPol" enabled="T">0</param>
<param id="sourcePulseType" comment="all rays start simultaneously" enabled="T">0</param>
<param id="sourcePulseLength" enabled="F">0</param>
</object>
```
</object>
```
44 changes: 18 additions & 26 deletions docs/src/Model/BeamlineObjects/LightSources/DipoleSource.md
Original file line number Diff line number Diff line change
@@ -1,50 +1,45 @@
# Dipole Source

The Dipole Source in RAYX is implemented to generate a realistic lightbeam. To simulate a realistic representation of behaviour, the natural spectral and spatial distributions of synchrotron radiation are used as a foundation. Specificly the distributions defined by the universal function for synchrotron radiation defined by Wiedemann, Synchrotron Radiation P. 159 ().
The Dipole Source in RAYX is implemented to generate a realistic light beam. To simulate realistic behavior, the natural spectral and spatial distributions of synchrotron radiation are used as a foundation. Specifically, the distributions defined by the universal function for synchrotron radiation, as outlined by Wiedemann in *Synchrotron Radiation*, p. 159, are utilized.

## Backround
## Background

Dipole Sources are among the most common lightsources used to generate synchrotron radiation. In synchrotrons dipole magnets are used to bend a charged particle beam. Depending on the strength of the magnetic field and other changeble parameters the act of bending the particle beam produces X-Rays. Highly energized photons traveling with relativistic speeds. These photons than travel throuh the beamline, colliding with optical elements, and hitting an experiment at the end of the line.
Dipole sources are among the most common light sources used to generate synchrotron radiation. In synchrotrons, dipole magnets are used to bend a charged particle beam. Depending on the strength of the magnetic field and other adjustable parameters, bending the particle beam produces X-rays—high-energy photons traveling at relativistic speeds. These photons then travel through the beamline, interacting with optical elements, and eventually reaching an experiment at the end of the line.

## Light Properties

In RAYX every ray is described by four properties. Each light source has a different approach to determine these, depending on which parts should be realisic and what should be syntheticaly generated. The values are randomly generated for the given distirubution. This guarantees that minimal systematic errors are impacting the simulation. The user gives a distribution window for the properties.
In RAYX, every ray is described by four properties. Each light source has a different approach to determining these, depending on which parts should be realistic and which should be synthetically generated. The values are randomly generated for the given distribution, ensuring that minimal systematic errors impact the simulation. The user provides a distribution window for these properties.

### Origin

The Origin for each Ray is described by a x, y and z Position. For the dipole source the position is dependent on the strength of the dipole magnet.
In the coordinates system for the Lightsource x is on the horizontal plane with z. The y direction is "up" and "down" looking from the source down the beamline. Which is the direction to the experiment, or at least to the next optical element and is described by z.
The user has limeted influence on the distribution of the position. It is determined by the magnetic field and the horizontal divergence window.
The origin of each ray is described by its x, y, and z positions. For the dipole source, the position depends on the strength of the dipole magnet. In the coordinate system for the light source, x lies on the horizontal plane with z, while the y direction is "up" and "down" when looking from the source down the beamline (toward the experiment or the next optical element, described by z). The user has limited influence over the distribution of the position, which is primarily determined by the magnetic field and the horizontal divergence window.

### Direction

The Direction is determined by the vertical and horizontal angle. Those are determind by the users input for the vertical and horizontal Divergence. The Direction is calculated by two variables the Phi and Psi angle.
Phi is determined randomly in a uniform spread on the given horizontal Divergence.
For Psi the calculation is a little more complex and dependent on the Polarisation.
Of the given vertical electron beam divergance a distribution window is calculated.
The direction is determined by the vertical and horizontal angles, based on the user's input for vertical and horizontal divergence. The direction is calculated using two variables: the Phi and Psi angles. Phi is determined randomly with a uniform distribution over the given horizontal divergence. Psi is more complex, depending on the polarization. From the given vertical electron beam divergence, a distribution window is calculated.

### Energy

The photon energy is dependant on the given mean-energy and the energyspread. Again the focus of the simulation lays in the distribution of the photonenergies between all generated rays. The energy can be understood as the equvalent to the wavelength of the photon. For the dipole source the energy is randomly distributed according to the universal function for synchrotron radiation (1).
The basis for the simulation lays in Helmut Wiedemanns description (Synchrotron Radiation P. 259 (D.21)). He gives edge cases which are usefull to simplyfy the simulation.
The photon energy depends on the specified mean energy and the energy spread. The focus of the simulation is the distribution of photon energies among all generated rays. The energy can be understood as equivalent to the wavelength of the photon. For the dipole source, energy is randomly distributed according to the universal function for synchrotron radiation. The basis for this simulation is Helmut Wiedemann’s description in *Synchrotron Radiation*, p. 259 (D.21), where edge cases simplify the simulation.

### Polarisation
### Polarization

The light polarisation impacts the reflective properties of the ray. The polarization is also important for the distiribution of the vertical direction value of the ray. As written by Helmut Wiedemanns (Synchrotron Radiation P. 155 (9.78)) the polarisation, direction and photon energy determine the distribution.
Light polarization affects the reflective properties of the ray. Polarization is also important for the distribution of the vertical direction of the ray. As described by Helmut Wiedemann (*Synchrotron Radiation*, p. 155 (9.78)), polarization, direction, and photon energy jointly determine the distribution.

## Struct Ray
In RAYX we transfer all the generated information from the light sources to the optical elements via the struct Ray.

## Tracing Parameter
In RAYX, all the generated information from the light sources is transferred to the optical elements using the `Ray` structure.

## Tracing Parameters

- Energy Distribution
- Photon Flux
- Electron Energy Orientation
- Source Pulse Type
- Bending Radius (Double)
- Bending Radius
- Electron Energy
- Photon Energy
- Vertical Ebeam Divergence
- Vertical E-beam Divergence
- Energy Spread
- Energy Spread Unit
- Horizontal Divergence
Expand All @@ -56,13 +51,11 @@ In RAYX we transfer all the generated information from the light sources to the
- Energy Distribution Type
- Energy Distribution File



## RML Object

To trace a Dipole Source through an RML File, utilize an XML Object to encompass all pertinent information for the light source. The default configuration for the light source from RAY-UI is presented here for your ease of use. It is recommended to include an Imageplane at the end for clearer results.
To trace a Dipole Source through an RML file, use an XML object to contain all relevant information for the light source. Below is the default configuration for the light source from RAY-UI for your convenience. It is recommended to include an Image Plane at the end for clearer results.

```XML
```xml
<object name="Dipole Source" type="Dipole Source">
<param id="numberRays" enabled="T">200</param>
<param id="sourceWidth" enabled="T">0.065</param>
Expand Down Expand Up @@ -106,6 +99,5 @@ To trace a Dipole Source through an RML File, utilize an XML Object to encompass
<param id="sourcePulseType" comment="all rays start simultaneously" enabled="T">0</param>
<param id="sourcePulseLength" enabled="F">0</param>
<param id="photonFlux" enabled="T">2.76089e+12</param>
</object>

```
</object>
```
63 changes: 29 additions & 34 deletions docs/src/Model/BeamlineObjects/LightSources/LightSources.md
Original file line number Diff line number Diff line change
@@ -1,77 +1,72 @@
# Light Sources

Light Sources are the starting point for each ray. Here the Properties of the light are set. Depending on the user input the direction, photon energy and light polarization are determined. In this section, you can find a description on
how the light sources are implemented and how to employ them for different beamlines. Depending on the needs it can be usefull to know which light source suits best.
The important part of the implementation of light sources in RAYX are the overall distributions of the values. Most of the Lightsources produce a spectrum of light rays.
Light sources are the starting point for each ray. Here, the properties of the light are set. Depending on user input, the direction, photon energy, and light polarization are determined. This section provides a description of how the light sources are implemented and how to use them for different beamlines. Depending on your needs, it can be useful to understand which light source is most suitable.
The key part of light source implementation in RAYX is the overall distribution of values. Most light sources produce a spectrum of light rays.

## Implemented Sources

Currently there are six light sources implemented in RAYX. They are fundamentaly different and serve different purpuses.
Currently, there are six light sources implemented in RAYX. They are fundamentally different and serve various purposes:

- Dipole Source
- Matrix Source
- Point Source
- Circle Source
- Pixle Source
- Pixel Source
- Simple Undulator Source

The Matrix and Point Sources are conceptual sources, wheras the implementation of the Dipole Source is aiming to be as close to the reality as possible.
The Matrix and Point Sources are conceptual sources, whereas the Dipole Source aims to replicate real-world behavior as accurately as possible.

## Light Properties

In RAYX every ray is described by four properties. Each light source has a different approach to determine these, depending on which parts should be realisic and what should be syntheticaly generated. The values are almost always in a given distribution-window and randomly generated. This guarantees that minimal systematic errors are impacting the ray generation. The user can choose a distribution window and a distribution type.
In RAYX, every ray is described by four properties. Each light source has a different approach to determining these, depending on which aspects should be realistic and which should be synthetically generated. The values are almost always in a given distribution window and are randomly generated. This ensures minimal systematic errors impact the ray generation. The user can choose a distribution window and a distribution type.

Parameters:
- Origin
- Direction
- Photonenergy
- Polarisation.
- Photon Energy
- Polarization

### Origin

The user sets the following parameters:
* source width(x-dir)
* source height(y-dir)
* source depth(z-dir)
* distribution types (up tp 3 different ones)
* Source width (x-dir)
* Source height (y-dir)
* Source depth (z-dir)
* Distribution types (up to 3 different ones)

The origin for each ray is described by a x, y and z value.
The origin for each ray is described by x, y, and z values.

With repeatability in mind the Maxtrix Source has a completely deterministic aproach to set the origin of each ray. All rays are positioned in a uniform grid inside the given width and height. Depending on the number of rays this grid can look scarsly or completely filled.
With repeatability in mind, the Matrix Source has a fully deterministic approach to setting the origin of each ray. All rays are positioned in a uniform grid within the given width and height. Depending on the number of rays, this grid can appear sparse or fully filled.

The Point Source has set distribution types for the positions. Every ray has a random origin but looking at all rays combined, they represent the chosen distribution type. The common choises are either hard-edge or soft-edge distributions.
The Point Source uses preset distribution types for the positions. Each ray has a random origin, but when considered collectively, they represent the chosen distribution type. Common choices are either hard-edge or soft-edge distributions.

The Dipole Source additionaly takes the horizontal divergence and bending radius into account. The origin positions are in a 3 dimensual bend, representing the trajectory of the electrons in the synchrotron. The position has a natural distribution which is dependant on the horizontal divergence of the electron beam.
The Dipole Source additionally considers the horizontal divergence and bending radius. The origin positions are in a 3-dimensional curve, representing the trajectory of the electrons in the synchrotron. The positions have a natural distribution that depends on the horizontal divergence of the electron beam.

### Direction

The user sets the following parameters:
* horizontal divergence (x-dir)
* vertical divergence (y-dir)
* distribution type
* Horizontal divergence (x-dir)
* Vertical divergence (y-dir)
* Distribution type

The direction for each ray is calculated for phi and psi values. They are the horizontal and vertical angles of the direction.
A direction vector is calculated from these angles and used for the tracing process.
The direction for each ray is calculated using the phi and psi values, which are the horizontal and vertical angles of the direction. A direction vector is then calculated from these angles and used in the tracing process.

And again there are differences for each source which are described in the respective chapters.
Each source has different directional behaviors, which are detailed in their respective chapters.

### Energy

The user sets the following parameters:
* Photonenergy (mean)
* Energy spread
* distribution type
* Photon Energy (mean)
* Energy Spread
* Distribution type
* (File path)

The Photonenergy is understood as the mean energy in a given distribution. If the energyspread is defined as 0 all rays have the same energy.
All the iformation can also be
Photon energy is understood as the mean energy in a given distribution. If the energy spread is defined as 0, all rays have the same energy.

The energy can be understood as the equivalent to the wavelength of the lightray. Different Distributiontypes are available to observe the behaiviour.
The energy is equivalent to the wavelength of the light ray. Different distribution types are available for observing the behavior.

### Polarisation
### Polarization

The light polarisation impacts the reflective properties of the ray. Depending on the lightsource it is calculated or given by the user.
Light polarization impacts the reflective properties of the ray. Depending on the light source, it is either calculated or provided by the user.

For more information on how to implement and use light sources please read the dokumentation for the spesific light source (updated soon).

##
For more information on how to implement and use light sources, please refer to the documentation for the specific light source (updated soon).
Loading

0 comments on commit 7e618d7

Please sign in to comment.