[yt-users] LightRay Objection Creation - Index Error

Andrew James Emerick emerick at astro.columbia.edu
Sun Jan 12 20:19:28 PST 2014


Claire,

I remember running into this issue when I first started. I don't remember
why this had happened but it had to do with setting the initial and final
redshift both to zero.

I don't have access to my computer at the moment, but I believe my
workaround was setting zmin and zmax both to a nonzero value. For the value
I picked, I just took the distance to the center of my ray and converted to
a redshift. This was Ok for me since ultimately redshift for what I was
doing was arbitrary. It may not work for you.

Alternatively, you could try setting zmin to zero and zmax to the redshift
corresponding to the distance away from the initial start point (I.e.
length of the ray). This may or may not work in your situation.

Hope this helps.



Andrew Emerick
 Sunday, January 12, 2014, Claire Kopenhafer wrote:

> Hello out there, I'm trying to create a LightRay object for an enzo sim. I
> get this error message:
>
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
>   File
> "/data/codes/yt-x86_64/src/yt-hg/yt/analysis_modules/cosmological_observation/light_ray/light_ray.py",
> line 117, in __init__
>     redshift_data=redshift_data)
>   File
> "/data/codes/yt-x86_64/src/yt-hg/yt/analysis_modules/cosmological_observation/cosmology_splice.py",
> line 119, in create_cosmology_splice
>     cosmology_splice.append({'time': self.simulation[0].current_time,
>   File "/data/codes/yt-x86_64/src/yt-hg/yt/data_objects/time_series.py",
> line 117, in __getitem__
>     o = self._pre_outputs[key]
> IndexError: list index out of range
>
> The nearest and farthest redshift are both 0, which is the current
> redshift of the dataset I was given. This may or may not have any bearing
> on the problem. Thanks for the help!
>
> -Claire Kopenhafer
>


-- 
Graduate Student
Columbia University
Department of Astronomy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20140112/6900f231/attachment.htm>


More information about the yt-users mailing list