An output cube cannot be made when a field other than ("gas","density") is used. The code:
cubeL = PPVCube(ds, L, ("gas","cell_mass"), (-150.,150.,6,"km/s"), dim s=100, method="sum", center=c,width=(0.01, "Mpc"), data_source=sp)
cubeL.write_fits("mass.fits",length_unit="kpc", clobber='True')
Creates the following traceback:
KeyError Traceback (most recent cal
l last)
<ipython-input-9-4e7ff69a0d0f> in <module>()
----> 1 cubeL.write_fits("mass.fits",length_unit="kpc", clobber='Tru
e')
/anaconda2/lib/python2.7/site-packages/yt/utilities/parallel_tools/p
arallel_analysis_interface.pyc in root_only(*args, **kwargs)
317
318
--> 319
320 321
def root_only(*args, **kwargs):
if not parallel_capable:
return func(*args, **kwargs)
comm = _get_comm(args)
rv = None
/anaconda2/lib/python2.7/site-packages/yt/analysis_modules/ppv_cube/
ppv_cube.pyc in write_fits(self, filename, overwrite, length_unit, s
ky_scale, sky_center, **kwargs)
313
314
--> 315
317 fib.update_all_headers("btype", self.field)
/anaconda2/lib/python2.7/site-packages/yt/visualization/fits_image.p
yc in __init__(self, data, fields, units, width, wcs)
w.wcs.ctype = ["LINEAR","LINEAR",vtype]
fib = FITSImageData(self.data.transpose(), fields=se
fib.update_all_headers("bunit", re.sub('()', '', str
(self.proj_units)))
lf.field, wcs=w)316
158
159
--> 160
161
eld].units)162
KeyError: 'cell_mass'
An output cube cannot be made when a field other than ("gas","density") is used. The code: