def set_optics(v=None): el = [] pp = [] names = [ 'CRL', 'CRL_Watchpoint', 'Watchpoint', 'Fiber', 'Fiber_Watchpoint2', 'Watchpoint2' ] for el_name in names: if el_name == 'CRL': # CRL: crl 36.0m el.append( srwlib.srwl_opt_setup_CRL( _foc_plane=v.op_CRL_foc_plane, _delta=v.op_CRL_delta, _atten_len=v.op_CRL_atten_len, _shape=v.op_CRL_shape, _apert_h=v.op_CRL_apert_h, _apert_v=v.op_CRL_apert_v, _r_min=v.op_CRL_r_min, _n=v.op_CRL_n, _wall_thick=v.op_CRL_wall_thick, _xc=v.op_CRL_x, _yc=v.op_CRL_y, )) pp.append(v.op_CRL_pp) elif el_name == 'CRL_Watchpoint': # CRL_Watchpoint: drift 36.0m el.append(srwlib.SRWLOptD(_L=v.op_CRL_Watchpoint_L, )) pp.append(v.op_CRL_Watchpoint_pp) elif el_name == 'Watchpoint': # Watchpoint: watch 70.1915m pass elif el_name == 'Fiber': # Fiber: fiber 70.1915m el.append( srwlib.srwl_opt_setup_cyl_fiber( _foc_plane=v.op_Fiber_foc_plane, _delta_ext=v.op_Fiber_delta_ext, _delta_core=v.op_Fiber_delta_core, _atten_len_ext=v.op_Fiber_atten_len_ext, _atten_len_core=v.op_Fiber_atten_len_core, _diam_ext=v.op_Fiber_externalDiameter, _diam_core=v.op_Fiber_diam_core, _xc=v.op_Fiber_xc, _yc=v.op_Fiber_yc, )) pp.append(v.op_Fiber_pp) elif el_name == 'Fiber_Watchpoint2': # Fiber_Watchpoint2: drift 70.1915m el.append(srwlib.SRWLOptD(_L=v.op_Fiber_Watchpoint2_L, )) pp.append(v.op_Fiber_Watchpoint2_pp) elif el_name == 'Watchpoint2': # Watchpoint2: watch 70.85m pass pp.append(v.op_fin_pp) return srwlib.SRWLOptC(el, pp)
def set_optics(v=None): el = [] pp = [] names = ['CRL', 'CRL_Watchpoint', 'Watchpoint', 'Fiber', 'Fiber_Watchpoint2', 'Watchpoint2'] for el_name in names: if el_name == 'CRL': # CRL: crl 36.0m el.append(srwlib.srwl_opt_setup_CRL( _foc_plane=v.op_CRL_foc_plane, _delta=v.op_CRL_delta, _atten_len=v.op_CRL_atten_len, _shape=v.op_CRL_shape, _apert_h=v.op_CRL_apert_h, _apert_v=v.op_CRL_apert_v, _r_min=v.op_CRL_r_min, _n=v.op_CRL_n, _wall_thick=v.op_CRL_wall_thick, _xc=v.op_CRL_x, _yc=v.op_CRL_y, )) pp.append(v.op_CRL_pp) elif el_name == 'CRL_Watchpoint': # CRL_Watchpoint: drift 36.0m el.append(srwlib.SRWLOptD( _L=v.op_CRL_Watchpoint_L, )) pp.append(v.op_CRL_Watchpoint_pp) elif el_name == 'Watchpoint': # Watchpoint: watch 70.1915m pass elif el_name == 'Fiber': # Fiber: fiber 70.1915m el.append(srwlib.srwl_opt_setup_cyl_fiber( _foc_plane=v.op_Fiber_foc_plane, _delta_ext=v.op_Fiber_delta_ext, _delta_core=v.op_Fiber_delta_core, _atten_len_ext=v.op_Fiber_atten_len_ext, _atten_len_core=v.op_Fiber_atten_len_core, _diam_ext=v.op_Fiber_externalDiameter, _diam_core=v.op_Fiber_diam_core, _xc=v.op_Fiber_xc, _yc=v.op_Fiber_yc, )) pp.append(v.op_Fiber_pp) elif el_name == 'Fiber_Watchpoint2': # Fiber_Watchpoint2: drift 70.1915m el.append(srwlib.SRWLOptD( _L=v.op_Fiber_Watchpoint2_L, )) pp.append(v.op_Fiber_Watchpoint2_pp) elif el_name == 'Watchpoint2': # Watchpoint2: watch 70.85m pass pp.append(v.op_fin_pp) return srwlib.SRWLOptC(el, pp)
def set_optics(v=None): el = [] # CRL: crl 36.0m el.append( srwlib.srwl_opt_setup_CRL(2, 4.716943e-06, 0.006257, 1, 0.001, 0.001, 0.0005, 3, 8e-05, 0.0, 0.0)) el.append(srwlib.SRWLOptD(34.1915)) # Watchpoint: watch 70.1915m # Fiber: fiber 70.1915m el.append( srwlib.srwl_opt_setup_cyl_fiber(_foc_plane=2, _delta_ext=6.228746e-06, _delta_core=4.129923e-05, _atten_len_ext=0.002412, _atten_len_core=3.63751e-06, _diam_ext=0.0001, _diam_core=1e-05, _xc=0.0, _yc=0.0)) el.append(srwlib.SRWLOptD(0.6585)) # Watchpoint: watch 70.85m pp = [] # CRL pp.append([ 0, 0, 1.0, 0, 0, 1.0, 1.0, 1.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ]) pp.append([ 0, 0, 1.0, 1, 0, 1.0, 1.0, 1.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ]) # Watchpoint # Fiber pp.append([ 0, 0, 1.0, 0, 0, 1.0, 1.0, 1.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ]) pp.append([ 0, 0, 1.0, 1, 0, 1.0, 1.0, 1.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ]) # Watchpoint # final post-propagation pp.append([ 0, 0, 1.0, 0, 0, 0.7, 2.0, 0.2, 10.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ]) return srwlib.SRWLOptC(el, pp)