[yt-users] combining data objects

Stephen Skory s at skory.us
Tue Sep 6 12:54:04 PDT 2011


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)



More information about the yt-users mailing list