[yt-users] Command line rendering error

Noel Scudder noel.scudder at stonybrook.edu
Wed Jul 3 11:33:21 PDT 2013


Hi yt users,

I'm having a problem volume rendering through the command line. I've been
playing around with the yt command, and I noticed that when I do

$ yt plot --field density plt_def_00020

I will get plots for my axes just as I would expect. However, if I do

$ yt render --field density plt_def_00020

I get the following error:

Traceback (most recent call last):
  File "/home/noel/shocks/yt-x86_64/bin/yt", line 9, in <module>
    load_entry_point('yt==2.5.4', 'console_scripts', 'yt')()
  File
"/home/noel/shocks/yt-x86_64/src/yt-hg/yt/utilities/command_line.py", line
1691, in run_main
    args.func(args)
  File
"/home/noel/shocks/yt-x86_64/src/yt-hg/yt/utilities/command_line.py", line
97, in run
    self(args)
  File
"/home/noel/shocks/yt-x86_64/src/yt-hg/yt/utilities/command_line.py", line
1404, in __call__
    cam = pf.h.camera(center, L, width, (N,N), transfer_function=tf)
  File
"/home/noel/shocks/yt-x86_64/src/yt-hg/yt/visualization/volume_rendering/camera.py",
line 225, in __init__
    self.log_fields = [self.pf.field_info[f].take_log for f in self.fields]
  File
"/home/noel/shocks/yt-x86_64/src/yt-hg/yt/data_objects/field_info_container.py",
line 131, in __missing__
    return self.fallback[key]
  File
"/home/noel/shocks/yt-x86_64/src/yt-hg/yt/data_objects/field_info_container.py",
line 131, in __missing__
    return self.fallback[key]
  File
"/home/noel/shocks/yt-x86_64/src/yt-hg/yt/data_objects/field_info_container.py",
line 130, in __missing__
    raise KeyError("No field named %s" % key)
KeyError: 'No field named Density'

It looks to me like the Camera function isn't being called with a specific
field, and is defaulting to "Density", which is not a field for Castro
data. I took a stab at fixing this by editing the camera line to

   cam = pf.h.camera(center, L, width, (N,N), transfer_function=tf,
fields=field)

But then my command yields the following error:

Traceback (most recent call last):
  File "/home/noel/shocks/yt-x86_64/bin/yt", line 9, in <module>
    load_entry_point('yt==2.5.4', 'console_scripts', 'yt')()
  File
"/home/noel/shocks/yt-x86_64/src/yt-hg/yt/utilities/command_line.py", line
1691, in run_main
    args.func(args)
  File
"/home/noel/shocks/yt-x86_64/src/yt-hg/yt/utilities/command_line.py", line
97, in run
    self(args)
  File
"/home/noel/shocks/yt-x86_64/src/yt-hg/yt/utilities/command_line.py", line
1404, in __call__
    cam = pf.h.camera(center, L, width, (N,N), transfer_function=tf,
fields=field)
  File
"/home/noel/shocks/yt-x86_64/src/yt-hg/yt/visualization/volume_rendering/camera.py",
line 225, in __init__
    self.log_fields = [self.pf.field_info[f].take_log for f in self.fields]
  File
"/home/noel/shocks/yt-x86_64/src/yt-hg/yt/data_objects/field_info_container.py",
line 131, in __missing__
    return self.fallback[key]
  File
"/home/noel/shocks/yt-x86_64/src/yt-hg/yt/data_objects/field_info_container.py",
line 131, in __missing__
    return self.fallback[key]
  File
"/home/noel/shocks/yt-x86_64/src/yt-hg/yt/data_objects/field_info_container.py",
line 130, in __missing__
    raise KeyError("No field named %s" % key)
KeyError: 'No field named d'

I tried to delve a little deeper, but couldn't make any more headway. Does
anyone know how to fix these errors? Thanks in advance.

Cheers,

Noel Scudder
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20130703/a2fbc7fd/attachment.htm>


More information about the yt-users mailing list