<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Nov 21, 2014 at 8:20 AM, Douglas Harvey Rudd <span dir="ltr"><<a href="mailto:drudd@uchicago.edu" target="_blank">drudd@uchicago.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Instead use an integer index field?  Most frontends probably already have them, and those that don't should be encouraged...<br>
<br></blockquote><div><br></div><div>That's the trouble - there isn't an integer index field.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Douglas Rudd<br>
Scientific Computing Consultant<br>
Research Computing Center<br>
<a href="mailto:drudd@uchicago.edu">drudd@uchicago.edu</a><br>
<div class="HOEnZb"><div class="h5"><span style="color:rgb(34,34,34)"> </span></div></div></blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">
<br>
> On Nov 21, 2014, at 3:09 AM, Nathan Goldbaum <<a href="mailto:issues-reply@bitbucket.org">issues-reply@bitbucket.org</a>> wrote:<br>
><br>
> New issue 941: CutRegionSelector doesn't work with some data types<br>
> <a href="https://bitbucket.org/yt_analysis/yt/issue/941/cutregionselector-doesnt-work-with-some" target="_blank">https://bitbucket.org/yt_analysis/yt/issue/941/cutregionselector-doesnt-work-with-some</a><br>
><br>
> Nathan Goldbaum:<br>
><br>
> It turns out the `CutRegionSelector` I recently added doesn't work so well for FLASH data:<br>
><br>
><br>
> ```<br>
> #!python<br>
><br>
> import yt<br>
><br>
> ds = yt.load("GasSloshing/sloshing_nomag2_hdf5_plt_cnt_0150")<br>
><br>
> dd = ds.all_data()<br>
> dd = dd.cut_region("obj['density'] > 1e-27")<br>
><br>
> slc = yt.SlicePlot(ds, 2, 'density', data_source=dd)<br>
> slc.set_zlim('density', 1e-30, 1e-25)<br>
> slc.set_figure_size(5)<br>
> slc.save()<br>
><br>
> ```<br>
><br>
> ![sloshing_nomag2_hdf5_plt_cnt_0150_Slice_z_density.png](<a href="https://bitbucket.org/repo/BXbAb/images/3572484347-sloshing_nomag2_hdf5_plt_cnt_0150_Slice_z_density.png" target="_blank">https://bitbucket.org/repo/BXbAb/images/3572484347-sloshing_nomag2_hdf5_plt_cnt_0150_Slice_z_density.png</a>)<br>
><br>
> This is happening because `CutRegionSelector` is using a fragile exact comparison between floats. It does this to take advantage of an efficient hashing algorithm, but it looks like this comes at the cost of maintaining bitwise identicality between two different ways of calculating cell positions.<br>
><br>
> The fix is either:<br>
><br>
> 1. Figure out why the FLASH cell position fields are not bitwise identical to the cell positions calculated inside `SelectorObject.fill_mask`.  It seems Enzo data is unaffected by the round-off artifacts we see with FLASH data, so we know that means it is possible to rely on the cell positions matching exactly at some level.<br>
><br>
> 2. Use a more forgiving data structure to retrieve matching cell positions.  A KD-tree seems like a natural choice, but I'm unsure if there's a ready-to-use KD-tree library available.<br>
><br>
> Responsible: ngoldbaum<br>
> _______________________________________________<br>
> yt-dev mailing list<br>
> <a href="mailto:yt-dev@lists.spacepope.org">yt-dev@lists.spacepope.org</a><br>
> <a href="http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org</a><br>
<br>
_______________________________________________<br>
yt-dev mailing list<br>
<a href="mailto:yt-dev@lists.spacepope.org">yt-dev@lists.spacepope.org</a><br>
<a href="http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org</a><br>
</div></div></blockquote></div><br></div></div>