[yt-users] Make projections for uniform grid FLASH4 data

Ji Suoqing jisuoqing at gmail.com
Tue Aug 7 12:40:25 PDT 2012


Ah, thanks a lot! With your suggestion I have axis ticks now.

And the ug projection is still a problem.

Best wishes,
Suoqing

在 2012-8-7,下午3:34,Ji Suoqing <jisuoqing at gmail.com> 写道:

> Hi Matt,
> 
> Thanks for you response. I've tried:
> 
>>>> from yt.mods import  *
>>>> pf=load('relax_hdf5_chk_0000')
> yt : [INFO     ] 2012-08-07 23:39:54,570 Parameters: current_time              = 0.0
> yt : [INFO     ] 2012-08-07 23:39:54,571 Parameters: domain_dimensions         = [512 256   1]
> yt : [INFO     ] 2012-08-07 23:39:54,571 Parameters: domain_left_edge          = [  1.50000000e+07  -6.55360000e+09   0.00000000e+00]
> yt : [INFO     ] 2012-08-07 23:39:54,571 Parameters: domain_right_edge         = [  2.62144000e+10   6.55360000e+09   1.74532925e-02]
> yt : [INFO     ] 2012-08-07 23:39:54,572 Parameters: cosmological_simulation   = 0.0
>>>> p = ProjectionPlot(pf, "z", "Density")
> yt : [INFO     ] 2012-08-07 23:40:02,771 Adding unknown field fspd to list of fields
> yt : [INFO     ] 2012-08-07 23:40:02,772 Adding unknown field spec to list of fields
> Traceback (most recent call last):
>  File "<stdin>", line 1, in <module>
>  File "/aphelion/jisuoqing/yt-x86_64/src/yt-hg/yt/visualization/plot_window.py", line 875, in __init__
>    proj = pf.h.proj(axis,fields,weight_field=weight_field,max_level=max_level,center=center)
>  File "/aphelion/jisuoqing/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.py", line 1697, in __init__
>    self._initialize_source(source)
>  File "/aphelion/jisuoqing/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.py", line 1724, in _initialize_source
>    source = self.pf.h.all_data()
>  File "/aphelion/jisuoqing/yt-x86_64/src/yt-hg/yt/data_objects/hierarchy.py", line 188, in all_data
>    pf.domain_left_edge, pf.domain_right_edge)
>  File "/aphelion/jisuoqing/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.py", line 3221, in __init__
>    self._refresh_data()
>  File "/aphelion/jisuoqing/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.py", line 315, in _refresh_data
>    self.get_data()
>  File "/aphelion/jisuoqing/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.py", line 2508, in get_data
>    raise YTNoDataInObjectError(self)
> yt.utilities.exceptions.YTNoDataInObjectError: The object requested has no data included in it.
> 
> All best,
> Suoqing
> 
> 在 2012-8-7,下午3:24,Matthew Turk <matthewturk at gmail.com> 写道:
> 
>> Hi Suoqing,
>> 
>> Could you try it with the ProjectionPlot call?  It should look like this:
>> 
>> p = ProjectionPlot(pf, "z", "Density")
>> p.save()
>> 
>> -Matt
>> 
>> On Tue, Aug 7, 2012 at 3:14 PM, Ji Suoqing <jisuoqing at gmail.com> wrote:
>>> Hi all,
>>> 
>>> I'm trying to make projections for uniform grid FLASH4 data with the most updated YT, but there're errors when adding projections:
>>> 
>>> yt : [WARNING  ] 2012-08-07 23:13:56,239 integer runtime parameter checkpointfilenumber overwrites a simulation scalar of the same name
>>> yt : [INFO     ] 2012-08-07 23:13:56,244 Parameters: current_time              = 0.0
>>> yt : [INFO     ] 2012-08-07 23:13:56,245 Parameters: domain_dimensions         = [512 256   1]
>>> yt : [INFO     ] 2012-08-07 23:13:56,245 Parameters: domain_left_edge          = [  1.50000000e+07  -6.55360000e+09   0.00000000e+00]
>>> yt : [INFO     ] 2012-08-07 23:13:56,245 Parameters: domain_right_edge         = [  2.62144000e+10   6.55360000e+09   1.74532925e-02]
>>> yt : [INFO     ] 2012-08-07 23:13:56,245 Parameters: cosmological_simulation   = 0.0
>>> yt : [INFO     ] 2012-08-07 23:13:56,587 Max Value is 2.46340e+06 at 38378027.3437500000000000 6400000.0000000000000000 0.5000000000000000 in grid FLASHGrid_0033 ([128 128   1]) at level 0 (1, 0, 0)
>>> yt : [INFO     ] 2012-08-07 23:13:56,587 Created plot collection with default plot-center = [13114700000.0, 0.0, 0.0087266462599716477]
>>> Traceback (most recent call last):
>>> File "proj.py", line 18, in <module>
>>>   p1 = pc.add_projection(my_var, 2)
>>> File "/aphelion/jisuoqing/yt-x86_64/src/yt-hg/yt/visualization/plot_collection.py", line 784, in add_projection
>>>   **field_parameters)
>>> File "/aphelion/jisuoqing/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.py", line 1697, in __init__
>>>   self._initialize_source(source)
>>> File "/aphelion/jisuoqing/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.py", line 1724, in _initialize_source
>>>   source = self.pf.h.all_data()
>>> File "/aphelion/jisuoqing/yt-x86_64/src/yt-hg/yt/data_objects/hierarchy.py", line 188, in all_data
>>>   pf.domain_left_edge, pf.domain_right_edge)
>>> File "/aphelion/jisuoqing/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.py", line 3221, in __init__
>>>   self._refresh_data()
>>> File "/aphelion/jisuoqing/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.py", line 315, in _refresh_data
>>>   self.get_data()
>>> File "/aphelion/jisuoqing/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.py", line 2508, in get_data
>>>   raise YTNoDataInObjectError(self)
>>> yt.utilities.exceptions.YTNoDataInObjectError: The object requested has no data included in it.
>>> 
>>> 
>>> And another separated question: how can I add axis ticks onto projection or slice plot to show the spacial scale? I suspect there should exist some easy way, but I failed to find it.
>>> 
>>> Thanks for your care!
>>> 
>>> All best,
>>> Suoqing
>>> _______________________________________________
>>> 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