<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hi all,<br>
    <br>
    Joe decided (offlist) to directly access the region object itself.
    Because re.ds references the dataset that the region came from,
    instead of using
    
    <br>
    
    <ol style="margin: 0px; padding: 0px 0px 0px 48px; color: rgb(172,
      172, 172); font-family: Consolas, Menlo, Monaco, 'Lucida Console',
      'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono',
      monospace, serif; font-size: 12px; font-style: normal;
      font-variant: normal; font-weight: normal; letter-spacing: normal;
      line-height: 21px; orphans: auto; text-align: start; text-indent:
      0px; text-transform: none; white-space: normal; widows: 1;
      word-spacing: 0px; -webkit-text-stroke-width: 0px;
      background-color: rgb(248, 248, 248);">
      <li class="li1" style="-webkit-user-select: none;">
        <div class="de1" style="-webkit-user-select: text; padding: 0px
          5px; vertical-align: top; color: rgb(0, 0, 0);
          border-left-width: 1px; border-left-style: solid;
          border-left-color: rgb(204, 204, 204); margin: 0px 0px 0px
          -7px; position: relative; font-family: Consolas, Menlo,
          Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans
          Mono', 'Bitstream Vera Sans Mono', monospace, serif;
          line-height: 21px; background: rgb(255, 255, 255);">ds<span class="Apple-converted-space"> </span><span class="sy0" style="color: rgb(102, 204, 102);">=</span><span class="Apple-converted-space"> </span>load<span class="br0" style="color: black;">(</span><span class="st0" style="color: rgb(72, 61, 139);">'myfile.hdf5'</span><span class="sy0" style="color: rgb(102, 204, 102);">,</span>over_refine_factor<span class="sy0" style="color: rgb(102, 204, 102);">=</span><span class="nu0" style="color: rgb(255, 69, 0);">1</span><span class="br0" style="color: black;">)</span></div>
      </li>
      <li class="li2" style="-webkit-user-select: none;">
        <div class="de2" style="-webkit-user-select: text; padding: 0px
          5px; vertical-align: top; color: rgb(0, 0, 0);
          border-left-width: 1px; border-left-style: solid;
          border-left-color: rgb(204, 204, 204); margin: 0px 0px 0px
          -7px; position: relative; font-family: Consolas, Menlo,
          Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans
          Mono', 'Bitstream Vera Sans Mono', monospace, serif;
          line-height: 21px; background: rgb(255, 255, 255);"><span class="kw3" style="color: rgb(220, 20, 60);">re</span><span class="Apple-converted-space"> </span><span class="sy0" style="color: rgb(102, 204, 102);">=</span><span class="Apple-converted-space"> </span>ds.<span class="me1" style="color: black;">region</span><span class="br0" style="color: black;">(</span>center<span class="sy0" style="color: rgb(102, 204, 102);">=</span><span class="br0" style="color: black;">[</span><span class="nu0" style="color: rgb(255, 69, 0);">750</span><span class="br0" style="color: black;">]</span>*<span class="nu0" style="color: rgb(255, 69, 0);">3</span><span class="sy0" style="color: rgb(102, 204, 102);">,</span><span class="Apple-converted-space"> </span>left_edge<span class="sy0" style="color: rgb(102, 204, 102);">=</span><span class="br0" style="color: black;">[</span><span class="nu0" style="color: rgb(255, 69, 0);">700</span><span class="br0" style="color: black;">]</span>*<span class="nu0" style="color: rgb(255, 69, 0);">3</span><span class="sy0" style="color: rgb(102, 204, 102);">,</span><span class="Apple-converted-space"> </span>right_edge<span class="sy0" style="color: rgb(102, 204, 102);">=</span><span class="br0" style="color: black;">[</span><span class="nu0" style="color: rgb(255, 69, 0);">800</span><span class="br0" style="color: black;">]</span>*<span class="nu0" style="color: rgb(255, 69, 0);">3</span><span class="br0" style="color: black;">)</span></div>
      </li>
      <li class="li2" style="-webkit-user-select: none;">
        <div class="de2" style="-webkit-user-select: text; padding: 0px
          5px; vertical-align: top; color: rgb(0, 0, 0);
          border-left-width: 1px; border-left-style: solid;
          border-left-color: rgb(204, 204, 204); margin: 0px 0px 0px
          -7px; position: relative; font-family: Consolas, Menlo,
          Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans
          Mono', 'Bitstream Vera Sans Mono', monospace, serif;
          line-height: 21px; background: rgb(255, 255, 255);">ad<span class="Apple-converted-space"> </span><span class="sy0" style="color: rgb(102, 204, 102);">=</span><span class="Apple-converted-space"> </span><span class="kw3" style="color: rgb(220, 20, 60);">re</span>.<span class="me1" style="color: black;">ds</span>.<span class="me1" style="color: black;">all_data</span><span class="br0" style="color: black;">(</span><span class="br0" style="color: black;">)</span></div>
      </li>
      <li class="li1" style="-webkit-user-select: none;">
        <div class="de1" style="-webkit-user-select: text; padding: 0px
          5px; vertical-align: top; color: rgb(0, 0, 0);
          border-left-width: 1px; border-left-style: solid;
          border-left-color: rgb(204, 204, 204); margin: 0px 0px 0px
          -7px; position: relative; font-family: Consolas, Menlo,
          Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans
          Mono', 'Bitstream Vera Sans Mono', monospace, serif;
          line-height: 21px; background: rgb(255, 255, 255);">density<span class="Apple-converted-space"> </span><span class="sy0" style="color: rgb(102, 204, 102);">=</span><span class="Apple-converted-space"> </span>ad<span class="br0" style="color: black;">[</span><span class="br0" style="color: black;">(</span><span class="st0" style="color: rgb(72, 61, 139);">"PartType0"</span><span class="sy0" style="color: rgb(102, 204, 102);">,</span><span class="st0" style="color: rgb(72, 61, 139);">"density"</span><span class="br0" style="color: black;">)</span><span class="br0" style="color: black;">]</span></div>
      </li>
      <li class="li2" style="-webkit-user-select: none;">
        <div class="de2" style="-webkit-user-select: text; padding: 0px
          5px; vertical-align: top; color: rgb(0, 0, 0);
          border-left-width: 1px; border-left-style: solid;
          border-left-color: rgb(204, 204, 204); margin: 0px 0px 0px
          -7px; position: relative; font-family: Consolas, Menlo,
          Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans
          Mono', 'Bitstream Vera Sans Mono', monospace, serif;
          line-height: 21px; background: rgb(255, 255, 255);">wdens<span class="Apple-converted-space"> </span><span class="sy0" style="color: rgb(102, 204, 102);">=</span><span class="Apple-converted-space"> </span>np.<span class="me1" style="color: black;">where</span><span class="br0" style="color: black;">(</span>density<span class="Apple-converted-space"> </span><span class="sy0" style="color: rgb(102, 204, 102);">==</span><span class="Apple-converted-space"> </span>np.<span class="kw2" style="color: rgb(0, 128, 0);">max</span><span class="br0" style="color: black;">(</span>density<span class="br0" style="color: black;">)</span><span class="br0" style="color: black;">)</span></div>
      </li>
      <li class="li1" style="-webkit-user-select: none;">
        <div class="de1" style="-webkit-user-select: text; padding: 0px
          5px; vertical-align: top; color: rgb(0, 0, 0);
          border-left-width: 1px; border-left-style: solid;
          border-left-color: rgb(204, 204, 204); margin: 0px 0px 0px
          -7px; position: relative; font-family: Consolas, Menlo,
          Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans
          Mono', 'Bitstream Vera Sans Mono', monospace, serif;
          line-height: 21px; background: rgb(255, 255, 255);">coordinates<span class="Apple-converted-space"> </span><span class="sy0" style="color: rgb(102, 204, 102);">=</span><span class="Apple-converted-space"> </span>ad<span class="br0" style="color: black;">[</span><span class="br0" style="color: black;">(</span><span class="st0" style="color: rgb(72, 61, 139);">"PartType0"</span><span class="sy0" style="color: rgb(102, 204, 102);">,</span><span class="st0" style="color: rgb(72, 61, 139);">"Coordinates"</span><span class="br0" style="color: black;">)</span><span class="br0" style="color: black;">]</span></div>
      </li>
      <li class="li2" style="-webkit-user-select: none;">
        <div class="de2" style="-webkit-user-select: text; padding: 0px
          5px; vertical-align: top; color: rgb(0, 0, 0);
          border-left-width: 1px; border-left-style: solid;
          border-left-color: rgb(204, 204, 204); margin: 0px 0px 0px
          -7px; position: relative; font-family: Consolas, Menlo,
          Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans
          Mono', 'Bitstream Vera Sans Mono', monospace, serif;
          line-height: 21px; background: rgb(255, 255, 255);">cen<span class="Apple-converted-space"> </span><span class="sy0" style="color: rgb(102, 204, 102);">=</span><span class="Apple-converted-space"> </span>coordinates<span class="br0" style="color: black;">[</span>wdens<span class="br0" style="color: black;">]</span><span class="br0" style="color: black;">[</span><span class="nu0" style="color: rgb(255, 69, 0);">0</span><span class="br0" style="color: black;">]</span></div>
      </li>
    </ol>
    the question can be resolved with<br>
    
    <ol style="margin: 0px; padding: 0px 0px 0px 48px; color: rgb(172,
      172, 172); font-family: Consolas, Menlo, Monaco, 'Lucida Console',
      'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono',
      monospace, serif; font-size: 12px; font-style: normal;
      font-variant: normal; font-weight: normal; letter-spacing: normal;
      line-height: 21px; orphans: auto; text-align: start; text-indent:
      0px; text-transform: none; white-space: normal; widows: 1;
      word-spacing: 0px; -webkit-text-stroke-width: 0px;
      background-color: rgb(248, 248, 248);">
      <li class="li1" style="-webkit-user-select: none;">
        <div class="de1" style="-webkit-user-select: text; padding: 0px
          5px; vertical-align: top; color: rgb(0, 0, 0);
          border-left-width: 1px; border-left-style: solid;
          border-left-color: rgb(204, 204, 204); margin: 0px 0px 0px
          -7px; position: relative; font-family: Consolas, Menlo,
          Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans
          Mono', 'Bitstream Vera Sans Mono', monospace, serif;
          line-height: 21px; background: rgb(255, 255, 255);">ds<span class="Apple-converted-space"> </span><span class="sy0" style="color: rgb(102, 204, 102);">=</span><span class="Apple-converted-space"> </span>load<span class="br0" style="color: black;">(</span><span class="st0" style="color: rgb(72, 61, 139);">'myfile.hdf5'</span><span class="sy0" style="color: rgb(102, 204, 102);">,</span>over_refine_factor<span class="sy0" style="color: rgb(102, 204, 102);">=</span><span class="nu0" style="color: rgb(255, 69, 0);">1</span><span class="br0" style="color: black;">)</span></div>
      </li>
      <li class="li2" style="-webkit-user-select: none;">
        <div class="de2" style="-webkit-user-select: text; padding: 0px
          5px; vertical-align: top; color: rgb(0, 0, 0);
          border-left-width: 1px; border-left-style: solid;
          border-left-color: rgb(204, 204, 204); margin: 0px 0px 0px
          -7px; position: relative; font-family: Consolas, Menlo,
          Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans
          Mono', 'Bitstream Vera Sans Mono', monospace, serif;
          line-height: 21px; background: rgb(255, 255, 255);"><span class="kw3" style="color: rgb(220, 20, 60);">re</span><span class="Apple-converted-space"> </span><span class="sy0" style="color: rgb(102, 204, 102);">=</span><span class="Apple-converted-space"> </span>ds.<span class="me1" style="color: black;">region</span><span class="br0" style="color: black;">(</span>center<span class="sy0" style="color: rgb(102, 204, 102);">=</span><span class="br0" style="color: black;">[</span><span class="nu0" style="color: rgb(255, 69, 0);">750</span><span class="br0" style="color: black;">]</span>*<span class="nu0" style="color: rgb(255, 69, 0);">3</span><span class="sy0" style="color: rgb(102, 204, 102);">,</span><span class="Apple-converted-space"> </span>left_edge<span class="sy0" style="color: rgb(102, 204, 102);">=</span><span class="br0" style="color: black;">[</span><span class="nu0" style="color: rgb(255, 69, 0);">700</span><span class="br0" style="color: black;">]</span>*<span class="nu0" style="color: rgb(255, 69, 0);">3</span><span class="sy0" style="color: rgb(102, 204, 102);">,</span><span class="Apple-converted-space"> </span>right_edge<span class="sy0" style="color: rgb(102, 204, 102);">=</span><span class="br0" style="color: black;">[</span><span class="nu0" style="color: rgb(255, 69, 0);">800</span><span class="br0" style="color: black;">]</span>*<span class="nu0" style="color: rgb(255, 69, 0);">3</span><span class="br0" style="color: black;">)</span></div>
      </li>
      <li class="li1" style="-webkit-user-select: none;">
        <div class="de1" style="-webkit-user-select: text; padding: 0px
          5px; vertical-align: top; color: rgb(0, 0, 0);
          border-left-width: 1px; border-left-style: solid;
          border-left-color: rgb(204, 204, 204); margin: 0px 0px 0px
          -7px; position: relative; font-family: Consolas, Menlo,
          Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans
          Mono', 'Bitstream Vera Sans Mono', monospace, serif;
          line-height: 21px; background: rgb(255, 255, 255);">density<span class="Apple-converted-space"> </span><span class="sy0" style="color: rgb(102, 204, 102);">=</span><span class="Apple-converted-space"> </span>re<span class="br0" style="color: black;">[</span><span class="br0" style="color: black;">(</span><span class="st0" style="color: rgb(72, 61, 139);">"PartType0"</span><span class="sy0" style="color: rgb(102, 204, 102);">,</span><span class="st0" style="color: rgb(72, 61, 139);">"density"</span><span class="br0" style="color: black;">)</span><span class="br0" style="color: black;">]</span></div>
      </li>
      <li class="li2" style="-webkit-user-select: none;">
        <div class="de2" style="-webkit-user-select: text; padding: 0px
          5px; vertical-align: top; color: rgb(0, 0, 0);
          border-left-width: 1px; border-left-style: solid;
          border-left-color: rgb(204, 204, 204); margin: 0px 0px 0px
          -7px; position: relative; font-family: Consolas, Menlo,
          Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans
          Mono', 'Bitstream Vera Sans Mono', monospace, serif;
          line-height: 21px; background: rgb(255, 255, 255);">wdens<span class="Apple-converted-space"> </span><span class="sy0" style="color: rgb(102, 204, 102);">=</span><span class="Apple-converted-space"> </span>np.<span class="me1" style="color: black;">where</span><span class="br0" style="color: black;">(</span>density<span class="Apple-converted-space"> </span><span class="sy0" style="color: rgb(102, 204, 102);">==</span><span class="Apple-converted-space"> </span>np.<span class="kw2" style="color: rgb(0, 128, 0);">max</span><span class="br0" style="color: black;">(</span>density<span class="br0" style="color: black;">)</span><span class="br0" style="color: black;">)</span></div>
      </li>
      <li class="li1" style="-webkit-user-select: none;">
        <div class="de1" style="-webkit-user-select: text; padding: 0px
          5px; vertical-align: top; color: rgb(0, 0, 0);
          border-left-width: 1px; border-left-style: solid;
          border-left-color: rgb(204, 204, 204); margin: 0px 0px 0px
          -7px; position: relative; font-family: Consolas, Menlo,
          Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans
          Mono', 'Bitstream Vera Sans Mono', monospace, serif;
          line-height: 21px; background: rgb(255, 255, 255);">coordinates<span class="Apple-converted-space"> </span><span class="sy0" style="color: rgb(102, 204, 102);">=</span><span class="Apple-converted-space"> </span>re<span class="br0" style="color: black;">[</span><span class="br0" style="color: black;">(</span><span class="st0" style="color: rgb(72, 61, 139);">"PartType0"</span><span class="sy0" style="color: rgb(102, 204, 102);">,</span><span class="st0" style="color: rgb(72, 61, 139);">"Coordinates"</span><span class="br0" style="color: black;">)</span><span class="br0" style="color: black;">]</span></div>
      </li>
      <li class="li2" style="-webkit-user-select: none;">
        <div class="de2" style="-webkit-user-select: text; padding: 0px
          5px; vertical-align: top; color: rgb(0, 0, 0);
          border-left-width: 1px; border-left-style: solid;
          border-left-color: rgb(204, 204, 204); margin: 0px 0px 0px
          -7px; position: relative; font-family: Consolas, Menlo,
          Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans
          Mono', 'Bitstream Vera Sans Mono', monospace, serif;
          line-height: 21px; background: rgb(255, 255, 255);">cen<span class="Apple-converted-space"> </span><span class="sy0" style="color: rgb(102, 204, 102);">=</span><span class="Apple-converted-space"> </span>coordinates<span class="br0" style="color: black;">[</span>wdens<span class="br0" style="color: black;">]</span><span class="br0" style="color: black;">[</span><span class="nu0" style="color: rgb(255, 69, 0);">0</span><span class="br0" style="color: black;">]</span></div>
      </li>
    </ol>
    <br>
    Cheers,<br>
    Aaron<br>
    <pre class="moz-signature" cols="72">--
