shadow4.beamline.optical_elements.ideal_elements package

Submodules

shadow4.beamline.optical_elements.ideal_elements.s4_beam_movement module

The s4 beam movement ideal element (optical element and beamline element).

class shadow4.beamline.optical_elements.ideal_elements.s4_beam_movement.S4BeamMovement(name='Undefined', apply_flag=0, translation_x=0.0, translation_y=0.0, translation_z=0.0, rotation_x=0.0, rotation_y=0.0, rotation_z=0.0)[source]

Bases: OpticalElement, S4OpticalElementDecorator

to_python_code(**kwargs)[source]

Creates the python code for defining the element.

Parameters:

**kwargs

Returns:

Python code.

Return type:

str

class shadow4.beamline.optical_elements.ideal_elements.s4_beam_movement.S4BeamMovementElement(optical_element: S4BeamMovement = None, coordinates: ElementCoordinates = None, input_beam: S4Beam = None)[source]

Bases: S4BeamlineElement

Constructor.

Parameters:
  • optical_element (instance of OpticalElement, optional) – The syned optical element.

  • coordinates (instance of ElementCoordinates, optional) – The syned element coordinates.

  • input_beam (instance of S4Beam, optional) – The S4 incident beam.

Return type:

instance of S4BeamMovementElement.

to_python_code(**kwargs)[source]

Creates the python code for defining the element.

Parameters:

**kwargs

Returns:

Python code.

Return type:

str

trace_beam(**params)[source]

Runs (ray tracing) the input beam through the element.

Parameters:

**params

Returns:

(output_beam, footprint) instances of S4Beam.

Return type:

tuple

shadow4.beamline.optical_elements.ideal_elements.s4_empty module

The s4 empty (pass-through) ideal element (optical element and beamline element).

class shadow4.beamline.optical_elements.ideal_elements.s4_empty.S4Empty(name='Undefined')[source]

Bases: Screen, S4OpticalElementDecorator

get_info()[source]

Returns the specific information of the S4 empty optical element.

Return type:

str

to_python_code(**kwargs)[source]

Creates the python code for defining the element.

Parameters:

**kwargs

Returns:

Python code.

Return type:

str

class shadow4.beamline.optical_elements.ideal_elements.s4_empty.S4EmptyElement(optical_element: S4Empty = None, coordinates: ElementCoordinates = None, input_beam: S4Beam = None)[source]

Bases: S4BeamlineElement

Constructor.

Parameters:
  • optical_element (instance of OpticalElement, optional) – The syned optical element.

  • coordinates (instance of ElementCoordinates, optional) – The syned element coordinates.

  • input_beam (instance of S4Beam, optional) – The S4 incident beam.

Return type:

instance of S4EmptyElement.

to_python_code(**kwargs)[source]

Creates the python code for defining the element.

Parameters:

**kwargs

Returns:

Python code.

Return type:

str

trace_beam(**params)[source]

Runs (ray tracing) the input beam through the element.

Parameters:

**params

Returns:

(output_beam, footprint) instances of S4Beam.

Return type:

tuple

shadow4.beamline.optical_elements.ideal_elements.s4_ideal_fzp module

The s4 ideal Fresnel zone plate (optical element and beamline element).

class shadow4.beamline.optical_elements.ideal_elements.s4_ideal_fzp.S4IdealFZP(name='Ideal FZP', focusing_direction=3, focal=1.0, nominal_wavelength=1e-10, diameter=0.001)[source]

Bases: IdealFZP, S4OpticalElementDecorator

Defines an ideal Fresnel Zone Plate.

Constructor.

Parameters:
  • name (str, optional) – The name of the optical element.

  • focusing_direction (int) – 0=None, 1=x (sagittal), 2=z (meridional), 3=2D focusing.

  • focal (float) – The focal length in meters.

  • nominal_wavelength (float) – The nominal wavelength in m for where the focal length is defined.

  • diameter (float) – The FZP diameter in m.

