Module: CodeRunner::Trinity::TrinityMultiKits

Included in:
CodeRunner::Trinity
Defined in:
lib/trinitycrmod/graphs.rb

Instance Method Summary collapse

Instance Method Details

#calibration_graphkit(options) ⇒ Object



201
202
203
204
205
206
207
208
209
210
211
212
# File 'lib/trinitycrmod/graphs.rb', line 201

def calibration_graphkit(options)
  kit = GraphKit::MultiKit.new(
    [
      ion_hflux_calibration_graphkit(options),
      eln_hflux_calibration_graphkit(options),
      pflux_calibration_graphkit(options)
    ]
  )
  kit.gp.multiplot = "layout 2,2"
  kit.gp.key = "tmargin"
  kit
end

#geometry_graphkit(options) ⇒ Object



185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
# File 'lib/trinitycrmod/graphs.rb', line 185

def geometry_graphkit(options)
  kit = GraphKit::MultiKit.new(
    [
      smart_graphkit(options.absorb graphkit_name: 'nc_area_grid'),
      smart_graphkit(options.absorb graphkit_name: 'nc_qval_grid'),
      smart_graphkit(options.absorb graphkit_name: 'nc_shat_grid'),
      smart_graphkit(options.absorb graphkit_name: 'nc_kappa_grid'),
      smart_graphkit(options.absorb graphkit_name: 'nc_kapprim_grid'),
      smart_graphkit(options.absorb graphkit_name: 'nc_delta_grid'),
      smart_graphkit(options.absorb graphkit_name: 'nc_deltprim_grid'),
    ]
  )
  kit.each{|k| k.ylabel.sub!(/\(inout.*/, ''); k.gp.key="off"; k.title=nil}
  kit.gp.multiplot = "layout 2,4"
  kit
end

#profiles_graphkit(options) ⇒ Object



153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
# File 'lib/trinitycrmod/graphs.rb', line 153

def profiles_graphkit(options)
  kit = GraphKit::MultiKit.new(
    [
      #ion_temp_prof_graphkit(options),
      #eln_temp_prof_graphkit(options),
      #dens_prof_graphkit(options),
      #ang_mom_prof_graphkit(options)
      smart_graphkit(options.absorb graphkit_name: 'nc_temp_grid', tspec_index: 2),
      smart_graphkit(options.absorb graphkit_name: 'nc_temp_grid', tspec_index: 1),
      smart_graphkit(options.absorb graphkit_name: 'nc_dens_grid', tspec_index: 1),
      smart_graphkit(options.absorb graphkit_name: 'nc_omega_grid'),
  ]
  )
  kit.each{|k| k.title = "nil"; k.gp.key = "off"}
  kit[0].ylabel = "Ion Temp (keV)"
  kit[1].ylabel = "Electron Temp (keV)"
  kit[2].ylabel = "Electron Dens (10^20 m^-3)"
  kit[3].ylabel = "Toroidal Rotation (rad s^-1)"
  kit.each{|k| k.title = nil}
  #if options[:horizontal]
    #kit.slice(0..2).each{|k| k.xlabel = nil; k.gp.xtics = "format ''"}
    #kit[3].gp.xtics = 'format "%2.1f"'
  #else
    #kit.values_at(0,2).each{|k| k.xlabel = nil; k.gp.xtics = "format ''"}
    kit.gp.multiplot = "layout 2,2"
    #kit[1].gp.key = "top"
    kit[0].xlabel = nil
    kit[1].xlabel = nil
  #end
  kit

end