lib/trinitycrmod/graphs.rb in trinitycrmod-0.6.7 vs lib/trinitycrmod/graphs.rb in trinitycrmod-0.6.8
- old
+ new
@@ -122,10 +122,32 @@
end
end
end
+ # Graph of the ion heat calibration factor
+ def ion_hflux_calibration_graphkit(options)
+ calibs = Calib.analyse_file("#@directory/#@run_name.calib")
+ k = calibs.map{|c| c.qflux_graphkit(0)}.sum
+ k.ylabel = 'Qi'
+ k
+ end
+ # Graph of the electron heat calibration factor
+ def eln_hflux_calibration_graphkit(options)
+ calibs = Calib.analyse_file("#@directory/#@run_name.calib")
+ k = calibs.map{|c| c.qflux_graphkit(1)}.sum
+ k.ylabel = 'Qe'
+ k
+ end
+ # Graph of the particle flux calibration factor
+ def pflux_calibration_graphkit(options)
+ calibs = Calib.analyse_file("#@directory/#@run_name.calib")
+ k = calibs.map{|c| c.pflux_graphkit(1)}.sum
+ k.ylabel = 'Gamma'
+ k
+ end
+
include TrinityGraphKits
module TrinityMultiKits
def profiles_graphkit(options)
kit = GraphKit::MultiKit.new(
@@ -146,9 +168,22 @@
kit.gp.key = "tmargin"
end
kit
end
+ 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
+
end
include TrinityMultiKits
# This is the hook that is called by CodeRunner, providing the