Aaron Smith
NSF Graduate Research Fellow
Department of Astronomy
University of Texas at Austin
<a class="moz-txt-link-abbreviated" href="http://www.as.utexas.edu/~asmith">www.as.utexas.edu/~asmith</a></pre>
    <div class="moz-cite-prefix"><br>
      On 5/2/15 5:27 PM, Joseph Smidt wrote:<br>
    </div>
    <blockquote cite="mid:CACfQXCp9Z+j9bpPPpnQsfwxgA2V=uC-o7LmKDEZ-avD1ViHcJQ@mail.gmail.com" type="cite">
      <pre wrap="">Hey everyone,

    I am trying to find the densest point in Gadget data in the
subvolume with left edge [700]*3 and right edge [800]*3 where 700 and
800 are in code units.

     This is what I do [1],  which was inspired by this page [2],
except I try and take the all_data confined to a region.  The output
[3] says however where you will note the center is not inside the
region. It found the densest point in the whole data set, not the
region.

    So how would I do this instead for a subvolume of Gadget data?  Thanks.


[1] <a class="moz-txt-link-freetext" href="http://pastebin.com/kyUgEi3a">http://pastebin.com/kyUgEi3a</a>

[2] <a class="moz-txt-link-freetext" href="http://yt-project.org/doc/cookbook/gadget_notebook.html">http://yt-project.org/doc/cookbook/gadget_notebook.html</a>

[3]  <a class="moz-txt-link-freetext" href="http://pastebin.com/E4aLb5VC">http://pastebin.com/E4aLb5VC</a>



</pre>
    </blockquote>
    <br>
  </body>
</html>