<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">if you haven't yet it worth while to
      print the time values reported by the reader. make sure it's not
      changing them on you. after that try to get a stack trace showing
      where the crash occurs.<br>
      <br>
      On 08/22/2013 02:16 AM, Hedieh Ebrahimi wrote:<br>
    </div>
    <blockquote
cite="mid:CA+ze5C6JmROUuj=jMJ9S-OsX3tz6YzLe90pqiydvgtZ7USbA2g@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>
          <div>
            <div>
              <div>
                <div>Hi Burlen,<br>
                  <br>
                  Thanks for your reply. Actually when I mentioned final
                  time step at&nbsp; 10000 to get the image; by 10000 I
                  actually was referring to the the time. ( The time
                  step related to this time (10000) is time step 40)<br>
                  <br>
                </div>
                I see what time is relating to what time step by using
                the "AnnotateTimeFilter" and seeing the times
                interactively.<br>
                <br>
              </div>
              Considering that I know the correct time, still pvpython
              crashes when I try to get the image at a different time by
              changing the following to time=10000 or any other time
              that exist in my simulation result.<br>
              <br>
              RenderView1.ViewTime = 10000.0<br>
              RenderView1.CacheKey = 10000.0<br>
              RenderView1.UseCache = 0<br>
              AnimationScene1 = GetAnimationScene()<br>
              AnimationScene1.AnimationTime = 10000.0<br>
              WriteImage('myImage.jpg')<br>
              <br>
              Render()<br>
              <br>
            </div>
            Any ideas on what I could be doing wrong and how to get the
            image at a different time using pvpython ?<br>
            <br>
          </div>
          I&acute;d appreciate any help<br>
        </div>
        Thanks<br>
      </div>
      <div class="gmail_extra"><br>
        <br>
        <div class="gmail_quote">On 21 August 2013 18:27, Burlen Loring
          <span dir="ltr">&lt;<a moz-do-not-send="true"
              href="mailto:bloring@lbl.gov" target="_blank">bloring@lbl.gov</a>&gt;</span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div bgcolor="#FFFFFF" text="#000000">
              <div>time is not always the same as time-step. Here's an
                example of how you could query the reader for time
                values and then use them<br>
                <br>
                <pre style="font-family:Consolas,'Liberation Mono',Courier,monospace;font-size:12px;margin-top:0px;margin-bottom:0px;color:rgb(51,51,51);font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:18px;text-align:start;text-indent:0px;text-transform:none;word-spacing:0px"><div style="padding-left:10px"><span style="color:rgb(51,51,51)">...

nSteps</span> <span style="font-weight:bold">=</span> <span style="color:rgb(0,153,153)">0</span></div><div style="padding-left:10px"><span style="color:rgb(51,51,51)">steps</span> <span style="font-weight:bold">=</span> <span style="color:rgb(51,51,51)">reader</span><span style="font-weight:bold">.</span><span style="color:rgb(51,51,51)">TimestepValues</span></div>
<div style="padding-left:10px"><span style="font-weight:bold">try</span><span>:</span></div><div style="padding-left:10px">&nbsp;&nbsp;<span style="color:rgb(51,51,51)">nSteps</span> <span style="font-weight:bold">=</span> <span style="color:rgb(0,134,179)">len</span><span>(</span><span style="color:rgb(51,51,51)">steps</span><span>)</span></div>
<div style="padding-left:10px"><span style="font-weight:bold">except</span><span>:</span></div><div style="padding-left:10px">&nbsp;&nbsp;<span style="color:rgb(51,51,51)">nSteps</span> <span style="font-weight:bold">=</span> <span style="color:rgb(0,153,153)">1</span></div>
<div style="padding-left:10px">&nbsp;&nbsp;<span style="color:rgb(51,51,51)">steps</span> <span style="font-weight:bold">=</span> <span>[</span><span style="color:rgb(51,51,51)">steps</span><span>]

...

</span></div></pre>
                <pre style="font-family:Consolas,'Liberation Mono',Courier,monospace;font-size:12px;margin-top:0px;margin-bottom:0px;color:rgb(51,51,51);font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:18px;text-align:start;text-indent:0px;text-transform:none;word-spacing:0px"><div style="padding-left:10px"><span style="color:rgb(51,51,51)">anim</span> <span style="font-weight:bold">=</span> <span style="color:rgb(51,51,51)">GetAnimationScene</span><span>()</span></div><div style="padding-left:10px">
