Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- In [1]: from yt.mods import *
- In [2]: pf = load('DD0047/output_0047')
- yt : [INFO ] 2013-05-28 19:38:49,553 Parameters: current_time = 20.046508365
- yt : [INFO ] 2013-05-28 19:38:49,553 Parameters: domain_dimensions = [256 256 256]
- yt : [INFO ] 2013-05-28 19:38:49,554 Parameters: domain_left_edge = [ 0. 0. 0.]
- yt : [INFO ] 2013-05-28 19:38:49,554 Parameters: domain_right_edge = [ 1. 1. 1.]
- yt : [INFO ] 2013-05-28 19:38:49,554 Parameters: cosmological_simulation = 1
- yt : [INFO ] 2013-05-28 19:38:49,554 Parameters: current_redshift = 16.8746585087
- yt : [INFO ] 2013-05-28 19:38:49,554 Parameters: omega_lambda = 0.724
- yt : [INFO ] 2013-05-28 19:38:49,554 Parameters: omega_matter = 0.276
- yt : [INFO ] 2013-05-28 19:38:49,554 Parameters: hubble_constant = 0.703
- In [3]: pf.h.print_stats()
- yt : [INFO ] 2013-05-28 19:38:52,657 Getting the binary hierarchy
- yt : [INFO ] 2013-05-28 19:38:52,741 Finished with binary hierarchy reading
- yt : [INFO ] 2013-05-28 19:38:52,828 Adding unknown field PotentialField to list of fields
- yt : [INFO ] 2013-05-28 19:38:52,828 Adding unknown field GravitatingMassField to list of fields
- level # grids # cells # cells^3
- ----------------------------------------------
- 0 768 16777216 255
- 1 396 4096000 159
- 2 1104 22906304 283
- 3 1012 147197952 527
- 4 7 34976 32
- 5 3 13264 23
- 6 1 5832 17
- 7 1 4608 16
- 8 1 3584 15
- 9 1 3584 15
- 10 1 3584 15
- 11 1 3136 14
- 12 1 2744 13
- 13 1 2744 13
- 14 1 2744 13
- 15 1 2744 13
- 16 1 2744 13
- 17 1 2744 13
- 18 1 2744 13
- 19 1 2744 13
- 20 1 2744 13
- ----------------------------------------------
- 3305 191074736
- t = 2.00465084e+01 = 7.37163789e+15 s = 2.33593109e+08 years
- Smallest Cell:
- Width: 4.168e-10 mpch
- Width: 5.929e-10 mpc
- Width: 3.725e-09 1
- Width: 3.725e-09 unitary
- Width: 7.451e-09 mpchcm
- Width: 1.060e-08 mpccm
- Width: 3.147e-08 aye
- Width: 4.168e-07 kpch
- Width: 5.929e-07 kpc
- Width: 7.451e-06 kpchcm
- Width: 1.060e-05 kpccm
- Width: 4.168e-04 pch
- Width: 5.929e-04 pc
- Width: 7.451e-03 pchcm
- Width: 1.060e-02 pccm
- Width: 8.598e+01 auh
- Width: 1.223e+02 au
- Width: 1.537e+03 auhcm
- Width: 2.186e+03 aucm
- Width: 1.849e+04 rsunh
- Width: 2.631e+04 rsun
- Width: 3.306e+05 rsunhcm
- Width: 4.702e+05 rsuncm
- Width: 7.992e+09 milesh
- Width: 1.137e+10 miles
- Width: 1.429e+11 mileshcm
- Width: 2.032e+11 milescm
- Width: 1.286e+15 cmh
- Width: 1.830e+15 cm
- Width: 2.299e+16 cmhcm
- Width: 3.270e+16 cmcm
- In [4]: val, loc = pf.h.find_max('Density')
- ---------------------------------------------------------------------------
- IndexError Traceback (most recent call last)
- <ipython-input-4-efca65fda48d> in <module>()
- ----> 1 val, loc = pf.h.find_max('Density')
- /usr/projects/magnetic/jsmidt/yt-x86_64/lib/python2.7/site-packages/yt-2.4-py2.7-linux-x86_64.egg/yt/data_objects/object_finding_mixin.pyc in find_max(self, field, finest_levels)
- 59 if (field, finest_levels) in self._max_locations:
- 60 return self._max_locations[(field, finest_levels)]
- ---> 61 mg, mc, mv, pos = self.find_max_cell_location(field, finest_levels)
- 62 self._max_locations[(field, finest_levels)] = (mv, pos)
- 63 return mv, pos
- /usr/projects/magnetic/jsmidt/yt-x86_64/lib/python2.7/site-packages/yt-2.4-py2.7-linux-x86_64.egg/yt/data_objects/object_finding_mixin.pyc in find_max_cell_location(self, field, finest_levels)
- 72 len(source._grids), field)
- 73 max_val, maxi, mx, my, mz, mg = \
- ---> 74 source.quantities["MaxLocation"]( field, lazy_reader=True)
- 75 max_grid = self.grids[mg]
- 76 mc = np.unravel_index(maxi, max_grid.ActiveDimensions)
- /usr/projects/magnetic/jsmidt/yt-x86_64/lib/python2.7/site-packages/yt-2.4-py2.7-linux-x86_64.egg/yt/data_objects/derived_quantities.pyc in __call__(self, *args, **kwargs)
- 90 self._data_source.pf.h.io)
- 91 if lazy_reader and not self.force_unlazy:
- ---> 92 return self._call_func_lazy(args, kwargs)
- 93 else:
- 94 return self._call_func_unlazy(args, kwargs)
- /usr/projects/magnetic/jsmidt/yt-x86_64/lib/python2.7/site-packages/yt-2.4-py2.7-linux-x86_64.egg/yt/data_objects/derived_quantities.pyc in _call_func_lazy(self, args, kwargs)
- 97 self.retvals = [ [] for i in range(self.n_ret)]
- 98 for gi,g in enumerate(self._get_grids()):
- ---> 99 rv = self.func(GridChildMaskWrapper(g, self._data_source), *args, **kwargs)
- 100 if not iterable(rv): rv = (rv,)
- 101 for i in range(self.n_ret): self.retvals[i].append(rv[i])
- /usr/projects/magnetic/jsmidt/yt-x86_64/lib/python2.7/site-packages/yt-2.4-py2.7-linux-x86_64.egg/yt/data_objects/derived_quantities.pyc in _MaxLocation(data, field)
- 670 maxi = np.argmax(data[field])
- 671 ma = data[field][maxi]
- --> 672 mx, my, mz = [data[ax][maxi] for ax in 'xyz']
- 673 mg = data["GridIndices"][maxi]
- 674 return (ma, maxi, mx, my, mz, mg)
- IndexError: index out of bounds
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement