[yt-users] OutSRV Re: ART time
Matthew Turk
matthewturk at gmail.com
Wed Feb 20 02:32:15 PST 2013
Hi Pedro,
On Tue, Feb 19, 2013 at 10:06 PM, Pedro Colin <p.colin at crya.unam.mx> wrote:
> Hi Chris,
>
> Soon after I sent the message I realized time was in seconds, thanks. I am
> familiar with the conversion of time because I use it in some of my analysis
> programs but my point here is if yt-ART really needs that conversion.
One of the goals of yt is to provide quantities back in units that are
useful, and comparable across codes. I think the key error you are
seeing is an oversight. Chris, if pf.current_time is already in cgs,
setting pf.conversion_factors["Time"] to 1.0 will correct the KeyError
that shows up in pf.h.print_stats() . Maybe that could be added to
the frontend?
-Matt
>
> Pedro
>
> On Tue, 19 Feb 2013 15:56:00 -0800, Christopher Moody wrote
>> Hi Pedro,
>> Does the time look so bad? That number of seconds corresponds to
>> 13.88 Gyrs. As for the KeyError, most codes use pf["Time"] to
>> indicate the conversion factor between code units and time units.
>> I've never filled this out, since as you point out, there's a
>> complicated nonlinear relation between code time units and seconds.
>> Alternatively we could write pf.conversion_factors["Time"]=1.0 and
>> avoid this error.
>>
>> Nevertheless, you can check out how the code time -> seconds time works
>> here in the b2t function:
>>
> https://bitbucket.org/juxtaposicion/yt/src/b529d44c0de571a1d5afb5695b9a1501052
> 428d6/yt/frontends/art/io.py?at=yt#cl-550The above function (and the set of
> functions it calls) is translated from some of Daniel Ceverino's ART-analyzing
> Fortran code. Because they involve finding the zero-point of a function that
> in turn requires a numerical integration, the routine can be quite slow,
> despite using interpolation. Nevertheless, I think it still gives correct
> answers.
>>
>> Thanks!
>> chris
>>
>> On Tue, Feb 19, 2013 at 2:22 PM, Pedro Colin <p.colin at crya.unam.mx> wrote:
>>
>> > Hi,
>> >
>> > I have downloaded several ART files and parameters like current redshift
> or
>> > omega lambda are okay but the current time = 4.38272802952e+17 looks very
>> > suspicious. This may be the reason why I got an error when I try to
>> > print_stats
>> >
>> > raise KeyError(key)
>> > KeyError: 'Time'
>> >
>> > I also think this error is the reason why I got wrong units. By the way, I
>> > know ART time code unit is negative and reached zero at the present time.
>> > Any
>> > help?
>> >
>> > Pedro Colin
>> >
>> >
>> > _______________________________________________
>> > yt-users mailing list
>> > yt-users at lists.spacepope.org
>> > http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>> >
>
> _______________________________________________
> yt-users mailing list
> yt-users at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
More information about the yt-users
mailing list