[yt-svn] commit/yt: 6 new changesets
commits-noreply at bitbucket.org
commits-noreply at bitbucket.org
Thu Feb 1 10:00:17 PST 2018
6 new commits in yt:
https://bitbucket.org/yt_analysis/yt/commits/1c22dab0ecc5/
Changeset: 1c22dab0ecc5
User: Christoph Behrens
Date: 2018-01-30 16:39:46+00:00
Summary: check if eps is larger than the domain when building halo catalog from rockstar input, addresses Issue #1678
Affected #: 1 file
diff -r e6a7a03a324126a91b9911a7e416dba39608cbe1 -r 1c22dab0ecc5d63a6ac177e15d99e797f7f31c2a yt/frontends/rockstar/io.py
--- a/yt/frontends/rockstar/io.py
+++ b/yt/frontends/rockstar/io.py
@@ -99,8 +99,13 @@
pos = np.empty((halos.size, 3), dtype="float64")
# These positions are in Mpc, *not* "code" units
pos = data_file.ds.arr(pos, "code_length")
- dx = np.finfo(halos['particle_position_x'].dtype).eps
- dx = 2.0*self.ds.quan(dx, "code_length")
+ eps = np.finfo(halos['particle_position_x'].dtype).eps
+ # Make sure eps is not larger than the domain itself
+ if(eps>np.max(abs(self.ds.domain_right_edge))):
+ eps = eps*self.ds.domain_right_edge
+ dx = eps
+ else:
+ dx = 2.0*self.ds.quan(dx, "code_length")
pos[:,0] = halos["particle_position_x"]
pos[:,1] = halos["particle_position_y"]
pos[:,2] = halos["particle_position_z"]
@@ -130,3 +135,4 @@
fields = [("halos", f) for f in self._halo_dt.fields if
"padding" not in f]
return fields, {}
+
https://bitbucket.org/yt_analysis/yt/commits/aa47c4a20895/
Changeset: aa47c4a20895
User: Christoph Behrens
Date: 2018-01-30 16:55:29+00:00
Summary: make sure dx is scalar
Affected #: 1 file
diff -r 1c22dab0ecc5d63a6ac177e15d99e797f7f31c2a -r aa47c4a20895e813919d18932a4559c4d8661fa7 yt/frontends/rockstar/io.py
--- a/yt/frontends/rockstar/io.py
+++ b/yt/frontends/rockstar/io.py
@@ -103,7 +103,7 @@
# Make sure eps is not larger than the domain itself
if(eps>np.max(abs(self.ds.domain_right_edge))):
eps = eps*self.ds.domain_right_edge
- dx = eps
+ dx = np.abs(eps).max()
else:
dx = 2.0*self.ds.quan(dx, "code_length")
pos[:,0] = halos["particle_position_x"]
https://bitbucket.org/yt_analysis/yt/commits/61072b23b420/
Changeset: 61072b23b420
User: Christoph Behrens
Date: 2018-01-30 17:08:27+00:00
Summary: cleared indentation
Affected #: 1 file
diff -r aa47c4a20895e813919d18932a4559c4d8661fa7 -r 61072b23b42047f3679e234a92379e72c075fef5 yt/frontends/rockstar/io.py
--- a/yt/frontends/rockstar/io.py
+++ b/yt/frontends/rockstar/io.py
@@ -104,7 +104,7 @@
if(eps>np.max(abs(self.ds.domain_right_edge))):
eps = eps*self.ds.domain_right_edge
dx = np.abs(eps).max()
- else:
+ else:
dx = 2.0*self.ds.quan(dx, "code_length")
pos[:,0] = halos["particle_position_x"]
pos[:,1] = halos["particle_position_y"]
@@ -135,4 +135,3 @@
fields = [("halos", f) for f in self._halo_dt.fields if
"padding" not in f]
return fields, {}
-
https://bitbucket.org/yt_analysis/yt/commits/faa37cf7eeb1/
Changeset: faa37cf7eeb1
User: Christoph Behrens
Date: 2018-01-30 17:21:06+00:00
Summary: always define dx before referencing it
Affected #: 1 file
diff -r 61072b23b42047f3679e234a92379e72c075fef5 -r faa37cf7eeb13dda56e567f46e357141c38dd9f9 yt/frontends/rockstar/io.py
--- a/yt/frontends/rockstar/io.py
+++ b/yt/frontends/rockstar/io.py
@@ -105,7 +105,7 @@
eps = eps*self.ds.domain_right_edge
dx = np.abs(eps).max()
else:
- dx = 2.0*self.ds.quan(dx, "code_length")
+ dx = 2.0*self.ds.quan(eps, "code_length")
pos[:,0] = halos["particle_position_x"]
pos[:,1] = halos["particle_position_y"]
pos[:,2] = halos["particle_position_z"]
https://bitbucket.org/yt_analysis/yt/commits/005c65c4cd99/
Changeset: 005c65c4cd99
User: Christoph Behrens
Date: 2018-02-01 13:22:12+00:00
Summary: removed if statement to always calculate eps in a safer way
Affected #: 1 file
diff -r faa37cf7eeb13dda56e567f46e357141c38dd9f9 -r 005c65c4cd99f12bcba907a65d11b6a8e0d21dbf yt/frontends/rockstar/io.py
--- a/yt/frontends/rockstar/io.py
+++ b/yt/frontends/rockstar/io.py
@@ -101,11 +101,8 @@
pos = data_file.ds.arr(pos, "code_length")
eps = np.finfo(halos['particle_position_x'].dtype).eps
# Make sure eps is not larger than the domain itself
- if(eps>np.max(abs(self.ds.domain_right_edge))):
- eps = eps*self.ds.domain_right_edge
- dx = np.abs(eps).max()
- else:
- dx = 2.0*self.ds.quan(eps, "code_length")
+ eps = eps*self.ds.domain_right_edge
+ dx = np.abs(eps).max()
pos[:,0] = halos["particle_position_x"]
pos[:,1] = halos["particle_position_y"]
pos[:,2] = halos["particle_position_z"]
https://bitbucket.org/yt_analysis/yt/commits/20e4aa4d9c5f/
Changeset: 20e4aa4d9c5f
User: ngoldbaum
Date: 2018-02-01 17:59:46+00:00
Summary: Merge pull request #1679 from cbehren/fixIssue1678
check if eps is larger than the domain when building halo catalog fro…
Affected #: 1 file
diff -r 5e1b3f05162773e0d549a5b4b384803054914b84 -r 20e4aa4d9c5f0a4cf3c04dc57dabf809de95375e yt/frontends/rockstar/io.py
--- a/yt/frontends/rockstar/io.py
+++ b/yt/frontends/rockstar/io.py
@@ -99,8 +99,10 @@
pos = np.empty((halos.size, 3), dtype="float64")
# These positions are in Mpc, *not* "code" units
pos = data_file.ds.arr(pos, "code_length")
- dx = np.finfo(halos['particle_position_x'].dtype).eps
- dx = 2.0*self.ds.quan(dx, "code_length")
+ eps = np.finfo(halos['particle_position_x'].dtype).eps
+ # Make sure eps is not larger than the domain itself
+ eps = eps*self.ds.domain_right_edge
+ dx = np.abs(eps).max()
pos[:,0] = halos["particle_position_x"]
pos[:,1] = halos["particle_position_y"]
pos[:,2] = halos["particle_position_z"]
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