Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue writing PPV cubes to FITS #38

Open
smbenincasa opened this issue Nov 16, 2018 · 0 comments
Open

Issue writing PPV cubes to FITS #38

smbenincasa opened this issue Nov 16, 2018 · 0 comments
Labels

Comments

@smbenincasa
Copy link

smbenincasa commented Nov 16, 2018

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'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants