[yt-users] Specific angular momentum

Latif latifne at gmail.com
Thu Jul 12 09:25:21 PDT 2012


Hi all,

I am trying to compute specific angular momentum using YT. I am getting the
following error. It is already in derived fields list but does not work. Am
i doing some thing wrong here? Any ideas what is going wrong here?
Thanks in advance!
Cheers
Latif

pc.add_profile_sphere(150, "kpc",
                      ["Radiuspc", "SpecificAngularMomentum"],
weight="CellMassMsun", accumulation=False,
                      x_bins=64, x_log=True, x_bounds=None,lazy_reader=True,
                      id=None, figure=None, axes=None) # x, y, weight

  id=None, figure=None, axes=None) # x, y, weight
  File
"/home/astro73/mlatif/YT/yt-x86_64/src/yt-hg/yt/visualization/plot_collection.py",
line 1033, in add_profile_sphere
    figure=figure, axes=axes)
  File
"/home/astro73/mlatif/YT/yt-x86_64/src/yt-hg/yt/visualization/plot_collection.py",
line 943, in add_profile_object
    profile.add_fields(fields[1], weight=weight, accumulation=accumulation)
  File
"/home/astro73/mlatif/YT/yt-x86_64/src/yt-hg/yt/data_objects/profiles.py",
line 147, in add_fields
    self._lazy_add_fields(fields, weight, accumulation)
  File
"/home/astro73/mlatif/YT/yt-x86_64/src/yt-hg/yt/data_objects/profiles.py",
line 107, in _lazy_add_fields
    args=args, check_cut=True)
  File
"/home/astro73/mlatif/YT/yt-x86_64/src/yt-hg/yt/data_objects/profiles.py",
line 56, in save_state
    tr = func(*args, **kwargs)
  File
"/home/astro73/mlatif/YT/yt-x86_64/src/yt-hg/yt/data_objects/profiles.py",
line 243, in _bin_field
    source_data = self._get_field(source, field, check_cut)
  File
"/home/astro73/mlatif/YT/yt-x86_64/src/yt-hg/yt/data_objects/profiles.py",
line 183, in _get_field
    data.append(source[field][pointI].ravel().astype('float64'))
IndexError: index (3) out of range (0<=index<2) in dimension 0
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20120712/025be1ce/attachment.htm>


More information about the yt-users mailing list