[yt-svn] commit/yt: 2 new changesets
Bitbucket
commits-noreply at bitbucket.org
Wed Feb 22 09:21:15 PST 2012
2 new commits in yt:
https://bitbucket.org/yt_analysis/yt/changeset/ed12b1e9edeb/
changeset: ed12b1e9edeb
branch: yt
user: samskillman
date: 2012-02-22 05:08:53
summary: There was a bug where only the 3rd listed field in the list of fields given to pc.add_phase_object was being added. Now we iterate through the rest of the list and add them one at a time.
affected #: 1 file
diff -r 6c96a5d7052a50928198ba392e73b8c093a73867 -r ed12b1e9edebec49ada8dec518f0038628b8e740 yt/visualization/plot_collection.py
--- a/yt/visualization/plot_collection.py
+++ b/yt/visualization/plot_collection.py
@@ -1152,9 +1152,9 @@
p = self._add_plot(PhasePlot(profile, fields,
id, cmap=cmap,
figure=figure, axes=axes))
- if len(fields) > 2:
- # This will add all the fields to the profile object
- p.switch_z(fields[2], weight=weight, accumulation=accumulation, fractional=fractional)
+ # This will add all the fields to the profile object
+ for i in range(2, len(fields)):
+ p.switch_z(fields[i], weight=weight, accumulation=accumulation, fractional=fractional)
return p
def add_phase_sphere(self, radius, unit, fields, center = None, cmap=None,
https://bitbucket.org/yt_analysis/yt/changeset/34b8de09f209/
changeset: 34b8de09f209
branch: yt
user: samskillman
date: 2012-02-22 18:04:38
summary: Modifying add_profile_object and add_phase_object such that their behavior matches the docstrings, now without changing the resultant plot. If field list is greater than 2 (for profile) or 3 (for phase), the first field will be added as a plot to the plot collection. The rest of the fields will be added to the underlying BinnedProfile objects during the same pass over the data.
affected #: 1 file
diff -r ed12b1e9edebec49ada8dec518f0038628b8e740 -r 34b8de09f20990eabc853770a224491b14b047cd yt/visualization/plot_collection.py
--- a/yt/visualization/plot_collection.py
+++ b/yt/visualization/plot_collection.py
@@ -940,7 +940,7 @@
x_bins, fields[0], x_min, x_max, x_log,
lazy_reader)
if len(fields) > 1:
- profile.add_fields(fields[1], weight=weight, accumulation=accumulation)
+ profile.add_fields(fields[1:], weight=weight, accumulation=accumulation)
if id is None: id = self._get_new_id()
p = self._add_plot(Profile1DPlot(profile, fields, id,
axes=axes, figure=figure))
@@ -1148,13 +1148,15 @@
x_bins, fields[0], x_min, x_max, x_log,
y_bins, fields[1], y_min, y_max, y_log,
lazy_reader)
+ # This will add all the fields to the profile object
+ if len(fields)>2:
+ profile.add_fields(fields[2:], weight=weight,
+ accumulation=accumulation, fractional=fractional)
+
if id is None: id = self._get_new_id()
p = self._add_plot(PhasePlot(profile, fields,
id, cmap=cmap,
figure=figure, axes=axes))
- # This will add all the fields to the profile object
- for i in range(2, len(fields)):
- p.switch_z(fields[i], weight=weight, accumulation=accumulation, fractional=fractional)
return p
def add_phase_sphere(self, radius, unit, fields, center = None, cmap=None,
Repository URL: https://bitbucket.org/yt_analysis/yt/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
More information about the yt-svn
mailing list