[yt-dev] duplicate obtain_rvec and obtain_rv_vec functions in source

Nathan Goldbaum nathan12343 at gmail.com
Tue Oct 27 08:19:19 PDT 2015


I think the original intention was that obtain_rvec was for getting the
radius vector and obtain_rv_vec was for getting the radial velocity vector.
Looking at the code, I think these functions have been repurposed for
alternate purposes in the intervening years.

Having one function for getting data like this sounds like a good idea, but
care must be taken to make sure that the implementations really are
redundant.

On Tue, Oct 27, 2015 at 9:55 AM, Britton Smith <brittonsmith at gmail.com>
wrote:

> Hi Matt,
>
> Yes, we can do that.  They should definitely be removed with extreme care,
> like the funny bone in Operation!, but perhaps it's a good idea to let the
> test suite run over it in a PR.
>
> Britton
>
> On Tue, Oct 27, 2015 at 2:41 PM, Matthew Turk <matthewturk at gmail.com>
> wrote:
>
>> Hi Britton,
>>
>> Sounds like a mess to me.  I'm epsilon nervous about changing them,
>> since we've had lots of turnover in this stuff, but do you want to go
>> over these in a quick hangout collaboratively?
>>
>> On Tue, Oct 27, 2015 at 9:39 AM, Britton Smith <brittonsmith at gmail.com>
>> wrote:
>> > Hi all,
>> >
>> > It seems that there are two definitions in the yt source of the
>> following
>> > functions:
>> > - obtain_rvec
>> > - obtain_rv_vec
>> >
>> > For each of these, one is in utilities/lib/misc_utilities.pyx and the
>> other
>> > is in utilities/lib/geometry_utils.pyx.  Also in each case, the source
>> code
>> > for each is extremely similar, with the versions in misc_utilities
>> > containing additional keywords.  At least in the case of obtain_rv_vec,
>> both
>> > versions are called in different places in the code.  Does anyone know
>> of a
>> > reason for this?  If there is one, this looks like a mess that should
>> > probably be cleaned up.
>> >
>> > Britton
>> >
>> > _______________________________________________
>> > yt-dev mailing list
>> > yt-dev at lists.spacepope.org
>> > http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org
>> >
>> _______________________________________________
>> yt-dev mailing list
>> yt-dev at lists.spacepope.org
>> http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org
>>
>
>
> _______________________________________________
> yt-dev mailing list
> yt-dev at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-dev-spacepope.org/attachments/20151027/11b45d33/attachment.htm>


More information about the yt-dev mailing list