Hello there,
What is my_fns pointing to? When you want to load a FLASH particle set
in yt, there are two methods.
1. If there is both a plot and particle file with the same number (i.e.
flash_hdf5_plt_cnt_0000 and flash_hdf5_part_0000) together in the
directory, and you
load the plot file, yt is smart enough to grab the particle data at the
same time (it silently loads the particle file for you). Of course if you
load a checkpoint, you also get both.
2. Just load the particle file directly using
yt.load("/path/to/data/flash_hdf5_part_0000"). Note when using this method,
some information that is only stored in the plot file won't
be available for you to get to.
Joshua Wall
Doctoral Candidate
Department of Physics
Drexel University
On Sat, Dec 15, 2018 at 1:38 PM
Hi, I referred to the relevant part of the documentation about FLASH particle data on, http://yt-project.org/doc/analyzing/particle_trajectories.html and managed to post process a series of data files that have just 1 single particle in it.
When I used multiple particles in the simulation, at the step where we do the following,
ds = yt.load(my_fns[0]) dd = ds.all_data() indices = dd["particle_index"].astype("int")
I got the following error:
~/.local/lib/python3.6/site-packages/yt/frontends/flash/io.py in <listcomp>(.0) 171 self._particle_fields = determine_particle_fields(self._handle) 172 self._position_fields = [self._particle_fields["particle_pos%s" % ax] --> 173 for ax in 'xyz'] 174 self._chunksize = 32**3 175
KeyError: 'particle_posx'
I am new to YT in general and facing a difficulty in understanding what's the problem. As per the documentation, the syntax should work for multiple particles. Do you think that it could be FLASH issue? What are the ways you would go about debugging it? Thanks. _______________________________________________ yt-users mailing list -- yt-users@python.org To unsubscribe send an email to yt-users-leave@python.org