cgre-aachen / pynoddy

pynoddy is a python package to write, change, and analyse kinematic geological modelling simulations performed with Noddy.
GNU General Public License v2.0
71 stars 31 forks source link

Experiment method `get_section_voxels()` throws AttributeError #34

Open alex-schaaf opened 4 years ago

alex-schaaf commented 4 years ago
exp = pynoddy.experiment.Experiment("history.his")
exp.get_section_voxels()

Throws:

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-310-fdb1209cdcb8> in <module>
----> 2 exp.get_section_voxels()

/pynoddy/pynoddy/output.py in get_section_voxels(self, direction, position, **kwds)
    455         """
    456 
--> 457         data = kwds.get('data',self.block)
    458 
    459         if direction == 'x':

AttributeError: 'Experiment' object has no attribute 'block'

Expected behavior Get a np.ndarray containing the section lithology ids.

Current workaround

tmp_out = exp.get_section()
section, _ = tmp_out.get_section_voxels()