Configuration change: Context
This commit is contained in:
23
script/test/ScanPlot.py
Normal file
23
script/test/ScanPlot.py
Normal file
@@ -0,0 +1,23 @@
|
||||
from mathutils import *
|
||||
from plotutils import *
|
||||
|
||||
|
||||
y = [0,1,2,3,5,15, 60, 17, 14,6,3,2] #ret.getReadable(0)
|
||||
x = [0,1,2,3,4,5,6,7,8,9,10,11] #ret.getPositions(0)
|
||||
|
||||
p = plot(y, xdata=x, title="Processed")[0]
|
||||
|
||||
#function = interpolate(y,x,"cubic")
|
||||
d = deriv(y,x)
|
||||
plot_function(p, interpolate(d,x,"cubic"), "Deriv", x)
|
||||
|
||||
p.setLegendVisible(True)
|
||||
(normalization, mean_val, sigma) = fit_gaussian(y, x)
|
||||
fitted_gaussian_function = Gaussian(normalization, mean_val, sigma)
|
||||
plot_function(p, fitted_gaussian_function, "Fit", x)
|
||||
|
||||
p.addText(x[5], max(y)+2, get_exec_pars().path, Color.RED)
|
||||
|
||||
plots = get_plot_snapshots("Processed")
|
||||
print plots
|
||||
|
||||
Reference in New Issue
Block a user