[yt-users] physical quantities

Cameron Hummels chummels at gmail.com
Thu May 22 13:57:29 PDT 2014


This may also be a good option for you, Desika:

http://yt-project.org/docs/dev-3.0/examining/low_level_inspection.html#examining-grid-data-in-a-fixed-resolution-array

Cameron


On Thu, May 22, 2014 at 10:38 AM, Nathan Goldbaum <nathan12343 at gmail.com>wrote:

> Hey Desika,
>
> You're right, you need to use all_data:
>
> import yt
> ds = yt.load("your_dataset")
> ad = ds.all_data()
> print ad["PartType0", "Coordinates"]
>
> In general all yt data sources will print out the flattened data contained
> in the source when you query them like a dictionary using an unambiguous
> string field name or ('field_type', 'field name') tuple.
>
> Nathan
>
>
> On Thursday, May 22, 2014, Desika Narayanan <dnarayan at haverford.edu>
> wrote:
>
>> Hi yt,
>>
>> I have a pretty simple question that I ought to know the answer to -  how
>> do I extract the actual values in the field_list or derived_field_list of a
>> ds?
>>
>> For example, I have a field: ('PartType0', 'Coordinates'),
>>
>> but printing something like pf[('PartType0','Coordinates')] doesn't
>> return the list of particle type 0 coordinates (or anything for that
>> matter).  Do I have to access this through a pf.all_data() command somehow?
>>
>>
>> Thanks
>> -desika
>>
>>
> _______________________________________________
> yt-users mailing list
> yt-users at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>
>


-- 
Cameron Hummels
Postdoctoral Researcher
Steward Observatory
University of Arizona
http://chummels.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20140522/59c8bfc7/attachment.htm>


More information about the yt-users mailing list