[yt-users] passing parameters to 'ray'

Elizabeth Tasker taskere at mcmaster.ca
Wed Aug 10 08:36:00 PDT 2011


Hi Matt,

I think this script explains what I mean. When I run it, I get:

/1/home/taskere/yt/yt/data_objects/field_info_container.py in 
__call__(self, data)
    357                 doesnt_have.append(p)
    358         if len(doesnt_have) > 0:
--> 359             raise NeedsParameter(doesnt_have)
    360         return True
    361

NeedsParameter: (['height_vector'])


As a side note, I think 'ray' sets its own value for the field 
parameter, "center", making it the start of the ray. If that's true, 
does it have problems for calling radius? e.g.

ray["Radius"]

where radius would need to be the center of the object, not necessarily 
the start of the ray? (This particular issue wouldn't affect me, but I 
thought it might bite someone later).

Elizabeth



Matthew Turk wrote:
>
> Hi Elizabeth,
>
> Could you elaborate on what you mean, and provide an example script?
>
> Thanks,
>
> -Matt
>
> On Aug 10, 2011 7:22 AM, "Elizabeth Tasker" <taskere at mcmaster.ca 
> <mailto:taskere at mcmaster.ca>> wrote:
> > Hi,
> >
> > I'm having problems passing parameters to a ray object. I'm trying:
> >
> > ray1 = pf.h.ray( com[c], com[nearestcore], field_parameters =
> > {'height_vector':na.array([0,0,1]), 'center':dd.center})
> > Omega0 = ray1["Omega"]
> >
> > and I also tried out:
> >
> > ray1.set_field_parameter("height_vector", na.array([0,0,1]))
> > ray1.set_field_parameter("center", dd.center)
> >
> > But it can't recognise them.
> >
> > Elizabeth
> > _______________________________________________
> > yt-users mailing list
> > yt-users at lists.spacepope.org <mailto:yt-users at lists.spacepope.org>
> > http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
> ------------------------------------------------------------------------
>
> _______________________________________________
> yt-users mailing list
> yt-users at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>   

-------------- next part --------------
A non-text attachment was scrubbed...
Name: ray_test.py
Type: text/x-python
Size: 650 bytes
Desc: not available
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20110810/b51f29cc/attachment-0001.py>


More information about the yt-users mailing list