[yt-svn] commit/yt: 28 new changesets
Bitbucket
commits-noreply at bitbucket.org
Fri Feb 15 13:06:19 PST 2013
28 new commits in yt:
https://bitbucket.org/yt_analysis/yt/commits/949825951849/
changeset: 949825951849
branch: yt
user: MatthewTurk
date: 2013-02-15 18:12:57
summary: Moving docstrings from __init__ to top-level in plot_window.py
affected #: 1 file
diff -r 6ad7685b37719a895551010381a52b51b57e53c7 -r 94982595184977955dfbbb50c0210ac4e8cfb3db yt/visualization/plot_window.py
--- a/yt/visualization/plot_window.py
+++ b/yt/visualization/plot_window.py
@@ -221,6 +221,35 @@
return (bounds, center, units)
class PlotWindow(object):
+ r"""
+ PlotWindow(data_source, bounds, buff_size=(800,800), antialias = True)
+
+ A ploting mechanism based around the concept of a window into a
+ data source. It can have arbitrary fields, each of which will be
+ centered on the same viewpoint, but will have individual zlimits.
+
+ The data and plot are updated separately, and each can be
+ invalidated as the object is modified.
+
+ Data is handled by a FixedResolutionBuffer object.
+
+ Parameters
+ ----------
+ data_source : :class:`yt.data_objects.data_containers.AMRProjBase` or :class:`yt.data_objects.data_containers.AMRSliceBase`
+ This is the source to be pixelized, which can be a projection or a
+ slice. (For cutting planes, see
+ `yt.visualization.fixed_resolution.ObliqueFixedResolutionBuffer`.)
+ bounds : sequence of floats
+ Bounds are the min and max in the image plane that we want our
+ image to cover. It's in the order of (xmin, xmax, ymin, ymax),
+ where the coordinates are all in the appropriate code units.
+ buff_size : sequence of ints
+ The size of the image to generate.
+ antialias : boolean
+ This can be true or false. It determines whether or not sub-pixel
+ rendering is used during data deposition.
+
+ """
_plot_valid = False
_colorbar_valid = False
_contour_info = None
@@ -228,35 +257,6 @@
_frb = None
def __init__(self, data_source, bounds, buff_size=(800,800), antialias=True,
periodic=True, origin='center-window', oblique=False, fontsize=15):
- r"""
- PlotWindow(data_source, bounds, buff_size=(800,800), antialias = True)
-
- A ploting mechanism based around the concept of a window into a
- data source. It can have arbitrary fields, each of which will be
- centered on the same viewpoint, but will have individual zlimits.
-
- The data and plot are updated separately, and each can be
- invalidated as the object is modified.
-
- Data is handled by a FixedResolutionBuffer object.
-
- Parameters
- ----------
- data_source : :class:`yt.data_objects.data_containers.AMRProjBase` or :class:`yt.data_objects.data_containers.AMRSliceBase`
- This is the source to be pixelized, which can be a projection or a
- slice. (For cutting planes, see
- `yt.visualization.fixed_resolution.ObliqueFixedResolutionBuffer`.)
- bounds : sequence of floats
- Bounds are the min and max in the image plane that we want our
- image to cover. It's in the order of (xmin, xmax, ymin, ymax),
- where the coordinates are all in the appropriate code units.
- buff_size : sequence of ints
- The size of the image to generate.
- antialias : boolean
- This can be true or false. It determines whether or not sub-pixel
- rendering is used during data deposition.
-
- """
if not hasattr(self, "pf"):
self.pf = data_source.pf
ts = self._initialize_dataset(self.pf)
@@ -1026,102 +1026,102 @@
raise YTNotInsideNotebook
class SlicePlot(PWViewerMPL):
+ r"""Creates a slice plot from a parameter file
+
+ Given a pf object, an axis to slice 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 : `StaticOutput`
+ This is the parameter file object corresponding to the
+ simulation output to be plotted.
+ axis : int or one of 'x', 'y', 'z'
+ An int corresponding to the axis to slice along (0=x, 1=y, 2=z)
+ or the axis name itself
+ fields : string
+ The name of the field(s) to be plotted.
+ center : two or three-element vector of sequence floats, 'c', or 'center', or 'max'
+ 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. If set to 'max', will be at the point
+ of highest density.
+ width : tuple or a float.
+ Width can have four different formats to support windows with variable
+ x and y widths. They are:
+
+ ================================== =======================
+ format example
+ ================================== =======================
+ (float, string) (10,'kpc')
+ ((float, string), (float, string)) ((10,'kpc'),(15,'kpc'))
+ float 0.2
+ (float, float) (0.2, 0.3)
+ ================================== =======================
+
+ For example, (10, 'kpc') requests a plot window that is 10 kiloparsecs
+ wide in the x and y directions, ((10,'kpc'),(15,'kpc')) requests a window
+ that is 10 kiloparsecs wide along the x axis and 15 kiloparsecs wide along
+ the y axis. In the other two examples, code units are assumed, for example
+ (0.2, 0.3) requests a plot that has an x width of 0.2 and a y width of 0.3
+ in code units. If units are provided the resulting plot axis labels will
+ use the supplied units.
+ axes_unit : A string
+ The name of the unit for the tick labels on the x and y axes.
+ Defaults to None, which automatically picks an appropriate unit.
+ If axes_unit is '1', 'u', or 'unitary', it will not display the
+ units, and only show the axes name.
+ origin : string or length 1, 2, or 3 sequence of strings
+ The location of the origin of the plot coordinate system. This is
+ represented by '-' separated string or a tuple of strings. In the
+ first index the y-location is given by 'lower', 'upper', or 'center'.
+ The second index is the x-location, given as 'left', 'right', or
+ 'center'. Finally, the whether the origin is applied in 'domain' space,
+ plot 'window' space or 'native' simulation coordinate system is given.
+ For example, both 'upper-right-domain' and ['upper', 'right', 'domain']
+ both place the origin in the upper right hand corner of domain space.
+ If x or y are not given, a value is inffered. For instance, 'left-domain'
+ corresponds to the lower-left hand corner of the simulation domain,
+ 'center-domain' corresponds to the center of the simulation domain,
+ or 'center-window' for the center of the plot window. Further examples:
+
+ ================================== ============================
+ format example
+ ================================== ============================
+ '{space}' 'domain'
+ '{xloc}-{space}' 'left-window'
+ '{yloc}-{space}' 'upper-domain'
+ '{yloc}-{xloc}-{space}' 'lower-right-window'
+ ('{space}',) ('window',)
+ ('{xloc}', '{space}') ('right', 'domain')
+ ('{yloc}', '{space}') ('lower', 'window')
+ ('{yloc}', '{xloc}', '{space}') ('lower', 'right', 'window')
+ ================================== ============================
+ fontsize : integer
+ The size of the fonts for the axis, colorbar, and tick labels.
+ field_parameters : dictionary
+ A dictionary of field parameters than can be accessed by derived fields.
+
+ Examples
+ --------
+
+ This will save an image the the file 'sliceplot_Density
+
+ >>> pf = load('galaxy0030/galaxy0030')
+ >>> p = SlicePlot(pf,2,'Density','c',(20,'kpc'))
+ >>> p.save('sliceplot')
+
+ """
_plot_type = 'Slice'
_frb_generator = FixedResolutionBuffer
def __init__(self, pf, axis, fields, center='c', width=None, axes_unit=None,
origin='center-window', fontsize=15, field_parameters=None):
- r"""Creates a slice plot from a parameter file
-
- Given a pf object, an axis to slice 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 : `StaticOutput`
- This is the parameter file object corresponding to the
- simulation output to be plotted.
- axis : int or one of 'x', 'y', 'z'
- An int corresponding to the axis to slice along (0=x, 1=y, 2=z)
- or the axis name itself
- fields : string
- The name of the field(s) to be plotted.
- center : two or three-element vector of sequence floats, 'c', or 'center', or 'max'
- 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. If set to 'max', will be at the point
- of highest density.
- width : tuple or a float.
- Width can have four different formats to support windows with variable
- x and y widths. They are:
-
- ================================== =======================
- format example
- ================================== =======================
- (float, string) (10,'kpc')
- ((float, string), (float, string)) ((10,'kpc'),(15,'kpc'))
- float 0.2
- (float, float) (0.2, 0.3)
- ================================== =======================
-
- For example, (10, 'kpc') requests a plot window that is 10 kiloparsecs
- wide in the x and y directions, ((10,'kpc'),(15,'kpc')) requests a window
- that is 10 kiloparsecs wide along the x axis and 15 kiloparsecs wide along
- the y axis. In the other two examples, code units are assumed, for example
- (0.2, 0.3) requests a plot that has an x width of 0.2 and a y width of 0.3
- in code units. If units are provided the resulting plot axis labels will
- use the supplied units.
- axes_unit : A string
- The name of the unit for the tick labels on the x and y axes.
- Defaults to None, which automatically picks an appropriate unit.
- If axes_unit is '1', 'u', or 'unitary', it will not display the
- units, and only show the axes name.
- origin : string or length 1, 2, or 3 sequence of strings
- The location of the origin of the plot coordinate system. This is
- represented by '-' separated string or a tuple of strings. In the
- first index the y-location is given by 'lower', 'upper', or 'center'.
- The second index is the x-location, given as 'left', 'right', or
- 'center'. Finally, the whether the origin is applied in 'domain' space,
- plot 'window' space or 'native' simulation coordinate system is given.
- For example, both 'upper-right-domain' and ['upper', 'right', 'domain']
- both place the origin in the upper right hand corner of domain space.
- If x or y are not given, a value is inffered. For instance, 'left-domain'
- corresponds to the lower-left hand corner of the simulation domain,
- 'center-domain' corresponds to the center of the simulation domain,
- or 'center-window' for the center of the plot window. Further examples:
-
- ================================== ============================
- format example
- ================================== ============================
- '{space}' 'domain'
- '{xloc}-{space}' 'left-window'
- '{yloc}-{space}' 'upper-domain'
- '{yloc}-{xloc}-{space}' 'lower-right-window'
- ('{space}',) ('window',)
- ('{xloc}', '{space}') ('right', 'domain')
- ('{yloc}', '{space}') ('lower', 'window')
- ('{yloc}', '{xloc}', '{space}') ('lower', 'right', 'window')
- ================================== ============================
- fontsize : integer
- The size of the fonts for the axis, colorbar, and tick labels.
- field_parameters : dictionary
- A dictionary of field parameters than can be accessed by derived fields.
-
- Examples
- --------
-
- This will save an image the the file 'sliceplot_Density
-
- >>> pf = load('galaxy0030/galaxy0030')
- >>> p = SlicePlot(pf,2,'Density','c',(20,'kpc'))
- >>> p.save('sliceplot')
-
- """
# this will handle time series data and controllers
ts = self._initialize_dataset(pf)
self.ts = ts
@@ -1252,53 +1252,54 @@
self.set_axes_unit(axes_unit)
class OffAxisSlicePlot(PWViewerMPL):
+ r"""Creates an off axis slice plot from a parameter file
+
+ 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.
+
+ 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
+ axes_unit : A string
+ The name of the unit for the tick labels on the x and y axes.
+ Defaults to None, which automatically picks an appropriate unit.
+ If axes_unit is '1', 'u', or 'unitary', it will not display the
+ units, and only show the axes name.
+ 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.
+ fontsize : integer
+ The size of the fonts for the axis, colorbar, and tick labels.
+ field_parameters : dictionary
+ A dictionary of field parameters than can be accessed by derived fields.
+ """
+
_plot_type = 'OffAxisSlice'
_frb_generator = ObliqueFixedResolutionBuffer
def __init__(self, pf, normal, fields, center='c', width=None,
axes_unit=None, north_vector=None, fontsize=15,
field_parameters=None):
- r"""Creates an off axis slice plot from a parameter file
-
- 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.
-
- 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
- axes_unit : A string
- The name of the unit for the tick labels on the x and y axes.
- Defaults to None, which automatically picks an appropriate unit.
- If axes_unit is '1', 'u', or 'unitary', it will not display the
- units, and only show the axes name.
- 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.
- fontsize : integer
- The size of the fonts for the axis, colorbar, and tick labels.
- field_parameters : dictionary
- A dictionary of field parameters than can be accessed by derived fields.
- """
(bounds, center_rot, units) = GetObliqueWindowParameters(normal,center,width,pf)
if axes_unit is None and units != ('1', '1'):
axes_unit = units
@@ -1333,6 +1334,52 @@
self.north_vector = north_vector
class OffAxisProjectionPlot(PWViewerMPL):
+ r"""Creates an off axis projection plot from a parameter file
+
+ Given a pf object, a normal vector 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.
+ 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
+ depth : A tuple or a float
+ A tuple containing the depth to project thourhg and the string
+ key of the unit: (width, 'unit'). If set to a float, code units
+ are assumed
+ weight_field : string
+ The name of the weighting field. Set to None for no weight.
+ max_level: int
+ The maximum level to project to.
+ axes_unit : A string
+ The name of the unit for the tick labels on the x and y axes.
+ Defaults to None, which automatically picks an appropriate unit.
+ If axes_unit is '1', 'u', or 'unitary', it will not display the
+ units, and only show the axes name.
+ 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.
+
+ """
_plot_type = 'OffAxisProjection'
_frb_generator = OffAxisProjectionFixedResolutionBuffer
@@ -1340,52 +1387,6 @@
depth=(1, '1'), axes_unit=None, weight_field=None,
max_level=None, north_vector=None, volume=None, no_ghost=False,
le=None, re=None, interpolated=False, fontsize=15):
- r"""Creates an off axis projection plot from a parameter file
-
- Given a pf object, a normal vector 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.
- 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
- depth : A tuple or a float
- A tuple containing the depth to project thourhg and the string
- key of the unit: (width, 'unit'). If set to a float, code units
- are assumed
- weight_field : string
- The name of the weighting field. Set to None for no weight.
- max_level: int
- The maximum level to project to.
- axes_unit : A string
- The name of the unit for the tick labels on the x and y axes.
- Defaults to None, which automatically picks an appropriate unit.
- If axes_unit is '1', 'u', or 'unitary', it will not display the
- units, and only show the axes name.
- 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, units) = GetObliqueWindowParameters(normal,center,width,pf,depth=depth)
if axes_unit is None and units != ('1', '1', '1'):
axes_unit = units[:2]
https://bitbucket.org/yt_analysis/yt/commits/b694f47a5a6d/
changeset: b694f47a5a6d
branch: yt
user: MatthewTurk
date: 2013-02-15 18:23:50
summary: Moving docstrings from __init__ to top-level in data_containers.py
affected #: 1 file
diff -r 94982595184977955dfbbb50c0210ac4e8cfb3db -r b694f47a5a6d69e6f1e0e1b87393f82c3381da8c yt/data_objects/data_containers.py
--- a/yt/data_objects/data_containers.py
+++ b/yt/data_objects/data_containers.py
@@ -532,42 +532,42 @@
self[field] = self[field][self._sortkey]
class AMROrthoRayBase(AMR1DData):
+ """
+ This is an orthogonal ray cast through the entire domain, at a specific
+ coordinate.
+
+ This object is typically accessed through the `ortho_ray` object that
+ hangs off of hierarchy objects. The resulting arrays have their
+ dimensionality reduced to one, and an ordered list of points at an
+ (x,y) tuple along `axis` are available.
+
+ Parameters
+ ----------
+ axis : int
+ The axis along which to cast the ray. Can be 0, 1, or 2 for x, y, z.
+ coords : tuple of floats
+ The (plane_x, plane_y) coordinates at which to cast the ray. Note
+ that this is in the plane coordinates: so if you are casting along
+ x, this will be (y,z). If you are casting along y, this will be
+ (x,z). If you are casting along z, this will be (x,y).
+ fields : list of strings, optional
+ If you want the object to pre-retrieve a set of fields, supply them
+ here. This is not necessary.
+ kwargs : dict of items
+ Any additional values are passed as field parameters that can be
+ accessed by generated fields.
+
+ Examples
+ --------
+
+ >>> pf = load("RedshiftOutput0005")
+ >>> oray = pf.h.ortho_ray(0, (0.2, 0.74))
+ >>> print oray["Density"]
+ """
_key_fields = ['x','y','z','dx','dy','dz']
_type_name = "ortho_ray"
_con_args = ('axis', 'coords')
def __init__(self, axis, coords, fields=None, pf=None, **kwargs):
- """
- This is an orthogonal ray cast through the entire domain, at a specific
- coordinate.
-
- This object is typically accessed through the `ortho_ray` object that
- hangs off of hierarchy objects. The resulting arrays have their
- dimensionality reduced to one, and an ordered list of points at an
- (x,y) tuple along `axis` are available.
-
- Parameters
- ----------
- axis : int
- The axis along which to cast the ray. Can be 0, 1, or 2 for x, y, z.
- coords : tuple of floats
- The (plane_x, plane_y) coordinates at which to cast the ray. Note
- that this is in the plane coordinates: so if you are casting along
- x, this will be (y,z). If you are casting along y, this will be
- (x,z). If you are casting along z, this will be (x,y).
- fields : list of strings, optional
- If you want the object to pre-retrieve a set of fields, supply them
- here. This is not necessary.
- kwargs : dict of items
- Any additional values are passed as field parameters that can be
- accessed by generated fields.
-
- Examples
- --------
-
- >>> pf = load("RedshiftOutput0005")
- >>> oray = pf.h.ortho_ray(0, (0.2, 0.74))
- >>> print oray["Density"]
- """
AMR1DData.__init__(self, pf, fields, **kwargs)
self.axis = axis
self.px_ax = x_dict[self.axis]
@@ -613,41 +613,41 @@
return gf[np.where(grid.child_mask[sl])]
class AMRRayBase(AMR1DData):
+ """
+ This is an arbitrarily-aligned ray cast through the entire domain, at a
+ specific coordinate.
+
+ This object is typically accessed through the `ray` object that hangs
+ off of hierarchy objects. The resulting arrays have their
+ dimensionality reduced to one, and an ordered list of points at an
+ (x,y) tuple along `axis` are available, as is the `t` field, which
+ corresponds to a unitless measurement along the ray from start to
+ end.
+
+ Parameters
+ ----------
+ start_point : array-like set of 3 floats
+ The place where the ray starts.
+ end_point : array-like set of 3 floats
+ The place where the ray ends.
+ fields : list of strings, optional
+ If you want the object to pre-retrieve a set of fields, supply them
+ here. This is not necessary.
+ kwargs : dict of items
+ Any additional values are passed as field parameters that can be
+ accessed by generated fields.
+
+ Examples
+ --------
+
+ >>> pf = load("RedshiftOutput0005")
+ >>> ray = pf.h._ray((0.2, 0.74, 0.11), (0.4, 0.91, 0.31))
+ >>> print ray["Density"], ray["t"], ray["dts"]
+ """
_type_name = "ray"
_con_args = ('start_point', 'end_point')
sort_by = 't'
def __init__(self, start_point, end_point, fields=None, pf=None, **kwargs):
- """
- This is an arbitrarily-aligned ray cast through the entire domain, at a
- specific coordinate.
-
- This object is typically accessed through the `ray` object that hangs
- off of hierarchy objects. The resulting arrays have their
- dimensionality reduced to one, and an ordered list of points at an
- (x,y) tuple along `axis` are available, as is the `t` field, which
- corresponds to a unitless measurement along the ray from start to
- end.
-
- Parameters
- ----------
- start_point : array-like set of 3 floats
- The place where the ray starts.
- end_point : array-like set of 3 floats
- The place where the ray ends.
- fields : list of strings, optional
- If you want the object to pre-retrieve a set of fields, supply them
- here. This is not necessary.
- kwargs : dict of items
- Any additional values are passed as field parameters that can be
- accessed by generated fields.
-
- Examples
- --------
-
- >>> pf = load("RedshiftOutput0005")
- >>> ray = pf.h._ray((0.2, 0.74, 0.11), (0.4, 0.91, 0.31))
- >>> print ray["Density"], ray["t"], ray["dts"]
- """
AMR1DData.__init__(self, pf, fields, **kwargs)
self.start_point = np.array(start_point, dtype='float64')
self.end_point = np.array(end_point, dtype='float64')
@@ -708,46 +708,46 @@
return mask
class AMRStreamlineBase(AMR1DData):
+ """
+ This is a streamline, which is a set of points defined as
+ being parallel to some vector field.
+
+ This object is typically accessed through the Streamlines.path
+ function. The resulting arrays have their dimensionality
+ reduced to one, and an ordered list of points at an (x,y)
+ tuple along `axis` are available, as is the `t` field, which
+ corresponds to a unitless measurement along the ray from start
+ to end.
+
+ Parameters
+ ----------
+ positions : array-like
+ List of streamline positions
+ length : float
+ The magnitude of the distance; dts will be divided by this
+ fields : list of strings, optional
+ If you want the object to pre-retrieve a set of fields, supply them
+ here. This is not necessary.
+ pf : Parameter file object
+ Passed in to access the hierarchy
+ kwargs : dict of items
+ Any additional values are passed as field parameters that can be
+ accessed by generated fields.
+
+ Examples
+ --------
+
+ >>> from yt.visualization.api import Streamlines
+ >>> streamlines = Streamlines(pf, [0.5]*3)
+ >>> streamlines.integrate_through_volume()
+ >>> stream = streamlines.path(0)
+ >>> matplotlib.pylab.semilogy(stream['t'], stream['Density'], '-x')
+
+ """
_type_name = "streamline"
_con_args = ('positions')
sort_by = 't'
def __init__(self, positions, length = 1.0, fields=None, pf=None, **kwargs):
- """
- This is a streamline, which is a set of points defined as
- being parallel to some vector field.
-
- This object is typically accessed through the Streamlines.path
- function. The resulting arrays have their dimensionality
- reduced to one, and an ordered list of points at an (x,y)
- tuple along `axis` are available, as is the `t` field, which
- corresponds to a unitless measurement along the ray from start
- to end.
-
- Parameters
- ----------
- positions : array-like
- List of streamline positions
- length : float
- The magnitude of the distance; dts will be divided by this
- fields : list of strings, optional
- If you want the object to pre-retrieve a set of fields, supply them
- here. This is not necessary.
- pf : Parameter file object
- Passed in to access the hierarchy
- kwargs : dict of items
- Any additional values are passed as field parameters that can be
- accessed by generated fields.
-
- Examples
- --------
-
- >>> from yt.visualization.api import Streamlines
- >>> streamlines = Streamlines(pf, [0.5]*3)
- >>> streamlines.integrate_through_volume()
- >>> stream = streamlines.path(0)
- >>> matplotlib.pylab.semilogy(stream['t'], stream['Density'], '-x')
-
- """
AMR1DData.__init__(self, pf, fields, **kwargs)
self.positions = positions
self.dts = np.empty_like(positions[:,0])
@@ -998,50 +998,50 @@
self._store_fields(self.fields, node_name, force)
class AMRSliceBase(AMR2DData):
+ """
+ This is a data object corresponding to a slice through the simulation
+ domain.
+
+ This object is typically accessed through the `slice` object that hangs
+ off of hierarchy objects. AMRSlice is an orthogonal slice through the
+ data, taking all the points at the finest resolution available and then
+ indexing them. It is more appropriately thought of as a slice
+ 'operator' than an object, however, as its field and coordinate can
+ both change.
+
+ Parameters
+ ----------
+ axis : int
+ The axis along which to slice. Can be 0, 1, or 2 for x, y, z.
+ coord : float
+ The coordinate along the axis at which to slice. This is in
+ "domain" coordinates.
+ fields : list of strings, optional
+ If you want the object to pre-retrieve a set of fields, supply them
+ here. This is not necessary.
+ center : array_like, optional
+ The 'center' supplied to fields that use it. Note that this does
+ not have to have `coord` as one value. Strictly optional.
+ node_name: string, optional
+ The node in the .yt file to find or store this slice at. Should
+ probably not be used.
+ kwargs : dict of items
+ Any additional values are passed as field parameters that can be
+ accessed by generated fields.
+
+ Examples
+ --------
+
+ >>> pf = load("RedshiftOutput0005")
+ >>> slice = pf.h.slice(0, 0.25)
+ >>> print slice["Density"]
+ """
_top_node = "/Slices"
_type_name = "slice"
_con_args = ('axis', 'coord')
#@time_execution
def __init__(self, axis, coord, fields = None, center=None, pf=None,
node_name = False, **kwargs):
- """
- This is a data object corresponding to a slice through the simulation
- domain.
-
- This object is typically accessed through the `slice` object that hangs
- off of hierarchy objects. AMRSlice is an orthogonal slice through the
- data, taking all the points at the finest resolution available and then
- indexing them. It is more appropriately thought of as a slice
- 'operator' than an object, however, as its field and coordinate can
- both change.
-
- Parameters
- ----------
- axis : int
- The axis along which to slice. Can be 0, 1, or 2 for x, y, z.
- coord : float
- The coordinate along the axis at which to slice. This is in
- "domain" coordinates.
- fields : list of strings, optional
- If you want the object to pre-retrieve a set of fields, supply them
- here. This is not necessary.
- center : array_like, optional
- The 'center' supplied to fields that use it. Note that this does
- not have to have `coord` as one value. Strictly optional.
- node_name: string, optional
- The node in the .yt file to find or store this slice at. Should
- probably not be used.
- kwargs : dict of items
- Any additional values are passed as field parameters that can be
- accessed by generated fields.
-
- Examples
- --------
-
- >>> pf = load("RedshiftOutput0005")
- >>> slice = pf.h.slice(0, 0.25)
- >>> print slice["Density"]
- """
AMR2DData.__init__(self, axis, fields, pf, **kwargs)
self._set_center(center)
self.coord = coord
@@ -1210,6 +1210,49 @@
return pw
class AMRCuttingPlaneBase(AMR2DData):
+ """
+ This is a data object corresponding to an oblique slice through the
+ simulation domain.
+
+ This object is typically accessed through the `cutting` object
+ that hangs off of hierarchy objects. AMRCuttingPlane is an oblique
+ plane through the data, defined by a normal vector and a coordinate.
+ It attempts to guess an 'up' vector, which cannot be overridden, and
+ then it pixelizes the appropriate data onto the plane without
+ interpolation.
+
+ Parameters
+ ----------
+ normal : array_like
+ The vector that defines the desired plane. For instance, the
+ angular momentum of a sphere.
+ center : array_like, optional
+ The center of the cutting plane.
+ fields : list of strings, optional
+ If you want the object to pre-retrieve a set of fields, supply them
+ here. This is not necessary.
+ node_name: string, optional
+ The node in the .yt file to find or store this slice at. Should
+ probably not be used.
+ kwargs : dict of items
+ Any additional values are passed as field parameters that can be
+ accessed by generated fields.
+
+ Notes
+ -----
+
+ This data object in particular can be somewhat expensive to create.
+ It's also important to note that unlike the other 2D data objects, this
+ oject provides px, py, pz, as some cells may have a height from the
+ plane.
+
+ Examples
+ --------
+
+ >>> pf = load("RedshiftOutput0005")
+ >>> cp = pf.h.cutting([0.1, 0.2, -0.9], [0.5, 0.42, 0.6])
+ >>> print cp["Density"]
+ """
_plane = None
_top_node = "/CuttingPlanes"
_key_fields = AMR2DData._key_fields + ['pz','pdz']
@@ -1217,49 +1260,6 @@
_con_args = ('normal', 'center')
def __init__(self, normal, center, fields = None, node_name = None,
north_vector = None, **kwargs):
- """
- This is a data object corresponding to an oblique slice through the
- simulation domain.
-
- This object is typically accessed through the `cutting` object
- that hangs off of hierarchy objects. AMRCuttingPlane is an oblique
- plane through the data, defined by a normal vector and a coordinate.
- It attempts to guess an 'up' vector, which cannot be overridden, and
- then it pixelizes the appropriate data onto the plane without
- interpolation.
-
- Parameters
- ----------
- normal : array_like
- The vector that defines the desired plane. For instance, the
- angular momentum of a sphere.
- center : array_like, optional
- The center of the cutting plane.
- fields : list of strings, optional
- If you want the object to pre-retrieve a set of fields, supply them
- here. This is not necessary.
- node_name: string, optional
- The node in the .yt file to find or store this slice at. Should
- probably not be used.
- kwargs : dict of items
- Any additional values are passed as field parameters that can be
- accessed by generated fields.
-
- Notes
- -----
-
- This data object in particular can be somewhat expensive to create.
- It's also important to note that unlike the other 2D data objects, this
- oject provides px, py, pz, as some cells may have a height from the
- plane.
-
- Examples
- --------
-
- >>> pf = load("RedshiftOutput0005")
- >>> cp = pf.h.cutting([0.1, 0.2, -0.9], [0.5, 0.42, 0.6])
- >>> print cp["Density"]
- """
AMR2DData.__init__(self, 4, fields, **kwargs)
self._set_center(center)
self.set_field_parameter('center',center)
@@ -1452,6 +1452,11 @@
class AMRFixedResCuttingPlaneBase(AMR2DData):
"""
+ The fixed resolution Cutting Plane slices at an oblique angle,
+ where we use the *normal* vector at the *center* to define the
+ viewing plane. The plane is *width* units wide. The 'up'
+ direction is guessed at automatically if not given.
+
AMRFixedResCuttingPlaneBase is an oblique plane through the data,
defined by a normal vector and a coordinate. It trilinearly
interpolates the data to a fixed resolution slice. It differs from
@@ -1463,12 +1468,6 @@
_con_args = ('normal', 'center', 'width', 'dims')
def __init__(self, normal, center, width, dims, fields = None,
node_name = None, **kwargs):
- """
- The fixed resolution Cutting Plane slices at an oblique angle,
- where we use the *normal* vector at the *center* to define the
- viewing plane. The plane is *width* units wide. The 'up'
- direction is guessed at automatically if not given.
- """
#
# Taken from Cutting Plane
#
@@ -1654,6 +1653,68 @@
(self._top_node, cen_name, L_name)
class AMRQuadTreeProjBase(AMR2DData):
+ """
+ This is a data object corresponding to a line integral through the
+ simulation domain.
+
+ This object is typically accessed through the `proj` object that
+ hangs off of hierarchy objects. AMRQuadProj is a projection of a
+ `field` along an `axis`. The field can have an associated
+ `weight_field`, in which case the values are multiplied by a weight
+ before being summed, and then divided by the sum of that weight; the
+ two fundamental modes of operating are direct line integral (no
+ weighting) and average along a line of sight (weighting.) What makes
+ `proj` different from the standard projection mechanism is that it
+ utilizes a quadtree data structure, rather than the old mechanism for
+ projections. It will not run in parallel, but serial runs should be
+ substantially faster. Note also that lines of sight are integrated at
+ every projected finest-level cell.
+
+ Parameters
+ ----------
+ axis : int
+ The axis along which to slice. Can be 0, 1, or 2 for x, y, z.
+ field : string
+ This is the field which will be "projected" along the axis. If
+ multiple are specified (in a list) they will all be projected in
+ the first pass.
+ weight_field : string
+ If supplied, the field being projected will be multiplied by this
+ weight value before being integrated, and at the conclusion of the
+ projection the resultant values will be divided by the projected
+ `weight_field`.
+ max_level : int
+ If supplied, only cells at or below this level will be projected.
+ center : array_like, optional
+ The 'center' supplied to fields that use it. Note that this does
+ not have to have `coord` as one value. Strictly optional.
+ source : `yt.data_objects.api.AMRData`, optional
+ If specified, this will be the data source used for selecting
+ regions to project.
+ node_name: string, optional
+ The node in the .yt file to find or store this slice at. Should
+ probably not be used.
+ field_cuts : list of strings, optional
+ If supplied, each of these strings will be evaluated to cut a
+ region of a grid out. They can be of the form "grid['Temperature']
+ > 100" for instance.
+ preload_style : string
+ Either 'level', 'all', or None (default). Defines how grids are
+ loaded -- either level by level, or all at once. Only applicable
+ during parallel runs.
+ serialize : bool, optional
+ Whether we should store this projection in the .yt file or not.
+ kwargs : dict of items
+ Any additional values are passed as field parameters that can be
+ accessed by generated fields.
+
+ Examples
+ --------
+
+ >>> pf = load("RedshiftOutput0005")
+ >>> qproj = pf.h.quad_proj(0, "Density")
+ >>> print qproj["Density"]
+ """
_top_node = "/Projections"
_key_fields = AMR2DData._key_fields + ['weight_field']
_type_name = "proj"
@@ -1663,68 +1724,6 @@
source=None, node_name = None, field_cuts = None,
preload_style=None, serialize=True,
style = "integrate", **kwargs):
- """
- This is a data object corresponding to a line integral through the
- simulation domain.
-
- This object is typically accessed through the `proj` object that
- hangs off of hierarchy objects. AMRQuadProj is a projection of a
- `field` along an `axis`. The field can have an associated
- `weight_field`, in which case the values are multiplied by a weight
- before being summed, and then divided by the sum of that weight; the
- two fundamental modes of operating are direct line integral (no
- weighting) and average along a line of sight (weighting.) What makes
- `proj` different from the standard projection mechanism is that it
- utilizes a quadtree data structure, rather than the old mechanism for
- projections. It will not run in parallel, but serial runs should be
- substantially faster. Note also that lines of sight are integrated at
- every projected finest-level cell.
-
- Parameters
- ----------
- axis : int
- The axis along which to slice. Can be 0, 1, or 2 for x, y, z.
- field : string
- This is the field which will be "projected" along the axis. If
- multiple are specified (in a list) they will all be projected in
- the first pass.
- weight_field : string
- If supplied, the field being projected will be multiplied by this
- weight value before being integrated, and at the conclusion of the
- projection the resultant values will be divided by the projected
- `weight_field`.
- max_level : int
- If supplied, only cells at or below this level will be projected.
- center : array_like, optional
- The 'center' supplied to fields that use it. Note that this does
- not have to have `coord` as one value. Strictly optional.
- source : `yt.data_objects.api.AMRData`, optional
- If specified, this will be the data source used for selecting
- regions to project.
- node_name: string, optional
- The node in the .yt file to find or store this slice at. Should
- probably not be used.
- field_cuts : list of strings, optional
- If supplied, each of these strings will be evaluated to cut a
- region of a grid out. They can be of the form "grid['Temperature']
- > 100" for instance.
- preload_style : string
- Either 'level', 'all', or None (default). Defines how grids are
- loaded -- either level by level, or all at once. Only applicable
- during parallel runs.
- serialize : bool, optional
- Whether we should store this projection in the .yt file or not.
- kwargs : dict of items
- Any additional values are passed as field parameters that can be
- accessed by generated fields.
-
- Examples
- --------
-
- >>> pf = load("RedshiftOutput0005")
- >>> qproj = pf.h.quad_proj(0, "Density")
- >>> print qproj["Density"]
- """
AMR2DData.__init__(self, axis, field, pf, node_name = None, **kwargs)
self.proj_style = style
if style == "mip":
@@ -2002,6 +2001,64 @@
class AMRProjBase(AMR2DData):
+ """
+ This is a data object corresponding to a line integral through the
+ simulation domain.
+
+ This object is typically accessed through the `proj` object that
+ hangs off of hierarchy objects. AMRProj is a projection of a `field`
+ along an `axis`. The field can have an associated `weight_field`, in
+ which case the values are multiplied by a weight before being summed,
+ and then divided by the sum of that weight; the two fundamental modes
+ of operating are direct line integral (no weighting) and average along
+ a line of sight (weighting.) Note also that lines of sight are
+ integrated at every projected finest-level cell
+
+ Parameters
+ ----------
+ axis : int
+ The axis along which to slice. Can be 0, 1, or 2 for x, y, z.
+ field : string
+ This is the field which will be "projected" along the axis. If
+ multiple are specified (in a list) they will all be projected in
+ the first pass.
+ weight_field : string
+ If supplied, the field being projected will be multiplied by this
+ weight value before being integrated, and at the conclusion of the
+ projection the resultant values will be divided by the projected
+ `weight_field`.
+ max_level : int
+ If supplied, only cells at or below this level will be projected.
+ center : array_like, optional
+ The 'center' supplied to fields that use it. Note that this does
+ not have to have `coord` as one value. Strictly optional.
+ source : `yt.data_objects.api.AMRData`, optional
+ If specified, this will be the data source used for selecting
+ regions to project.
+ node_name: string, optional
+ The node in the .yt file to find or store this slice at. Should
+ probably not be used.
+ field_cuts : list of strings, optional
+ If supplied, each of these strings will be evaluated to cut a
+ region of a grid out. They can be of the form "grid['Temperature']
+ > 100" for instance.
+ preload_style : string
+ Either 'level' (default) or 'all'. Defines how grids are loaded --
+ either level by level, or all at once. Only applicable during
+ parallel runs.
+ serialize : bool, optional
+ Whether we should store this projection in the .yt file or not.
+ kwargs : dict of items
+ Any additional values are passed as field parameters that can be
+ accessed by generated fields.
+
+ Examples
+ --------
+
+ >>> pf = load("RedshiftOutput0005")
+ >>> proj = pf.h.proj(0, "Density")
+ >>> print proj["Density"]
+ """
_top_node = "/Projections"
_key_fields = AMR2DData._key_fields + ['weight_field']
_type_name = "overlap_proj"
@@ -2010,64 +2067,6 @@
max_level = None, center = None, pf = None,
source=None, node_name = None, field_cuts = None,
preload_style='level', serialize=True,**kwargs):
- """
- This is a data object corresponding to a line integral through the
- simulation domain.
-
- This object is typically accessed through the `proj` object that
- hangs off of hierarchy objects. AMRProj is a projection of a `field`
- along an `axis`. The field can have an associated `weight_field`, in
- which case the values are multiplied by a weight before being summed,
- and then divided by the sum of that weight; the two fundamental modes
- of operating are direct line integral (no weighting) and average along
- a line of sight (weighting.) Note also that lines of sight are
- integrated at every projected finest-level cell
-
- Parameters
- ----------
- axis : int
- The axis along which to slice. Can be 0, 1, or 2 for x, y, z.
- field : string
- This is the field which will be "projected" along the axis. If
- multiple are specified (in a list) they will all be projected in
- the first pass.
- weight_field : string
- If supplied, the field being projected will be multiplied by this
- weight value before being integrated, and at the conclusion of the
- projection the resultant values will be divided by the projected
- `weight_field`.
- max_level : int
- If supplied, only cells at or below this level will be projected.
- center : array_like, optional
- The 'center' supplied to fields that use it. Note that this does
- not have to have `coord` as one value. Strictly optional.
- source : `yt.data_objects.api.AMRData`, optional
- If specified, this will be the data source used for selecting
- regions to project.
- node_name: string, optional
- The node in the .yt file to find or store this slice at. Should
- probably not be used.
- field_cuts : list of strings, optional
- If supplied, each of these strings will be evaluated to cut a
- region of a grid out. They can be of the form "grid['Temperature']
- > 100" for instance.
- preload_style : string
- Either 'level' (default) or 'all'. Defines how grids are loaded --
- either level by level, or all at once. Only applicable during
- parallel runs.
- serialize : bool, optional
- Whether we should store this projection in the .yt file or not.
- kwargs : dict of items
- Any additional values are passed as field parameters that can be
- accessed by generated fields.
-
- Examples
- --------
-
- >>> pf = load("RedshiftOutput0005")
- >>> proj = pf.h.proj(0, "Density")
- >>> print proj["Density"]
- """
AMR2DData.__init__(self, axis, field, pf, node_name = None, **kwargs)
self.weight_field = weight_field
self._field_cuts = field_cuts
@@ -2393,51 +2392,51 @@
(self._top_node, self.axis)
class AMRFixedResProjectionBase(AMR2DData):
+ """
+ This is a data structure that projects grids, but only to fixed (rather
+ than variable) resolution.
+
+ This object is typically accessed through the `fixed_res_proj` object
+ that hangs off of hierarchy objects. This projection mechanism is much
+ simpler than the standard, variable-resolution projection. Rather than
+ attempt to identify the highest-resolution element along every possible
+ line of sight, this data structure simply deposits every cell into one
+ of a fixed number of bins. It is suitable for inline analysis, and it
+ should scale nicely.
+
+ Parameters
+ ----------
+ axis : int
+ The axis along which to project. Can be 0, 1, or 2 for x, y, z.
+ level : int
+ This is the level to which values will be projected. Note that
+ the pixel size in the projection will be identical to a cell at
+ this level of refinement in the simulation.
+ left_edge : array of ints
+ The left edge, in level-local integer coordinates, of the
+ projection
+ dims : array of ints
+ The dimensions of the projection (which, in concert with the
+ left_edge, serves to define its right edge.)
+ fields : list of strings, optional
+ If you want the object to pre-retrieve a set of fields, supply them
+ here. This is not necessary.
+ kwargs : dict of items
+ Any additional values are passed as field parameters that can be
+ accessed by generated fields.
+
+ Examples
+ --------
+
+ >>> pf = load("RedshiftOutput0005")
+ >>> fproj = pf.h.fixed_res_proj(1, [0, 0, 0], [64, 64, 64], ["Density"])
+ >>> print fproj["Density"]
+ """
_top_node = "/Projections"
_type_name = "fixed_res_proj"
_con_args = ('axis', 'field', 'weight_field')
def __init__(self, axis, level, left_edge, dims,
fields = None, pf=None, **kwargs):
- """
- This is a data structure that projects grids, but only to fixed (rather
- than variable) resolution.
-
- This object is typically accessed through the `fixed_res_proj` object
- that hangs off of hierarchy objects. This projection mechanism is much
- simpler than the standard, variable-resolution projection. Rather than
- attempt to identify the highest-resolution element along every possible
- line of sight, this data structure simply deposits every cell into one
- of a fixed number of bins. It is suitable for inline analysis, and it
- should scale nicely.
-
- Parameters
- ----------
- axis : int
- The axis along which to project. Can be 0, 1, or 2 for x, y, z.
- level : int
- This is the level to which values will be projected. Note that
- the pixel size in the projection will be identical to a cell at
- this level of refinement in the simulation.
- left_edge : array of ints
- The left edge, in level-local integer coordinates, of the
- projection
- dims : array of ints
- The dimensions of the projection (which, in concert with the
- left_edge, serves to define its right edge.)
- fields : list of strings, optional
- If you want the object to pre-retrieve a set of fields, supply them
- here. This is not necessary.
- kwargs : dict of items
- Any additional values are passed as field parameters that can be
- accessed by generated fields.
-
- Examples
- --------
-
- >>> pf = load("RedshiftOutput0005")
- >>> fproj = pf.h.fixed_res_proj(1, [0, 0, 0], [64, 64, 64], ["Density"])
- >>> print fproj["Density"]
- """
AMR2DData.__init__(self, axis, fields, pf, **kwargs)
self.left_edge = np.array(left_edge)
self.level = level
@@ -2969,37 +2968,34 @@
class ExtractedRegionBase(AMR3DData):
"""
- ExtractedRegions are arbitrarily defined containers of data, useful
- for things like selection along a baryon field.
+ An arbitrarily defined data container that allows for selection
+ of all data meeting certain criteria.
+
+ In order to create an arbitrarily selected set of data, the
+ ExtractedRegion takes a `base_region` and a set of `indices`
+ and creates a region within the `base_region` consisting of
+ all data indexed by the `indices`. Note that `indices` must be
+ precomputed. This does not work well for parallelized
+ operations.
+
+ Parameters
+ ----------
+ base_region : yt data source
+ A previously selected data source.
+ indices : array_like
+ An array of indices
+
+ Other Parameters
+ ----------------
+ force_refresh : bool
+ Force a refresh of the data. Defaults to True.
+
+ Examples
+ --------
"""
_type_name = "extracted_region"
_con_args = ('_base_region', '_indices')
def __init__(self, base_region, indices, force_refresh=True, **kwargs):
- """An arbitrarily defined data container that allows for selection
- of all data meeting certain criteria.
-
- In order to create an arbitrarily selected set of data, the
- ExtractedRegion takes a `base_region` and a set of `indices`
- and creates a region within the `base_region` consisting of
- all data indexed by the `indices`. Note that `indices` must be
- precomputed. This does not work well for parallelized
- operations.
-
- Parameters
- ----------
- base_region : yt data source
- A previously selected data source.
- indices : array_like
- An array of indices
-
- Other Parameters
- ----------------
- force_refresh : bool
- Force a refresh of the data. Defaults to True.
-
- Examples
- --------
- """
cen = kwargs.pop("center", None)
if cen is None: cen = base_region.get_field_parameter("center")
AMR3DData.__init__(self, center=cen,
@@ -3140,17 +3136,14 @@
class AMRCylinderBase(AMR3DData):
"""
- We can define a cylinder (or disk) to act as a data object.
+ By providing a *center*, a *normal*, a *radius* and a *height* we
+ can define a cylinder of any proportion. Only cells whose centers are
+ within the cylinder will be selected.
"""
_type_name = "disk"
_con_args = ('center', '_norm_vec', '_radius', '_height')
def __init__(self, center, normal, radius, height, fields=None,
pf=None, **kwargs):
- """
- By providing a *center*, a *normal*, a *radius* and a *height* we
- can define a cylinder of any proportion. Only cells whose centers are
- within the cylinder will be selected.
- """
AMR3DData.__init__(self, center, fields, pf, **kwargs)
self._norm_vec = np.array(normal)/np.sqrt(np.dot(normal,normal))
self.set_field_parameter("normal", self._norm_vec)
@@ -3202,18 +3195,18 @@
return cm
class AMRInclinedBox(AMR3DData):
+ """
+ A rectangular prism with arbitrary alignment to the computational
+ domain. *origin* is the origin of the box, while *box_vectors* is an
+ array of ordering [ax, ijk] that describes the three vectors that
+ describe the box. No checks are done to ensure that the box satisfies
+ a right-hand rule, but if it doesn't, behavior is undefined.
+ """
_type_name="inclined_box"
_con_args = ('origin','box_vectors')
def __init__(self, origin, box_vectors, fields=None,
pf=None, **kwargs):
- """
- A rectangular prism with arbitrary alignment to the computational
- domain. *origin* is the origin of the box, while *box_vectors* is an
- array of ordering [ax, ijk] that describes the three vectors that
- describe the box. No checks are done to ensure that the box satisfies
- a right-hand rule, but if it doesn't, behavior is undefined.
- """
self.origin = np.array(origin)
self.box_vectors = np.array(box_vectors, dtype='float64')
self.box_lengths = (self.box_vectors**2.0).sum(axis=1)**0.5
@@ -3269,31 +3262,28 @@
class AMRRegionBase(AMR3DData):
- """
- AMRRegions are rectangular prisms of data.
+ """A 3D region of data with an arbitrary center.
+
+ Takes an array of three *left_edge* coordinates, three
+ *right_edge* coordinates, and a *center* that can be anywhere
+ in the domain. If the selected region extends past the edges
+ of the domain, no data will be found there, though the
+ object's `left_edge` or `right_edge` are not modified.
+
+ Parameters
+ ----------
+ center : array_like
+ The center of the region
+ left_edge : array_like
+ The left edge of the region
+ right_edge : array_like
+ The right edge of the region
"""
_type_name = "region"
_con_args = ('center', 'left_edge', 'right_edge')
_dx_pad = 0.5
def __init__(self, center, left_edge, right_edge, fields = None,
pf = None, **kwargs):
- """A 3D region of data with an arbitrary center.
-
- Takes an array of three *left_edge* coordinates, three
- *right_edge* coordinates, and a *center* that can be anywhere
- in the domain. If the selected region extends past the edges
- of the domain, no data will be found there, though the
- object's `left_edge` or `right_edge` are not modified.
-
- Parameters
- ----------
- center : array_like
- The center of the region
- left_edge : array_like
- The left edge of the region
- right_edge : array_like
- The right edge of the region
- """
AMR3DData.__init__(self, center, fields, pf, **kwargs)
self.left_edge = left_edge
self.right_edge = right_edge
@@ -3405,26 +3395,19 @@
_dx_pad = 0.0
def __init__(self, center, left_edge, right_edge, fields = None,
pf = None, **kwargs):
- """same as periodic region, but does not include cells unless
- the selected region encompasses their centers.
-
- """
AMRPeriodicRegionBase.__init__(self, center, left_edge, right_edge,
fields = None, pf = None, **kwargs)
class AMRGridCollectionBase(AMR3DData):
"""
- An arbitrary selection of grids, within which we accept all points.
+ By selecting an arbitrary *grid_list*, we can act on those grids.
+ Child cells are not returned.
"""
_type_name = "grid_collection"
_con_args = ("center", "grid_list")
def __init__(self, center, grid_list, fields = None,
pf = None, **kwargs):
- """
- By selecting an arbitrary *grid_list*, we can act on those grids.
- Child cells are not returned.
- """
AMR3DData.__init__(self, center, fields, pf, **kwargs)
self._grids = np.array(grid_list)
self.grid_list = self._grids
@@ -3447,15 +3430,15 @@
return pointI
class AMRMaxLevelCollection(AMR3DData):
+ """
+ By selecting an arbitrary *max_level*, we can act on those grids.
+ Child cells are masked when the level of the grid is below the max
+ level.
+ """
_type_name = "grid_collection_max_level"
_con_args = ("center", "max_level")
def __init__(self, center, max_level, fields = None,
pf = None, **kwargs):
- """
- By selecting an arbitrary *max_level*, we can act on those grids.
- Child cells are masked when the level of the grid is below the max
- level.
- """
AMR3DData.__init__(self, center, fields, pf, **kwargs)
self.max_level = max_level
self._refresh_data()
@@ -3482,26 +3465,24 @@
class AMRSphereBase(AMR3DData):
"""
- A sphere of points
+ A sphere f points defined by a *center* and a *radius*.
+
+ Parameters
+ ----------
+ center : array_like
+ The center of the sphere.
+ radius : float
+ The radius of the sphere.
+
+ Examples
+ --------
+ >>> pf = load("DD0010/moving7_0010")
+ >>> c = [0.5,0.5,0.5]
+ >>> sphere = pf.h.sphere(c,1.*pf['kpc'])
"""
_type_name = "sphere"
_con_args = ('center', 'radius')
def __init__(self, center, radius, fields = None, pf = None, **kwargs):
- """A sphere f points defined by a *center* and a *radius*.
-
- Parameters
- ----------
- center : array_like
- The center of the sphere.
- radius : float
- The radius of the sphere.
-
- Examples
- --------
- >>> pf = load("DD0010/moving7_0010")
- >>> c = [0.5,0.5,0.5]
- >>> sphere = pf.h.sphere(c,1.*pf['kpc'])
- """
AMR3DData.__init__(self, center, fields, pf, **kwargs)
# Unpack the radius, if necessary
radius = fix_length(radius, self.pf)
@@ -3539,42 +3520,38 @@
class AMREllipsoidBase(AMR3DData):
"""
- We can define an ellipsoid to act as a data object.
+ By providing a *center*,*A*,*B*,*C*,*e0*,*tilt* we
+ can define a ellipsoid of any proportion. Only cells whose
+ centers are within the ellipsoid will be selected.
+
+ Parameters
+ ----------
+ center : array_like
+ The center of the ellipsoid.
+ A : float
+ The magnitude of the largest semi-major axis of the ellipsoid.
+ B : float
+ The magnitude of the medium semi-major axis of the ellipsoid.
+ C : float
+ The magnitude of the smallest semi-major axis of the ellipsoid.
+ e0 : array_like (automatically normalized)
+ the direction of the largest semi-major axis of the ellipsoid
+ tilt : float
+ After the rotation about the z-axis to allign e0 to x in the x-y
+ plane, and then rotating about the y-axis to align e0 completely
+ to the x-axis, tilt is the angle in radians remaining to
+ rotate about the x-axis to align both e1 to the y-axis and e2 to
+ the z-axis.
+ Examples
+ --------
+ >>> pf = load("DD####/DD####")
+ >>> c = [0.5,0.5,0.5]
+ >>> ell = pf.h.ellipsoid(c, 0.1, 0.1, 0.1, np.array([0.1, 0.1, 0.1]), 0.2)
"""
_type_name = "ellipsoid"
_con_args = ('center', '_A', '_B', '_C', '_e0', '_tilt')
def __init__(self, center, A, B, C, e0, tilt, fields=None,
pf=None, **kwargs):
- """
- By providing a *center*,*A*,*B*,*C*,*e0*,*tilt* we
- can define a ellipsoid of any proportion. Only cells whose
- centers are within the ellipsoid will be selected.
-
- Parameters
- ----------
- center : array_like
- The center of the ellipsoid.
- A : float
- The magnitude of the largest semi-major axis of the ellipsoid.
- B : float
- The magnitude of the medium semi-major axis of the ellipsoid.
- C : float
- The magnitude of the smallest semi-major axis of the ellipsoid.
- e0 : array_like (automatically normalized)
- the direction of the largest semi-major axis of the ellipsoid
- tilt : float
- After the rotation about the z-axis to allign e0 to x in the x-y
- plane, and then rotating about the y-axis to align e0 completely
- to the x-axis, tilt is the angle in radians remaining to
- rotate about the x-axis to align both e1 to the y-axis and e2 to
- the z-axis.
- Examples
- --------
- >>> pf = load("DD####/DD####")
- >>> c = [0.5,0.5,0.5]
- >>> ell = pf.h.ellipsoid(c, 0.1, 0.1, 0.1, np.array([0.1, 0.1, 0.1]), 0.2)
- """
-
AMR3DData.__init__(self, np.array(center), fields, pf, **kwargs)
# make sure the magnitudes of semi-major axes are in order
if A<B or B<C:
@@ -3707,31 +3684,31 @@
return cm
class AMRCoveringGridBase(AMR3DData):
+ """A 3D region with all data extracted to a single, specified
+ resolution.
+
+ Parameters
+ ----------
+ level : int
+ The resolution level data is uniformly gridded at
+ left_edge : array_like
+ The left edge of the region to be extracted
+ dims : array_like
+ Number of cells along each axis of resulting covering_grid
+ fields : array_like, optional
+ A list of fields that you'd like pre-generated for your object
+
+ Examples
+ --------
+ cube = pf.h.covering_grid(2, left_edge=[0.0, 0.0, 0.0], \
+ right_edge=[1.0, 1.0, 1.0],
+ dims=[128, 128, 128])
+ """
_spatial = True
_type_name = "covering_grid"
_con_args = ('level', 'left_edge', 'ActiveDimensions')
def __init__(self, level, left_edge, dims, fields = None,
pf = None, num_ghost_zones = 0, use_pbar = True, **kwargs):
- """A 3D region with all data extracted to a single, specified
- resolution.
-
- Parameters
- ----------
- level : int
- The resolution level data is uniformly gridded at
- left_edge : array_like
- The left edge of the region to be extracted
- dims : array_like
- Number of cells along each axis of resulting covering_grid
- fields : array_like, optional
- A list of fields that you'd like pre-generated for your object
-
- Examples
- --------
- cube = pf.h.covering_grid(2, left_edge=[0.0, 0.0, 0.0], \
- right_edge=[1.0, 1.0, 1.0],
- dims=[128, 128, 128])
- """
AMR3DData.__init__(self, center=kwargs.pop("center", None),
fields=fields, pf=pf, **kwargs)
self.left_edge = np.array(left_edge)
@@ -3870,34 +3847,33 @@
return self.right_edge
class AMRSmoothedCoveringGridBase(AMRCoveringGridBase):
+ """A 3D region with all data extracted and interpolated to a
+ single, specified resolution. (Identical to covering_grid,
+ except that it interpolates.)
+
+ Smoothed covering grids start at level 0, interpolating to
+ fill the region to level 1, replacing any cells actually
+ covered by level 1 data, and then recursively repeating this
+ process until it reaches the specified `level`.
+
+ Parameters
+ ----------
+ level : int
+ The resolution level data is uniformly gridded at
+ left_edge : array_like
+ The left edge of the region to be extracted
+ dims : array_like
+ Number of cells along each axis of resulting covering_grid.
+ fields : array_like, optional
+ A list of fields that you'd like pre-generated for your object
+
+ Example
+ -------
+ cube = pf.h.smoothed_covering_grid(2, left_edge=[0.0, 0.0, 0.0], \
+ dims=[128, 128, 128])
+ """
_type_name = "smoothed_covering_grid"
- @wraps(AMRCoveringGridBase.__init__)
def __init__(self, *args, **kwargs):
- """A 3D region with all data extracted and interpolated to a
- single, specified resolution. (Identical to covering_grid,
- except that it interpolates.)
-
- Smoothed covering grids start at level 0, interpolating to
- fill the region to level 1, replacing any cells actually
- covered by level 1 data, and then recursively repeating this
- process until it reaches the specified `level`.
-
- Parameters
- ----------
- level : int
- The resolution level data is uniformly gridded at
- left_edge : array_like
- The left edge of the region to be extracted
- dims : array_like
- Number of cells along each axis of resulting covering_grid.
- fields : array_like, optional
- A list of fields that you'd like pre-generated for your object
-
- Example
- -------
- cube = pf.h.smoothed_covering_grid(2, left_edge=[0.0, 0.0, 0.0], \
- dims=[128, 128, 128])
- """
self._base_dx = (
(self.pf.domain_right_edge - self.pf.domain_left_edge) /
self.pf.domain_dimensions.astype("float64"))
@@ -4029,34 +4005,30 @@
class AMRBooleanRegionBase(AMR3DData):
"""
- A hybrid region built by boolean comparison between
- existing regions.
+ This will build a hybrid region based on the boolean logic
+ of the regions.
+
+ Parameters
+ ----------
+ regions : list
+ A list of region objects and strings describing the boolean logic
+ to use when building the hybrid region. The boolean logic can be
+ nested using parentheses.
+
+ Examples
+ --------
+ >>> re1 = pf.h.region([0.5, 0.5, 0.5], [0.4, 0.4, 0.4],
+ [0.6, 0.6, 0.6])
+ >>> re2 = pf.h.region([0.5, 0.5, 0.5], [0.45, 0.45, 0.45],
+ [0.55, 0.55, 0.55])
+ >>> sp1 = pf.h.sphere([0.575, 0.575, 0.575], .03)
+ >>> toroid_shape = pf.h.boolean([re1, "NOT", re2])
+ >>> toroid_shape_with_hole = pf.h.boolean([re1, "NOT", "(", re2, "OR",
+ sp1, ")"])
"""
_type_name = "boolean"
_con_args = ("regions")
def __init__(self, regions, fields = None, pf = None, **kwargs):
- """
- This will build a hybrid region based on the boolean logic
- of the regions.
-
- Parameters
- ----------
- regions : list
- A list of region objects and strings describing the boolean logic
- to use when building the hybrid region. The boolean logic can be
- nested using parentheses.
-
- Examples
- --------
- >>> re1 = pf.h.region([0.5, 0.5, 0.5], [0.4, 0.4, 0.4],
- [0.6, 0.6, 0.6])
- >>> re2 = pf.h.region([0.5, 0.5, 0.5], [0.45, 0.45, 0.45],
- [0.55, 0.55, 0.55])
- >>> sp1 = pf.h.sphere([0.575, 0.575, 0.575], .03)
- >>> toroid_shape = pf.h.boolean([re1, "NOT", re2])
- >>> toroid_shape_with_hole = pf.h.boolean([re1, "NOT", "(", re2, "OR",
- sp1, ")"])
- """
# Center is meaningless, but we'll define it all the same.
AMR3DData.__init__(self, [0.5]*3, fields, pf, **kwargs)
self.regions = regions
@@ -4198,52 +4170,52 @@
return this_cut_mask
class AMRSurfaceBase(AMRData, ParallelAnalysisInterface):
+ r"""This surface object identifies isocontours on a cell-by-cell basis,
+ with no consideration of global connectedness, and returns the vertices
+ of the Triangles in that isocontour.
+
+ This object simply returns the vertices of all the triangles
+ calculated by the marching cubes algorithm; for more complex
+ operations, such as identifying connected sets of cells above a given
+ threshold, see the extract_connected_sets function. This is more
+ useful for calculating, for instance, total isocontour area, or
+ visualizing in an external program (such as `MeshLab
+ <http://meshlab.sf.net>`_.) The object has the properties .vertices
+ and will sample values if a field is requested. The values are
+ interpolated to the center of a given face.
+
+ Parameters
+ ----------
+ data_source : AMR3DDataObject
+ This is the object which will used as a source
+ surface_field : string
+ Any field that can be obtained in a data object. This is the field
+ which will be isocontoured.
+ field_value : float
+ The value at which the isocontour should be calculated.
+
+ References
+ ----------
+
+ .. [1] Marching Cubes: http://en.wikipedia.org/wiki/Marching_cubes
+
+ Examples
+ --------
+ This will create a data object, find a nice value in the center, and
+ output the vertices to "triangles.obj" after rescaling them.
+
+ >>> sp = pf.h.sphere("max", (10, "kpc")
+ >>> surf = pf.h.surface(sp, "Density", 5e-27)
+ >>> print surf["Temperature"]
+ >>> print surf.vertices
+ >>> bounds = [(sp.center[i] - 5.0/pf['kpc'],
+ ... sp.center[i] + 5.0/pf['kpc']) for i in range(3)]
+ >>> surf.export_ply("my_galaxy.ply", bounds = bounds)
+ """
_type_name = "surface"
_con_args = ("data_source", "surface_field", "field_value")
vertices = None
def __init__(self, data_source, surface_field, field_value):
- r"""This surface object identifies isocontours on a cell-by-cell basis,
- with no consideration of global connectedness, and returns the vertices
- of the Triangles in that isocontour.
-
- This object simply returns the vertices of all the triangles
- calculated by the marching cubes algorithm; for more complex
- operations, such as identifying connected sets of cells above a given
- threshold, see the extract_connected_sets function. This is more
- useful for calculating, for instance, total isocontour area, or
- visualizing in an external program (such as `MeshLab
- <http://meshlab.sf.net>`_.) The object has the properties .vertices
- and will sample values if a field is requested. The values are
- interpolated to the center of a given face.
-
- Parameters
- ----------
- data_source : AMR3DDataObject
- This is the object which will used as a source
- surface_field : string
- Any field that can be obtained in a data object. This is the field
- which will be isocontoured.
- field_value : float
- The value at which the isocontour should be calculated.
-
- References
- ----------
-
- .. [1] Marching Cubes: http://en.wikipedia.org/wiki/Marching_cubes
-
- Examples
- --------
- This will create a data object, find a nice value in the center, and
- output the vertices to "triangles.obj" after rescaling them.
-
- >>> sp = pf.h.sphere("max", (10, "kpc")
- >>> surf = pf.h.surface(sp, "Density", 5e-27)
- >>> print surf["Temperature"]
- >>> print surf.vertices
- >>> bounds = [(sp.center[i] - 5.0/pf['kpc'],
- ... sp.center[i] + 5.0/pf['kpc']) for i in range(3)]
- >>> surf.export_ply("my_galaxy.ply", bounds = bounds)
- """
ParallelAnalysisInterface.__init__(self)
self.data_source = data_source
self.surface_field = surface_field
https://bitbucket.org/yt_analysis/yt/commits/78b607fff0ec/
changeset: 78b607fff0ec
branch: yt
user: MatthewTurk
date: 2013-02-15 18:24:23
summary: Moving docstrings from __init__ to top-level in plot_collection.py
affected #: 1 file
diff -r b694f47a5a6d69e6f1e0e1b87393f82c3381da8c -r 78b607fff0ec274bc5f0f2cc1f550857637c1a94 yt/visualization/plot_collection.py
--- a/yt/visualization/plot_collection.py
+++ b/yt/visualization/plot_collection.py
@@ -74,47 +74,48 @@
self.images.append((os.path.basename(fn), np.fromfile(fn, dtype='c')))
class PlotCollection(object):
+ r"""The primary interface for creating plots.
+
+ The PlotCollection object was created to ease the creation of multiple
+ slices, projections and so forth made from a single parameter file.
+ The concept is that when the width on one image changes, it should
+ change on all the others. The PlotCollection can create all plot types
+ available in yt.
+
+ Parameters
+ ----------
+ pf : `StaticOutput`
+ The parameter file from which all the plots will be created.
+ center : array_like, optional
+ The 'center' supplied to plots like sphere plots, slices, and so
+ on. Should be 3 elements. Defaults to the point of maximum
+ density.
+ Long_variable_name : {'hi', 'ho'}, optional
+ Choices in brackets, default first when optional.
+
+ Notes
+ -----
+ This class is the primary entry point to creating plots, but it is not
+ the only entry point. Additionally, creating a PlotCollection should
+ be a "cheap" operation.
+
+ You may iterate over the plots in the PlotCollection, via something
+ like:
+
+ >>> pc = PlotCollection(pf)
+ >>> for p in pc: print p
+
+ Examples
+ --------
+
+ >>> pc = PlotCollection(pf, center=[0.5, 0.5, 0.5])
+ >>> pc.add_slice("Density", 'x')
+ >>> pc.save()
+
+ """
+
__id_counter = 0
def __init__(self, pf, center=None):
- r"""The primary interface for creating plots.
-
- The PlotCollection object was created to ease the creation of multiple
- slices, projections and so forth made from a single parameter file.
- The concept is that when the width on one image changes, it should
- change on all the others. The PlotCollection can create all plot types
- available in yt.
-
- Parameters
- ----------
- pf : `StaticOutput`
- The parameter file from which all the plots will be created.
- center : array_like, optional
- The 'center' supplied to plots like sphere plots, slices, and so
- on. Should be 3 elements. Defaults to the point of maximum
- density.
- Long_variable_name : {'hi', 'ho'}, optional
- Choices in brackets, default first when optional.
-
- Notes
- -----
- This class is the primary entry point to creating plots, but it is not
- the only entry point. Additionally, creating a PlotCollection should
- be a "cheap" operation.
-
- You may iterate over the plots in the PlotCollection, via something
- like:
-
- >>> pc = PlotCollection(pf)
- >>> for p in pc: print p
-
- Examples
- --------
-
- >>> pc = PlotCollection(pf, center=[0.5, 0.5, 0.5])
- >>> pc.add_slice("Density", 'x')
- >>> pc.save()
-
- """
self.plots = []
self.pf = pf
if center == None:
https://bitbucket.org/yt_analysis/yt/commits/a9dae4f647d9/
changeset: a9dae4f647d9
branch: yt
user: MatthewTurk
date: 2013-02-15 18:26:56
summary: Moving docstrings from __init__ to top-level in profiles.py
affected #: 1 file
diff -r 78b607fff0ec274bc5f0f2cc1f550857637c1a94 -r a9dae4f647d9316cc58df6156f4bc6859f5a15f1 yt/data_objects/profiles.py
--- a/yt/data_objects/profiles.py
+++ b/yt/data_objects/profiles.py
@@ -210,23 +210,23 @@
# @todo: Fix accumulation with overriding
class BinnedProfile1D(BinnedProfile):
+ """
+ A 'Profile' produces either a weighted (or unweighted) average or a
+ straight sum of a field in a bin defined by another field. In the case
+ of a weighted average, we have: p_i = sum( w_i * v_i ) / sum(w_i)
+
+ We accept a *data_source*, which will be binned into *n_bins*
+ by the field *bin_field* between the *lower_bound* and the
+ *upper_bound*. These bins may or may not be equally divided
+ in *log_space*, and the *lazy_reader* flag controls whether we
+ use a memory conservative approach. If *end_collect* is True,
+ take all values outside the given bounds and store them in the
+ 0 and *n_bins*-1 values.
+ """
def __init__(self, data_source, n_bins, bin_field,
lower_bound, upper_bound,
log_space = True, lazy_reader=False,
end_collect=False):
- """
- A 'Profile' produces either a weighted (or unweighted) average or a
- straight sum of a field in a bin defined by another field. In the case
- of a weighted average, we have: p_i = sum( w_i * v_i ) / sum(w_i)
-
- We accept a *data_source*, which will be binned into *n_bins*
- by the field *bin_field* between the *lower_bound* and the
- *upper_bound*. These bins may or may not be equally divided
- in *log_space*, and the *lazy_reader* flag controls whether we
- use a memory conservative approach. If *end_collect* is True,
- take all values outside the given bounds and store them in the
- 0 and *n_bins*-1 values.
- """
BinnedProfile.__init__(self, data_source, lazy_reader)
self.bin_field = bin_field
self._x_log = log_space
@@ -379,27 +379,27 @@
return [self.bin_field]
class BinnedProfile2D(BinnedProfile):
+ """
+ A 'Profile' produces either a weighted (or unweighted) average
+ or a straight sum of a field in a bin defined by two other
+ fields. In the case of a weighted average, we have: p_i =
+ sum( w_i * v_i ) / sum(w_i)
+
+ We accept a *data_source*, which will be binned into
+ *x_n_bins* by the field *x_bin_field* between the
+ *x_lower_bound* and the *x_upper_bound* and then again binned
+ into *y_n_bins* by the field *y_bin_field* between the
+ *y_lower_bound* and the *y_upper_bound*. These bins may or
+ may not be equally divided in log-space as specified by
+ *x_log* and *y_log*, and the *lazy_reader* flag controls
+ whether we use a memory conservative approach. If
+ *end_collect* is True, take all values outside the given
+ bounds and store them in the 0 and *n_bins*-1 values.
+ """
def __init__(self, data_source,
x_n_bins, x_bin_field, x_lower_bound, x_upper_bound, x_log,
y_n_bins, y_bin_field, y_lower_bound, y_upper_bound, y_log,
lazy_reader=False, end_collect=False):
- """
- A 'Profile' produces either a weighted (or unweighted) average
- or a straight sum of a field in a bin defined by two other
- fields. In the case of a weighted average, we have: p_i =
- sum( w_i * v_i ) / sum(w_i)
-
- We accept a *data_source*, which will be binned into
- *x_n_bins* by the field *x_bin_field* between the
- *x_lower_bound* and the *x_upper_bound* and then again binned
- into *y_n_bins* by the field *y_bin_field* between the
- *y_lower_bound* and the *y_upper_bound*. These bins may or
- may not be equally divided in log-space as specified by
- *x_log* and *y_log*, and the *lazy_reader* flag controls
- whether we use a memory conservative approach. If
- *end_collect* is True, take all values outside the given
- bounds and store them in the 0 and *n_bins*-1 values.
- """
BinnedProfile.__init__(self, data_source, lazy_reader)
self.x_bin_field = x_bin_field
self.y_bin_field = y_bin_field
https://bitbucket.org/yt_analysis/yt/commits/ed005fd80434/
changeset: ed005fd80434
branch: yt
user: MatthewTurk
date: 2013-02-15 18:32:22
summary: Moving docstrings from __init__ to top-level in plot_modifications.py
affected #: 1 file
Diff not available.
https://bitbucket.org/yt_analysis/yt/commits/d25a4d070c0f/
changeset: d25a4d070c0f
branch: yt
user: MatthewTurk
date: 2013-02-15 18:37:45
summary: Moving docstrings from __init__ to top-level in time_series.py
affected #: 1 file
Diff not available.
https://bitbucket.org/yt_analysis/yt/commits/c4232cc67a7e/
changeset: c4232cc67a7e
branch: yt
user: MatthewTurk
date: 2013-02-15 18:37:51
summary: Moving docstrings from __init__ to top-level in camera.py
affected #: 1 file
Diff not available.
https://bitbucket.org/yt_analysis/yt/commits/a73c6ee4ad44/
changeset: a73c6ee4ad44
branch: yt
user: MatthewTurk
date: 2013-02-15 18:44:06
summary: Moving docstrings from __init__ to top-level in halo_objects.py.
affected #: 1 file
Diff not available.
https://bitbucket.org/yt_analysis/yt/commits/7c55a92502fc/
changeset: 7c55a92502fc
branch: yt
user: MatthewTurk
date: 2013-02-15 18:45:29
summary: Moving docstrings from __init__ to top-level in transfer_functions.py
affected #: 1 file
Diff not available.
https://bitbucket.org/yt_analysis/yt/commits/7cb529a1b0ce/
changeset: 7cb529a1b0ce
branch: yt
user: MatthewTurk
date: 2013-02-15 18:50:32
summary: Moving docstrings from __init__ to top-level in light_cone.py
affected #: 1 file
Diff not available.
https://bitbucket.org/yt_analysis/yt/commits/c322b4e07f81/
changeset: c322b4e07f81
branch: yt
user: MatthewTurk
date: 2013-02-15 18:50:46
summary: Moving docstrings from __init__ to top-level in absorption_spectrum.py
affected #: 1 file
Diff not available.
https://bitbucket.org/yt_analysis/yt/commits/0b37e17e305f/
changeset: 0b37e17e305f
branch: yt
user: MatthewTurk
date: 2013-02-15 18:52:32
summary: Moving docstrings from __init__ to top-level in halo_mass_function.py.
affected #: 1 file
Diff not available.
https://bitbucket.org/yt_analysis/yt/commits/ce846a515c30/
changeset: ce846a515c30
branch: yt
user: MatthewTurk
date: 2013-02-15 18:52:48
summary: Moving docstrings from __init__ to top-level in light_ray.py
affected #: 1 file
Diff not available.
https://bitbucket.org/yt_analysis/yt/commits/78be8e6309d6/
changeset: 78be8e6309d6
branch: yt
user: MatthewTurk
date: 2013-02-15 18:52:56
summary: Moving docstrings from __init__ to top-level in rockstar.py
affected #: 1 file
Diff not available.
https://bitbucket.org/yt_analysis/yt/commits/389b05d1af10/
changeset: 389b05d1af10
branch: yt
user: MatthewTurk
date: 2013-02-15 18:55:40
summary: Moving docstrings from __init__ to top-level in merger_tree.py
affected #: 1 file
Diff not available.
https://bitbucket.org/yt_analysis/yt/commits/3a1264bb4425/
changeset: 3a1264bb4425
branch: yt
user: MatthewTurk
date: 2013-02-15 19:01:36
summary: Moving docstrings from __init__ to top-level in radial_column_density.py
affected #: 1 file
Diff not available.
https://bitbucket.org/yt_analysis/yt/commits/b418bd1a0c40/
changeset: b418bd1a0c40
branch: yt
user: MatthewTurk
date: 2013-02-15 19:01:50
summary: Moving docstrings from __init__ to top-level in multi_halo_profiler.py
affected #: 1 file
Diff not available.
https://bitbucket.org/yt_analysis/yt/commits/ea75ec53e0f8/
changeset: ea75ec53e0f8
branch: yt
user: MatthewTurk
date: 2013-02-15 19:05:05
summary: Moving docstrings from __init__ to top-level in spectral_frequency_integrator.py
affected #: 1 file
Diff not available.
https://bitbucket.org/yt_analysis/yt/commits/c53081f66a02/
changeset: c53081f66a02
branch: yt
user: MatthewTurk
date: 2013-02-15 19:06:07
summary: Moving docstrings from __init__ to top-level in sfr_spectrum.py
affected #: 1 file
Diff not available.
https://bitbucket.org/yt_analysis/yt/commits/03ff88f7ddf9/
changeset: 03ff88f7ddf9
branch: yt
user: MatthewTurk
date: 2013-02-15 19:08:05
summary: Moving docstrings from __init__ to top-level in two_point_functions.py
affected #: 1 file
Diff not available.
https://bitbucket.org/yt_analysis/yt/commits/247286fdf1c4/
changeset: 247286fdf1c4
branch: yt
user: MatthewTurk
date: 2013-02-15 19:29:17
summary: Restoring a line I missed.
affected #: 1 file
Diff not available.
https://bitbucket.org/yt_analysis/yt/commits/e6e20acd5008/
changeset: e6e20acd5008
branch: yt
user: MatthewTurk
date: 2013-02-15 19:35:30
summary: Fixing a few formatting problems in the docstrings.
affected #: 4 files
Diff not available.
https://bitbucket.org/yt_analysis/yt/commits/0321b16fd1c1/
changeset: 0321b16fd1c1
branch: yt
user: MatthewTurk
date: 2013-02-15 19:45:26
summary: Addressing Nathan's comment
affected #: 1 file
Diff not available.
https://bitbucket.org/yt_analysis/yt/commits/5f7b53ad5515/
changeset: 5f7b53ad5515
branch: yt
user: MatthewTurk
date: 2013-02-15 19:55:15
summary: Changing to "interactive" rather than "script" examples.
I don't like having to do this, but Sphinx won't compile otherwise.
affected #: 1 file
Diff not available.
https://bitbucket.org/yt_analysis/yt/commits/3754278c7cc5/
changeset: 3754278c7cc5
branch: yt
user: MatthewTurk
date: 2013-02-15 20:04:41
summary: Switching some docstrings to NumPy format. Minor formatting elsewhere.
affected #: 3 files
Diff not available.
https://bitbucket.org/yt_analysis/yt/commits/0158eafd7c35/
changeset: 0158eafd7c35
branch: yt
user: MatthewTurk
date: 2013-02-15 21:48:12
summary: Fixing DerivedField and FixedResolutionBuffer
affected #: 2 files
Diff not available.
https://bitbucket.org/yt_analysis/yt/commits/43b4a03be478/
changeset: 43b4a03be478
branch: yt
user: MatthewTurk
date: 2013-02-15 21:49:34
summary: Merging from Britton's change and Kacper's change
affected #: 4 files
Diff not available.
https://bitbucket.org/yt_analysis/yt/commits/425e98d5b747/
changeset: 425e98d5b747
branch: yt
user: MatthewTurk
date: 2013-02-15 21:57:36
summary: Missed ProjectionPlot.
affected #: 1 file
Diff not available.
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