[yt-svn] commit/yt: xarthisius: Merged in ngoldbaum/yt (pull request #2272)
commits-noreply at bitbucket.org
commits-noreply at bitbucket.org
Sat Jul 16 08:46:53 PDT 2016
1 new commit in yt:
https://bitbucket.org/yt_analysis/yt/commits/c0c922e7117a/
Changeset: c0c922e7117a
Branch: yt
User: xarthisius
Date: 2016-07-16 15:46:24+00:00
Summary: Merged in ngoldbaum/yt (pull request #2272)
Fix a number of sphinx build warnings
Affected #: 5 files
diff -r 32d6f2c945190b3f101f0c2a895b968bc570cbac -r c0c922e7117a4300b3166331c69be33169a794e8 yt/data_objects/construction_data_containers.py
--- a/yt/data_objects/construction_data_containers.py
+++ b/yt/data_objects/construction_data_containers.py
@@ -1225,20 +1225,22 @@
color_log = True, emit_log = True, plot_index = None,
color_field_max = None, color_field_min = None,
emit_field_max = None, emit_field_min = None):
- r"""This exports the surface to the OBJ format, suitable for visualization
- in many different programs (e.g., Blender). NOTE: this exports an .obj file
- and an .mtl file, both with the general 'filename' as a prefix.
- The .obj file points to the .mtl file in its header, so if you move the 2
- files, make sure you change the .obj header to account for this. ALSO NOTE:
- the emit_field needs to be a combination of the other 2 fields used to
- have the emissivity track with the color.
+ r"""Export the surface to the OBJ format
+
+ Suitable for visualization in many different programs (e.g., Blender).
+ NOTE: this exports an .obj file and an .mtl file, both with the general
+ 'filename' as a prefix. The .obj file points to the .mtl file in its
+ header, so if you move the 2 files, make sure you change the .obj header
+ to account for this. ALSO NOTE: the emit_field needs to be a combination
+ of the other 2 fields used to have the emissivity track with the color.
Parameters
- ----------
+ ----------
+
filename : string
- The file this will be exported to. This cannot be a file-like object.
- Note - there are no file extentions included - both obj & mtl files
- are created.
+ The file this will be exported to. This cannot be a file-like
+ object. If there are no file extentions included - both obj & mtl
+ files are created.
transparency : float
This gives the transparency of the output surface plot. Values
from 0.0 (invisible) to 1.0 (opaque).
@@ -1247,8 +1249,8 @@
color_field : string
Should a field be sample and colormapped?
emit_field : string
- Should we track the emissivity of a field?
- NOTE: this should be a combination of the other 2 fields being used.
+ Should we track the emissivity of a field? This should be a
+ combination of the other 2 fields being used.
color_map : string
Which color map should be applied?
color_log : bool
@@ -1292,12 +1294,14 @@
>>> trans = [0.5, 1.0]
>>> distf = 3.1e18*1e3 # distances into kpc
>>> def _Emissivity(field, data):
- ... return (data['density']*data['density']*np.sqrt(data['temperature']))
+ ... return (data['density']*data['density'] *
+ ... np.sqrt(data['temperature']))
>>> ds.add_field("emissivity", function=_Emissivity, units=r"g*K/cm**6")
>>> for i, r in enumerate(rhos):
... surf = ds.surface(sp,'density',r)
... surf.export_obj("my_galaxy", transparency=trans[i],
- ... color_field='temperature', emit_field = 'emissivity',
+ ... color_field='temperature',
+ ... emit_field='emissivity',
... dist_fac = distf, plot_index = i)
"""
diff -r 32d6f2c945190b3f101f0c2a895b968bc570cbac -r c0c922e7117a4300b3166331c69be33169a794e8 yt/data_objects/derived_quantities.py
--- a/yt/data_objects/derived_quantities.py
+++ b/yt/data_objects/derived_quantities.py
@@ -657,7 +657,9 @@
Given by Equation 3 of Peebles (1971, A&A, 11, 377), the spin parameter
is defined as
- lambda = (L \* |E|^(1/2)) / (G \* M^5/2),
+ .. math::
+
+ \lambda = (L * |E|^(1/2)) / (G * M^5/2),
where L is the total angular momentum, E is the total energy (kinetic and
potential), G is the gravitational constant, and M is the total mass.
diff -r 32d6f2c945190b3f101f0c2a895b968bc570cbac -r c0c922e7117a4300b3166331c69be33169a794e8 yt/testing.py
--- a/yt/testing.py
+++ b/yt/testing.py
@@ -392,7 +392,6 @@
return ds
def expand_keywords(keywords, full=False):
-
"""
expand_keywords is a means for testing all possible keyword
arguments in the nosetests. Simply pass it a dictionary of all the
@@ -408,23 +407,28 @@
list. Be careful, by using full=True, you may be in for an exponentially
larger number of tests!
+ Parameters
+ ----------
+
keywords : dict
a dictionary where the keys are the keywords for the function,
and the values of each key are the possible values that this key
can take in the function
- full : bool
+ full : bool
if set to True, every possible combination of given keywords is
returned
Returns
-------
+
array of dicts
An array of dictionaries to be individually passed to the appropriate
function matching these kwargs.
Examples
--------
+
>>> keywords = {}
>>> keywords['dpi'] = (50, 100, 200)
>>> keywords['cmap'] = ('arbre', 'kelp')
diff -r 32d6f2c945190b3f101f0c2a895b968bc570cbac -r c0c922e7117a4300b3166331c69be33169a794e8 yt/visualization/plot_container.py
--- a/yt/visualization/plot_container.py
+++ b/yt/visualization/plot_container.py
@@ -432,35 +432,38 @@
Parameters
----------
+
font_dict : dict
- A dict of keyword parameters to be passed to
- :py:class:`matplotlib.font_manager.FontProperties`.
+ A dict of keyword parameters to be passed to
+ :py:class:`matplotlib.font_manager.FontProperties`.
- Possible keys include
- * family - The font family. Can be serif, sans-serif, cursive, 'fantasy' or
- 'monospace'.
- * style - The font style. Either normal, italic or oblique.
- * color - A valid color string like 'r', 'g', 'red', 'cobalt', and
- 'orange'.
- * variant: Either normal or small-caps.
- * size: Either an relative value of xx-small, x-small, small, medium,
- large, x-large, xx-large or an absolute font size, e.g. 12
- * stretch: A numeric value in the range 0-1000 or one of
- ultra-condensed, extra-condensed, condensed, semi-condensed, normal,
- semi-expanded, expanded, extra-expanded or ultra-expanded
- * weight: A numeric value in the range 0-1000 or one of ultralight,
- light, normal, regular, book, medium, roman, semibold, demibold, demi,
- bold, heavy, extra bold, or black
+ Possible keys include
+ * family - The font family. Can be serif, sans-serif, cursive,
+ 'fantasy' or 'monospace'.
+ * style - The font style. Either normal, italic or oblique.
+ * color - A valid color string like 'r', 'g', 'red', 'cobalt', and
+ 'orange'.
+ * variant: Either normal or small-caps.
+ * size: Either an relative value of xx-small, x-small, small, medium,
+ large, x-large, xx-large or an absolute font size, e.g. 12
+ * stretch: A numeric value in the range 0-1000 or one of
+ ultra-condensed, extra-condensed, condensed, semi-condensed, normal,
+ semi-expanded, expanded, extra-expanded or ultra-expanded
+ * weight: A numeric value in the range 0-1000 or one of ultralight,
+ light, normal, regular, book, medium, roman, semibold, demibold,
+ demi, bold, heavy, extra bold, or black
- See the matplotlib font manager API documentation for more details.
- http://matplotlib.org/api/font_manager_api.html
+ See the matplotlib font manager API documentation for more details.
+ http://matplotlib.org/api/font_manager_api.html
Notes
-----
+
Mathtext axis labels will only obey the `size` and `color` keyword.
Examples
--------
+
This sets the font to be 24-pt, blue, sans-serif, italic, and
bold-face.
diff -r 32d6f2c945190b3f101f0c2a895b968bc570cbac -r c0c922e7117a4300b3166331c69be33169a794e8 yt/visualization/plot_modifications.py
--- a/yt/visualization/plot_modifications.py
+++ b/yt/visualization/plot_modifications.py
@@ -162,18 +162,32 @@
Given a set of x,y (and z) coordinates and a coordinate system,
convert the coordinates (and transformation) ready for final plotting.
- Coordinate systems
- ------------------
+ Parameters
+ ----------
+
+ plot: a PlotMPL subclass
+ The plot that we are converting coordinates for
- data : 3D data coordinates relative to original dataset
+ coord: array-like
+ Coordinates in some coordinate system.
- plot : 2D coordinates as defined by the final axis locations
+ coord_system: string
- axis : 2D coordinates within the axis object from (0,0) in lower left
- to (1,1) in upper right. Same as matplotlib axis coords.
+ Possible values include:
- figure : 2D coordinates within figure object from (0,0) in lower left
- to (1,1) in upper right. Same as matplotlib figure coords.
+ * ``'data'``
+ 3D data coordinates relative to original dataset
+
+ * ``'plot'``
+ 2D coordinates as defined by the final axis locations
+
+ * ``'axis'``
+ 2D coordinates within the axis object from (0,0) in lower left
+ to (1,1) in upper right. Same as matplotlib axis coords.
+
+ * ``'figure'``
+ 2D coordinates within figure object from (0,0) in lower left
+ to (1,1) in upper right. Same as matplotlib figure coords.
"""
# if in data coords, project them to plot coords
if coord_system == "data":
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