New issue 1142: ProfilePlot.from_profiles fails when passed two profile objects
https://bitbucket.org/yt_analysis/yt/issues/1142/profileplotfrom_profiles-f…
Nathan Goldbaum:
The following test script (from mintaka on IRC):
```
#!python
import yt
import numpy as np
from yt.units import kpc
from matplotlib import pyplot as plt
ds = yt.load('sizmbhloz-clref04SNth-rs9_a0.9011/sizmbhloz-clref04SNth-rs9_a0.9011.art')
ad = ds.all_data()
profiles = []
labels = []
profiles.append(yt.create_profile(ad, ["radius"], fields=['density']))
labels.append("density")
profiles.append(yt.create_profile(ad, ["radius"], fields=[('deposit', 'N-BODY_density')]))
labels.append('N-BODY')
prf = yt.ProfilePlot.from_profiles(profiles, labels=labels)
prf.save()
```
Raises the following error:
```
Traceback (most recent call last):
File "test.py", line 15, in <module>
prf = yt.ProfilePlot.from_profiles(profiles, labels=labels)
File "/Users/goldbaum/Documents/yt-hg/yt/visualization/profile_plotter.py", line 416, in from_profiles
return cls._initialize_instance(obj, profiles, labels, plot_specs, y_log)
File "/Users/goldbaum/Documents/yt-hg/yt/visualization/profile_plotter.py", line 366, in _initialize_instance
obj._setup_plots()
File "/Users/goldbaum/Documents/yt-hg/yt/visualization/profile_plotter.py", line 340, in _setup_plots
xtitle, ytitle = self._get_field_title(fname, profile)
File "/Users/goldbaum/Documents/yt-hg/yt/visualization/profile_plotter.py", line 634, in _get_field_title
y_unit = profile.field_units[field_y]
KeyError: ('gas', 'density')
```
Probably we need to make sure that field name tuples are normalized somewhere.
Responsible: ngoldbaum
New issue 1141: Problem to sample a ray in yt 3.2
https://bitbucket.org/yt_analysis/yt/issues/1141/problem-to-sample-a-ray-in…
Kuo-Chuan Pan:
Dear all,
I am not sure if here is the correct place to ask question (if not, please forgive me).
Recently, I am updating my analysis codes from yt 2.x to 3.2.
I found that the pf.h.ray method is very different in between yt 2.x and 3.x.
I use pf.h.ray(point1, point2) in yt 2.x and ds.ray(point1,point2) in yt3.2.
In yt 3.2, sometimes I got very strange results in ray('t').
The returned value is simply 0 1, instead of an array of sampled data.
In addition, sometimes the returned array in ray('t') is not sorted in radius.
I know that I could sort the array by using argsort() but is this due to performance issue
or did I made some stupid mistake to use ds.ray()?
Also, is this a bug when ds.ray(point1,point2) returns just 0 1?
I am sure I am giving correct point1 and point2 and with a reasonable length.
Many thanks,
Kuo-Chuan
I'm developing a new frontend for yt <https://bitbucket.org/eschnett/yt>. I
am currently encountering this error <http://pastebin.com/EYauU1rv>.
I don't know what causes this error. The error message mentions an __init__
function, but I don't know which __init__ function this is, nor whether the
problem is in the caller or the callee. I'd be grateful for any feedback.
-erik
--
Erik Schnetter <schnetter(a)gmail.com>
http://www.perimeterinstitute.ca/personal/eschnetter/
We (the Einstein Toolkit community; see <http://einsteintoolkit.org>) are
examining / experimenting with new file formats for our 3D simulations. As
part of these experiments, we also want to examine how they integrate with
visualization toolkits.
I have forked yt on Bitbucket <https://bitbucket.org/eschnett/yt>, and am
working on a new front end. At the moment, I cannot make any promise as to
whether this will work out, but I thought I'd let you know anyway.
-erik
--
Erik Schnetter <schnetter(a)gmail.com>
http://www.perimeterinstitute.ca/personal/eschnetter/