[yt-svn] commit/yt: 3 new changesets
commits-noreply at bitbucket.org
commits-noreply at bitbucket.org
Fri Jan 13 11:06:06 PST 2017
3 new commits in yt:
https://bitbucket.org/yt_analysis/yt/commits/8aac51f306c4/
Changeset: 8aac51f306c4
Branch: yt
User: ngoldbaum
Date: 2017-01-11 17:13:11+00:00
Summary: Ensure all existing plotting classes that take data_source as a keyword argument have docstrings for it
Affected #: 1 file
diff -r eb89d13ffb42b93b146a2deff9e1ad24d90feb75 -r 8aac51f306c4a5a8fea958cf8c2e2e85dd9ed28f yt/visualization/plot_window.py
--- a/yt/visualization/plot_window.py
+++ b/yt/visualization/plot_window.py
@@ -1283,9 +1283,9 @@
field_parameters : dictionary
A dictionary of field parameters than can be accessed by derived
fields.
- data_source : YTSelectionContainer Object
- Object to be used for data selection. Defaults to a region covering
- the entire simulation.
+ data_source: YTSelectionContainer object
+ Object to be used for data selection. Defaults to ds.all_data(), a
+ region covering the full domain
Examples
--------
@@ -1460,6 +1460,9 @@
field_parameters : dictionary
A dictionary of field parameters than can be accessed by derived
fields.
+ data_source: YTSelectionContainer object
+ Object to be used for data selection. Defaults to ds.all_data(), a
+ region covering the full domain
Examples
--------
@@ -1587,8 +1590,8 @@
A dictionary of field parameters than can be accessed by derived
fields.
data_source : YTSelectionContainer Object
- Object to be used for data selection. Defaults to a region covering
- the entire simulation.
+ Object to be used for data selection. Defaults ds.all_data(), a
+ region covering the full domain.
"""
_plot_type = 'OffAxisSlice'
https://bitbucket.org/yt_analysis/yt/commits/afbbf986c3fc/
Changeset: afbbf986c3fc
Branch: yt
User: ngoldbaum
Date: 2017-01-11 17:13:33+00:00
Summary: Make it possible to pass a data_source keyword argument to OffAxisProjectionPlot
Closes #1309
Affected #: 1 file
diff -r 8aac51f306c4a5a8fea958cf8c2e2e85dd9ed28f -r afbbf986c3fc3327e71cb63f560e5fe40dcb66df yt/visualization/plot_window.py
--- a/yt/visualization/plot_window.py
+++ b/yt/visualization/plot_window.py
@@ -1629,13 +1629,17 @@
def __init__(self, center, ds, normal_vector, width, fields,
interpolated, resolution = (800,800), weight=None,
volume=None, no_ghost=False, le=None, re=None,
- north_vector=None, method="integrate"):
+ north_vector=None, method="integrate",
+ data_source=None):
self.center = center
self.ds = ds
self.axis = 4 # always true for oblique data objects
self.normal_vector = normal_vector
self.width = width
- self.dd = ds.all_data()
+ if data_source is None:
+ self.dd = ds.all_data()
+ else:
+ self.dd = data_source
fields = self.dd._determine_fields(fields)
self.fields = fields
self.interpolated = interpolated
@@ -1740,6 +1744,9 @@
just a straight summation of the field along the given axis. WARNING:
This should only be used for uniform resolution grid datasets, as other
datasets may result in unphysical images.
+ data_source: YTSelectionContainer object
+ Object to be used for data selection. Defaults to ds.all_data(), a
+ region covering the full domain
"""
_plot_type = 'OffAxisProjection'
_frb_generator = OffAxisProjectionFixedResolutionBuffer
@@ -1748,7 +1755,8 @@
depth=(1, '1'), axes_unit=None, weight_field=None,
max_level=None, north_vector=None, right_handed=True,
volume=None, no_ghost=False, le=None, re=None,
- interpolated=False, fontsize=18, method="integrate"):
+ interpolated=False, fontsize=18, method="integrate",
+ data_source=None):
(bounds, center_rot) = \
get_oblique_window_parameters(normal,center,width,ds,depth=depth)
fields = ensure_list(fields)[:]
@@ -1758,7 +1766,8 @@
OffAxisProj = OffAxisProjectionDummyDataSource(
center_rot, ds, normal, oap_width, fields, interpolated,
weight=weight_field, volume=volume, no_ghost=no_ghost,
- le=le, re=re, north_vector=north_vector, method=method)
+ le=le, re=re, north_vector=north_vector, method=method,
+ data_source=data_source)
validate_mesh_fields(OffAxisProj, fields)
https://bitbucket.org/yt_analysis/yt/commits/b7b71a7c2e00/
Changeset: b7b71a7c2e00
Branch: yt
User: jzuhone
Date: 2017-01-13 19:05:39+00:00
Summary: Merged in ngoldbaum/yt (pull request #2490)
Make it possible to pass a data_source keyword argument to OffAxisProjectionPlot. Closes #1309
Affected #: 1 file
diff -r ec92132823b016f9056f53d166e7262bca2275a7 -r b7b71a7c2e00c7a43b7e736a9111fe7d4051b7e8 yt/visualization/plot_window.py
--- a/yt/visualization/plot_window.py
+++ b/yt/visualization/plot_window.py
@@ -1283,9 +1283,9 @@
field_parameters : dictionary
A dictionary of field parameters than can be accessed by derived
fields.
- data_source : YTSelectionContainer Object
- Object to be used for data selection. Defaults to a region covering
- the entire simulation.
+ data_source: YTSelectionContainer object
+ Object to be used for data selection. Defaults to ds.all_data(), a
+ region covering the full domain
Examples
--------
@@ -1460,6 +1460,9 @@
field_parameters : dictionary
A dictionary of field parameters than can be accessed by derived
fields.
+ data_source: YTSelectionContainer object
+ Object to be used for data selection. Defaults to ds.all_data(), a
+ region covering the full domain
Examples
--------
@@ -1587,8 +1590,8 @@
A dictionary of field parameters than can be accessed by derived
fields.
data_source : YTSelectionContainer Object
- Object to be used for data selection. Defaults to a region covering
- the entire simulation.
+ Object to be used for data selection. Defaults ds.all_data(), a
+ region covering the full domain.
"""
_plot_type = 'OffAxisSlice'
@@ -1626,13 +1629,17 @@
def __init__(self, center, ds, normal_vector, width, fields,
interpolated, resolution = (800,800), weight=None,
volume=None, no_ghost=False, le=None, re=None,
- north_vector=None, method="integrate"):
+ north_vector=None, method="integrate",
+ data_source=None):
self.center = center
self.ds = ds
self.axis = 4 # always true for oblique data objects
self.normal_vector = normal_vector
self.width = width
- self.dd = ds.all_data()
+ if data_source is None:
+ self.dd = ds.all_data()
+ else:
+ self.dd = data_source
fields = self.dd._determine_fields(fields)
self.fields = fields
self.interpolated = interpolated
@@ -1737,6 +1744,9 @@
just a straight summation of the field along the given axis. WARNING:
This should only be used for uniform resolution grid datasets, as other
datasets may result in unphysical images.
+ data_source: YTSelectionContainer object
+ Object to be used for data selection. Defaults to ds.all_data(), a
+ region covering the full domain
"""
_plot_type = 'OffAxisProjection'
_frb_generator = OffAxisProjectionFixedResolutionBuffer
@@ -1745,7 +1755,8 @@
depth=(1, '1'), axes_unit=None, weight_field=None,
max_level=None, north_vector=None, right_handed=True,
volume=None, no_ghost=False, le=None, re=None,
- interpolated=False, fontsize=18, method="integrate"):
+ interpolated=False, fontsize=18, method="integrate",
+ data_source=None):
(bounds, center_rot) = \
get_oblique_window_parameters(normal,center,width,ds,depth=depth)
fields = ensure_list(fields)[:]
@@ -1755,7 +1766,8 @@
OffAxisProj = OffAxisProjectionDummyDataSource(
center_rot, ds, normal, oap_width, fields, interpolated,
weight=weight_field, volume=volume, no_ghost=no_ghost,
- le=le, re=re, north_vector=north_vector, method=method)
+ le=le, re=re, north_vector=north_vector, method=method,
+ data_source=data_source)
validate_mesh_fields(OffAxisProj, fields)
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