[yt-dev] Issue #1067: ds.h.find_max fail with cylindrical data (yt_analysis/yt)
Suoqing Ji
issues-reply at bitbucket.org
Wed Aug 19 15:18:52 PDT 2015
New issue 1067: ds.h.find_max fail with cylindrical data
https://bitbucket.org/yt_analysis/yt/issues/1067/dshfind_max-fail-with-cylindrical-data
Suoqing Ji:
Test [data](http://yt-project.org/data/WDMerger_hdf5_chk_1000.tar.gz) and script:
```
#!python
import yt
ds = yt.load("WDmerger_hdf5_chk_1000/WDmerger_hdf5_chk_1000.hdf5")
v, c = ds.h.find_max('density')
```
Error message:
```
#!bash
v, c = ds.h.find_max('density')
File "/Users/jisuoqing/Workspace/code/yt-x86_64/src/yt-hg/yt/data_objects/static_output.py", line 583, in find_max
source.quantities.max_location(field)
File "/Users/jisuoqing/Workspace/code/yt-x86_64/src/yt-hg/yt/data_objects/derived_quantities.py", line 540, in __call__
rv = super(MaxLocation, self).__call__(field)
File "/Users/jisuoqing/Workspace/code/yt-x86_64/src/yt-hg/yt/data_objects/derived_quantities.py", line 58, in __call__
sto.result = self.process_chunk(ds, *args, **kwargs)
File "/Users/jisuoqing/Workspace/code/yt-x86_64/src/yt-hg/yt/data_objects/derived_quantities.py", line 547, in process_chunk
mx = array_like_field(data, -1, "x")
File "/Users/jisuoqing/Workspace/code/yt-x86_64/src/yt-hg/yt/units/yt_array.py", line 1271, in array_like_field
field = data._determine_fields(field)[0]
File "/Users/jisuoqing/Workspace/code/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.py", line 555, in _determine_fields
finfo = self.ds._get_field_info("unknown", fname)
File "/Users/jisuoqing/Workspace/code/yt-x86_64/src/yt-hg/yt/data_objects/static_output.py", line 543, in _get_field_info
raise YTFieldNotFound((ftype, fname), self)
yt.utilities.exceptions.YTFieldNotFound: Could not find field '('all', 'x')' in WDmerger_hdf5_chk_1000/WDmerger_hdf5_chk_1000.hdf5.
```
Although I'm kind of know what causes this error, someone else might have a better and more global idea about this.
Also I'm in no hurry to use this function -- it just appears and I report it here.
More information about the yt-dev
mailing list