[yt-users] finding resolution of a hotspot

Nathan Goldbaum nathan12343 at gmail.com
Fri Sep 16 08:21:24 PDT 2016


On Fri, Sep 16, 2016 at 10:16 AM, tazkera haque <h.tazkera at gmail.com> wrote:

> Hi Nathan,
>
> I would ask for a little more favor, what if instead of maximum
> temperature, I want to track down the cells who has a range of temperature,
> say 2.9*10^9 to 4.9*10^9 K and then find the ['dx'] etc. How do I modify
> the
> *v, c = ds.find_max("temperature") to *declare a range?
>

You want to use a cut_region:

http://yt-project.org/docs/dev/analyzing/filtering.html#cut-regions
http://yt-project.org/docs/dev/reference/api/generated/yt.data_objects.selection_data_containers.YTCutRegion.html



>
> Thanks again
>
> On Fri, Sep 16, 2016 at 1:05 AM, tazkera haque <h.tazkera at gmail.com>
> wrote:
>
>> thanks, Nathan, problem solved
>>
>> On Fri, Sep 16, 2016 at 12:53 AM, Nathan Goldbaum <nathan12343 at gmail.com>
>> wrote:
>>
>>>
>>>
>>> On Thu, Sep 15, 2016 at 11:33 PM, tazkera haque <h.tazkera at gmail.com>
>>> wrote:
>>>
>>>> Hi people,
>>>>
>>>> I have a hotspot in one of my sliceplots [see attached image] and I
>>>> want to find the resolution/cell size of the hotspot, in other words, the
>>>> ['x'], ['y']. ['z'] co-ordinates  and ['dx'] of the cells those contain
>>>> that maximum temperature. I have written a code like this:
>>>>
>>>>
>>>> *import yt*
>>>> *ds = yt.load("~/super3d_hdf5_plt_cnt_0018")*
>>>>
>>>> *dd = ds.all_data()*
>>>> *v, c = ds.find_max("temperature")*
>>>>
>>>
>>> From here, try:
>>>
>>> point = ds.point(c)
>>>
>>> print(point['x'])
>>> print(point['y'])
>>> print(point['z'])
>>> print(point['dx'])
>>> print(point['dy'])
>>> print(point['dz'])
>>>
>>>
>>>
>>>
>>>
>>>>
>>>> *print dd['dx']*
>>>> *print dd['dy']*
>>>> *print dd['dz']*
>>>> *print dd['x']*
>>>> *print dd['y']*
>>>> *print dd['z']*
>>>>
>>>
>>>
>>>
>>>
>>>>
>>>> and I have an output like this:
>>>>
>>>> *yt : [INFO     ] 2016-09-15 22:49:18,265 Parameters: current_time
>>>>          = 28.501984704*
>>>> *yt : [INFO     ] 2016-09-15 22:49:18,265 Parameters: domain_dimensions
>>>>         = [128 128 128]*
>>>> *yt : [INFO     ] 2016-09-15 22:49:18,293 Parameters: domain_left_edge
>>>>          = [ -2.80000000e+10  -2.80000000e+10  -2.80000000e+10]*
>>>> *yt : [INFO     ] 2016-09-15 22:49:18,294 Parameters: domain_right_edge
>>>>         = [  2.80000000e+10   2.80000000e+10   2.80000000e+10]*
>>>> *yt : [INFO     ] 2016-09-15 22:49:18,294 Parameters:
>>>> cosmological_simulation   = 0.0*
>>>> *yt : [INFO     ] 2016-09-15 22:49:25,099 Max Value is 4.81587e+09 at
>>>> -184570312.5000000000000000 116210937.5000000000000000
>>>> 6835937.5000000000000000*
>>>> *[  4.37500000e+08   4.37500000e+08   4.37500000e+08 ...,
>>>> 4.37500000e+08*
>>>> *   4.37500000e+08   4.37500000e+08] code_length*
>>>> *[  4.37500000e+08   4.37500000e+08   4.37500000e+08 ...,
>>>> 4.37500000e+08*
>>>> *   4.37500000e+08   4.37500000e+08] code_length*
>>>> *[  4.37500000e+08   4.37500000e+08   4.37500000e+08 ...,
>>>> 4.37500000e+08*
>>>> *   4.37500000e+08   4.37500000e+08] code_length*
>>>> *[ -2.77812500e+10  -2.77812500e+10  -2.77812500e+10 ...,
>>>> 2.77812500e+10*
>>>> *   2.77812500e+10   2.77812500e+10] code_length*
>>>> *[ -2.77812500e+10  -2.77812500e+10  -2.77812500e+10 ...,
>>>> 2.77812500e+10*
>>>> *   2.77812500e+10   2.77812500e+10] code_length*
>>>> *[ -2.77812500e+10  -2.73437500e+10  -2.69062500e+10 ...,
>>>> 2.69062500e+10*
>>>> *   2.73437500e+10   2.77812500e+10] code_length*
>>>>
>>>> but I believe my code is wrong in this context, because my highest
>>>> resolution is 136 km and this is an AMR code , so I should see ['dx'] very
>>>> close to the order of 136 km. please help me get the code. thanks
>>>>
>>>> Tazkera
>>>>
>>>> _______________________________________________
>>>> 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
>>>
>>>
>>
>
> _______________________________________________
> yt-users mailing list
> yt-users at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20160916/c8c1ac86/attachment-0001.html>


More information about the yt-users mailing list