[yt-svn] commit/yt: BW Keller: Made a boneheaded mistake in particle ordering for the tipsy reading.
commits-noreply at bitbucket.org
commits-noreply at bitbucket.org
Mon Mar 24 15:41:54 PDT 2014
1 new commit in yt:
https://bitbucket.org/yt_analysis/yt/commits/52d107903dc7/
Changeset: 52d107903dc7
Branch: yt-3.0
User: BW Keller
Date: 2014-03-24 23:28:13
Summary: Made a boneheaded mistake in particle ordering for the tipsy reading.
Affected #: 1 file
diff -r 2052f06e3786ee96c35d5a79851ea82066b1061d -r 52d107903dc7266ae046be4adb93c0cc40cdb052 yt/frontends/sph/io.py
--- a/yt/frontends/sph/io.py
+++ b/yt/frontends/sph/io.py
@@ -452,12 +452,12 @@
raise RuntimeError
# Use the mask to slice out the appropriate particle type data
- if mask.size == data_file.total_particles['DarkMatter']:
- return auxdata[:data_file.total_particles['DarkMatter']]
- elif mask.size == data_file.total_particles['Gas']:
- return auxdata[data_file.total_particles['DarkMatter']:data_file.total_particles['Stars']]
+ if mask.size == data_file.total_particles['Gas']:
+ return auxdata[:data_file.total_particles['Gas']]
+ elif mask.size == data_file.total_particles['DarkMatter']:
+ return auxdata[data_file.total_particles['Gas']:-data_file.total_particles['DarkMatter']]
else:
- return auxdata[data_file.total_particles['Stars']:]
+ return auxdata[-data_file.total_particles['Stars']:]
def _fill_fields(self, fields, vals, mask, data_file):
if mask is None:
Repository URL: https://bitbucket.org/yt_analysis/yt/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
More information about the yt-svn
mailing list