<div dir="ltr">Hi Matt,<div><br></div><div>yes, I don't know why it is not there.</div><div><br></div><div>I tried with the pf.parameters function:</div><div><br></div><div><div><i>In [456]: pf.parameters['Initialdt']</i></div>
<div><i>---------------------------------------------------------------------------</i></div><div><i>KeyError                                  Traceback (most recent call last)</i></div><div><i><br></i></div><div><i>/home/cthulhu/Repository/Python/yt scripts/<a href="http://5.primary_damping_analysis.py">5.primary_damping_analysis.py</a> in <module>()</i></div>
<div><i>----> 1 </i></div><div><i>      2 </i></div><div><i>      3 </i></div><div><i>      4 </i></div><div><i>      5 </i></div><div><i><br></i></div><div><i>KeyError: 'Initialdt'</i></div><div><i><br></i></div>
<div><i>In [458]: pf.parameters['InitialTime']</i></div><div><i>Out[458]: 0.52818454582493</i></div><div><br></div><div>but since Initialdt is not there it is not able to find it. </div><div><br></div><div>Can I ask if is there a way to tell Enzo to write out the Initialdt or should be there by default?</div>
<div><br></div><div>Thanks,</div><div>             Roberto</div><div><br></div><div><br></div><div><br></div><div><br></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 3 December 2013 10:13, Matthew Turk <span dir="ltr"><<a href="mailto:matthewturk@gmail.com" target="_blank">matthewturk@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Roberto,<br>
<div><div class="h5"><br>
On Mon, Dec 2, 2013 at 6:10 PM, trobolo dinni<br>
<<a href="mailto:trobolo.trobolo.dinni5@gmail.com">trobolo.trobolo.dinni5@gmail.com</a>> wrote:<br>
> Dear YT users,<br>
><br>
> I would like to ask a simple question to which I was not able to find a<br>
> solution.<br>
><br>
> My Enzo parameters file does not have any Initialdt line saved, also if by<br>
> reading the Enzo documentation at<br>
> <a href="http://enzo.readthedocs.org/en/latest/parameters/initialization.html" target="_blank">http://enzo.readthedocs.org/en/latest/parameters/initialization.html</a> looks<br>
> like the line should be there; and I would like to obtain the current<br>
> timestep from the output using yt.<br>
><br>
> I would like to ask if is there a way to do that or if there is some<br>
> alternative solution.<br>
><br>
> Thanks for the help,<br>
>                                  Roberto<br>
<br>
</div></div>Weird that it's not there!  yt can get the cycle number if it's not.<br>
You can see this and other parameters by looking at pf.parameters .<br>
You can try using the "pprint" module to make it looks nice:<br>
<br>
import pprint<br>
pprint.pprint(pf.parameters)<br>
<br>
-Matt<br>
<br>
><br>
><br>
><br>
><br>
><br>
><br>
> _______________________________________________<br>
> yt-users mailing list<br>
> <a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a><br>
> <a 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>
yt-users mailing list<br>
<a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a><br>
<a 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></div><br></div>