Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:15:23

0001 # optics tuning
0002 require './ruby/variator/variator_base.rb'
0003 
0004 class Variator < VariatorBase
0005   def initialize
0006     super
0007 
0008     @varied_settings = [
0009       {
0010         :xpath     => '//mirror',
0011         :attribute => 'focus_tune_x',
0012         :function  => @@center_delta,
0013         :args      => [10, 20],
0014         :count     => 5,
0015       },
0016       {
0017         :xpath     => '//mirror',
0018         :attribute => 'focus_tune_z',
0019         :function  => @@center_delta,
0020         :args      => [30, 30],
0021         :count     => 5,
0022       },
0023       {
0024         :xpath     => '//sensors//sphere',
0025         :attribute => 'radius',
0026         :function  => @@min_max,
0027         :args      => [80, 160],
0028         :count     => 5,
0029         :label     => :sensor_sphere_radius,
0030       },
0031     ]
0032 
0033     @derived_settings = [
0034       {
0035         :xpath      => '//sensors//sphere',
0036         :attribute  => 'centerz',
0037         :derivation => Proc.new{ |value| 50.0 - value[:sensor_sphere_radius] },
0038       },
0039     ]
0040 
0041     @simulation_pipelines = @@test_optics
0042 
0043     # best variants:
0044     #
0045     # 0
0046     # 6 <- best
0047     # 7
0048     # 12
0049     # 18
0050     # 32
0051     # 52
0052     # 57
0053     #
0054     # 6 is the best:
0055     # focus_tune_x          = -10.0
0056     # focus_tune_z          = 15.0
0057     # sensor_sphere_radius  = 100.0
0058     # sensor_sphere_centerz = -50.0
0059 
0060   end
0061 end