<div dir="ltr"><div>Hi Matt and Nathan,<br><br>Thank you for all your help. That works perfectly!<br><br></div>-Samantha<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Nov 27, 2013 at 2:06 PM, Matthew Turk <span dir="ltr"><<a href="mailto:matthewturk@gmail.com" target="_blank">matthewturk@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Samantha and everyone,<br>
<br>
Sorry for the long delay in replying. I've figured out the problem,<br>
and how to fix it.<br>
<br>
The endianness of Tipsy data often has to be guessed, and we don't do<br>
a good job of that. I was able to load the data by supplying the<br>
argument:<br>
<br>
endian = '<'<br>
<br>
to the TipsyStaticOutput command. I've pushed a change that notes<br>
this if it doesn't get a consistent output, but here's my full script:<br>
<br>
from yt.mods import *<br>
domain_left_edge = np.zeros(3, dtype="float64") - 600<br>
domain_right_edge = np.zeros(3, dtype="float64") + 600<br>
ds = TipsyStaticOutput('test.00169',parameter_file='test.param', endian = '<',<br>
domain_left_edge = domain_left_edge,<br>
domain_right_edge = domain_right_edge,<br>
n_ref = 8,<br>
)<br>
for v in ds._header_spec: print v, ds.parameters[v[0]]<br>
p = ProjectionPlot(ds, "x", ("deposit", "all_density"))<br>
p.save()<br>
<br>
-Matt<br>
<div class="HOEnZb"><div class="h5"><br>
On Fri, Nov 15, 2013 at 3:36 PM, Nathan Goldbaum <<a href="mailto:nathan12343@gmail.com">nathan12343@gmail.com</a>> wrote:<br>
> Unfortunately I don't have time to look into this too deeply. For what it's<br>
> worth, I get the traceback pasted below when I try to load Samantha's<br>
> dataset. It looks like there's some corruption happening when yt tries to<br>
> infer the particle counts.<br>
><br>
> In [1]: ds = TipsyStaticOutput('test.00169', parameter_file='test.param',<br>
> domain_left_edge=[-57]*3, domain_right_edge=[57]*3)<br>
><br>
> In [2]: ds.h<br>
> Exception IndexError: 'Out of bounds on buffer access (axis 0)' in<br>
> 'yt.geometry.particle_oct_container.ParticleRegions._mask_positions' ignored<br>
> ---------------------------------------------------------------------------<br>
> ValueError Traceback (most recent call last)<br>
> /Users/goldbaum/Documents/yt-3.0/scripts/iyt in <module>()<br>
> ----> 1 ds.h<br>
><br>
> /Users/goldbaum/Documents/yt-3.0/yt/data_objects/static_output.pyc in<br>
> hierarchy(self)<br>
> 220 raise RuntimeError("You should not instantiate<br>
> StaticOutput.")<br>
> 221 self._instantiated_hierarchy = self._hierarchy_class(<br>
> --> 222 self, data_style=self.data_style)<br>
> 223 # Now we do things that we need an instantiated<br>
> hierarchy for<br>
> 224 if "all" not in self.particle_types:<br>
><br>
> /Users/goldbaum/Documents/yt-3.0/yt/geometry/particle_geometry_handler.pyc<br>
> in __init__(self, pf, data_style)<br>
> 48 self.directory = os.path.dirname(self.hierarchy_filename)<br>
> 49 self.float_type = np.float64<br>
> ---> 50 super(ParticleGeometryHandler, self).__init__(pf,<br>
> data_style)<br>
> 51<br>
> 52 def _setup_geometry(self):<br>
><br>
> /Users/goldbaum/Documents/yt-3.0/yt/geometry/geometry_handler.pyc in<br>
> __init__(self, pf, data_style)<br>
> 64<br>
> 65 mylog.debug("Setting up domain geometry.")<br>
> ---> 66 self._setup_geometry()<br>
> 67<br>
> 68 mylog.debug("Initializing data grid data IO")<br>
><br>
> /Users/goldbaum/Documents/yt-3.0/yt/geometry/particle_geometry_handler.pyc<br>
> in _setup_geometry(self)<br>
> 52 def _setup_geometry(self):<br>
> 53 mylog.debug("Initializing Particle Geometry Handler.")<br>
> ---> 54 self._initialize_particle_handler()<br>
> 55<br>
> 56<br>
><br>
> /Users/goldbaum/Documents/yt-3.0/yt/geometry/particle_geometry_handler.pyc<br>
> in _initialize_particle_handler(self)<br>
> 87 pf.domain_left_edge, pf.domain_right_edge,<br>
> 88 [N, N, N], len(self.data_files))<br>
> ---> 89 self._initialize_indices()<br>
> 90 self.oct_handler.finalize()<br>
> 91 self.max_level = self.oct_handler.max_level<br>
><br>
> /Users/goldbaum/Documents/yt-3.0/yt/geometry/particle_geometry_handler.pyc<br>
> in _initialize_indices(self)<br>
> 109 npart = sum(data_file.total_particles.values())<br>
> 110 morton[ind:ind + npart] = \<br>
> --> 111 self.io._initialize_index(data_file, self.regions)<br>
> 112 ind += npart<br>
> 113 morton.sort()<br>
><br>
> /Users/goldbaum/Documents/yt-3.0/yt/frontends/sph/io.py in<br>
> _initialize_index(self, data_file, regions)<br>
> 486 morton[ind:ind+c] = compute_morton(<br>
> 487 pos[:,0], pos[:,1], pos[:,2],<br>
> --> 488 DLE, DRE)<br>
> 489 ind += c<br>
> 490 <a href="http://mylog.info" target="_blank">mylog.info</a>("Adding %0.3e particles", morton.size)<br>
><br>
> ValueError: could not broadcast input array from shape (301190) into shape<br>
> (10000000)<br>
><br>
><br>
><br>
> On Fri, Nov 15, 2013 at 11:39 AM, Samantha Benincasa <<a href="mailto:benincsm@mcmaster.ca">benincsm@mcmaster.ca</a>><br>
> wrote:<br>
>><br>
>> Hi Nathan,<br>
>><br>
>> I've put a sample tipsy file and the corresponding param file up, they can<br>
>> be downloaded at these links:<br>
>><br>
>> tipsy file:<br>
>> <a href="http://www.physics.mcmaster.ca/~benincsm/test.00169" target="_blank">http://www.physics.mcmaster.ca/~benincsm/test.00169</a><br>
>><br>
>> parameter file:<br>
>> <a href="http://www.physics.mcmaster.ca/~benincsm/test.param" target="_blank">http://www.physics.mcmaster.ca/~benincsm/test.param</a><br>
>><br>
>> Samantha<br>
>><br>
>><br>
>> On Fri, Nov 15, 2013 at 2:24 PM, Nathan Goldbaum <<a href="mailto:nathan12343@gmail.com">nathan12343@gmail.com</a>><br>
>> wrote:<br>
>>><br>
>>> Hi Samantha,<br>
>>><br>
>>> Do you have a sample dataset you can share? Uploading to a personal<br>
>>> website works well, but you can also share a link from dropbox, google<br>
>>> drive, or some other similar service.<br>
>>><br>
>>> -Nathan<br>
>>><br>
>>><br>
>>> On Fri, Nov 15, 2013 at 10:57 AM, Samantha Benincasa<br>
>>> <<a href="mailto:benincsm@mcmaster.ca">benincsm@mcmaster.ca</a>> wrote:<br>
>>>><br>
>>>> Hello,<br>
>>>><br>
>>>> I have been trying to analyze a TIPSY dataset using the new features in<br>
>>>> yt-3.0. I am unable to do any analysis without getting a segmentation<br>
>>>> fault.<br>
>>>><br>
>>>> Following the python notebook example for Gasoline, I read in the data<br>
>>>> using the command:<br>
>>>><br>
>>>> ds = TipsyStaticOutput('test.00001',parameter_file='test.param')<br>
>>>><br>
>>>> When I try to construct a plot collection, I am given the following<br>
>>>> error:<br>
>>>><br>
>>>> YTDomainOverflow: Particle bounds [ 1.25443703e-02 -5.12246704e+02<br>
>>>> -5.46726685e+02] and [ 1.25443703e-02 5.65781677e+02 4.61335541e+02]<br>
>>>> exceed domain bounds [-0.5 -0.5 -0.5] and [ 0.5 0.5 0.5]<br>
>>>><br>
>>>> If I instead try to manually set the domain bounds in the<br>
>>>> TipsyStaticOutput command,<br>
>>>><br>
>>>> ds =<br>
>>>> TipsyStaticOutput('test.00001',parameter_file='test.param',domain_left_edge=[-57,-57,-57],domain_right_edge=[57,57,57])<br>
>>>><br>
>>>> This gets rid of the domain boundary errors but I still receive a<br>
>>>> segmentation fault when I try to create the PlotCollection. I am just<br>
>>>> trying to read the data in so I can make slices/projections in temperature<br>
>>>> and density.<br>
>>>><br>
>>>> Thank you in advance for the help,<br>
>>>> Samantha<br>
>>>><br>
>>>> _______________________________________________<br>
>>>> yt-users mailing list<br>
>>>> <a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a><br>
>>>> <a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
>>>><br>
>>><br>
>>><br>
>>> _______________________________________________<br>
>>> yt-users mailing list<br>
>>> <a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a><br>
>>> <a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
>>><br>
>><br>
>><br>
>> _______________________________________________<br>
>> yt-users mailing list<br>
>> <a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a><br>
>> <a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
>><br>
><br>
><br>
> _______________________________________________<br>
> yt-users mailing list<br>
> <a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a><br>
> <a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
><br>
_______________________________________________<br>
yt-users mailing list<br>
<a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a><br>
<a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
</div></div></blockquote></div><br></div>