Issue #948: FITSProjection fails with ValueError: 'code_length' did not parse as fits unit (yt_analysis/yt)
New issue 948: FITSProjection fails with ValueError: 'code_length' did not parse as fits unit https://bitbucket.org/yt_analysis/yt/issue/948/fitsprojection-fails-with-val... Kacper Kowalik: Following script: ``` #!python import yt from yt.utilities.fits_image import FITSProjection ds = yt.load("MHDSloshing/virgo_low_res.0054.vtk", parameters={"length_unit": (1.0, "Mpc"), "mass_unit": (1.0e14, "Msun"), "time_unit": (1.0, "Myr")}) prj_fits = FITSProjection(ds, "z", ["temperature"], weight_field="density") ``` yields ``` #!text Traceback (most recent call last): File "foo.py", line 8, in <module> prj_fits = FITSProjection(ds, "z", ["temperature"], weight_field="density") File "yt/utilities/fits_image.py", line 474, in __init__ image_res=image_res) File "yt/utilities/fits_image.py", line 358, in construct_image w.wcs.cunit = cunit File "/usr/lib64/python2.7/site-packages/astropy/units/core.py", line 1735, in __call__ raise ValueError(msg) ValueError: 'code_length' did not parse as fits unit: At col 0, Unit u'code_length' not supported by the FITS standard. ``` I'm using *astropy-0.4* and *yt* rev: 09a0a10893ef Responsible: jzuhone
participants (1)
-
Kacper Kowalik