I am not sure, but the first thing I would do would be to add

from yt.units import Mpccm 

At the top and see what happens next. 

Best,
Stephanie 

On Tue, Sep 12, 2017 at 11:36 AM Ashley Jarvis <ajarvis@star.sr.bham.ac.uk> wrote:
Hi all,

I’m attempting to adapt the example script for plotting star formation rates (found at http://yt-project.org/doc/analyzing/analysis_modules/star_analysis.html#star-formation-rate) to work with output data from a simulation run using Enzo. However, when I attempt to run the script, I get the following error:

———————————————————

File "PlotSFR.py", line 26, in <module>
    sfr = StarFormationRate(data, star_mass=mass_old, star_creation_time=ct_old, volume=sp.volume())
  File "/usr/local/anaconda/lib/python2.7/site-packages/yt/analysis_modules/star_analysis/sfr_spectrum.py", line 115, in __init__
    self._ds.quan(1.0, 'Mpccm**3').units
  File "/usr/local/anaconda/lib/python2.7/site-packages/yt/units/yt_array.py", line 1355, in __new__
    dtype=dtype, bypass_validation=bypass_validation)
  File "/usr/local/anaconda/lib/python2.7/site-packages/yt/units/yt_array.py", line 430, in __new__
    units = Unit(input_units, registry=registry)
  File "/usr/local/anaconda/lib/python2.7/site-packages/yt/units/unit_object.py", line 257, in __new__
    unit_data = _get_unit_data_from_expr(unit_expr, registry.lut)
  File "/usr/local/anaconda/lib/python2.7/site-packages/yt/units/unit_object.py", line 572, in _get_unit_data_from_expr
    unit_data = _get_unit_data_from_expr(unit_expr.args[0], unit_symbol_lut)
  File "/usr/local/anaconda/lib/python2.7/site-packages/yt/units/unit_object.py", line 566, in _get_unit_data_from_expr
    return _lookup_unit_symbol(str(unit_expr), unit_symbol_lut)
  File "/usr/local/anaconda/lib/python2.7/site-packages/yt/units/unit_object.py", line 657, in _lookup_unit_symbol
    "symbols." % symbol_str)
yt.units.unit_registry.UnitParseError: Could not find unit symbol 'Mpccm' in the provided symbols.

———————————————————

I am using version 3.3.5 of yt.

Does anyone know how I can resolve this? Any suggestions would be greatly appreciated.

Thanks,
Ashley



_______________________________________________
yt-users mailing list
yt-users@lists.spacepope.org
http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
--
--
Dr. Stephanie Tonnesen
Alvin E. Nashman Postdoctoral Fellow
Carnegie Observatories, Pasadena, CA
stonnes@gmail.com