Beamline defined in syned

[1]:
%matplotlib inline
import matplotlib
matplotlib.rcParams['figure.dpi'] = 100

try:
    import srxraylib.plot.gol as _gol
    _gol.set_qt = lambda: None
except Exception:
    pass

[2]:

from syned.storage_ring.electron_beam import ElectronBeam from syned.storage_ring.magnetic_structures.undulator import Undulator from syned.storage_ring.light_source import LightSource from syned.beamline.shape import * from syned.beamline.optical_elements.ideal_elements.screen import Screen from syned.beamline.optical_elements.ideal_elements.ideal_lens import IdealLens from syned.beamline.optical_elements.absorbers.filter import Filter from syned.beamline.optical_elements.absorbers.slit import Slit from syned.beamline.optical_elements.absorbers.beam_stopper import BeamStopper from syned.beamline.optical_elements.mirrors.mirror import Mirror from syned.beamline.optical_elements.crystals.crystal import Crystal from syned.beamline.optical_elements.gratings.grating import Grating from syned.beamline.beamline import BeamlineElement, Beamline from syned.beamline.element_coordinates import ElementCoordinates from syned.util.json_tools import load_from_json_file # # example of setting a beamline in SYNED. # if __name__ == "__main__": print("==================== LightSource: ==================") src1 = ElectronBeam.initialize_as_pencil_beam(energy_in_GeV=6.0,current=0.2) src2 = Undulator() src2.set_value_from_key_name("K_horizontal",33) # just to be sure... assert (33 == src2.get_value_from_key_name("K_horizontal")) src = LightSource("test",src1,src2) # check file o/i for test src.to_json("tmp.json") # write to file tmp = load_from_json_file("tmp.json") # read from file print("returned class: ", type(tmp)) print(src.to_dictionary()) print(tmp.to_dictionary()) assert(src.to_dictionary() == tmp.to_dictionary()) print("==================== Optical elements: ==================") # # ideal elements # screen1 = Screen("screen1") lens1 = IdealLens("lens1",3.0) # # absorbers # filter1 = Filter("filter1","H2O",3.0e-6) slit1 = Slit(name="slit1",boundary_shape=Rectangle(-0.5e-3,0.5e-3,-2e-3,2e-3)) slit2 = Slit(name="slit2") slit2.set_rectangle(width=3e-4,height=5e-4) slit2.set_circle(radius=3e-4) stopper1 = BeamStopper(name="stopper1",boundary_shape=Rectangle(-0.5e-3,0.5e-3,-2e-3,2e-3)) stopper2 = BeamStopper(name="stopper2") stopper2.set_rectangle(width=3e-4,height=5e-4) stopper2.set_circle(radius=3e-4) # # elements with shape: mirror, gratings, crystals # mirror1 = Mirror(name="mirror1") crystal1 = Crystal(name="crystal1") grating1 = Grating(name="grating1") print("==================== BeamLine: ==================") beamline1 = Beamline() beamline1.set_light_source(src) list_oe = [screen1, lens1, filter1, slit1, slit2, stopper1, stopper2, mirror1, crystal1, grating1] for i, optical_element in enumerate(list_oe): coordinates=ElementCoordinates(p=1.1*i, q=1.2*i) be = BeamlineElement(optical_element=optical_element, coordinates=coordinates) beamline1.append_beamline_element(be) print(beamline1.info()) # check file o/i for test beamline1.to_json("tmp_beamline1.json") tmp = load_from_json_file("tmp_beamline1.json") print("returned class: ",type(tmp)) print(beamline1.to_dictionary()) print(tmp.to_dictionary()) assert(beamline1.to_dictionary() == tmp.to_dictionary())
==================== LightSource: ==================
File written to disk: tmp.json
returned class:  <class 'syned.storage_ring.light_source.LightSource'>
OrderedDict({'CLASS_NAME': 'LightSource', 'name': 'test', 'electron_beam': OrderedDict({'CLASS_NAME': 'ElectronBeam', 'energy_in_GeV': 6.0, 'energy_spread': 0.0, 'current': 0.2, 'number_of_bunches': 1, 'moment_xx': 0.0, 'moment_xxp': 0.0, 'moment_xpxp': 0.0, 'moment_yy': 0.0, 'moment_yyp': 0.0, 'moment_ypyp': 0.0, 'dispersion_x': 0.0, 'dispersion_y': 0.0, 'dispersionp_x': 0.0, 'dispersionp_y': 0.0}), 'magnetic_structure': OrderedDict({'CLASS_NAME': 'Undulator', 'K_vertical': 0.0, 'K_horizontal': 33, 'period_length': 0.0, 'number_of_periods': 1.0})})
OrderedDict({'CLASS_NAME': 'LightSource', 'name': 'test', 'electron_beam': OrderedDict({'CLASS_NAME': 'ElectronBeam', 'energy_in_GeV': 6.0, 'energy_spread': 0.0, 'current': 0.2, 'number_of_bunches': 1, 'moment_xx': 0.0, 'moment_xxp': 0.0, 'moment_xpxp': 0.0, 'moment_yy': 0.0, 'moment_yyp': 0.0, 'moment_ypyp': 0.0, 'dispersion_x': 0.0, 'dispersion_y': 0.0, 'dispersionp_x': 0.0, 'dispersionp_y': 0.0}), 'magnetic_structure': OrderedDict({'CLASS_NAME': 'Undulator', 'K_vertical': 0.0, 'K_horizontal': 33, 'period_length': 0.0, 'number_of_periods': 1.0})})
==================== Optical elements: ==================
==================== BeamLine: ==================
    -------Beamline---------
        -------LightSource---------
        name: 'test'  # Name
        -------ElectronBeam---------
        energy_in_GeV: 6.0 GeV # Electron beam energy
        energy_spread: 0.0  # Electron beam energy spread (relative)
        current: 0.2 A # Electron beam current
        number_of_bunches: 1  # Number of bunches
        moment_xx: 0.0 m^2 # Moment (spatial^2, horizontal)
        moment_xxp: 0.0 m # Moment (spatial-angular, horizontal)
        moment_xpxp: 0.0  # Moment (angular^2, horizontal)
        moment_yy: 0.0 m^2 # Moment (spatial^2, vertical)
        moment_yyp: 0.0 m # Moment (spatial-angular, vertical)
        moment_ypyp: 0.0  # Moment (angular^2, vertical)
        dispersion_x: 0.0  # Dispersion (horizontal)
        dispersion_y: 0.0  # Dispersion (vertical)
        dispersionp_x: 0.0  # Dispersion Derivative (horizontal)
        dispersionp_y: 0.0  # Dispersion Derivative (vertical)
        -------Undulator---------
        K_vertical: 0.0  # K value (vertical)
        K_horizontal: 33  # K value (horizontal)
        period_length: 0.0 m # Period length
        number_of_periods: 1.0  # Number of periods
        -------BeamlineElement---------
        -------Screen---------
        name: 'screen1'  # Name
        boundary_shape: None  #
        -------ElementCoordinates---------
        p: 0.0 m # distance from previous continuation plane
        q: 0.0 m # distance to next continuation plane
        angle_radial: 0.0 rad # incident angle [to normal]
        angle_radial_out: None rad # output angle [to normal]
        angle_azimuthal: 0.0 rad # rotation along beam axis
        -------BeamlineElement---------
        -------IdealLens---------
        name: 'lens1'  # Name
        boundary_shape: None  #
        focal_x: 3.0 m # Focal length in x [horizontal]
        focal_y: 1.0 m # Focal length in y [vertical]
        -------ElementCoordinates---------
        p: 1.1 m # distance from previous continuation plane
        q: 1.2 m # distance to next continuation plane
        angle_radial: 0.0 rad # incident angle [to normal]
        angle_radial_out: None rad # output angle [to normal]
        angle_azimuthal: 0.0 rad # rotation along beam axis
        -------BeamlineElement---------
        -------Filter---------
        material: 'H2O'  # Material (symbol, formula or name)
        thickness: 3e-06 m # Thickness
        -------ElementCoordinates---------
        p: 2.2 m # distance from previous continuation plane
        q: 2.4 m # distance to next continuation plane
        angle_radial: 0.0 rad # incident angle [to normal]
        angle_radial_out: None rad # output angle [to normal]
        angle_azimuthal: 0.0 rad # rotation along beam axis
        -------BeamlineElement---------
        -------Slit---------
        name: 'slit1'  # Name
        -------Rectangle---------
        x_left: -0.0005 m # x (width) minimum (signed)
        x_right: 0.0005 m # x (width) maximum (signed)
        y_bottom: -0.002 m # y (length) minimum (signed)
        y_top: 0.002 m # y (length) maximum (signed)
        -------ElementCoordinates---------
        p: 3.3000000000000003 m # distance from previous continuation plane
        q: 3.5999999999999996 m # distance to next continuation plane
        angle_radial: 0.0 rad # incident angle [to normal]
        angle_radial_out: None rad # output angle [to normal]
        angle_azimuthal: 0.0 rad # rotation along beam axis
        -------BeamlineElement---------
        -------Slit---------
        name: 'slit2'  # Name
        -------Circle---------
        radius: 0.0003 m # radius
        x_center: 0.0 m # x center (signed)
        y_center: 0.0 m # y center (signed)
        -------ElementCoordinates---------
        p: 4.4 m # distance from previous continuation plane
        q: 4.8 m # distance to next continuation plane
        angle_radial: 0.0 rad # incident angle [to normal]
        angle_radial_out: None rad # output angle [to normal]
        angle_azimuthal: 0.0 rad # rotation along beam axis
        -------BeamlineElement---------
        -------BeamStopper---------
        name: 'stopper1'  # Name
        -------Rectangle---------
        x_left: -0.0005 m # x (width) minimum (signed)
        x_right: 0.0005 m # x (width) maximum (signed)
        y_bottom: -0.002 m # y (length) minimum (signed)
        y_top: 0.002 m # y (length) maximum (signed)
        -------ElementCoordinates---------
        p: 5.5 m # distance from previous continuation plane
        q: 6.0 m # distance to next continuation plane
        angle_radial: 0.0 rad # incident angle [to normal]
        angle_radial_out: None rad # output angle [to normal]
        angle_azimuthal: 0.0 rad # rotation along beam axis
        -------BeamlineElement---------
        -------BeamStopper---------
        name: 'stopper2'  # Name
        -------Ellipse---------
        a_axis_min: -0.00015 m # x (width) axis starts (signed)
        a_axis_max: 0.00015 m # x (width) axis ends (signed)
        b_axis_min: -0.00015 m # y (length) axis starts (signed)
        b_axis_max: 0.00015 m # y (length) axis ends (signed)
        -------ElementCoordinates---------
        p: 6.6000000000000005 m # distance from previous continuation plane
        q: 7.199999999999999 m # distance to next continuation plane
        angle_radial: 0.0 rad # incident angle [to normal]
        angle_radial_out: None rad # output angle [to normal]
        angle_azimuthal: 0.0 rad # rotation along beam axis
        -------BeamlineElement---------
        -------Mirror---------
        name: 'mirror1'  # Name
        -------SurfaceShape---------
        boundary_shape: None  # Boundary shape
        coating: None  # Coating (element, compound or name)
        coating_thickness: None m # Coating thickness
        -------ElementCoordinates---------
        p: 7.700000000000001 m # distance from previous continuation plane
        q: 8.4 m # distance to next continuation plane
        angle_radial: 0.0 rad # incident angle [to normal]
        angle_radial_out: None rad # output angle [to normal]
        angle_azimuthal: 0.0 rad # rotation along beam axis
        -------BeamlineElement---------
        -------Crystal---------
        name: 'crystal1'  # Name
        -------SurfaceShape---------
        boundary_shape: None  # Boundary Shape
        material: 'Si'  # Material (name)
        diffraction_geometry: 0  # Diffraction Geometry
        miller_index_h: 1  # Miller index h
        miller_index_k: 1  # Miller index k
        miller_index_l: 1  # Miller index l
        asymmetry_angle: 0.0 rad # Asymmetry angle
        thickness: 0.0 m # Thickness
        -------ElementCoordinates---------
        p: 8.8 m # distance from previous continuation plane
        q: 9.6 m # distance to next continuation plane
        angle_radial: 0.0 rad # incident angle [to normal]
        angle_radial_out: None rad # output angle [to normal]
        angle_azimuthal: 0.0 rad # rotation along beam axis
        -------BeamlineElement---------
        -------Grating---------
        name: 'grating1'  # Name
        -------SurfaceShape---------
        -------BoundaryShape---------
        ruling: 800000.0 lines/m # Ruling at center
        -------ElementCoordinates---------
        p: 9.9 m # distance from previous continuation plane
        q: 10.799999999999999 m # distance to next continuation plane
        angle_radial: 0.0 rad # incident angle [to normal]
        angle_radial_out: None rad # output angle [to normal]
        angle_azimuthal: 0.0 rad # rotation along beam axis

