<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Dear Ryan,</p>
    <p>Thanks for your suggestion. I looked into the python tool in <i>tools/python/output.py
        & yt_derived_fields.py</i>. I tried to import those files
      into my jupyter notebook. I find most of them is outdated (in
      FLASH4.6.2), even the <i>yt</i> command such as <i>from
        yt.data_objects.field_info_container import add_field </i>does
      not exist anymore. Only part of the file is compatible with
      python3 (e.g. tools/scripts/extract_rays.py). I will try out yt
      for the plotting.<br>
    </p>
    <pre class="moz-signature" cols="72">Regards,

Dr. Ong Jian Fuh
Extreme Light Infrastructure - Nuclear Physics
"Horia Hulubei" National Institute for Physics and Nuclear Engineering
30 Reactorului Street, 077125 Magurele (Ilfov), Romania
<a class="moz-txt-link-abbreviated" href="http://www.eli-np.ro">www.eli-np.ro</a></pre>
    <div class="moz-cite-prefix">On 01/06/2021 6:08 pm, Ryan Farber
      wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAF9W8=1Nh9qSzXVRjUEHLvKqmP_kxL-O2KJEKJBV4nSVAjXMMg@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">Hi Jian,
        <div><br>
        </div>
        <div>I'd recommend copy pasting the exact command you're using
          at the command line, similar to how you've been copy-pasting
          the Traceback error messages. I'd also recommend following the
          instructions in the quickstart guide here: <a
