[yt-users] problem with covering_grid for Nyx data sets (Wolfram Schmidt), yt-users Digest, Vol 66, Issue 17

Wolfram Schmidt schmidt at astro.physik.uni-goettingen.de
Wed Aug 7 03:17:05 PDT 2013


Hi Nathan,

thanks a lot for your suggestions! I updated yt to the current 
development version, which didn't fix the problem. So I tried what you 
suggested:

On 08/06/2013 07:52 PM, yt-users-request at lists.spacepope.org wrote:
> and then try your script again. If the issue isn't fixed by updating, I
> would then try applying the following diff to the nyx frontend:
>
> diff -r f936432ed45d yt/frontends/nyx/data_structures.py
> --- a/yt/frontends/nyx/data_structures.py       Tue Jul 30 10:08:24 2013
> -0700
> +++ b/yt/frontends/nyx/data_structures.py       Tue Aug 06 08:10:25 2013
> -0700
> @@ -611,7 +611,7 @@
>           # aliases we need
>           self.parameters["TopGridRank"] =
> len(self.parameters["TopGridDimensions"]
>           self.dimensionality = self.parameters["TopGridRank"]
> -        self.domain_dimensions = self.parameters["TopGridDimensions"]
> +        self.domain_dimensions =
> np.array(self.parameters["TopGridDimensions"])
>           self.refine_by = self.parameters.get("RefineBy", 2)  # 2 is silent
> defaul
>
>           # Nyx is always cosmological.
>
I replaced the definition of self.domain_dimensions with the np.array 
thing. Now, the script actually reads in the data, but then another 
problem is encountered when an FFT is applied to the data:

Searching grids for values 100% 
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| 
Time: 00:03:04
yt : [ERROR    ] 2013-08-07 11:56:48,958 Covering problem: 16777216 
cells are uncovered
Traceback (most recent call last):
   File "/usr/users/wschmid2/scripts/spect_sb.py", line 72, in <module>
     velx_hat = na.fft.fftn( cg['xmom']/cg['density'] )/cg['xmom'].size
   File 
"/home/uni05/wschmid2/yt-i686/src/yt-hg/yt/data_objects/data_containers.py", 
line 332, in __getitem__
     self.get_data(key)
   File 
"/home/uni05/wschmid2/yt-i686/src/yt-hg/yt/data_objects/data_containers.py", 
line 3776, in get_data
     raise KeyError(n_bad)
KeyError: 16777216

The line with the fft actually used to work and it still works just fine 
if I use an old yt version (which, fortunately, I was able to dig out). 
Do you understand what is the problem here?

Cheers,
Wolfram




More information about the yt-users mailing list