[yt-svn] commit/yt: 2 new changesets
commits-noreply at bitbucket.org
commits-noreply at bitbucket.org
Wed Apr 23 15:53:14 PDT 2014
2 new commits in yt:
https://bitbucket.org/yt_analysis/yt/commits/1106b533a057/
Changeset: 1106b533a057
Branch: yt-3.0
User: MatthewTurk
Date: 2014-04-23 22:25:49
Summary: Apply minimum particle count for FOF groups.
Affected #: 2 files
diff -r 2dd2d810e60cebaaab21688cf06e69580a3ad76d -r 1106b533a057e1b7ad07ee8d0ed0ad7a44ccdb1e yt/utilities/lib/ContourFinding.pxd
--- a/yt/utilities/lib/ContourFinding.pxd
+++ b/yt/utilities/lib/ContourFinding.pxd
@@ -39,6 +39,7 @@
ContourID *parent
ContourID *next
ContourID *prev
+ np.int64_t count
cdef struct CandidateContour
diff -r 2dd2d810e60cebaaab21688cf06e69580a3ad76d -r 1106b533a057e1b7ad07ee8d0ed0ad7a44ccdb1e yt/utilities/lib/ContourFinding.pyx
--- a/yt/utilities/lib/ContourFinding.pyx
+++ b/yt/utilities/lib/ContourFinding.pyx
@@ -36,6 +36,7 @@
node.contour_id = contour_id
node.next = node.parent = NULL
node.prev = prev
+ node.count = 0
if prev != NULL: prev.next = node
return node
@@ -631,7 +632,8 @@
np.ndarray[np.float64_t, ndim=2] positions,
np.ndarray[np.int64_t, ndim=1] particle_ids,
int domain_id = -1, int domain_offset = 0,
- periodicity = (True, True, True)):
+ periodicity = (True, True, True),
+ minimum_count = 8):
cdef np.ndarray[np.int64_t, ndim=1] pdoms, pcount, pind, doff
cdef np.float64_t pos[3]
cdef Oct *oct = NULL, **neighbors = NULL
@@ -728,6 +730,16 @@
c1 = container[poffset]
c0 = contour_find(c1)
contour_ids[pind[poffset]] = c0.contour_id
+ c0.count += 1
+ for i in range(doff.shape[0]):
+ if doff[i] < 0: continue
+ for j in range(pcount[i]):
+ poffset = doff[i] + j
+ c1 = container[poffset]
+ if c1 == NULL: continue
+ c0 = contour_find(c1)
+ if c0.count < minimum_count:
+ contour_ids[pind[poffset]] = -1
free(container)
return contour_ids
https://bitbucket.org/yt_analysis/yt/commits/517830c2e778/
Changeset: 517830c2e778
Branch: yt-3.0
User: MatthewTurk
Date: 2014-04-24 00:47:43
Summary: Fixing FOF particle tags for Rockstar groupies.
Affected #: 1 file
diff -r 1106b533a057e1b7ad07ee8d0ed0ad7a44ccdb1e -r 517830c2e778140eec909381113eda714de435f4 yt/analysis_modules/halo_finding/rockstar/rockstar_groupies.pyx
--- a/yt/analysis_modules/halo_finding/rockstar/rockstar_groupies.pyx
+++ b/yt/analysis_modules/halo_finding/rockstar/rockstar_groupies.pyx
@@ -220,12 +220,11 @@
cdef np.int64_t last_fof_tag = 1
cdef np.int64_t k = 0
for i in range(num_particles):
- if fof_tags[i] == 0:
+ if fof_tags[i] < 0:
continue
if fof_tags[i] != last_fof_tag:
last_fof_tag = fof_tags[i]
if k > 16:
- print "Finding subs", k, i
fof_obj.num_p = k
find_subs(&fof_obj)
k = 0
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