[yt-users] variance versus standard deviation

Andrew Cunningham ajcunn at gmail.com
Sat Dec 31 17:50:48 PST 2016


In the following cookbook example:

http://yt-project.org/doc/cookbook/simple_plots.html#profiles-with-variance-values

the variance along the profile is extracted:

variance = prof.variance['gas', 'velocity_magnitude'].value

but is then labelled as the standard deviation when the plot is created:

plt.loglog(radius, variance, label='Standard Deviation')

So, does "prof.variance" return the standard deviation and not the
variance?  Or, is the plot mislabelled?  Should the plot instead be:

plt.loglog(radius, np.sqrt(variance), label='Standard Deviation')
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20161231/166e2b17/attachment.htm>


More information about the yt-users mailing list