[yt-svn] commit/yt: alrosen: Fixed line that read in number of stars to read 1st number on line 1 of StarParticle file in orion/data_structures.py
Bitbucket
commits-noreply at bitbucket.org
Fri Apr 13 17:44:17 PDT 2012
1 new commit in yt:
https://bitbucket.org/yt_analysis/yt/changeset/821e4a571515/
changeset: 821e4a571515
branch: yt
user: alrosen
date: 2012-04-12 19:08:21
summary: Fixed line that read in number of stars to read 1st number on line 1 of StarParticle file in orion/data_structures.py
affected #: 1 file
diff -r b82c364257ac3265867abb2dfb60e40d8bcd8d80 -r 821e4a5715154550adf0c2ec9c0ebcd38589a48f yt/frontends/orion/data_structures.py
--- a/yt/frontends/orion/data_structures.py
+++ b/yt/frontends/orion/data_structures.py
@@ -151,7 +151,7 @@
if not os.path.exists(fn): return
with open(fn, 'r') as f:
lines = f.readlines()
- self.num_stars = int(lines[0].strip())
+ self.num_stars = int(lines[0].strip()[0])
for line in lines[1:]:
particle_position_x = float(line.split(' ')[1])
particle_position_y = float(line.split(' ')[2])
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