combining read in files in yt
Hi All, (a second question, though in a different thread for cleanliness): Is it possible to combine multiple files that I load into yt? i.e. if I have particle lists that are written into multiple files and do:
pf1 = load("snap1a.hdf5") pf2 = load("snap1b.hdf5")
Is it possible to combine the two into a single pf that contains the information for all of the particles? thanks, desika
You should be able to do this, although you'll probably have to do it manually. I'm not aware of such capability within yt at the moment. I've done surgery like this on Enzo files using h5py without issues in the past. You'll have to ensure that you not only concatenate the particle lists in the new combined file, but that the header metadata is also updated to match the size of the new data. -Nathan On Tue, Feb 11, 2014 at 9:41 AM, Desika Narayanan <dnarayan@haverford.edu> wrote:
Hi All,
(a second question, though in a different thread for cleanliness):
Is it possible to combine multiple files that I load into yt? i.e. if I have particle lists that are written into multiple files and do:
pf1 = load("snap1a.hdf5") pf2 = load("snap1b.hdf5")
Is it possible to combine the two into a single pf that contains the information for all of the particles?
thanks, desika
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
Hi Desika, On Tue, Feb 11, 2014 at 11:41 AM, Desika Narayanan <dnarayan@haverford.edu> wrote:
Hi All,
(a second question, though in a different thread for cleanliness):
Is it possible to combine multiple files that I load into yt? i.e. if I have particle lists that are written into multiple files and do:
pf1 = load("snap1a.hdf5") pf2 = load("snap1b.hdf5")
Is it possible to combine the two into a single pf that contains the information for all of the particles?
Hmm, if they're a single Gadget snapshot, it should already work. If they are separate and each thinks they're their own snapshot, it'll be trickier. You can do it if you use the load_particles command on numpy arrays that have been concatenated in memory. -Matt
thanks, desika
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
participants (3)
-
Desika Narayanan
-
Matthew Turk
-
Nathan Goldbaum