<p>Hi Josh,</p>
<p>I'm not sure what's causing that as it's never happened to me before. I'm away from my computer at the moment but I will take a look at this later. Is the script you're using unaltered?  If not, please send me the one you're using off-list.</p>

<p>Also, please make sure to send emails to the list from the address that you signed up with. Otherwise, it has to be approved by the moderator each time.</p>
<p>Britton</p>
<div class="gmail_quote">On Jul 27, 2012 7:05 PM, "Joshua Eric Moloney" <<a href="mailto:Joshua.Moloney@colorado.edu">Joshua.Moloney@colorado.edu</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
The install I'm running should be the latest stable version of the code:<br><br>The current version of the code is:<br><br>---<br>c23cb264f04c (stable)<br>---<br><br>-Josh<div><div>
<img src="http://images/cleardot.gif"></div></div><br><br><div class="gmail_quote">On Fri, Jul 27, 2012 at 4:54 PM, Nathan Goldbaum <span dir="ltr"><<a href="mailto:nathan12343@gmail.com" target="_blank">nathan12343@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div>Hi Joshua,</div><div><br></div><div>I can't speak to the problem you're having specifically.  However, since there have been some recent updates to the light ray, it would help us to figure out what's happening if you could reply with the output of the "yt instinfo" command, run on the command line.</div>

<div><br></div><div>Cheers,</div><div><br></div><div>Nathan</div><div><br></div><div><div><div><div>On Jul 27, 2012, at 3:49 PM, Joshua Eric Moloney wrote:</div><br></div></div><blockquote type="cite"><div><div>
Hi all,<br><br>I've been trying to get a script (provided to me by 
Britton) working to create a bunch of light rays from an Enzo 
simulation. Depending on the initial seed value, it makes some of them 
correctly but eventually fails with the following error:<br>
<br>Traceback (most recent call last):<br>  File "make_light_rays.py", line 32, in <module><br>    get_los_velocity=True, get_nearest_galaxy=False)<br>  File "/home/student/jomo9722/Enzo/<div>
yt-x86_64/src/yt-hg/yt/analysis_modules/light_ray/light_ray.py", line 275, in make_light_ray<br>
    (sub_ray[field])])<br>  File "/home/student/jomo9722/Enzo/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.py", line 319, in __getitem__<br>    self.get_data(key)<br>  File "/home/student/jomo9722/Enzo/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.py", line 508, in get_data<br>



    if field not in ("dts", "t") and self._generate_field(field):<br>  File "/home/student/jomo9722/Enzo/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.py", line 349, in _generate_field<br>



    self[field] = self.pf.field_info[field](self)<br>  File "/home/student/jomo9722/Enzo/yt-x86_64/src/yt-hg/yt/data_objects/field_info_container.py", line 316, in __call__<br>    dd = self._function(self, data)<br>



  File "/data/moloney/cosmology_test/test_new/ion_balance/SD93IonBalance.py", line 178, in _ion_number_density<br>    return solarAbundance[atom] * data[fractionField] * data['Metallicity'] * \<br>  File "/home/student/jomo9722/Enzo/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.py", line 319, in __getitem__<br>



    self.get_data(key)<br>  File "/home/student/jomo9722/Enzo/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.py", line 508, in get_data<br>    if field not in ("dts", "t") and self._generate_field(field):<br>



  File "/home/student/jomo9722/Enzo/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.py", line 349, in _generate_field<br>    self[field] = self.pf.field_info[field](self)<br>  File "/home/student/jomo9722/Enzo/yt-x86_64/src/yt-hg/yt/data_objects/field_info_container.py", line 316, in __call__<br>



    dd = self._function(self, data)<br>  File "/data/moloney/cosmology_test/test_new/ion_balance/SD93IonBalance.py", line 193, in _ion_fraction_field<br>    fraction = na.power(10, interp(data))<br>  File "/home/student/jomo9722/Enzo/yt-x86_64/src/yt-hg/yt/utilities/linear_interpolators.py", line 44, in __call__<br>



    x_i = (na.digitize(x_vals, self.x_bins) - 1).astype('int32')<br>ValueError: Both x and bins must have non-zero length<br><br>Working
 through the debugger, I found that for the segment where it failed the 
periodic_ray function had produced the following list of segments.<br>
<br>[[array([ 0.16103374,  0.78830872,  0.24846128]), array([ 
0.14031834,  0.57367409,  1.        ])], [array([ 0.14031834,  
0.57367409,  1.        ]), array([ 0.14031834,  0.57367409,  1.        
])], [array([ 0.14031834,  0.57367409,  0.        ]), array([ 
0.13268221,  0.49455532,  0.2770327 ])]]<br>
<br>The second segment here has identical start and end points, which is
 leading yt to try to interpolate a field with nothing in it (and 
therefore throwing the above error). It seems that what's happening is 
that due to rounding errors the first segment being produced actually 
has a value < 1 for the third dimension so that when it checks to see
 if the segment hit any of the box walls it thinks that it didn't. It 
then tries to start a new segment that's already at the boundary of the 
box, producing a ray segment containing 0 grid cells.<br>
<br>Has anyone run into this problem before, and is there a fix for it 
floating around out there somewhere? If not I could probably work 
something up that checks to see if the distance from the segment 
endpoint to the wall is < SmallNumber and set it equal to the value 
at the wall if it is.<br>
<br>Thanks.<div><div><img></div></div></div></div></div>
_______________________________________________<br>yt-users mailing list<br><a href="mailto:yt-users@lists.spacepope.org" target="_blank">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>

</blockquote></div><br></div><br>_______________________________________________<br>
yt-users mailing list<br>
<a href="mailto:yt-users@lists.spacepope.org" target="_blank">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></blockquote></div><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></blockquote></div>