[yt-users] combining data objects
Matthew Turk
matthewturk at gmail.com
Tue Sep 6 12:56:37 PDT 2011
[slaps forehead] Yes, of course. This will definitely work if the
objects are disjoint, but use care if they overlap, as it will return
double points. Thank you, Stephen.
On Tue, Sep 6, 2011 at 3:54 PM, Stephen Skory <s at skory.us> wrote:
> Christine,
>
> Depending on what you want to do, it could be a simple as something like this:
>
> sp1 = pf.h.sphere([0.2]*3, 0.1)
> sp2 = pf.h.sphere([0.7]*3, 0.2)
>
> def spboth(field):
> one = sp1[field]
> two = sp2[field]
> return na.concatenate((one, two))
>
> and then you could do things like
>
> spboth('Density')
>
> Many things will not work with spboth, like quantities. Matt's
> suggestion would probably be a better long-term solution.
>
> --
> Stephen Skory
> s at skory.us
> http://stephenskory.com/
> 510.621.3687 (google voice)
> _______________________________________________
> yt-users mailing list
> yt-users at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>
More information about the yt-users
mailing list