[yt-dev] Issue #921: Querying non-periodic datasets outside of domain fails and needs more descriptive error (yt_analysis/yt)

Cameron Hummels issues-reply at bitbucket.org
Thu Oct 16 07:57:49 PDT 2014


New issue 921: Querying non-periodic datasets outside of domain fails and needs more descriptive error
https://bitbucket.org/yt_analysis/yt/issue/921/querying-non-periodic-datasets-outside-of

Cameron Hummels:

Right now when one attempts to index a region outside of the domain of a non-periodic dataset, one gets a somewhat opaque error.  

Example:

```
#!python

$ yt load GasSloshingLowRes/sloshing_low_res_hdf5_plt_cnt_0690
box = ds.box(ds.domain_right_edge, 2*ds.domain_right_edge)
box.quantities.total_mass()

RuntimeError: Error: bad Region in non-periodic domain along dimension 0. Region left edge = 3.0856e+24 code_length, R
egion right edge = 6.1712e+24 code_lengthDataset left edge = -3.0856e+24 code_length, Dataset right edge = 3.0856e+24
code_length
```


It would be better to have a more descriptive error that you're trying to index a region outside of the valid domain.





More information about the yt-dev mailing list