to_python_code(**kwargs)[source]

Creates the python code for defining the element.

Parameters:

**kwargs

Returns:

Python code.

Return type:

str

class shadow4.beamline.optical_elements.ideal_elements.s4_ideal_fzp.S4IdealFZPElement(optical_element: S4IdealFZP = None, coordinates: ElementCoordinates = None, input_beam: S4Beam = None)[source]

Bases: S4BeamlineElement

Constructor.

Parameters:
  • optical_element (instance of OpticalElement, optional) – The syned optical element.

  • coordinates (instance of ElementCoordinates, optional) – The syned element coordinates.

  • input_beam (instance of S4Beam, optional) – The S4 incident beam.

Return type:

instance of S4IdealFZPElement.

to_python_code(**kwargs)[source]

Creates the python code for defining the element.

Parameters:

**kwargs

Returns:

Python code.

Return type:

str

trace_beam(**params)[source]

Runs (ray tracing) the input beam through the element.

Parameters:

**params

Returns:

(output_beam, footprint) instances of S4Beam.

Return type:

tuple

shadow4.beamline.optical_elements.ideal_elements.s4_ideal_lens module

The s4 ideal lens (optical element and beamline element).

class shadow4.beamline.optical_elements.ideal_elements.s4_ideal_lens.S4IdealLens(name='Undefined', focal_x=0.0, focal_y=0.0)[source]

Bases: IdealLens, S4OpticalElementDecorator

to_python_code(**kwargs)[source]

Creates the python code for defining the element.

Parameters:

**kwargs

Returns:

Python code.

Return type:

str

class shadow4.beamline.optical_elements.ideal_elements.s4_ideal_lens.S4IdealLensElement(optical_element: S4IdealLens = None, coordinates: ElementCoordinates = None, input_beam: S4Beam = None)[source]

Bases: S4BeamlineElement

Constructor.

Parameters:
  • optical_element (instance of OpticalElement, optional) – The syned optical element.

  • coordinates (instance of ElementCoordinates, optional) – The syned element coordinates.

  • input_beam (instance of S4Beam, optional) – The S4 incident beam.

Return type:

instance of S4IdealLensElement.

get_focalX()[source]
get_focalZ()[source]
to_python_code(**kwargs)[source]

Creates the python code for defining the element.

Parameters:

**kwargs

Returns:

Python code.

Return type:

str

trace_beam(**params)[source]

Runs (ray tracing) the input beam through the element.

Parameters:

**params

Returns:

(output_beam, footprint) instances of S4Beam.

Return type:

tuple

class shadow4.beamline.optical_elements.ideal_elements.s4_ideal_lens.S4SuperIdealLens(name='Undefined', focal_p_x=1.0, focal_p_y=1.0, focal_q_x=1.0, focal_q_y=1.0)[source]

Bases: IdealLens, S4OpticalElementDecorator

to_python_code(**kwargs)[source]

Creates the python code for defining the element.

Parameters:

**kwargs

Returns:

Python code.

Return type:

str

class shadow4.beamline.optical_elements.ideal_elements.s4_ideal_lens.S4SuperIdealLensElement(optical_element: S4SuperIdealLens = None, coordinates: ElementCoordinates = None, input_beam: S4Beam = None)[source]

Bases: S4BeamlineElement

Constructor.

Parameters:
  • optical_element (instance of OpticalElement, optional) – The syned optical element.

  • coordinates (instance of ElementCoordinates, optional) – The syned element coordinates.

  • input_beam (instance of S4Beam, optional) – The S4 incident beam.

Return type:

instance of S4SuperIdealLensElement.

to_python_code(**kwargs)[source]

Creates the python code for defining the element.

Parameters:

**kwargs

Returns:

Python code.

Return type:

str

trace_beam(**params)[source]

Runs (ray tracing) the input beam through the element.

Parameters:

**params

Returns:

(output_beam, footprint) instances of S4Beam.

Return type:

tuple

Module contents