[yt-svn] commit/yt: 2 new changesets
Bitbucket
commits-noreply at bitbucket.org
Mon Jul 16 07:43:10 PDT 2012
2 new commits in yt:
https://bitbucket.org/yt_analysis/yt/changeset/93fb42c18a6c/
changeset: 93fb42c18a6c
branch: yt
user: ngoldbaum
date: 2012-07-16 07:35:18
summary: Fixing an indentation error.
affected #: 1 file
diff -r b846255f760b6cb250003f105250f0e5e3f3cc6b -r 93fb42c18a6c8d928bfce90879b5d96364778982 yt/visualization/plot_window.py
--- a/yt/visualization/plot_window.py
+++ b/yt/visualization/plot_window.py
@@ -630,97 +630,97 @@
class ProjectionPlot(PWViewerMPL):
def __init__(pf, axis, fields, center=None, width=None,
weight_field=None, max_level=None, origin='center-window'):
- r"""
- Given a pf object, an axis to project along, and a field name
- string, this will return a PWViewrMPL object containing
- the plot.
-
- The plot can be updated using one of the many helper functions
- defined in PlotWindow.
-
- Parameters
- ----------
- pf : :class:`yt.data_objects.api.StaticOutput`
- This is the parameter file object corresponding to the
- simulation output to be plotted.
- axis : int
- An int corresponding to the axis to slice along. (0=x, 1=y, 2=z)
- fields : string
- The name of the field(s) to be plotted.
- center : A two or three-element vector of sequence floats, 'c', or
- 'center'
- The coordinate of the center of the image. If left blanck,
- the image centers on the location of the maximum density
- cell. If set to 'c' or 'center', the plot is centered on
- the middle of the domain.
- width : A tuple or a float
- A tuple containing the width of image and the string key of
- the unit: (width, 'unit'). If set to a float, code units
- are assumed
- origin : A string
- The location of the origin of the plot coordinate system.
- Currently, can be set to three options: 'left-domain', corresponding
- to the bottom-left hand corner of the simulation domain, 'center-domain',
- corresponding the center of the simulation domain, or 'center-window' for
- the center of the plot window.
- weight_field : string
- The name of the weighting field. Set to None for no weight.
- max_level: int
- The maximum level to project to.
-
- Examples
- --------
-
- This is a very simple way of creating a projection plot.
-
- >>> pf = load('galaxy0030/galaxy0030')
- >>> p = ProjectionPlot(pf,2,'Density','c',(20,'kpc'))
- >>> p.save('sliceplot')
-
- """
- (bounds,center) = GetBoundsAndCenter(axis,center,width,pf)
- proj = pf.h.proj(axis,fields,weight_field=weight_field,max_level=max_level,center=center)
- PWViewerMPL.__init__(self,proj,bounds,origin=origin)
+ r"""
+ Given a pf object, an axis to project along, and a field name
+ string, this will return a PWViewrMPL object containing
+ the plot.
+
+ The plot can be updated using one of the many helper functions
+ defined in PlotWindow.
+
+ Parameters
+ ----------
+ pf : :class:`yt.data_objects.api.StaticOutput`
+ This is the parameter file object corresponding to the
+ simulation output to be plotted.
+ axis : int
+ An int corresponding to the axis to slice along. (0=x, 1=y, 2=z)
+ fields : string
+ The name of the field(s) to be plotted.
+ center : A two or three-element vector of sequence floats, 'c', or
+ 'center'
+ The coordinate of the center of the image. If left blanck,
+ the image centers on the location of the maximum density
+ cell. If set to 'c' or 'center', the plot is centered on
+ the middle of the domain.
+ width : A tuple or a float
+ A tuple containing the width of image and the string key of
+ the unit: (width, 'unit'). If set to a float, code units
+ are assumed
+ origin : A string
+ The location of the origin of the plot coordinate system.
+ Currently, can be set to three options: 'left-domain', corresponding
+ to the bottom-left hand corner of the simulation domain, 'center-domain',
+ corresponding the center of the simulation domain, or 'center-window' for
+ the center of the plot window.
+ weight_field : string
+ The name of the weighting field. Set to None for no weight.
+ max_level: int
+ The maximum level to project to.
+
+ Examples
+ --------
+
+ This is a very simple way of creating a projection plot.
+
+ >>> pf = load('galaxy0030/galaxy0030')
+ >>> p = ProjectionPlot(pf,2,'Density','c',(20,'kpc'))
+ >>> p.save('sliceplot')
+
+ """
+ (bounds,center) = GetBoundsAndCenter(axis,center,width,pf)
+ proj = pf.h.proj(axis,fields,weight_field=weight_field,max_level=max_level,center=center)
+ PWViewerMPL.__init__(self,proj,bounds,origin=origin)
class OffAxisSlicePlot(PWViewerMPL):
def __init__(pf, normal, fields, center=None, width=None, north_vector=None):
- r"""
- Given a pf object, a normal vector defining a slicing plane, and
- a field name string, this will return a PWViewrMPL object
- containing the plot.
+ r"""
+ Given a pf object, a normal vector defining a slicing plane, and
+ a field name string, this will return a PWViewrMPL object
+ containing the plot.
+
+ The plot can be updated using one of the many helper functions
+ defined in PlotWindow.
- The plot can be updated using one of the many helper functions
- defined in PlotWindow.
-
- Parameters
- ----------
- pf : :class:`yt.data_objects.api.StaticOutput`
- This is the parameter file object corresponding to the
- simulation output to be plotted.
- normal : a sequence of floats
- The vector normal to the slicing plane.
- fields : string
- The name of the field(s) to be plotted.
- center : A two or three-element vector of sequence floats, 'c', or
- 'center'
- The coordinate of the center of the image. If left blanck,
- the image centers on the location of the maximum density
- cell. If set to 'c' or 'center', the plot is centered on
- the middle of the domain.
- width : A tuple or a float
- A tuple containing the width of image and the string key of
- the unit: (width, 'unit'). If set to a float, code units
- are assumed
- north-vector : a sequence of floats
- A vector defining the 'up' direction in the plot. This
- option sets the orientation of the slicing plane. If not
- set, an arbitrary grid-aligned north-vector is chosen.
- """
- (bounds,center_rot) = GetOffAxisBoundsAndCenter(normal,center,width,pf)
- cutting = pf.h.cutting(normal,center,fields=fields,north_vector=north_vector)
- # Hard-coding the origin keyword since the other two options
- # aren't well-defined for off-axis data objects
- PWViewerMPL.__init__(self,cutting,bounds,origin='center-window',periodic=False,oblique=True)
+ Parameters
+ ----------
+ pf : :class:`yt.data_objects.api.StaticOutput`
+ This is the parameter file object corresponding to the
+ simulation output to be plotted.
+ normal : a sequence of floats
+ The vector normal to the slicing plane.
+ fields : string
+ The name of the field(s) to be plotted.
+ center : A two or three-element vector of sequence floats, 'c', or
+ 'center'
+ The coordinate of the center of the image. If left blanck,
+ the image centers on the location of the maximum density
+ cell. If set to 'c' or 'center', the plot is centered on
+ the middle of the domain.
+ width : A tuple or a float
+ A tuple containing the width of image and the string key of
+ the unit: (width, 'unit'). If set to a float, code units
+ are assumed
+ north-vector : a sequence of floats
+ A vector defining the 'up' direction in the plot. This
+ option sets the orientation of the slicing plane. If not
+ set, an arbitrary grid-aligned north-vector is chosen.
+ """
+ (bounds,center_rot) = GetOffAxisBoundsAndCenter(normal,center,width,pf)
+ cutting = pf.h.cutting(normal,center,fields=fields,north_vector=north_vector)
+ # Hard-coding the origin keyword since the other two options
+ # aren't well-defined for off-axis data objects
+ PWViewerMPL.__init__(self,cutting,bounds,origin='center-window',periodic=False,oblique=True)
_metadata_template = """
https://bitbucket.org/yt_analysis/yt/changeset/fd1df40e7ca1/
changeset: fd1df40e7ca1
branch: yt
user: brittonsmith
date: 2012-07-16 16:43:09
summary: Merged in ngoldbaum/yt-ngoldbaum (pull request #208)
affected #: 1 file
diff -r f74ae195161d8287ea48f39e1cdc11883994e342 -r fd1df40e7ca111bd6868c2c8c494e872919d5b48 yt/visualization/plot_window.py
--- a/yt/visualization/plot_window.py
+++ b/yt/visualization/plot_window.py
@@ -644,97 +644,97 @@
class ProjectionPlot(PWViewerMPL):
def __init__(pf, axis, fields, center=None, width=None,
weight_field=None, max_level=None, origin='center-window'):
- r"""
- Given a pf object, an axis to project along, and a field name
- string, this will return a PWViewrMPL object containing
- the plot.
-
- The plot can be updated using one of the many helper functions
- defined in PlotWindow.
-
- Parameters
- ----------
- pf : :class:`yt.data_objects.api.StaticOutput`
- This is the parameter file object corresponding to the
- simulation output to be plotted.
- axis : int
- An int corresponding to the axis to slice along. (0=x, 1=y, 2=z)
- fields : string
- The name of the field(s) to be plotted.
- center : A two or three-element vector of sequence floats, 'c', or
- 'center'
- The coordinate of the center of the image. If left blanck,
- the image centers on the location of the maximum density
- cell. If set to 'c' or 'center', the plot is centered on
- the middle of the domain.
- width : A tuple or a float
- A tuple containing the width of image and the string key of
- the unit: (width, 'unit'). If set to a float, code units
- are assumed
- origin : A string
- The location of the origin of the plot coordinate system.
- Currently, can be set to three options: 'left-domain', corresponding
- to the bottom-left hand corner of the simulation domain, 'center-domain',
- corresponding the center of the simulation domain, or 'center-window' for
- the center of the plot window.
- weight_field : string
- The name of the weighting field. Set to None for no weight.
- max_level: int
- The maximum level to project to.
-
- Examples
- --------
-
- This is a very simple way of creating a projection plot.
-
- >>> pf = load('galaxy0030/galaxy0030')
- >>> p = ProjectionPlot(pf,2,'Density','c',(20,'kpc'))
- >>> p.save('sliceplot')
-
- """
- (bounds,center) = GetBoundsAndCenter(axis,center,width,pf)
- proj = pf.h.proj(axis,fields,weight_field=weight_field,max_level=max_level,center=center)
- PWViewerMPL.__init__(self,proj,bounds,origin=origin)
+ r"""
+ Given a pf object, an axis to project along, and a field name
+ string, this will return a PWViewrMPL object containing
+ the plot.
+
+ The plot can be updated using one of the many helper functions
+ defined in PlotWindow.
+
+ Parameters
+ ----------
+ pf : :class:`yt.data_objects.api.StaticOutput`
+ This is the parameter file object corresponding to the
+ simulation output to be plotted.
+ axis : int
+ An int corresponding to the axis to slice along. (0=x, 1=y, 2=z)
+ fields : string
+ The name of the field(s) to be plotted.
+ center : A two or three-element vector of sequence floats, 'c', or
+ 'center'
+ The coordinate of the center of the image. If left blanck,
+ the image centers on the location of the maximum density
+ cell. If set to 'c' or 'center', the plot is centered on
+ the middle of the domain.
+ width : A tuple or a float
+ A tuple containing the width of image and the string key of
+ the unit: (width, 'unit'). If set to a float, code units
+ are assumed
+ origin : A string
+ The location of the origin of the plot coordinate system.
+ Currently, can be set to three options: 'left-domain', corresponding
+ to the bottom-left hand corner of the simulation domain, 'center-domain',
+ corresponding the center of the simulation domain, or 'center-window' for
+ the center of the plot window.
+ weight_field : string
+ The name of the weighting field. Set to None for no weight.
+ max_level: int
+ The maximum level to project to.
+
+ Examples
+ --------
+
+ This is a very simple way of creating a projection plot.
+
+ >>> pf = load('galaxy0030/galaxy0030')
+ >>> p = ProjectionPlot(pf,2,'Density','c',(20,'kpc'))
+ >>> p.save('sliceplot')
+
+ """
+ (bounds,center) = GetBoundsAndCenter(axis,center,width,pf)
+ proj = pf.h.proj(axis,fields,weight_field=weight_field,max_level=max_level,center=center)
+ PWViewerMPL.__init__(self,proj,bounds,origin=origin)
class OffAxisSlicePlot(PWViewerMPL):
def __init__(pf, normal, fields, center=None, width=None, north_vector=None):
- r"""
- Given a pf object, a normal vector defining a slicing plane, and
- a field name string, this will return a PWViewrMPL object
- containing the plot.
+ r"""
+ Given a pf object, a normal vector defining a slicing plane, and
+ a field name string, this will return a PWViewrMPL object
+ containing the plot.
+
+ The plot can be updated using one of the many helper functions
+ defined in PlotWindow.
- The plot can be updated using one of the many helper functions
- defined in PlotWindow.
-
- Parameters
- ----------
- pf : :class:`yt.data_objects.api.StaticOutput`
- This is the parameter file object corresponding to the
- simulation output to be plotted.
- normal : a sequence of floats
- The vector normal to the slicing plane.
- fields : string
- The name of the field(s) to be plotted.
- center : A two or three-element vector of sequence floats, 'c', or
- 'center'
- The coordinate of the center of the image. If left blanck,
- the image centers on the location of the maximum density
- cell. If set to 'c' or 'center', the plot is centered on
- the middle of the domain.
- width : A tuple or a float
- A tuple containing the width of image and the string key of
- the unit: (width, 'unit'). If set to a float, code units
- are assumed
- north-vector : a sequence of floats
- A vector defining the 'up' direction in the plot. This
- option sets the orientation of the slicing plane. If not
- set, an arbitrary grid-aligned north-vector is chosen.
- """
- (bounds,center_rot) = GetOffAxisBoundsAndCenter(normal,center,width,pf)
- cutting = pf.h.cutting(normal,center,fields=fields,north_vector=north_vector)
- # Hard-coding the origin keyword since the other two options
- # aren't well-defined for off-axis data objects
- PWViewerMPL.__init__(self,cutting,bounds,origin='center-window',periodic=False,oblique=True)
+ Parameters
+ ----------
+ pf : :class:`yt.data_objects.api.StaticOutput`
+ This is the parameter file object corresponding to the
+ simulation output to be plotted.
+ normal : a sequence of floats
+ The vector normal to the slicing plane.
+ fields : string
+ The name of the field(s) to be plotted.
+ center : A two or three-element vector of sequence floats, 'c', or
+ 'center'
+ The coordinate of the center of the image. If left blanck,
+ the image centers on the location of the maximum density
+ cell. If set to 'c' or 'center', the plot is centered on
+ the middle of the domain.
+ width : A tuple or a float
+ A tuple containing the width of image and the string key of
+ the unit: (width, 'unit'). If set to a float, code units
+ are assumed
+ north-vector : a sequence of floats
+ A vector defining the 'up' direction in the plot. This
+ option sets the orientation of the slicing plane. If not
+ set, an arbitrary grid-aligned north-vector is chosen.
+ """
+ (bounds,center_rot) = GetOffAxisBoundsAndCenter(normal,center,width,pf)
+ cutting = pf.h.cutting(normal,center,fields=fields,north_vector=north_vector)
+ # Hard-coding the origin keyword since the other two options
+ # aren't well-defined for off-axis data objects
+ PWViewerMPL.__init__(self,cutting,bounds,origin='center-window',periodic=False,oblique=True)
_metadata_template = """
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