href="http://flash.uchicago.edu/site/flashcode/user_support/flash4_ug_4p62/node13.html"
            moz-do-not-send="true">http://flash.uchicago.edu/site/flashcode/user_support/flash4_ug_4p62/node13.html</a>
          (or for the corresponding version of FLASH you're using).</div>
        <div><br>
        </div>
        <div>The flmake documentation you linked to is from FLASH4
          ***beta*** which I would guess is around 10+ years old, so
          it's unsurprising to me that it doesn't work with FLASH4.6+.
          The good news is plotting natively with yt is simple enough,
          and the yt community is pretty helpful.</div>
        <div><br>
        </div>
        <div>Best,</div>
        <div>
          <div>
            <div dir="ltr" class="gmail_signature"
              data-smartmail="gmail_signature">
              <div dir="ltr">
                <div>
                  <div dir="ltr">
                    <div dir="ltr">--------
                      <div>Ryan</div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
          <br>
        </div>
      </div>
      <br>
      <div class="gmail_quote">
        <div dir="ltr" class="gmail_attr">On Tue, Jun 1, 2021 at 2:04 AM
          Jian Fuh Ong <<a href="mailto:jianfuh.ong@eli-np.ro"
            moz-do-not-send="true">jianfuh.ong@eli-np.ro</a>> wrote:<br>
        </div>
        <blockquote class="gmail_quote" style="margin:0px 0px 0px
          0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
          <div style="overflow-wrap: break-word;">Hi Ryan,
            <div><br>
            </div>
            <div>
              <div>I just downloaded FLASH4.6 and <i>python setup.py install<i> <span
                      style="background-color:rgb(246,252,252)">--</span></i></i><span><i>user</i> return </span></div>
              <div><span><br>
                </span></div>
              <div>
                <div
style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span
                    style="font-variant-ligatures:no-common-ligatures">  File
                    "setup.py", line 42</span></div>
                <div
style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span
                    style="font-variant-ligatures:no-common-ligatures"> 
                      print "RELEASE file not found at " + release_path</span></div>
                <div
style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span
                    style="font-variant-ligatures:no-common-ligatures">  
                                                      ^</span></div>
                <div
style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span
                    style="font-variant-ligatures:no-common-ligatures">SyntaxError:
                    Missing parentheses in call to 'print'. Did you mean
                    print("RELEASE file not found at " + release_path)?</span></div>
                <div
style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span
                    style="font-variant-ligatures:no-common-ligatures"><br>
                  </span></div>
                <span>The <> operator still appear in utils.py. I
                  am not sure if this python tool also changed to
                  python3. Using python2.7 gives</span></div>
              <div><span><br>
                </span></div>
              <div>
                <div
style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span
                    style="font-variant-ligatures:no-common-ligatures">Traceback
                    (most recent call last):</span></div>
                <div
style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span
                    style="font-variant-ligatures:no-common-ligatures"> 
                    File "setup.py", line 207, in <module></span></div>
                <div
style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span
                    style="font-variant-ligatures:no-common-ligatures"> 
                      run_setup()</span></div>
                <div
style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span
                    style="font-variant-ligatures:no-common-ligatures"> 
                    File "setup.py", line 199, in run_setup</span></div>
                <div
style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span
                    style="font-variant-ligatures:no-common-ligatures"> 
                      make_bash_completion()</span></div>
                <div
style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span
                    style="font-variant-ligatures:no-common-ligatures"> 
                    File "setup.py", line 118, in make_bash_completion</span></div>
                <div
style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span
                    style="font-variant-ligatures:no-common-ligatures"> 
                      import flash.flmake.__init__</span></div>
                <div
style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span
                    style="font-variant-ligatures:no-common-ligatures">ImportError:
                    No module named flash.flmake.__init__</span></div>
              </div>
              <span> </span></div>
            <div><span>I see the flamake lines here.</span></div>
            <div><span><a
href="http://flash.uchicago.edu/site/flashcode/user_support/tools4b/usersguide/output.html#"
                  target="_blank" moz-do-not-send="true">http://flash.uchicago.edu/site/flashcode/user_support/tools4b/usersguide/output.html#</a></span></div>
            <div><span><br>
              </span></div>
            <div>All I need to do is to extract the data from hdf5 file
              for plotting, i.e.</div>
            <div><br>
            </div>
            <div>
              <pre style="overflow:auto hidden;padding:5px;background-color:rgb(246,252,252);border-style:solid;border-color:rgb(128,133,138);border-width:1px 1px 1px 4px;color:rgb(0,0,0);line-height:15.6px"><span style="font-size:12px"><span style="color:rgb(0,136,0);font-weight:bold">from</span> <span style="color:rgb(187,0,102);font-weight:bold">flash</span> <span style="color:rgb(0,136,0);font-weight:bold">import</span> <span>output</span>
<span style="color:rgb(0,136,0);font-weight:bold">import</span> <span style="color:rgb(187,0,102);font-weight:bold">matplotlib.pyplot</span> <span style="color:rgb(0,136,0);font-weight:bold">as</span> <span style="color:rgb(187,0,102);font-weight:bold">plt</span>
<span>x</span><span>,</span> <span>y</span><span>,</span> <span>z</span> <span>=</span> <span>output</span><span>.</span><span>slice</span><span>(</span><span style="color:rgb(0,0,221);font-weight:bold">2</span><span>,</span> <span style="color:rgb(0,0,221);font-weight:bold">0.0</span><span>,</span> <span style="color:rgb(221,34,0);background-color:rgb(255,240,240)">'dens'</span><span>,</span> <span style="color:rgb(221,34,0);background-color:rgb(255,240,240)">"<path to chk>"</span><span>)</span>
<span>plt</span><span>.</span><span>imshow</span><span>(</span><span>z</span><span>)</span>
<span>plt</span><span>.</span><span>show</span><span>()</span></span></pre>
            </div>
            <div><span><br>
              </span><span>
                <div>Regards,<br>
                  Jian Fuh<br>
                  <br>
                  <br>
                </div>
              </span><span></span><span><br>
                <blockquote type="cite">On 31 May 2021, at 7:14 PM, Ryan
                  Farber <<a href="mailto:rjfarber@umich.edu"
                    target="_blank" moz-do-not-send="true">rjfarber@umich.edu</a>>
                  wrote:<br>
                  <br>
                  Hi Ong,<br>
                  <br>
                  Unfortunately, I appear to have deleted my FLASH 4.6.2
                  installation. I had thought it should be fine with
                  python3 but can't confirm at this time. However, the
                  user guide suggests python3 compatibility since FLASH
                  4.6 as I had thought so perhaps there is some improper
                  link for the download of FLASH 4.6.2 pointing to an
                  older version?<br>
                  <a
href="http://flash.uchicago.edu/site/flashcode/user_support/flash4_ug_4p62/node6.html"
                    target="_blank" moz-do-not-send="true">http://flash.uchicago.edu/site/flashcode/user_support/flash4_ug_4p62/node6.html</a><br>
                  <br>
                  Regarding the flmake lines in the user guide, where do
                  you see that? I haven't used that tool before. I don't
                  see flmake referenced in the quickstart guide (just
                  double-checked)<br>
                  <a
href="http://flash.uchicago.edu/site/flashcode/user_support/flash4_ug_4p62/node13.html"
                    target="_blank" moz-do-not-send="true">http://flash.uchicago.edu/site/flashcode/user_support/flash4_ug_4p62/node13.html</a>.<br>
                  <br>
                  If you don't require FLASH 4.6.2 you can see if
                  FLASH4.6 setup works with your python3 environment
                  (there shouldn't be those diamond operators except in
                  older version of FLASH). However, I'm pretty sure
                  python 2.7 will work if you don't use flmake since the
                  error you reported had to do with that tool.<br>
                  <br>
                  Best,<br>
                  --------<br>
                  Ryan<br>
                  <br>
                  <br>
                  On Sun, May 30, 2021 at 11:46 PM Ong Jian Fuh <<a
                    href="mailto:jianfuh.ong@eli-np.ro" target="_blank"
                    moz-do-not-send="true">jianfuh.ong@eli-np.ro</a>>
                  wrote:<br>
                  Dear Ryan,<br>
                  <br>
                  Thanks for your reply. I am using FLASH4.6.2 and I
                  believe this is the latest version. I still need to
                  replace print msg to print(msg), which is still in
                  python2.7. Fixing the symbol with "!=" then many more
                  issues exist as you suggested. Such as <br>
                  <br>
 File "/home/ong/.local/lib/python3.8/site-packages/flash/flmake/setup_globals.py", line
                  204, in set<br>
                      if type(value) != types.StringType:<br>
                  AttributeError: module 'types' has no attribute
                  'StringType'<br>
                  <br>
                  Then I try using python2.7. and return the following
                  error<br>
                  <br>
Writing /home/ong/.local/lib/python2.7/site-packages/flash-0.1.egg-info<br>
                  Traceback (most recent call last):<br>
                    File "setup.py", line 207, in <module><br>
                      run_setup()<br>
                    File "setup.py", line 199, in run_setup<br>
                      make_bash_completion()<br>
                    File "setup.py", line 118, in make_bash_completion<br>
                      import flash.flmake.__init__<br>
                  ImportError: No module named flash.flmake.__init__<br>
                  <br>
                  Is there any update from FLASH's python tools to
                  python3? I am using jupyter notebook which run on
                  python3.8.8. Switching from one version to another
                  would be quite troublesome. <br>
                  <br>
                  In addition, I am not clear what the following lines
                  in the user's guide do and how it relate to the
                  simulation<br>
                  <br>
                  <div>$ mkdir temp</div>
                  <div>$ cd temp</div>
                  <div>$ flmake setup -auto Sedov</div>
                  <div>$ flmake build -j 20</div>
                  <div>$ flmake run -n 20</div>
                  <br>
                  <div>Regards,</div>
                  <div><br>
                  </div>
                  <div>Dr. Ong Jian Fuh</div>
                  <div>Extreme Light Infrastructure - Nuclear Physics</div>
                  <div>"Horia Hulubei" National Institute for Physics
                    and Nuclear Engineering</div>
                  <div>30 Reactorului Street, 077125 Magurele (Ilfov),
                    Romania</div>
                  <br>
                  <a href="http://www.eli-np.ro" target="_blank"
                    moz-do-not-send="true">www.eli-np.ro</a><br>
                  On 28/05/2021 6:06 pm, Ryan Farber wrote:<br>
                  <blockquote type="cite">Hi Ong,<br>
                    <br>
                    I remember being mystified the first time I
                    encountered that archaic "diamond operator."<br>
                    <br>
                    The easiest solutions are:<br>
                    1. Use the latest FLASH, where they updated the
                    python code to be compatible with python3<br>
                    2. Use python2 if you need to use an old version of
                    FLASH (like me :))<br>
                    <br>
                    Or, you can replace "<>" with "!=", although
                    there will be many more issues you'll subsequently
                    need to convert.<br>
                    <br>
                    Best,<br>
                    --------<br>
                    Ryan<br>
                    <br>
                    <br>
                    On Fri, May 28, 2021 at 8:33 AM Ong Jian Fuh <<a
                      href="mailto:jianfuh.ong@eli-np.ro"
                      target="_blank" moz-do-not-send="true">jianfuh.ong@eli-np.ro</a>>
                    wrote:<br>
                    Dear all,<br>
                    <br>
                    Good afternoon. I am trying to install the FLASH
                    python tools for the plotting. <br>
                    <br>
                    Doing python setup.py install --user <br>
                    <br>
                    return <br>
                    <br>
                    running install<br>
                    running build<br>
                    running build_py<br>
                    copying python/metadata.json -> build/lib/flash<br>
                    running build_scripts<br>
                    running install_lib<br>
                    copying build/lib/flash/metadata.json
                    -> /home/ong/.local/lib/python3.8/site-packages/flash<br>
byte-compiling /home/ong/.local/lib/python3.8/site-packages/flash/flmake/utils.py to
                    utils.cpython-38.pyc<br>
                     
File "/home/ong/.local/lib/python3.8/site-packages/flash/flmake/utils.py", line
                    423<br>
                        if len(parts) <> 2:<br>
                                             ^<br>
                    SyntaxError: invalid syntax<br>
                    <br>
                    I am using python3.8. What can I do to fix this or
                    use it with new python? Thanks.  <br>
                    <br>
                    <div>-- </div>
                    <div>Regards,</div>
                    <div><br>
                    </div>
                    <div>Dr. Ong Jian Fuh</div>
                    <div>Extreme Light Infrastructure - Nuclear Physics</div>
                    <div>"Horia Hulubei" National Institute for Physics
                      and Nuclear Engineering</div>
                    <div>30 Reactorului Street, 077125 Magurele (Ilfov),
                      Romania</div>
                    <br>
                    <a href="http://www.eli-np.ro" target="_blank"
                      moz-do-not-send="true">www.eli-np.ro</a><br>
                  </blockquote>
                </blockquote>
              </span><br>
            </div>
          </div>
        </blockquote>
      </div>
    </blockquote>
  </body>
</html>