Hi this question is mainly for Stephen, I was working on using the ellipsoid branch of YT to do some analysis on the 3200 cube haloes found. I came across the same problem you described earlier where calculating for tB_index I get nan sometimes, but this is happening even after your fix. I dug through and found out that this happens because pHOP found some halo that have only 1 particle. This becomes problematic with my geometric ellipsoid, it requires at least 4 particles distributed in different planes. When the ellipsoid method is trying to find a particle to satisfy the equation of an ellipse in 2D, it will go through the list (of 1 element in this case), and find that it returns nan for the length it calculates. So even though the function nanargmax() is used to pick out biggest value of non-nan element index, with a list of only 1 nan, it still gets selected and the method fails. Currently my temporary solution is to tell the function that, if it encounters a halo with less than 4 particles, to returns all 0s for the ellipsoid attribute (A,B,C,e1x,y,z,tilt). I was under the impression from our previous talk that there's a lowest number threshold that pHOP requires to form a halo, I thought the number was 10 particles at least. Am I just remembering things wrong? It has been a couple of years... From G.S.
Geoffrey,
I was under the impression from our previous talk that there's a lowest number threshold that pHOP requires to form a halo, I thought the number was 10 particles at least. Am I just remembering things wrong? It has been a couple of years...
My memory is a bit faded, too, but I think I remember the story. Regular HOP does restrict halos to some particle count, but I think that was turned off in pHOP in favor of letting the user filter the answers on their own. In this sense, I think you've come to a satisfactory fix. Do you agree? -- Stephen Skory s@skory.us http://stephenskory.com/ 510.621.3687 (google voice)
Geoffrey and Stephen, Identifying halos with only a single particle by itself makes a pretty good argument that pHOP should apply a "minimum number of particles" setting. If you are interested in the requirements for resolving a halo with Enzo (which I believe is the source of the data you are using) you should see the discussion on yt-users between Brian O'Shea and Michele Trenti, and the papers cited therein, for more information. I would humbly suggest that you rethink what you are doing if you are trying to find the ellipsoidal extent of a four particle "halo." Come on, really? Even if we were able to get past the requirement that the word "halo" has some kind of semantic meaning when discussed in the context of a single particle, just from the perspective of creating Python objects for each Halo this can cause a gigantic problem. -Matt On Fri, Oct 28, 2011 at 2:48 PM, Stephen Skory <s@skory.us> wrote:
Geoffrey,
I was under the impression from our previous talk that there's a lowest number threshold that pHOP requires to form a halo, I thought the number was 10 particles at least. Am I just remembering things wrong? It has been a couple of years...
My memory is a bit faded, too, but I think I remember the story. Regular HOP does restrict halos to some particle count, but I think that was turned off in pHOP in favor of letting the user filter the answers on their own. In this sense, I think you've come to a satisfactory fix. Do you agree?
-- Stephen Skory s@skory.us http://stephenskory.com/ 510.621.3687 (google voice) _______________________________________________ Yt-dev mailing list Yt-dev@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org
Matt,
Identifying halos with only a single particle by itself makes a pretty good argument that pHOP should apply a "minimum number of particles" setting.
I see no reason that this can't be done. I'll add that to my todo list. -- Stephen Skory s@skory.us http://stephenskory.com/ 510.621.3687 (google voice)
I would humbly suggest that you rethink what you are doing if you are trying to find the ellipsoidal extent of a four particle "halo." The temporary fix was to not crash the script (and identify what was causing the crash), so I can get some result when testing, it was not meant as a permanent solution. After going through Brian's 2005 paper as Matt suggested, it seems that the cutoff they've chosen is to discard any "halo" with less than 32 particles, and after talking to Prof. Norman, he recalled that Brian mentioned that to be conservative, should really use 100 particles as the cutoff for unigrid simulations. Stephen, I think I recall now that the cutoff you mentioned is done in the filtering step, where if you specify the mass to be 10x the DM particle mass, then your halo will be at least 10 particles (if dm_only=True) etc, pretty vague in my memory. So I guess what I can do is in my ellipsoidal analysis to discard/filter haloes that are less than 100 particles to be safe. In addition to the particle count cutoff, currently I am also discarding all haloes that have C (the smallest axis) less than a cell width similar to what is done with spheres in YT. I think this is a pretty problem dependent number that can vary depending on what the user want, but I was wondering if there's a general consensus on how many cells constitute a good enough ellipsoid? I can throw in a switch for user to define this number as well. As an alternative to cell count, I was thinking maybe if the volume of the "perfect" ellipsoid is a "close enough" fraction of the cell volume, then to keep the ellipsoid, else discard it. This would be useful for keeping poorly resolve objects that exist in a couple cells and you'd think that it is big enough to consider all cells part of the object. In this case, the user would input the fraction instead of the cell count, what do you guys think? Any comments are appreciated. From G.S. On Fri, Oct 28, 2011 at 12:22 PM, Stephen Skory <s@skory.us> wrote:
Matt,
Identifying halos with only a single particle by itself makes a pretty good argument that pHOP should apply a "minimum number of particles" setting.
I see no reason that this can't be done. I'll add that to my todo list.
-- Stephen Skory s@skory.us http://stephenskory.com/ 510.621.3687 (google voice) _______________________________________________ Yt-dev mailing list Yt-dev@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org
Geoffrey,
In addition to the particle count cutoff, currently I am also discarding all haloes that have C (the smallest axis) less than a cell width similar to what is done with spheres in YT. I think this is a pretty problem dependent number that can vary depending on what the user want, but I was wondering if there's a general consensus on how many cells constitute a good enough ellipsoid? I can throw in a switch for user to define this number as well.
You're the ellipsoid expert around these parts, I think you need to decide what's the best way to go. But I would argue that any linear quantity you're measuring that's smaller than a cell is suspect.
As an alternative to cell count, I was thinking maybe if the volume of the "perfect" ellipsoid is a "close enough" fraction of the cell volume, then to keep the ellipsoid, else discard it. This would be useful for keeping poorly resolve objects that exist in a couple cells and you'd think that it is big enough to consider all cells part of the object. In this case, the user would input the fraction instead of the cell count, what do you guys think?
This sounds like another reasonable way to limit things. See my comment above about who's the expert around these parts :) -- Stephen Skory s@skory.us http://stephenskory.com/ 510.621.3687 (google voice)
participants (3)
-
Geoffrey So
-
Matthew Turk
-
Stephen Skory