¡@

Home 

python Programming Glossary: mu

Fit a gaussian function

http://stackoverflow.com/questions/11507028/fit-a-gaussian-function

to be used to fit to the data above def gauss x p A mu sigma p return A numpy.exp x mu 2 2. sigma 2 # p0 is the initial.. data above def gauss x p A mu sigma p return A numpy.exp x mu 2 2. sigma 2 # p0 is the initial guess for the fitting coefficients.. 2 # p0 is the initial guess for the fitting coefficients A mu and sigma above p0 1. 0. 1. coeff var_matrix curve_fit gauss..

plotting orbital trajectories in python

http://stackoverflow.com/questions/16049390/plotting-orbital-trajectories-in-python

the function to solve the ODEs The three equations are x'' mu np.sqrt x 2 y 2 z 2 x y'' mu np.sqrt x 2 y 2 z 2 y and z'' mu.. The three equations are x'' mu np.sqrt x 2 y 2 z 2 x y'' mu np.sqrt x 2 y 2 z 2 y and z'' mu np.sqrt x 2 y 2 z 2 z . Written.. np.sqrt x 2 y 2 z 2 x y'' mu np.sqrt x 2 y 2 z 2 y and z'' mu np.sqrt x 2 y 2 z 2 z . Written as 6 first order we have x'..

ode integration in python versus mathematica results

http://stackoverflow.com/questions/16222302/ode-integration-in-python-versus-mathematica-results

to believe one program has a higher error tolerance when simulating over millions of seconds in flight time. My question is.. spacecraft is above the Earth pi1 me me mm pi2 mm me mm mue 398600.0 # gravitational parameter of earth km^3 sec^2 mum.. 398600.0 # gravitational parameter of earth km^3 sec^2 mum G mm # grav param of the moon mu mue mum omega np.sqrt mu..

Histogram Matplotlib

http://stackoverflow.com/questions/5328556/histogram-matplotlib

import matplotlib.pyplot as plt import numpy as np mu sigma 100 15 x mu sigma np.random.randn 10000 hist bins np.histogram.. as plt import numpy as np mu sigma 100 15 x mu sigma np.random.randn 10000 hist bins np.histogram x bins 50..

confidence interval with leastsq fit in scipy python

http://stackoverflow.com/questions/5811043/confidence-interval-with-leastsq-fit-in-scipy-python

gaussian x arange 10 10 0.01 # model function def f p mu s p return exp x mu 2 2 s 2 # create error function for dataset.. 10 10 0.01 # model function def f p mu s p return exp x mu 2 2 s 2 # create error function for dataset def fff d def ff.. bootstrap data print 95 confidence interval print mu mean_params 0 std_params 0 1.95996 print sigma mean_params 1..

scipy, lognormal distribution - parameters

http://stackoverflow.com/questions/8747761/scipy-lognormal-distribution-parameters

stats.norm.rvs loc 10 scale 3 size 1000 # logsample ~ N mu 10 sigma 3 In 59 sample np.exp logsample # sample ~ lognormal.. 0 21318.029350592606 In 62 np.log scale shape # mu sigma Out 62 9.9673084420467362 2.9212650122639419 share improve..

ode integration in python versus mathematica results

http://stackoverflow.com/questions/16222302/ode-integration-in-python-versus-mathematica-results

rm 1737 r12 384400 Pi 1 me me mm Pi 2 mm me mm M me mm Mu 1 398600 Mu 2 G mm Mu Mu 1 Mu 2 CapitalOmega Sqrt Mu r12^3 Nu.. r12 384400 Pi 1 me me mm Pi 2 mm me mm M me mm Mu 1 398600 Mu 2 G mm Mu Mu 1 Mu 2 CapitalOmega Sqrt Mu r12^3 Nu Pi 4 xl4 384400.. Pi 1 me me mm Pi 2 mm me mm M me mm Mu 1 398600 Mu 2 G mm Mu Mu 1 Mu 2 CapitalOmega Sqrt Mu r12^3 Nu Pi 4 xl4 384400 2 4671..