File written to disk: tmp.json
returned class: <class 'syned.storage_ring.light_source.LightSource'>
OrderedDict([('CLASS_NAME', 'LightSource'), ('name', 'test_source'), ('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)])), ('magnetic_structure', OrderedDict([('CLASS_NAME', 'Undulator'), ('K_vertical', 0.0), ('K_horizontal', 0.0), ('period_length', 0.0), ('number_of_periods', 1.0)]))])
OrderedDict([('CLASS_NAME', 'LightSource'), ('name', 'test_source'), ('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)])), ('magnetic_structure', OrderedDict([('CLASS_NAME', 'Undulator'), ('K_vertical', 0.0), ('K_horizontal', 0.0), ('period_length', 0.0), ('number_of_periods', 1.0)]))])
File written to disk: tmp_0.json
File written to disk: tmp_1.json
File written to disk: tmp_2.json
loading element 0
returned class: <class 'syned.storage_ring.electron_beam.ElectronBeam'>
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)])
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)])
loading element 1
returned class: <class 'syned.storage_ring.magnetic_structures.undulator.Undulator'>
OrderedDict([('CLASS_NAME', 'Undulator'), ('K_vertical', 0.0), ('K_horizontal', 0.0), ('period_length', 0.0), ('number_of_periods', 1.0)])
OrderedDict([('CLASS_NAME', 'Undulator'), ('K_vertical', 0.0), ('K_horizontal', 0.0), ('period_length', 0.0), ('number_of_periods', 1.0)])
loading element 2
returned class: <class 'syned.beamline.optical_elements.absorbers.slit.Slit'>
OrderedDict([('CLASS_NAME', 'Slit'), ('name', 'slit1'), ('boundary_shape', OrderedDict([('CLASS_NAME', 'MultiplePatch'), ('patch_list', [OrderedDict([('CLASS_NAME', 'Rectangle'), ('x_left', -0.02), ('x_right', -0.01), ('y_bottom', -0.001), ('y_top', 0.001)]), OrderedDict([('CLASS_NAME', 'Rectangle'), ('x_left', 0.01), ('x_right', 0.02), ('y_bottom', -0.001), ('y_top', 0.001)])])]))])
OrderedDict([('CLASS_NAME', 'Slit'), ('name', 'slit1'), ('boundary_shape', OrderedDict([('CLASS_NAME', 'MultiplePatch'), ('patch_list', [OrderedDict([('CLASS_NAME', 'Rectangle'), ('x_left', -0.02), ('x_right', -0.01), ('y_bottom', -0.001), ('y_top', 0.001)]), OrderedDict([('CLASS_NAME', 'Rectangle'), ('x_left', 0.01), ('x_right', 0.02), ('y_bottom', -0.001), ('y_top', 0.001)])])]))])
File written to disk: tmp_bl.json
returned class: <class 'syned.beamline.beamline.Beamline'>
OrderedDict([('CLASS_NAME', 'Beamline'), ('light_source', OrderedDict([('CLASS_NAME', 'LightSource'), ('name', 'test_source'), ('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)])), ('magnetic_structure', OrderedDict([('CLASS_NAME', 'Undulator'), ('K_vertical', 0.0), ('K_horizontal', 0.0), ('period_length', 0.0), ('number_of_periods', 1.0)]))])), ('beamline_elements_list', [OrderedDict([('CLASS_NAME', 'BeamlineElement'), ('optical_element', OrderedDict([('CLASS_NAME', 'Slit'), ('name', 'slit1'), ('boundary_shape', OrderedDict([('CLASS_NAME', 'MultiplePatch'), ('patch_list', [OrderedDict([('CLASS_NAME', 'Rectangle'), ('x_left', -0.02), ('x_right', -0.01), ('y_bottom', -0.001), ('y_top', 0.001)]), OrderedDict([('CLASS_NAME', 'Rectangle'), ('x_left', 0.01), ('x_right', 0.02), ('y_bottom', -0.001), ('y_top', 0.001)])])]))])), ('coordinates', OrderedDict([('CLASS_NAME', 'ElementCoordinates'), ('p', 10.0), ('q', 3.0), ('angle_radial', 0.0), ('angle_radial_out', None), ('angle_azimuthal', 0.0)]))])])])
OrderedDict([('CLASS_NAME', 'Beamline'), ('light_source', OrderedDict([('CLASS_NAME', 'LightSource'), ('name', 'test_source'), ('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)])), ('magnetic_structure', OrderedDict([('CLASS_NAME', 'Undulator'), ('K_vertical', 0.0), ('K_horizontal', 0.0), ('period_length', 0.0), ('number_of_periods', 1.0)]))])), ('beamline_elements_list', [OrderedDict([('CLASS_NAME', 'BeamlineElement'), ('optical_element', OrderedDict([('CLASS_NAME', 'Slit'), ('name', 'slit1'), ('boundary_shape', OrderedDict([('CLASS_NAME', 'MultiplePatch'), ('patch_list', [OrderedDict([('CLASS_NAME', 'Rectangle'), ('x_left', -0.02), ('x_right', -0.01), ('y_bottom', -0.001), ('y_top', 0.001)]), OrderedDict([('CLASS_NAME', 'Rectangle'), ('x_left', 0.01), ('x_right', 0.02), ('y_bottom', -0.001), ('y_top', 0.001)])])]))])), ('coordinates', OrderedDict([('CLASS_NAME', 'ElementCoordinates'), ('p', 10.0), ('q', 3.0), ('angle_radial', 0.0), ('angle_radial_out', None), ('angle_azimuthal', 0.0)]))])])])
-------Beamline---------
-------LightSource---------
name: 'test_source' # 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)
-------Undulator---------
K_vertical: 0.0 # K value (vertical)
K_horizontal: 0.0 # K value (horizontal)
period_length: 0.0 m # Period length
number_of_periods: 1.0 # Number of periods
-------BeamlineElement---------
-------Slit---------
name: 'slit1' # Name
-------MultiplePatch---------
-------Rectangle---------
x_left: -0.02 m # x (width) minimum (signed)
x_right: -0.01 m # x (width) maximum (signed)
y_bottom: -0.001 m # y (length) minimum (signed)
y_top: 0.001 m # y (length) maximum (signed)
-------Rectangle---------
x_left: 0.01 m # x (width) minimum (signed)
x_right: 0.02 m # x (width) maximum (signed)
y_bottom: -0.001 m # y (length) minimum (signed)
y_top: 0.001 m # y (length) maximum (signed)
-------ElementCoordinates---------
p: 10.0 m # distance from previous continuation plane
q: 3.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