[yt-dev] Issue #951: FITSImageBuffer error in docs build (yt_analysis/yt)
Nathan Goldbaum
issues-reply at bitbucket.org
Mon Dec 8 18:58:31 PST 2014
New issue 951: FITSImageBuffer error in docs build
https://bitbucket.org/yt_analysis/yt/issue/951/fitsimagebuffer-error-in-docs-build
Nathan Goldbaum:
This is coming from the `FITSImageBuffer` notebook in the latest docs build:
```
#!python
%matplotlib inline
import yt
from yt.utilities.fits_image import FITSImageBuffer, FITSSlice, FITSProjection
INFO:root:Cell returned
INFO:root:Running cell:
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")})
INFO:root:Cell returned
INFO:root:Running cell:
prj = yt.ProjectionPlot(ds, "z", ["temperature"], weight_field="density", width=(500.,"kpc"))
prj.show()
INFO:root:Cell returned
INFO:root:Running cell:
prj_fits = FITSProjection(ds, "z", ["temperature"], weight_field="density")
INFO:root:Cell raised uncaught exception:
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-4-429a440945f9> in <module>()
----> 1 prj_fits = FITSProjection(ds, "z", ["temperature"], weight_field="density")
/var/lib/jenkins/jobs/yt-docs-3.0/workspace/yt/utilities/fits_image.pyc in __init__(self, ds, axis, fields, center, width, weight_field, image_res, **kwargs)
472 prj = ds.proj(fields[0], axis, weight_field=weight_field, **kwargs)
473 w, frb = construct_image(prj, center=dcenter, width=width,
--> 474 image_res=image_res)
475 super(FITSProjection, self).__init__(frb, fields=fields, wcs=w)
476 for i, field in enumerate(fields):
/var/lib/jenkins/jobs/yt-docs-3.0/workspace/yt/utilities/fits_image.pyc in construct_image(data_source, center, width, image_res)
356 w.wcs.cdelt = cdelt
357 w.wcs.crval = crval
--> 358 w.wcs.cunit = cunit
359 w.wcs.ctype = ctype
360 return w, frb
/home/xarth/yt-x86_64/lib/python2.7/site-packages/astropy-0.4.dev8348-py2.7-linux-x86_64.egg/astropy/units/core.pyc in __call__(self, s, represents, format, namespace, doc, parse_strict)
1715 .format(s, format_clause, six.text_type(e)))
1716 if parse_strict == 'raise':
-> 1717 raise ValueError(msg)
1718 elif parse_strict == 'warn':
1719 warnings.warn(msg, UnitsWarning)
ValueError: 'code_length' did not parse as fits unit: At col 0, Unit u'code_length' not supported by the FITS standard.
```
Responsible: jzuhone
More information about the yt-dev
mailing list