syned.beamline.optical_elements.absorbers package

Submodules

syned.beamline.optical_elements.absorbers.absorber module

class syned.beamline.optical_elements.absorbers.absorber.Absorber(name='Undefined', boundary_shape=None)[source]

Bases: OpticalElement

Base class for optical element category “absorbers” (filters, slits, etc.)

Constructor.

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

  • boundary_shape (instance of BoundaryShape, optional) – if None, it is initialized to BoundaryShape().

syned.beamline.optical_elements.absorbers.beam_stopper module

class syned.beamline.optical_elements.absorbers.beam_stopper.BeamStopper(name='Undefined', boundary_shape=None)[source]

Bases: Absorber

Beam-stopper or obstruction.

Constructor.

Note that:

Slit BeamStopper Filter HoledFilter

beam pass at center Yes No Yes No apply attenuation No No Yes Yes

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

  • boundary_shape (instance of BoundaryShape, optional) – The geometry of the slit aperture. if None, it is initialized to BoundaryShape().

set_circle(radius=0.003)[source]

Sets the stopper as a circle.

Parameters:
  • radius (float) – The radius of the circle.

  • center_x (float) – The x coordinate of the center of the circle.

  • center_y (float) – The y coordinate of the center of the circle.

set_rectangle(width=0.003, height=0.004)[source]

Sets the stopper as a rectangle.

Parameters:
  • width (float, optional) – The rectangle width.

  • length (float, optional) – The rectangle length.

  • center_x (float, optional) – The center coordinate X.

  • center_y (float, optional) – The center coordinate Y.

syned.beamline.optical_elements.absorbers.filter module

class syned.beamline.optical_elements.absorbers.filter.Filter(name='Undefined', material='Be', thickness=0.001, boundary_shape=None)[source]

Bases: Absorber

Filter or absorber or attenuator.

Note that:

Slit BeamStopper Filter HoledFilter

beam pass at center Yes No Yes No apply attenuation No No Yes Yes

Constructor.

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

  • material (str) – A string defining the material.

  • thickness (float) – The filter thickness in m.

  • boundary_shape (instance of BoundaryShape, optional) – if None, it is initialized to BoundaryShape().

get_material()[source]

Returns the material name.

Return type:

str

get_thickness()[source]

Retuirns the filter thickness in m.

Return type:

float

syned.beamline.optical_elements.absorbers.holed_filter module

class syned.beamline.optical_elements.absorbers.holed_filter.HoledFilter(name='Undefined', material='Be', thickness=0.001, boundary_shape=None)[source]

Bases: Absorber

Filter or absorber or attenuator with a hole.

Note that:

Slit BeamStopper Filter HoledFilter

beam pass at center Yes No Yes No apply attenuation No No Yes Yes

Constructor.

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

  • material (str) – A string defining the material.

  • thickness (float) – The filter thickness in m.

  • boundary_shape (instance of BoundaryShape, optional) – Defines the geometry of the hole. if None, it is initialized to BoundaryShape().

get_material()[source]

Returns the material name.

Return type:

str

get_thickness()[source]

Retuirns the filter thickness in m.

Return type:

float

syned.beamline.optical_elements.absorbers.slit module

class syned.beamline.optical_elements.absorbers.slit.Slit(name='Undefined', boundary_shape=None)[source]

Bases: Absorber

Slit or aperture.

Constructor.

Note that:

Slit BeamStopper Filter HoledFilter

beam pass at center Yes No Yes No apply attenuation No No Yes Yes

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

  • boundary_shape (instance of BoundaryShape, optional) – The geometry of the slit aperture. if None, it is initialized to BoundaryShape().

set_circle(radius=0.003, center_x=0.0, center_y=0.0)[source]

Sets the aperture as a circle.

Parameters:
  • radius (float) – The radius of the circle.

  • center_x (float) – The x coordinate of the center of the circle.

  • center_y (float) – The y coordinate of the center of the circle.

set_ellipse(width=0.003, height=0.004, center_x=0.0, center_y=0.0)[source]

Sets the aperture as an ellipse.

Parameters:
  • width (float, optional) – The ellipse width (2a).

  • height (float, optional) – The ellipse height (2b).

  • center_x (float, optional) – The ellipse center coordinate X.

  • center_y (float, optional) – The ellipse center coordinate Y.

set_rectangle(width=0.003, height=0.004, center_x=0.0, center_y=0.0)[source]

Sets the aperture as a rectangle.

Parameters:
  • width (float, optional) – The rectangle width.

  • length (float, optional) – The rectangle length.

  • center_x (float, optional) – The center coordinate X.

  • center_y (float, optional) – The center coordinate Y.

Module contents