<span style="color:rgb(51,51,51)">anim</span><span style="font-weight:bold">.</span><span style="color:rgb(51,51,51)">PlayMode</span> <span style="font-weight:bold">=</span> <span style="color:rgb(221,17,68)">'Snap To TimeSteps'</span></div>
<div style="padding-left:10px"><span style="color:rgb(51,51,51)">anim</span><span style="font-weight:bold">.</span><span style="color:rgb(51,51,51)">AnimationTime</span> <span style="font-weight:bold">=</span> <span style="color:rgb(51,51,51)">steps</span><span>[</span><span style="color:rgb(51,51,51)">step</span><span>]</span></div>
<div style="padding-left:10px">
</div><div style="padding-left:10px"><span style="color:rgb(51,51,51)">view</span> <span style="font-weight:bold">=</span> <span style="color:rgb(51,51,51)">GetRenderView</span><span>()</span></div><div style="padding-left:10px">
<span style="color:rgb(51,51,51)">view</span><span style="font-weight:bold">.</span><span style="color:rgb(51,51,51)">ViewTime</span> <span style="font-weight:bold">=</span> <span style="color:rgb(51,51,51)">steps</span><span>[</span><span style="color:rgb(51,51,51)">step</span><span>]

...

Render()
</span></div></pre>
                <div>
                  <div class="h5"> <br>
                    <br>
                    On 08/21/2013 03:04 AM, Hedieh Ebrahimi wrote:<br>
                  </div>
                </div>
              </div>
              <blockquote type="cite">
                <div>
                  <div class="h5">
                    <div dir="ltr">
                      <div>Hello, <br>
                        <br>
                      </div>
                      My Data is of type h5 that I open using PFlotran
                      HDF5 reader in ParaView&nbsp; which are result of
                      PFlotran simulation.<br>
                      <div>
                        <div><br>
                        </div>
                        <div>What I am trying to do is to write an image
                          at a certain time step and then finally write
                          a batch job that writes an image for each time
                          step of the simulation result.<br>
                          <br>
                        </div>
                        If I try to interactively go to a certain time
                        step and then save an image, everything works
                        fine.<br>
                        <br>
                      </div>
                      <div>The problem is I have 40 time steps and I
                        want to do the same procedure often. So I saved
                        my state file as a python script and then set
                        these few lines at the end of script just before
                        Render().<br>
                        <br>
                        RenderView1.ViewTime = 0.0<br>
                        RenderView1.CacheKey = 0.0<br>
                        RenderView1.UseCache = 0<br>
                        AnimationScene1 = GetAnimationScene()<br>
                        AnimationScene1.AnimationTime = 0.0<br>
                        WriteImage('myImage.jpg')<br>
                        <br>
                        Render()<br>
                        <br>
                        <br>
                      </div>
                      <div>My timeSeries start at 0 and the python
                        script works just fine for 0.<br>
                        <br>
                      </div>
                      <div>If I change the following lines to 10000 (my
                        final time step) or any other time step, then
                        pvpython crashes, that is the following change
                        to the script makes the pvpython crash:<br>
                        <br>
                        RenderView1.ViewTime = 10000.0<br>
                        RenderView1.CacheKey = 10000.0<br>
                        RenderView1.UseCache = 0<br>
                        AnimationScene1 = GetAnimationScene()<br>
                        AnimationScene1.AnimationTime = 10000.0<br>
                        WriteImage('myImage.jpg')<br>
                        <br>
                        Render()<br>
                        <br>
                      </div>
                      <div>I used the trace to see what values I need to
                        change to save an screen shot for any time step
                        and I ended up with ViewTime and AnimationTime.<br>
                        <br>
                      </div>
                      <div>I have attached my script with this email. I
                        would be grateful if you could please tell me if
                        I need to change more in my script or add any
                        additional lines to be able to get an screenshot
                        of any timestep rather than 0.<br>
                        <br>
                      </div>
                      <div>Thanks in Advance.<br>
                        <br>
                      </div>
                      <div>Hedie</div>
                    </div>
                    <br>
                    <fieldset></fieldset>
                    <br>
                  </div>
                </div>
                <pre>_______________________________________________
Powered by <a moz-do-not-send="true" href="http://www.kitware.com" target="_blank">www.kitware.com</a>

Visit other Kitware open-source projects at <a moz-do-not-send="true" href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a>

Please keep messages on-topic and check the ParaView Wiki at: <a moz-do-not-send="true" href="http://paraview.org/Wiki/ParaView" target="_blank">http://paraview.org/Wiki/ParaView</a>

Follow this link to subscribe/unsubscribe:
<a moz-do-not-send="true" href="http://www.paraview.org/mailman/listinfo/paraview" target="_blank">http://www.paraview.org/mailman/listinfo/paraview</a></pre>
              </blockquote>
              <br>
            </div>
          </blockquote>
        </div>
        <br>
      </div>
    </blockquote>
    <br>
  </body>
</html>