shadow4.beamline.optical_elements.absorbers package

Submodules

shadow4.beamline.optical_elements.absorbers.s4_screen module

The S4 screen optical element: it deals with screens, slits, beam-stoppers and absorbers (as in shadow3).

Notes

This is a stand-alone optical element (contrary to shadow3).

class shadow4.beamline.optical_elements.absorbers.s4_screen.S4Screen(name='Undefined', boundary_shape=None, i_abs=0, i_stop=0, thick=0.0, file_abs='', material='', density=1.0, dabax=None)[source]

Bases: Absorber, S4OpticalElementDecorator

get_info()[source]

Returns the specific information of the S4 screen 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

to_python_code_boundary_shape()[source]

Creates a code block with information of boundary shape.

Returns:

The text with the code.

Return type:

str

class shadow4.beamline.optical_elements.absorbers.s4_screen.S4ScreenElement(optical_element: S4Screen = 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.

  • movements (instance of S4BeamlineElementMovements, optional) – The S4 element movements.

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

Return type:

instance of S4ScreenElement.

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