Hi yt users,<div><br></div><div>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</div><div><br></div><div>$ yt plot --field density plt_def_00020</div>
<div><br></div><div>I will get plots for my axes just as I would expect. However, if I do</div><div><br></div><div><div>$ yt render --field density plt_def_00020</div></div><div><br></div><div>I get the following error:</div>
<div><br></div><div><div>Traceback (most recent call last):</div><div> File "/home/noel/shocks/yt-x86_64/bin/yt", line 9, in <module></div><div> load_entry_point('yt==2.5.4', 'console_scripts', 'yt')()</div>
<div> File "/home/noel/shocks/yt-x86_64/src/yt-hg/yt/utilities/command_line.py", line 1691, in run_main</div><div> args.func(args)</div><div> File "/home/noel/shocks/yt-x86_64/src/yt-hg/yt/utilities/command_line.py", line 97, in run</div>
<div> self(args)</div><div> File "/home/noel/shocks/yt-x86_64/src/yt-hg/yt/utilities/command_line.py", line 1404, in __call__</div><div> cam = pf.h.camera(center, L, width, (N,N), transfer_function=tf)</div>
<div> File "/home/noel/shocks/yt-x86_64/src/yt-hg/yt/visualization/volume_rendering/camera.py", line 225, in __init__</div><div> self.log_fields = [self.pf.field_info[f].take_log for f in self.fields]</div><div>
File "/home/noel/shocks/yt-x86_64/src/yt-hg/yt/data_objects/field_info_container.py", line 131, in __missing__</div><div> return self.fallback[key]</div><div> File "/home/noel/shocks/yt-x86_64/src/yt-hg/yt/data_objects/field_info_container.py", line 131, in __missing__</div>
<div> return self.fallback[key]</div><div> File "/home/noel/shocks/yt-x86_64/src/yt-hg/yt/data_objects/field_info_container.py", line 130, in __missing__</div><div> raise KeyError("No field named %s" % key)</div>
<div>KeyError: 'No field named Density'</div></div><div><br></div><div>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 </div>
<div><br></div><div> cam = pf.h.camera(center, L, width, (N,N), transfer_function=tf, fields=field)</div><div><br></div><div>But then my command yields the following error:</div><div><br></div><div><div>Traceback (most recent call last):</div>
<div> File "/home/noel/shocks/yt-x86_64/bin/yt", line 9, in <module></div><div> load_entry_point('yt==2.5.4', 'console_scripts', 'yt')()</div><div> File "/home/noel/shocks/yt-x86_64/src/yt-hg/yt/utilities/command_line.py", line 1691, in run_main</div>
<div> args.func(args)</div><div> File "/home/noel/shocks/yt-x86_64/src/yt-hg/yt/utilities/command_line.py", line 97, in run</div><div> self(args)</div><div> File "/home/noel/shocks/yt-x86_64/src/yt-hg/yt/utilities/command_line.py", line 1404, in __call__</div>
<div> cam = pf.h.camera(center, L, width, (N,N), transfer_function=tf, fields=field)</div><div> File "/home/noel/shocks/yt-x86_64/src/yt-hg/yt/visualization/volume_rendering/camera.py", line 225, in __init__</div>
<div> self.log_fields = [self.pf.field_info[f].take_log for f in self.fields]</div><div> File "/home/noel/shocks/yt-x86_64/src/yt-hg/yt/data_objects/field_info_container.py", line 131, in __missing__</div><div>
return self.fallback[key]</div><div> File "/home/noel/shocks/yt-x86_64/src/yt-hg/yt/data_objects/field_info_container.py", line 131, in __missing__</div><div> return self.fallback[key]</div><div> File "/home/noel/shocks/yt-x86_64/src/yt-hg/yt/data_objects/field_info_container.py", line 130, in __missing__</div>
<div> raise KeyError("No field named %s" % key)</div><div>KeyError: 'No field named d'</div></div><div><br></div><div>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.</div>
<div><br></div><div>Cheers,</div><div><br></div><div>Noel Scudder</div>