Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download

grey's web page?

108 views
ubuntu2204
# weibull function: p[0]=sigma-sat, p[1]=LET-thresh, p[2]=width, p[3]=exponent # default display App @interact #@interact #https://doc.sagemath.org/html/en/prep/Quickstarts/Interact.html #foo = ['bar' for _ in xrange(10000000)] def plot_weibull(m=('sigma-sat', 1e-7), let0=('threshold', 0.001), w=('width', 100.0), s=('exponent', 1.0)): p = [1.77e-8, 0.584, 240.1, 0.812]#Note REW Fit of 7-Series data (DSLee REDW + two low LET points) f(x) = p[0] * (1 - 1/(exp(((x - p[1])/p[2]) ^ p[3]))) f(x) = m * (1 - 1/(exp(((x - let0)/w) ^ s))) plot_semilogy(f(x), xmin=let0+0.001, xmax=120, thickness=2).show() # alternative to xmin: ymin=m*0.00001 plot_loglog(f, xmin=let0+0.001, xmax=120, thickness=2).show() plot(f(x), 0, 120, thickness=2).show() plot_semilogx(f, xmin=let0+0.001, xmax=120, thickness=2).show() return #https://doc.sagemath.org/html/en/thematic_tutorials/numerical_sage/numpy.html #option 2: https://stackoverflow.com/questions/1316767/how-can-i-explicitly-free-memory-in-python plot_weibull(1.77e-8, 0.584, 240.1, 0.812) # plot_weibull() #parametric_plot([cos(x) + 2*cos(x/4), sin(x) - 2*sin(x/4)], (x,0,8*pi), color='green', thickness=3, fill = True)
Interact: please open in CoCalc
*** WARNING: Code contains possible implicit multiplication *** *** Check if any of [ 1e, 77e, 77e ] need a "*" sign for multiplication, e.g. 5x should be 5*x ! *** Error in lines 11-11 Traceback (most recent call last): File "/cocalc/lib/python3.11/site-packages/smc_sagews/sage_server.py", line 1244, in execute exec( File "", line 1, in <module> TypeError: InteractFunction.__call__() takes 1 positional argument but 5 were given
interactive( plot_semilogy(f(x), xmin=p[1]+0.001, xmax=120, thickness=2).show()))) plot_loglog(f, xmin=p[1]+0.001, xmax=120, thickness=3)
plot_semilogx(f, xmin=p[1]+0.001, xmax=4 20, thickness=3)
interact(plot(x^2, (x,0,5)).show()