Hi Matt Your instructions are very clear. I have used these and now have yt producing slices and projection with correct units. Now I just need to figure out why my data looks odd. Thanks for help Kearn On 30 Oct 2013, at 19:08, Matthew Turk <matthewturk@gmail.com> wrote:
Hi Kearn,
Sorry, that was a hasty reply! Here's an example, for a dataset that only has five fields:
pf = load("output_00010/info_00010.txt", fields = ["Density", "x-velocity", "y-velocity", "z-velocity", "Pressure"])
If you have 7 or more fields (i.e., MHD?) you will have to add them on to the end of the list. The default list is:
["Density", "x-velocity", "y-velocity", "z-velocity", "Pressure", "Metallicity"]
Hope that helps -- let me know if it's not clear!
-Matt
On Wed, Oct 30, 2013 at 3:02 PM, Matthew Turk <matthewturk@gmail.com> wrote:
Yup, this looks like a field count issue. It looks like you've got n_fields != 6 -- you can specify this by supplying fields = [ ... ] (where ... ius the list of fields) to your load() command.
On Wed, Oct 30, 2013 at 2:58 PM, <k.grisdale@surrey.ac.uk> wrote:
Hi Matt,
I updated yt and it now lets me input the data into yt. However when I try to plot a slice I get this error:
slc = SlicePlot(pf, 'z', 'Density').save() You are running with the wrong number of fields. Please specify these in the load command. We are looking for 6 fields. The last set of field sizes was: [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 16, 16, 16, 16, 16, 16] Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/Applications/Code/yt/yt-x86_64/src/yt-hg/yt/visualization/plot_window.py", line 2148, in SlicePlot return AxisAlignedSlicePlot(pf, normal, fields, *args, **kwargs) File "/Applications/Code/yt/yt-x86_64/src/yt-hg/yt/visualization/plot_window.py", line 1320, in __init__ slc.get_data(fields) File "/Applications/Code/yt/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.py", line 531, in get_data fluids, self, self._current_chunk) File "/Applications/Code/yt/yt-x86_64/src/yt-hg/yt/geometry/geometry_handler.py", line 520, in _read_fluid_fields chunk_size) File "/Applications/Code/yt/yt-x86_64/src/yt-hg/yt/frontends/ramses/io.py", line 41, in _read_fluid_selection rv = subset.fill(content, fields, selector) File "/Applications/Code/yt/yt-x86_64/src/yt-hg/yt/frontends/ramses/data_structures.py", line 304, in fill for level, offset in enumerate(self.domain.hydro_offset): File "/Applications/Code/yt/yt-x86_64/src/yt-hg/yt/frontends/ramses/data_structures.py", line 102, in hydro_offset hvals = fpu.read_attrs(f, header, "=") File "/Applications/Code/yt/yt-x86_64/src/yt-hg/yt/utilities/fortran_utils.py", line 74, in read_attrs assert(s1 == s2) AssertionError.
Is this related or a different problem?
Thanks
Kearn On 30 Oct 2013, at 17:41, Matthew Turk <matthewturk@gmail.com> wrote:
Hi Kearn,
Not a dumb question at all! You should be able to run this command:
cd $YT_DEST/src/yt-hg hg pull -r tip http://bitbucket.org/yt_analysis/yt-3.0 hg up -C yt-3.0
We do have a "yt update" command but I want to make sure it does precisely this, so it'd be best if you ran it.
-Matt
On Wed, Oct 30, 2013 at 1:37 PM, <k.grisdale@surrey.ac.uk> wrote:
This is probably a dumb question but how do I update yt?
Thanks Kearn
On 30 Oct 2013, at 17:35, "Matthew Turk" <matthewturk@gmail.com> wrote:
Hi Kearn,
Did you update yt? If so, it should have given at least a better error message.
cd $YT_DEST/src/yt-hg hg pull -r tip http://bitbucket.org/yt_analysis/yt-3.0 hg up -C yt-3.0
-Matt
> On Wed, Oct 30, 2013 at 1:29 PM, <k.grisdale@surrey.ac.uk> wrote: > Hi, > > I completed a new run in RAMSES using the new version of the code and go the same results again. > >>>> from yt.mods import * >>>> pf = load("output_00001/info_00001.txt") Traceback (most recent call last): > File "<stdin>", line 1, in <module> > File "/Applications/Code/yt/yt-x86_64/src/yt-hg/yt/convenience.py", line 76, in load > if c._is_valid(*args, **kwargs): candidates.append(n) > File "/Applications/Code/yt/yt-x86_64/src/yt-hg/yt/frontends/art/data_structures.py", line 427, in _is_valid > amr_header_vals = read_attrs(fh, amr_header_struct, '>') > File "/Applications/Code/yt/yt-x86_64/src/yt-hg/yt/utilities/fortran_utils.py", line 62, in read_attrs > vals = list(struct.unpack(net_format, f.read(size))) > struct.error: unpack requires a string argument of length 892 > > Is there anything else I can try? > > Thanks > > Kearn >> On 30 Oct 2013, at 17:02, Matthew Turk <matthewturk@gmail.com> wrote: >> >> Hi Kearn, >> >> I think Romain's suggestion is likely going to fix the issue, but I >> also just pushed a change that will show the error differently and in >> a more informative way. ("hg pull >> http://bitbucket.org/yt_analysis/yt-3.0 && hg up" in your yt-hg >> directory will fix it.) >> >> -Matt >> >>> On Wed, Oct 30, 2013 at 12:39 PM, <k.grisdale@surrey.ac.uk> wrote: >>> Hi, >>> >>> I have been trying to load RAMSES data into yt 2.5. Orginaly it was loading >>> in but the graphs I was able to produce didn’t make sense. So I tried to >>> change to yt3 using the commands >>> >>> cd $YT_DEST/src/yt-hg/ >>> hg pull http://bitbucket.org/yt_analysis/yt-3.0 >>> hg up -C yt-3.0 >>> python2.7 setup.py build_ext -i -f >>> >>> The commands appear to have worked. But when I try to use yt to load in >>> RAMSES data I now get this error: >>> >>> >>> Traceback (most recent call last): File >>> "/Applications/Code/yt/yt-x86_64/src/yt-hg/yt/gui/reason/basic_repl.py", >>> line 81, in execute exec code in self.locals File "", line 1, in File >>> "/Applications/Code/yt/yt-x86_64/src/yt-hg/yt/convenience.py", line 76, in >>> load if c._is_valid(*args, **kwargs): candidates.append(n) File >>> "/Applications/Code/yt/yt-x86_64/src/yt-hg/yt/frontends/art/data_structures.py", >>> line 427, in _is_valid amr_header_vals = read_attrs(fh, amr_header_struct, >>> '>') File >>> "/Applications/Code/yt/yt-x86_64/src/yt-hg/yt/utilities/fortran_utils.py", >>> line 62, in read_attrs vals = list(struct.unpack(net_format, f.read(size))) >>> error: unpack requires a string argument of length 892 >>> >>> >>> Any idea what I need to do? >>> >>> Thanks >>> >>> Kearn >>> >>> _______________________________________________ >>> yt-users mailing list >>> yt-users@lists.spacepope.org >>> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org >> _______________________________________________ >> yt-users mailing list >> yt-users@lists.spacepope.org >> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org > > > _______________________________________________ > yt-users mailing list > yt-users@lists.spacepope.org > http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org _______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org