Re: [yt-users] yt-users Digest, Vol 72, Issue 26
Hi, pf = load("/../../testproblem/data.nnnn.dbl.h5"), as well as pf = load("/../../testproblem/data.nnnn.dbl.h5", "r") gave- File "<stdin>", line 1, in <module> File "/usr/local/lib/python2.7/dist-packages/yt/convenience.py", line 78, in load return output_type_registry[candidates[0]](*args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/yt/frontends/pluto/data_structures.py", line 182, in __init__ self.current_time = self._handle.attrs['time'] File "/usr/lib/python2.7/dist-packages/h5py/_hl/attrs.py", line 36, in __getitem__ attr = h5a.open(self._id, self._e(name)) File "h5a.pyx", line 77, in h5py.h5a.open (h5py/h5a.c:1945) KeyError: "can't open attribute (Attribute: Can't open object)" the h5 files produced from PLUTO are having cell_coords (group), node_coords(group) and vars(group), and this vars contain prs, rho, vx1, vx2 and vx3, which are the data sets, but their attributes are not clear. Cheers, V. On Tue, Feb 18, 2014 at 5:19 PM, <yt-users-request@lists.spacepope.org>wrote:
Send yt-users mailing list submissions to yt-users@lists.spacepope.org
To subscribe or unsubscribe via the World Wide Web, visit http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org or, via email, send a message with subject or body 'help' to yt-users-request@lists.spacepope.org
You can reach the person managing the list at yt-users-owner@lists.spacepope.org
When replying, please edit your Subject line so it is more specific than "Re: Contents of yt-users digest..."
Today's Topics:
1. Re: strange error with StarMassMsun (Geoffrey So) 2. yt for PLUTO (Varadarajan Parthasarathy) 3. rainbow+white? (Stephanie Tonnesen) 4. Re: yt for PLUTO (Kacper Kowalik) 5. Re: rainbow+white? (Sam Skillman)
----------------------------------------------------------------------
Message: 1 Date: Mon, 17 Feb 2014 12:38:47 -0800 From: Geoffrey So <gsiisg@gmail.com> To: Discussion of the yt analysis package <yt-users@lists.spacepope.org> Subject: Re: [yt-users] strange error with StarMassMsun Message-ID: <C72AB831-6629-41B4-ADE4-2A9479CA96EA@gmail.com> Content-Type: text/plain; charset=us-ascii
Thanks, will give it a try and let you know.
From G.S.
Sent from my iPhone
On Feb 17, 2014, at 5:01 AM, John Wise <jwise@physics.gatech.edu> wrote:
Hi Geoffrey,
This pull request has been merged, so all you have to do is update your yt installation on Stampede now.
Thanks, John
On 02/16/2014 08:00 PM, John Wise wrote: Hi Geoffrey,
This will happen if you're running with 32-bit precision in Enzo, and the particle fields except for position will be in 32-bit. However, the CICDeposit3 routine expects 64-bit floats as input. I've created a pull request that fixes this bug.
https://bitbucket.org/yt_analysis/yt/pull-request/706/input-enzo-deposited-f...
You can go ahead and test it by pulling my changeset and recompiling.
hg pull -r f9127d6 https://bitbucket.org/jwise77/yt hg up
Please see if this works for you and comment on the PR page.
Cheers, John
On 02/14/2014 05:12 PM, Geoffrey So wrote: I'm getting a strange error when executing the command
starmass = ell.quantities['TotalQuantity']('StarMassMsun')[0]
This is on Stampede, and on my laptop running OSX I did not get the
same
error. Has anyone else seen something similar?
From G.S.
In [100]: ell.quantities['TotalQuantity']('StarMassMsun')
ValueError Traceback (most recent call last) /home1/01041/tg802953/dev-yt/src/yt-hg/scripts/iyt in <module>() ----> 1 ell.quantities['TotalQuantity']('StarMassMsun')
/home1/01041/tg802953/dev-yt/src/yt-hg/yt/data_objects/derived_quantities.pyc
in __call__(self, *args, **kwargs) 80 self._data_source.pf.h.io <http://data_source.pf.h.io>) 81 if lazy_reader and not self.force_unlazy: ---> 82 return self._call_func_lazy(args, kwargs) 83 else: 84 return self._call_func_unlazy(args, kwargs)
/home1/01041/tg802953/dev-yt/src/yt-hg/yt/data_objects/derived_quantities.pyc
in _call_func_lazy(self, args, kwargs) 87 self.retvals = [ [] for i in range(self.n_ret)] 88 for gi,g in enumerate(self._get_grids()): ---> 89 rv = self.func(GridChildMaskWrapper(g, self._data_source), *args, **kwargs) 90 if not iterable(rv): rv = (rv,) 91 for i in range(self.n_ret): self.retvals[i].append(rv[i])
/home1/01041/tg802953/dev-yt/src/yt-hg/yt/data_objects/derived_quantities.pyc
in _TotalQuantity(data, fields) 703 totals = [] 704 for field in fields: --> 705 if data[field].size < 1: 706 totals.append(0.0) 707 continue
/home1/01041/tg802953/dev-yt/src/yt-hg/yt/data_objects/derived_quantities.pyc
in __getitem__(self, item) 48 def __getitem__(self, item): 49 if item not in self.local_cache: ---> 50 data = self.data_source._get_data_from_grid(self.grid, item) 51 self.local_cache[item] = data 52 return self.local_cache[item]
/home1/01041/tg802953/dev-yt/src/yt-hg/yt/data_objects/data_containers.pyc
in save_state(self, grid, field, *args, **kwargs) 79 old_keys = grid.field_data.keys() 80 grid.field_parameters = self.field_parameters ---> 81 tr = func(self, grid, field, *args, **kwargs) 82 grid.field_parameters = old_params 83 grid.field_data = YTFieldData( [(k, grid.field_data[k]) for k in old_keys] )
/home1/01041/tg802953/dev-yt/src/yt-hg/yt/data_objects/data_containers.pyc
in _get_data_from_grid(self, grid, field) 2644 return np.array([f[i,:][pointI] for i in range(3)]) 2645 else: -> 2646 tr = grid[field] 2647 if tr.size == 1: # dx, dy, dz, cellvolume 2648 tr = tr * np.ones(grid.ActiveDimensions, dtype='float64')
/home1/01041/tg802953/dev-yt/src/yt-hg/yt/data_objects/grid_patch.pyc
in
__getitem__(self, key) 145 """ 146 if key not in self.field_data: --> 147 self.get_data(key) 148 return self.field_data[key] 149
/home1/01041/tg802953/dev-yt/src/yt-hg/yt/data_objects/grid_patch.pyc in get_data(self, field, convert) 188 else: raise 189 else: --> 190 self._generate_field(field) 191 return self.field_data[field] 192
/home1/01041/tg802953/dev-yt/src/yt-hg/yt/data_objects/grid_patch.pyc in _generate_field(self, field) 133 self[field] = temp_array[sl] 134 else: --> 135 self[field] = self.pf.field_info[field](self) 136 else: # Can't find the field, try as it might 137 raise exceptions.KeyError(field)
/home1/01041/tg802953/dev-yt/src/yt-hg/yt/data_objects/field_info_container.pyc
in __call__(self, data) 383 ii = self.check_available(data) 384 original_fields = data.keys() # Copy --> 385 dd = self._function(self, data) 386 dd *= self._convert_function(data) 387 for field_name in data.keys():
/home1/01041/tg802953/dev-yt/src/yt-hg/yt/data_objects/universal_fields.pyc
in _StarMass(field, data) 439 440 def _StarMass(field,data): --> 441 return data["star_density"] * data["CellVolume"] 442 add_field("StarMassMsun", units=r"M_{\odot}", 443 function=_StarMass,
/home1/01041/tg802953/dev-yt/src/yt-hg/yt/data_objects/grid_patch.pyc
in
__getitem__(self, key) 145 """ 146 if key not in self.field_data: --> 147 self.get_data(key) 148 return self.field_data[key] 149
/home1/01041/tg802953/dev-yt/src/yt-hg/yt/data_objects/grid_patch.pyc in get_data(self, field, convert) 188 else: raise 189 else: --> 190 self._generate_field(field) 191 return self.field_data[field] 192
/home1/01041/tg802953/dev-yt/src/yt-hg/yt/data_objects/grid_patch.pyc in _generate_field(self, field) 133 self[field] = temp_array[sl] 134 else: --> 135 self[field] = self.pf.field_info[field](self) 136 else: # Can't find the field, try as it might 137 raise exceptions.KeyError(field)
/home1/01041/tg802953/dev-yt/src/yt-hg/yt/data_objects/field_info_container.pyc
in __call__(self, data) 383 ii = self.check_available(data) 384 original_fields = data.keys() # Copy --> 385 dd = self._function(self, data) 386 dd *= self._convert_function(data) 387 for field_name in data.keys():
/home1/01041/tg802953/dev-yt/src/yt-hg/yt/frontends/enzo/fields.pyc in _spdensity(field, data) 360 blank, np.array(data.LeftEdge).astype(np.float64), 361 np.array(data.ActiveDimensions).astype(np.int32), --> 362 np.float64(data['dx'])) 363 return blank 364
/home1/01041/tg802953/dev-yt/src/yt-hg/yt/utilities/lib/CICDeposit.so
in
yt.utilities.lib.CICDeposit.CICDeposit_3 (yt/utilities/lib/CICDeposit.c:1643)()
ValueError: Buffer dtype mismatch, expected 'float64_t' but got 'float'
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
-- John Wise Assistant Professor of Physics Center for Relativistic Astrophysics, Georgia Tech http://cosmo.gatech.edu _______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
------------------------------
Message: 2 Date: Mon, 17 Feb 2014 23:16:37 +0100 From: Varadarajan Parthasarathy <varada@camk.edu.pl> To: yt-users@lists.spacepope.org Subject: [yt-users] yt for PLUTO Message-ID: <CAPFsH9fr6qTi5WNqt7wtQy092OapkfA96ZyZBhP1ELdo= CghxQ@mail.gmail.com> Content-Type: text/plain; charset="iso-8859-1"
Hi,
I read through the webpages of yt-project and came to know that PLUTO is partly supported for yt and there is still a scope for creating a new code front end. To that extent, I would like to inform with how much I could get into this:
import h5py from yt.mods import *
f = h5py.File("/.../.../testproblem/data.nnnn.dbl.h5", "r")
print f.items() [(u'cell_coords', <HDF5 group "/cell_coords" (3 members)>), (u'node_coords', <HDF5 group "/node_coords" (3 members)>), (u'vars', <HDF5 group "/vars" (5 members)>)]
print f.keys() [u'cell_coords', u'node_coords', u'vars']
where cell_coords and node_coords are X, Y, Z cell and node contain different values. 'vars' are 'prs', 'rho', 'vx1', 'vx2', 'vx3'.
But after this I am not able to get the data into the dictionary and hence unable to produce plots. I did see through the PLUTO specified field list, but I am not able to make the way out. Also, the simulation was not run with Chombo refinement, but I hope it may not be a serious issue. Moreover, the procedure given in loading a generic array data for HDF5 files was a bit confusing with regard to,
data_dir = ytcfg.get('yt','test_data_dir') f = h5py.File(data_dir+"/Unigriddata/....h5", "r")
can anyone explain if this 'test_data_dir' is just the working directory and then 'f' consists of the file, else the procedure that I have followed directly is still correct.
I will be really glad if I can get to do data analysis and other such stuff with yt.
I hope to hear soon.
Regards., Varadarajan -------------- next part -------------- An HTML attachment was scrubbed... URL: < http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/2014...
------------------------------
Message: 3 Date: Mon, 17 Feb 2014 20:27:07 -0500 From: Stephanie Tonnesen <stonnes@gmail.com> To: Discussion of the yt analysis package <yt-users@lists.spacepope.org> Subject: [yt-users] rainbow+white? Message-ID: < CAE4JVxBRAT9ofEJGB0yLaOqRP2OMULrHHA2Y8CWq15JVETp2Rg@mail.gmail.com> Content-Type: text/plain; charset="iso-8859-1"
Hi yt-users,
I am imagining that this is something silly, but I tried to use rainbow + white, and it seems to me that it is actually rainbow + black? Certainly on the colormaps page those two maps look identical:
http://yt-project.org/docs/dev/visualizing/colormaps/index.html?highlight=cm... Is this actually the case? is there just some simple pointer that is messed up somewhere? Or can someone point me to the white in rainbow+white?
Thanks!
Stephanie -------------- next part -------------- An HTML attachment was scrubbed... URL: < http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/2014...
------------------------------
Message: 4 Date: Tue, 18 Feb 2014 09:24:53 +0100 From: Kacper Kowalik <xarthisius.kk@gmail.com> To: yt-users@lists.spacepope.org Subject: Re: [yt-users] yt for PLUTO Message-ID: <530318D5.1060103@gmail.com> Content-Type: text/plain; charset="iso-8859-1"
On 02/17/2014 11:16 PM, Varadarajan Parthasarathy wrote:
Hi,
I read through the webpages of yt-project and came to know that PLUTO is partly supported for yt and there is still a scope for creating a new code front end. To that extent, I would like to inform with how much I could get into this:
import h5py from yt.mods import *
f = h5py.File("/.../.../testproblem/data.nnnn.dbl.h5", "r")
Hi Varadarajan, does yt's load method any sort of error? Could you try the following script:
from yt.mods import * pf = load("/.../.../testproblem/data.nnnn.dbl.h5") slc = SlicePlot(pf, 'z', 'rho') slc.save()
this should create an slice plot of gas density, but the most interesting part is load(). It should take care of reading and interpreting all data from hdf5 file. Best regards, Kacper
print f.items() [(u'cell_coords', <HDF5 group "/cell_coords" (3 members)>), (u'node_coords', <HDF5 group "/node_coords" (3 members)>), (u'vars', <HDF5 group "/vars" (5 members)>)]
print f.keys() [u'cell_coords', u'node_coords', u'vars']
where cell_coords and node_coords are X, Y, Z cell and node contain different values. 'vars' are 'prs', 'rho', 'vx1', 'vx2', 'vx3'.
But after this I am not able to get the data into the dictionary and hence unable to produce plots. I did see through the PLUTO specified field list, but I am not able to make the way out. Also, the simulation was not run with Chombo refinement, but I hope it may not be a serious issue. Moreover, the procedure given in loading a generic array data for HDF5 files was a bit confusing with regard to,
data_dir = ytcfg.get('yt','test_data_dir') f = h5py.File(data_dir+"/Unigriddata/....h5", "r")
can anyone explain if this 'test_data_dir' is just the working directory and then 'f' consists of the file, else the procedure that I have followed directly is still correct.
I will be really glad if I can get to do data analysis and other such stuff with yt.
I hope to hear soon.
Regards., Varadarajan
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
-------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 901 bytes Desc: OpenPGP digital signature URL: < http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/2014...
------------------------------
Message: 5 Date: Tue, 18 Feb 2014 08:17:27 -0800 From: Sam Skillman <samskillman@gmail.com> To: Discussion of the yt analysis package <yt-users@lists.spacepope.org> Subject: Re: [yt-users] rainbow+white? Message-ID: <CAB4=1s15uFHog3=SWXH7mZ+CU0mncpBuXgMKHrNm5oZ02= SZxg@mail.gmail.com> Content-Type: text/plain; charset="iso-8859-1"
Hi Stephanie,
Hmm, it doesn't look like there is a messed up pointer in the yt/visualization/_colormap_data.py file to me, and looking at (random site found searching for idl maps) http://ham.space.umn.edu/johnd/ct/ct-names.html it seems like they have qualitatively the same colors for rainbow+white. If you want to try editing the _colormap_data.py entry for "idl39" you might have some luck. It seems from
http://yt-project.org/docs/dev/_images/cmap_images__Projection_Rainbow_+_whi... the white is being put at the max value (which gets put at the bottom for the _r) rather than the min value, which is I think what you want.
Let us know if that helps. Sam
On Mon, Feb 17, 2014 at 5:27 PM, Stephanie Tonnesen <stonnes@gmail.com
wrote:
Hi yt-users,
I am imagining that this is something silly, but I tried to use rainbow + white, and it seems to me that it is actually rainbow + black? Certainly on the colormaps page those two maps look identical:
http://yt-project.org/docs/dev/visualizing/colormaps/index.html?highlight=cm...
Is this actually the case? is there just some simple pointer that is messed up somewhere? Or can someone point me to the white in rainbow+white?
Thanks!
Stephanie
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
-------------- next part -------------- An HTML attachment was scrubbed... URL: < http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/2014...
------------------------------
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
End of yt-users Digest, Vol 72, Issue 26 ****************************************
participants (1)
-
Varadarajan Parthasarathy