<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">When I try <br>
      <br>
      pc.set_width((28,'mpccm'))<br>
      <br>
      it raises a key error:<br>
      <br>
      <br>
      Traceback (most recent call last):<br>
        File "projections.py", line 89, in <module><br>
          pc.set_width((28,'mpccm'))<br>
        File
      "/home/patrick/Programme/yt-x86_64/src/yt-hg/yt/visualization/plot_window.py",
      line 81, in newfunc<br>
          rv = f(*args, **kwargs)<br>
        File
      "/home/patrick/Programme/yt-x86_64/src/yt-hg/yt/visualization/plot_window.py",
      line 458, in set_width<br>
          width = [w / self.pf[unit] for w in width]<br>
        File
      "/home/patrick/Programme/yt-x86_64/src/yt-hg/yt/data_objects/static_output.py",
      line 143, in __getitem__<br>
          raise KeyError(key)<br>
      KeyError: 'mpccm'<br>
      <br>
      <br>
      Also when I search through the yt source code, "mpccm" is only
      found in universal_fields.py (in the WeakLensingConvergence field)
      and in light_ray.py.<br>
      <br>
      Best wishes,<br>
      Patrick<br>
      <br>
      <br>
      Am 12.11.2012 20:32, schrieb Britton Smith:<br>
    </div>
    <blockquote
cite="mid:CABfs61kLKDajrxymH5rzp5Z5W=ryy7PAq5JuuLEeno=GSTmF4g@mail.gmail.com"
      type="cite">Patrick,<br>
      <br>
      Don't worry about it.  I do that stuff all the time.<br>
      <br>
      Britton<br>
      <div class="gmail_extra"><br>
        <br>
        <div class="gmail_quote">On Mon, Nov 12, 2012 at 2:26 PM,
          Patrick Rieser <span dir="ltr"><<a moz-do-not-send="true"
              href="mailto:patrick.rieser@uibk.ac.at" target="_blank">patrick.rieser@uibk.ac.at</a>></span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">Ah damn,
            now I feel stupid. I should have realized that. I will try
            it tomorrow, but yes, that should fix it!<br>
            <br>
            Thanks a lot!<br>
            <br>
            Best wishes,<br>
            Patrick<br>
            <br>
            Am 12.11.2012 19:38, schrieb Nathan Goldbaum:
            <div class="HOEnZb">
              <div class="h5"><br>
                <blockquote class="gmail_quote" style="margin:0 0 0
                  .8ex;border-left:1px #ccc solid;padding-left:1ex">
                  If Britton is correct (and looking closely at your
                  script, I suspect he is) you'll likely fix the issue
                  by specifying the width of the image in comoving
                  units:<br>
                  <br>
                  pc.set_width((28,'mpccm'))<br>
                  <br>
                  Right now the plot axes will still choose to annotate
                  the x and y axes using physical units, even though the
                  width of the image will be the comoving width you
                  requested.  Sorry for that bit of nonintuitiveness.
                   Sam Skillman just filed a bug about this issue which
                  I will fix soon: <a moz-do-not-send="true"
href="https://bitbucket.org/yt_analysis/yt/issue/463/plotwindow-axes-unit-defaults"
                    target="_blank">https://bitbucket.org/yt_analysis/yt/issue/463/plotwindow-axes-unit-defaults</a><br>
                  <br>
                  -Nathan<br>
                  <br>
                  On 11/12/12 10:25 AM, Britton Smith wrote:<br>
                  <blockquote class="gmail_quote" style="margin:0 0 0
                    .8ex;border-left:1px #ccc solid;padding-left:1ex">
                    Hi Patrick,<br>
                    <br>
                    Is this a cosmology simulation?  If so, I think the
                    issue is that the window is in physical coordinates,
                    which are increasing with time.<br>
                    <br>
                    Britton<br>
                    <br>
                    <br>
                    On Mon, Nov 12, 2012 at 1:21 PM, Nathan Goldbaum
                    <<a moz-do-not-send="true"
                      href="mailto:nathan12343@gmail.com"
                      target="_blank">nathan12343@gmail.com</a>
                    <mailto:<a moz-do-not-send="true"
                      href="mailto:nathan12343@gmail.com"
                      target="_blank">nathan12343@gmail.com</a>>>
                    wrote:<br>
                    <br>
                        Hi Patrick,<br>
                    <br>
                        I'm unable to reproduce the issue you're seeing.
                     I'm running the<br>
                        following script:<br>
                    <br>
                        from yt.mods import * # set up our namespace<br>
                        from yt.analysis_modules.level_sets.api import *<br>
                    <br>
                        pf = load("galaxy0030/galaxy0030")<br>
                    <br>
                        master_clump = pf.h.load_object('My_Clumps')<br>
                    <br>
                        all_clumps = get_lowest_clumps(master_clump)<br>
                    <br>
                        for i in range(1,3):<br>
                    <br>
                            prj = ProjectionPlot(pf,2,'Density',center='c')<br>
                    <br>
                            prj.set_width((20,'kpc'))<br>
                    <br>
                            slc.annotate_text([0.0,1.05], "Clump %s" %
                    i)<br>
                    <br>
                            slc.annotate_clumps([all_clumps[i]])<br>
                    <br>
                            slc.save(str(i))<br>
                    <br>
                        I've previously saved the clump objects in the
                    file "My_clumps".<br>
                         I did this following Britton's recipe from the
                    workshop:<br>
                    <br>
                    <a moz-do-not-send="true"
