[Yt-dev] minor error in units

Matthew Turk matthewturk at gmail.com
Fri Feb 5 14:05:07 PST 2010


Hi JC,

You're totally right.  I think when I wrote it, I thought I was taking
the diameter of the sun and dividing by two, but I was really taking
the radius of the sun and dividing by two.

You are reporting a bug that has been in yt since the very first day I
worked on it.  Yowza.

Thanks,

Matt

On Fri, Feb 5, 2010 at 1:35 PM, Jean-Claude Passy <jcpassy at gmail.com> wrote:
> Hi Matt,
>
> just to let you know. I think I have found a very minor bug in units
> conversion:
>
>
> #########################################################
> In [2]: filen = 'static_nogas0000'
>
> In [4]: import yt.lagos as L
>
> In [6]: data.units
> Out[6]:
> {'1': 1,
>  'au': 3.4409335988416996,
>  'aye': 1.0,
>  'cm': 51467226398186.297,
>  'kpc': 1.6679270958999999e-08,
>  'miles': 319741624.28402996,
>  'mpc': 1.6679270958999998e-11,
>  'pc': 1.6679270958999999e-05,
>  'rsun': 369.72939934815298,
>  'unitary': 1.0}
>
> In [7]: 51467226398186.297 / 6.955e10
> Out[7]: 740.00325518599993
>
> In [8]: 51467226398186.297 / 1.496e13
> Out[8]: 3.4403226201996189
>
> In [9]: 51467226398186.297 / 3.0857e21
> Out[9]: 1.6679270958999999e-08
> #########################################################
>
> There is an error in the filed 'rsun'. It should give around 740, not 370.
> The rest looks fine.
>
> Take care,
>
> JC
>



More information about the yt-dev mailing list