Issue #1281: YTQuadTreeProj contains many unusable methods (yt_analysis/yt)

New issue 1281: YTQuadTreeProj contains many unusable methods https://bitbucket.org/yt_analysis/yt/issues/1281/ytquadtreeproj-contains-man... scott_feister: Unless I am understanding something wrong, there are several non-functioning methods listed in YTQuadTreeProj. The [auto-generated documentation](yt-project.org/doc/reference/api/generated/yt.data_objects.construction_data_containers.YTQuadTreeProj.html) lists methods like "min()", "max()", "mean()", "integrate()", etc. These methods are also available to the python interface, but almost all of them just throw errors at me that say "Data selector... not implemented". This is some combination of: 1. A bug 2. An oversight in documentation 3. An issue with method inheritance for YTQuadTreeProj OR I just messed something up. ``` #!python import yt exampledir = "/home/sfeister/test/yttest/ytExampleData/" ds = yt.load(exampledir + "Enzo_64/DD0043/data0043") reg = ds.all_data() print reg.min('Density') # Works proj = reg.integrate('Density', 2) # Do a projection of the region print(proj.__doc__) # Methods of YTQuadTree include "integrate", "min", etc. print("/n/n") print proj.min('Density') # Fails, with error below print proj.integrate('Density', 1) # Fails, similar error ``` Error is as follows: ``` Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/sfeister/anaconda2/lib/python2.7/site-packages/yt/data_objects/data_containers.py", line 778, in min rv += (self._compute_extrema(f)[0],) File "/home/sfeister/anaconda2/lib/python2.7/site-packages/yt/data_objects/data_containers.py", line 706, in _compute_extrema mi, ma = self.quantities.extrema(field) File "/home/sfeister/anaconda2/lib/python2.7/site-packages/yt/data_objects/derived_quantities.py", line 510, in __call__ rv = super(Extrema, self).__call__(fields, non_zero) File "/home/sfeister/anaconda2/lib/python2.7/site-packages/yt/data_objects/derived_quantities.py", line 66, in __call__ for sto, ds in parallel_objects(chunks, -1, storage = storage): File "/home/sfeister/anaconda2/lib/python2.7/site-packages/yt/utilities/parallel_tools/parallel_analysis_interface.py", line 508, in parallel_objects for result_id, obj in oiter: File "/home/sfeister/anaconda2/lib/python2.7/site-packages/yt/data_objects/data_containers.py", line 1087, in chunks for chunk in self.index._chunk(self, chunking_style, **kwargs): File "/home/sfeister/anaconda2/lib/python2.7/site-packages/yt/geometry/geometry_handler.py", line 251, in _chunk self._identify_base_chunk(dobj) File "/home/sfeister/anaconda2/lib/python2.7/site-packages/yt/geometry/grid_geometry_handler.py", line 293, in _identify_base_chunk gi = dobj.selector.select_grids(self.grid_left_edge, File "/home/sfeister/anaconda2/lib/python2.7/site-packages/yt/data_objects/data_containers.py", line 1075, in selector raise YTDataSelectorNotImplemented(self._type_name) yt.utilities.exceptions.YTDataSelectorNotImplemented: Data selector 'proj' not implemented. ``` Best, Scott
participants (1)
-
scott_feister