href="https://bitbucket.org/brittonsmith/yt.workshop2012.clump-finding/src/1e7af99cec95fb307bb79055f908d39a200b7091/scripts/find_clumps_and_save.py?at=default"
                      target="_blank">https://bitbucket.org/brittonsmith/yt.workshop2012.clump-finding/src/1e7af99cec95fb307bb79055f908d39a200b7091/scripts/find_clumps_and_save.py?at=default</a><br>
                    <br>
                        When I run the script, I get the following two
                    images:<br>
                    <br>
                        <a moz-do-not-send="true"
                      href="http://i.imgur.com/MhkaQ.png"
                      target="_blank">http://i.imgur.com/MhkaQ.png</a><br>
                        <a moz-do-not-send="true"
                      href="http://i.imgur.com/ZGzTl.png"
                      target="_blank">http://i.imgur.com/ZGzTl.png</a><br>
                    <br>
                        This script uses the IsolatedGalaxy dataset
                    stored at<br>
                        <a moz-do-not-send="true"
                      href="http://yt-project.org/data" target="_blank">yt-project.org/data</a>
                    <<a moz-do-not-send="true"
                      href="http://yt-project.org/data" target="_blank">http://yt-project.org/data</a>><br>
                    <br>
                        It would help me track down what's going wrong
                    if you could come<br>
                        up with a somewhat simpler script that
                    reproduces the error,<br>
                        preferably using one of the datasets on <a
                      moz-do-not-send="true"
                      href="http://yt-project.org" target="_blank">yt-project.org</a><br>
                        <<a moz-do-not-send="true"
                      href="http://yt-project.org" target="_blank">http://yt-project.org</a>>.
                     Please feel free to e-mail me in private<br>
                        or join us on irc so we can iterate on this.<br>
                    <br>
                        Cheers,<br>
                    <br>
                        Nathan<br>
                    <br>
                    <br>
                        On 11/12/12 9:50 AM, Patrick Rieser wrote:<br>
                    <br>
                            Hey all,<br>
                    <br>
                            So I still get some strange behaviour with
                    the ProjectionPlot.<br>
                            If I use the projection.set_width() with the
                    clumps callback<br>
                            method I get the real image shrinked inside
                    the the plot<br>
                            window. Strange thing is, that it grows with
                    each step! Here<br>
                            is a demonstration how it looks (you have to
                    look closely as<br>
                            it doesn't grow that much each step):<br>
                    <br>
                    <a moz-do-not-send="true"
                      href="http://www.flickr.com/photos/87912862@N05/sets/72157631990474435/"
                      target="_blank">http://www.flickr.com/photos/87912862@N05/sets/72157631990474435/</a><br>
                    <br>
                            If I don't use the set_width() then the
                    image itself looks<br>
                            fine, but the scale on the axis grows with
                    each step. So it<br>
                            seems to be the same error than with fixed
                    width.<br>
                    <br>
                    <br>
                            Best wishes,<br>
                            Patrick<br>
                    <br>
                    <br>
                    <br>
                            Here is the code that I am using:<br>
                    <br>
                            # ID is just a list of tuples with
                    clumps/their position in an<br>
                            array<br>
                            # sim_files and clump_files is a list
                    containing the filenames<br>
                            # get_myclump() simply returns a specific
                    clump<br>
                    <br>
                            for j, series in enumerate(ID):<br>
                                for i in series:<br>
                                    pf = load(sim_files[i[0]])<br>
                                    myclump =
                    get_myclump(clump_files[i[0]], i[1])<br>
                    <br>
                                    pc = ProjectionPlot(pf, axis,
                    my_field, center =<br>
                            pf.domain_center, weight_field = my_wfield)<br>
                                    pc.set_width(28, "mpc")<br>
                                    pc.annotate_text([0.0,1.05], "Clump
                    %s" % j)<br>
                    <br>
                                    if redshift:<br>
                                        pc.annotate_text([0.917,1.05],
                    "z = %0.4f" %<br>
                            pf.current_redshift)<br>
                                    if grid:<br>
                                        pc.annotate_grids()<br>
                                    if fix_scale:<br>
                    pc.set_zlim(my_field,boundaries[0],boundaries[1])<br>
                    <br>
                                    pc.set_cmap("Density", "idl01")<br>
                                    pc.annotate_clumps(myclump)<br>
                    <br>
                    pc.save('%s/Clump_%s_File_%s_Nr_%s_%s_Projection.png'<br>
                            % (myBASEDIR, j, i[0], i[1], axis))<br>
                            _______________________________________________<br>
                            yt-users mailing list<br>
                            <a moz-do-not-send="true"
                      href="mailto:yt-users@lists.spacepope.org"
                      target="_blank">yt-users@lists.spacepope.org</a>
                    <mailto:<a moz-do-not-send="true"
                      href="mailto:yt-users@lists.spacepope.org"
                      target="_blank">yt-users@lists.spacepope.org</a>><br>
                    <a moz-do-not-send="true"
                      href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org"
                      target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
                    <br>
                    <br>
                        _______________________________________________<br>
                        yt-users mailing list<br>
                        <a moz-do-not-send="true"
                      href="mailto:yt-users@lists.spacepope.org"
                      target="_blank">yt-users@lists.spacepope.org</a>
                    <mailto:<a moz-do-not-send="true"
                      href="mailto:yt-users@lists.spacepope.org"
                      target="_blank">yt-users@lists.spacepope.org</a>><br>
                    <a moz-do-not-send="true"
                      href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org"
                      target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
                    <br>
                    <br>
                    <br>
                    <br>
                    _______________________________________________<br>
                    yt-users mailing list<br>
                    <a moz-do-not-send="true"
                      href="mailto:yt-users@lists.spacepope.org"
                      target="_blank">yt-users@lists.spacepope.org</a><br>
                    <a moz-do-not-send="true"
                      href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org"
                      target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
                  </blockquote>
                  <br>
                  _______________________________________________<br>
                  yt-users mailing list<br>
                  <a moz-do-not-send="true"
                    href="mailto:yt-users@lists.spacepope.org"
                    target="_blank">yt-users@lists.spacepope.org</a><br>
                  <a moz-do-not-send="true"
                    href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org"
                    target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
                </blockquote>
                <br>
                _______________________________________________<br>
                yt-users mailing list<br>
                <a moz-do-not-send="true"
                  href="mailto:yt-users@lists.spacepope.org"
                  target="_blank">yt-users@lists.spacepope.org</a><br>
                <a moz-do-not-send="true"
                  href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org"
                  target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
              </div>
            </div>
          </blockquote>
        </div>
        <br>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
yt-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a>
<a class="moz-txt-link-freetext" href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>