File written to disk: tmp_beamline1.json
returned class:  <class 'syned.beamline.beamline.Beamline'>
OrderedDict({'CLASS_NAME': 'Beamline', 'light_source': OrderedDict({'CLASS_NAME': 'LightSource', 'name': 'test', 'electron_beam': OrderedDict({'CLASS_NAME': 'ElectronBeam', 'energy_in_GeV': 6.0, 'energy_spread': 0.0, 'current': 0.2, 'number_of_bunches': 1, 'moment_xx': 0.0, 'moment_xxp': 0.0, 'moment_xpxp': 0.0, 'moment_yy': 0.0, 'moment_yyp': 0.0, 'moment_ypyp': 0.0, 'dispersion_x': 0.0, 'dispersion_y': 0.0, 'dispersionp_x': 0.0, 'dispersionp_y': 0.0}), 'magnetic_structure': OrderedDict({'CLASS_NAME': 'Undulator', 'K_vertical': 0.0, 'K_horizontal': 33, 'period_length': 0.0, 'number_of_periods': 1.0})}), 'beamline_elements_list': [OrderedDict({'CLASS_NAME': 'BeamlineElement', 'optical_element': OrderedDict({'CLASS_NAME': 'Screen', 'name': 'screen1', 'boundary_shape': None}), 'coordinates': OrderedDict({'CLASS_NAME': 'ElementCoordinates', 'p': 0.0, 'q': 0.0, 'angle_radial': 0.0, 'angle_radial_out': None, 'angle_azimuthal': 0.0})}), OrderedDict({'CLASS_NAME': 'BeamlineElement', 'optical_element': OrderedDict({'CLASS_NAME': 'IdealLens', 'name': 'lens1', 'boundary_shape': None, 'focal_x': 3.0, 'focal_y': 1.0}), 'coordinates': OrderedDict({'CLASS_NAME': 'ElementCoordinates', 'p': 1.1, 'q': 1.2, 'angle_radial': 0.0, 'angle_radial_out': None, 'angle_azimuthal': 0.0})}), OrderedDict({'CLASS_NAME': 'BeamlineElement', 'optical_element': OrderedDict({'CLASS_NAME': 'Filter', 'material': 'H2O', 'thickness': 3e-06}), 'coordinates': OrderedDict({'CLASS_NAME': 'ElementCoordinates', 'p': 2.2, 'q': 2.4, 'angle_radial': 0.0, 'angle_radial_out': None, 'angle_azimuthal': 0.0})}), OrderedDict({'CLASS_NAME': 'BeamlineElement', 'optical_element': OrderedDict({'CLASS_NAME': 'Slit', 'name': 'slit1', 'boundary_shape': OrderedDict({'CLASS_NAME': 'Rectangle', 'x_left': -0.0005, 'x_right': 0.0005, 'y_bottom': -0.002, 'y_top': 0.002})}), 'coordinates': OrderedDict({'CLASS_NAME': 'ElementCoordinates', 'p': 3.3000000000000003, 'q': 3.5999999999999996, 'angle_radial': 0.0, 'angle_radial_out': None, 'angle_azimuthal': 0.0})}), OrderedDict({'CLASS_NAME': 'BeamlineElement', 'optical_element': OrderedDict({'CLASS_NAME': 'Slit', 'name': 'slit2', 'boundary_shape': OrderedDict({'CLASS_NAME': 'Circle', 'radius': 0.0003, 'x_center': 0.0, 'y_center': 0.0})}), 'coordinates': OrderedDict({'CLASS_NAME': 'ElementCoordinates', 'p': 4.4, 'q': 4.8, 'angle_radial': 0.0, 'angle_radial_out': None, 'angle_azimuthal': 0.0})}), OrderedDict({'CLASS_NAME': 'BeamlineElement', 'optical_element': OrderedDict({'CLASS_NAME': 'BeamStopper', 'name': 'stopper1', 'boundary_shape': OrderedDict({'CLASS_NAME': 'Rectangle', 'x_left': -0.0005, 'x_right': 0.0005, 'y_bottom': -0.002, 'y_top': 0.002})}), 'coordinates': OrderedDict({'CLASS_NAME': 'ElementCoordinates', 'p': 5.5, 'q': 6.0, 'angle_radial': 0.0, 'angle_radial_out': None, 'angle_azimuthal': 0.0})}), OrderedDict({'CLASS_NAME': 'BeamlineElement', 'optical_element': OrderedDict({'CLASS_NAME': 'BeamStopper', 'name': 'stopper2', 'boundary_shape': OrderedDict({'CLASS_NAME': 'Ellipse', 'a_axis_min': -0.00015, 'a_axis_max': 0.00015, 'b_axis_min': -0.00015, 'b_axis_max': 0.00015})}), 'coordinates': OrderedDict({'CLASS_NAME': 'ElementCoordinates', 'p': 6.6000000000000005, 'q': 7.199999999999999, 'angle_radial': 0.0, 'angle_radial_out': None, 'angle_azimuthal': 0.0})}), OrderedDict({'CLASS_NAME': 'BeamlineElement', 'optical_element': OrderedDict({'CLASS_NAME': 'Mirror', 'name': 'mirror1', 'surface_shape': OrderedDict({'CLASS_NAME': 'SurfaceShape'}), 'boundary_shape': None, 'coating': None, 'coating_thickness': None}), 'coordinates': OrderedDict({'CLASS_NAME': 'ElementCoordinates', 'p': 7.700000000000001, 'q': 8.4, 'angle_radial': 0.0, 'angle_radial_out': None, 'angle_azimuthal': 0.0})}), OrderedDict({'CLASS_NAME': 'BeamlineElement', 'optical_element': OrderedDict({'CLASS_NAME': 'Crystal', 'name': 'crystal1', 'surface_shape': OrderedDict({'CLASS_NAME': 'SurfaceShape'}), 'boundary_shape': None, 'material': 'Si', 'diffraction_geometry': 0, 'miller_index_h': 1, 'miller_index_k': 1, 'miller_index_l': 1, 'asymmetry_angle': 0.0, 'thickness': 0.0}), 'coordinates': OrderedDict({'CLASS_NAME': 'ElementCoordinates', 'p': 8.8, 'q': 9.6, 'angle_radial': 0.0, 'angle_radial_out': None, 'angle_azimuthal': 0.0})}), OrderedDict({'CLASS_NAME': 'BeamlineElement', 'optical_element': OrderedDict({'CLASS_NAME': 'Grating', 'name': 'grating1', 'surface_shape': OrderedDict({'CLASS_NAME': 'SurfaceShape'}), 'boundary_shape': OrderedDict({'CLASS_NAME': 'BoundaryShape'}), 'ruling': 800000.0}), 'coordinates': OrderedDict({'CLASS_NAME': 'ElementCoordinates', 'p': 9.9, 'q': 10.799999999999999, 'angle_radial': 0.0, 'angle_radial_out': None, 'angle_azimuthal': 0.0})})]})
OrderedDict({'CLASS_NAME': 'Beamline', 'light_source': OrderedDict({'CLASS_NAME': 'LightSource', 'name': 'test', 'electron_beam': OrderedDict({'CLASS_NAME': 'ElectronBeam', 'energy_in_GeV': 6.0, 'energy_spread': 0.0, 'current': 0.2, 'number_of_bunches': 1, 'moment_xx': 0.0, 'moment_xxp': 0.0, 'moment_xpxp': 0.0, 'moment_yy': 0.0, 'moment_yyp': 0.0, 'moment_ypyp': 0.0, 'dispersion_x': 0.0, 'dispersion_y': 0.0, 'dispersionp_x': 0.0, 'dispersionp_y': 0.0}), 'magnetic_structure': OrderedDict({'CLASS_NAME': 'Undulator', 'K_vertical': 0.0, 'K_horizontal': 33, 'period_length': 0.0, 'number_of_periods': 1.0})}), 'beamline_elements_list': [OrderedDict({'CLASS_NAME': 'BeamlineElement', 'optical_element': OrderedDict({'CLASS_NAME': 'Screen', 'name': 'screen1', 'boundary_shape': None}), 'coordinates': OrderedDict({'CLASS_NAME': 'ElementCoordinates', 'p': 0.0, 'q': 0.0, 'angle_radial': 0.0, 'angle_radial_out': None, 'angle_azimuthal': 0.0})}), OrderedDict({'CLASS_NAME': 'BeamlineElement', 'optical_element': OrderedDict({'CLASS_NAME': 'IdealLens', 'name': 'lens1', 'boundary_shape': None, 'focal_x': 3.0, 'focal_y': 1.0}), 'coordinates': OrderedDict({'CLASS_NAME': 'ElementCoordinates', 'p': 1.1, 'q': 1.2, 'angle_radial': 0.0, 'angle_radial_out': None, 'angle_azimuthal': 0.0})}), OrderedDict({'CLASS_NAME': 'BeamlineElement', 'optical_element': OrderedDict({'CLASS_NAME': 'Filter', 'material': 'H2O', 'thickness': 3e-06}), 'coordinates': OrderedDict({'CLASS_NAME': 'ElementCoordinates', 'p': 2.2, 'q': 2.4, 'angle_radial': 0.0, 'angle_radial_out': None, 'angle_azimuthal': 0.0})}), OrderedDict({'CLASS_NAME': 'BeamlineElement', 'optical_element': OrderedDict({'CLASS_NAME': 'Slit', 'name': 'slit1', 'boundary_shape': OrderedDict({'CLASS_NAME': 'Rectangle', 'x_left': -0.0005, 'x_right': 0.0005, 'y_bottom': -0.002, 'y_top': 0.002})}), 'coordinates': OrderedDict({'CLASS_NAME': 'ElementCoordinates', 'p': 3.3000000000000003, 'q': 3.5999999999999996, 'angle_radial': 0.0, 'angle_radial_out': None, 'angle_azimuthal': 0.0})}), OrderedDict({'CLASS_NAME': 'BeamlineElement', 'optical_element': OrderedDict({'CLASS_NAME': 'Slit', 'name': 'slit2', 'boundary_shape': OrderedDict({'CLASS_NAME': 'Circle', 'radius': 0.0003, 'x_center': 0.0, 'y_center': 0.0})}), 'coordinates': OrderedDict({'CLASS_NAME': 'ElementCoordinates', 'p': 4.4, 'q': 4.8, 'angle_radial': 0.0, 'angle_radial_out': None, 'angle_azimuthal': 0.0})}), OrderedDict({'CLASS_NAME': 'BeamlineElement', 'optical_element': OrderedDict({'CLASS_NAME': 'BeamStopper', 'name': 'stopper1', 'boundary_shape': OrderedDict({'CLASS_NAME': 'Rectangle', 'x_left': -0.0005, 'x_right': 0.0005, 'y_bottom': -0.002, 'y_top': 0.002})}), 'coordinates': OrderedDict({'CLASS_NAME': 'ElementCoordinates', 'p': 5.5, 'q': 6.0, 'angle_radial': 0.0, 'angle_radial_out': None, 'angle_azimuthal': 0.0})}), OrderedDict({'CLASS_NAME': 'BeamlineElement', 'optical_element': OrderedDict({'CLASS_NAME': 'BeamStopper', 'name': 'stopper2', 'boundary_shape': OrderedDict({'CLASS_NAME': 'Ellipse', 'a_axis_min': -0.00015, 'a_axis_max': 0.00015, 'b_axis_min': -0.00015, 'b_axis_max': 0.00015})}), 'coordinates': OrderedDict({'CLASS_NAME': 'ElementCoordinates', 'p': 6.6000000000000005, 'q': 7.199999999999999, 'angle_radial': 0.0, 'angle_radial_out': None, 'angle_azimuthal': 0.0})}), OrderedDict({'CLASS_NAME': 'BeamlineElement', 'optical_element': OrderedDict({'CLASS_NAME': 'Mirror', 'name': 'mirror1', 'surface_shape': OrderedDict({'CLASS_NAME': 'SurfaceShape'}), 'boundary_shape': None, 'coating': None, 'coating_thickness': None}), 'coordinates': OrderedDict({'CLASS_NAME': 'ElementCoordinates', 'p': 7.700000000000001, 'q': 8.4, 'angle_radial': 0.0, 'angle_radial_out': None, 'angle_azimuthal': 0.0})}), OrderedDict({'CLASS_NAME': 'BeamlineElement', 'optical_element': OrderedDict({'CLASS_NAME': 'Crystal', 'name': 'crystal1', 'surface_shape': OrderedDict({'CLASS_NAME': 'SurfaceShape'}), 'boundary_shape': None, 'material': 'Si', 'diffraction_geometry': 0, 'miller_index_h': 1, 'miller_index_k': 1, 'miller_index_l': 1, 'asymmetry_angle': 0.0, 'thickness': 0.0}), 'coordinates': OrderedDict({'CLASS_NAME': 'ElementCoordinates', 'p': 8.8, 'q': 9.6, 'angle_radial': 0.0, 'angle_radial_out': None, 'angle_azimuthal': 0.0})}), OrderedDict({'CLASS_NAME': 'BeamlineElement', 'optical_element': OrderedDict({'CLASS_NAME': 'Grating', 'name': 'grating1', 'surface_shape': OrderedDict({'CLASS_NAME': 'SurfaceShape'}), 'boundary_shape': OrderedDict({'CLASS_NAME': 'BoundaryShape'}), 'ruling': 800000.0}), 'coordinates': OrderedDict({'CLASS_NAME': 'ElementCoordinates', 'p': 9.9, 'q': 10.799999999999999, 'angle_radial': 0.0, 'angle_radial_out': None, 'angle_azimuthal': 0.0})})]})