[yt-svn] commit/yt: 7 new changesets
commits-noreply at bitbucket.org
commits-noreply at bitbucket.org
Fri Jul 24 09:16:04 PDT 2015
7 new commits in yt:
https://bitbucket.org/yt_analysis/yt/commits/744e4c540c77/
Changeset: 744e4c540c77
Branch: yt
User: xarthisius
Date: 2015-07-23 19:06:31+00:00
Summary: Escape asterisk
Affected #: 1 file
diff -r 1fe67dfda7055142c6173d021aa08a2ba27c5b1b -r 744e4c540c778eb7bb7e7b8db1e708ef6115cfda doc/source/examining/loading_data.rst
--- a/doc/source/examining/loading_data.rst
+++ b/doc/source/examining/loading_data.rst
@@ -268,7 +268,7 @@
Support for Pluto AMR data is provided through the Chombo frontend, which
is currently maintained by Andrew Myers. Pluto output files that don't use
the Chombo HDF5 format are currently not supported. To load a Pluto dataset,
-you can use the ``yt.load`` command on the *.hdf5 file. For example, the
+you can use the ``yt.load`` command on the ``*.hdf5`` files. For example, the
KelvinHelmholtz sample dataset is a directory that contains the following
files:
https://bitbucket.org/yt_analysis/yt/commits/2b68405a7910/
Changeset: 2b68405a7910
Branch: yt
User: xarthisius
Date: 2015-07-23 19:18:49+00:00
Summary: Format 'useful objects' in SpectrumBuilder.calculate_spectrum using Attributes
Affected #: 1 file
diff -r 744e4c540c778eb7bb7e7b8db1e708ef6115cfda -r 2b68405a791067677fb87c14516ac70257d15c80 yt/analysis_modules/star_analysis/sfr_spectrum.py
--- a/yt/analysis_modules/star_analysis/sfr_spectrum.py
+++ b/yt/analysis_modules/star_analysis/sfr_spectrum.py
@@ -354,12 +354,19 @@
r"""For the set of stars, calculate the collective spectrum.
Attached to the output are several useful objects:
- final_spec: The collective spectrum in units of flux binned in
- wavelength.
- wavelength: The wavelength for the spectrum bins, in Angstroms.
- total_mass: Total mass of all the stars.
- avg_mass: Average mass of all the stars.
- avg_metal: Average metallicity of all the stars.
+
+ Attributes
+ ----------
+ final_spec: array
+ The collective spectrum in units of flux binned in wavelength.
+ wavelength: array
+ The wavelength for the spectrum bins, in Angstroms.
+ total_mass: float
+ Total mass of all the stars.
+ avg_mass: float
+ Average mass of all the stars.
+ avg_metal: float
+ Average metallicity of all the stars.
Parameters
----------
@@ -389,6 +396,7 @@
>>> sp = ds.sphere([0.5, 0.5, 0.5], 0.1)
>>> spec.calculate_spectrum(data_source=sp, min_age=1.e6)
"""
+
# Initialize values
self.final_spec = np.zeros(self.wavelength.size, dtype='float64')
self._data_source = data_source
https://bitbucket.org/yt_analysis/yt/commits/a6d7f254a5ba/
Changeset: a6d7f254a5ba
Branch: yt
User: xarthisius
Date: 2015-07-23 19:30:18+00:00
Summary: Add blank lines where necessary, fix indent
Affected #: 2 files
diff -r 2b68405a791067677fb87c14516ac70257d15c80 -r a6d7f254a5ba0d7809de3a71a0431f15b9ab640b yt/config.py
--- a/yt/config.py
+++ b/yt/config.py
@@ -1,11 +1,10 @@
"""
This module is very simple. It imports the configuration
we have written for yt.
-Everything will be returned in a global config dictionary: ytcfg
-
-
+Everything will be returned in a global config dictionary ``ytcfg``
"""
+
from __future__ import print_function
#-----------------------------------------------------------------------------
diff -r 2b68405a791067677fb87c14516ac70257d15c80 -r a6d7f254a5ba0d7809de3a71a0431f15b9ab640b yt/data_objects/static_output.py
--- a/yt/data_objects/static_output.py
+++ b/yt/data_objects/static_output.py
@@ -256,27 +256,27 @@
def __iter__(self):
for i in self.parameters: yield i
- def get_smallest_appropriate_unit(self, v, quantity='distance',
+ def get_smallest_appropriate_unit(self, v, quantity='distance',
return_quantity=False):
"""
- Returns the largest whole unit smaller than the YTQuantity passed to
+ Returns the largest whole unit smaller than the YTQuantity passed to
it as a string.
- The quantity keyword can be equal to `distance` or `time`. In the
- case of distance, the units are: 'Mpc', 'kpc', 'pc', 'au', 'rsun',
- 'km', etc. For time, the units are: 'Myr', 'kyr', 'yr', 'day', 'hr',
+ The quantity keyword can be equal to `distance` or `time`. In the
+ case of distance, the units are: 'Mpc', 'kpc', 'pc', 'au', 'rsun',
+ 'km', etc. For time, the units are: 'Myr', 'kyr', 'yr', 'day', 'hr',
's', 'ms', etc.
-
- If return_quantity is set to True, it finds the largest YTQuantity
- object with a whole unit and a power of ten as the coefficient, and it
+
+ If return_quantity is set to True, it finds the largest YTQuantity
+ object with a whole unit and a power of ten as the coefficient, and it
returns this YTQuantity.
"""
good_u = None
if quantity == 'distance':
- unit_list =['Ppc', 'Tpc', 'Gpc', 'Mpc', 'kpc', 'pc', 'au', 'rsun',
+ unit_list =['Ppc', 'Tpc', 'Gpc', 'Mpc', 'kpc', 'pc', 'au', 'rsun',
'km', 'cm', 'um', 'nm', 'pm']
elif quantity == 'time':
- unit_list =['Yyr', 'Zyr', 'Eyr', 'Pyr', 'Tyr', 'Gyr', 'Myr', 'kyr',
+ unit_list =['Yyr', 'Zyr', 'Eyr', 'Pyr', 'Tyr', 'Gyr', 'Myr', 'kyr',
'yr', 'day', 'hr', 's', 'ms', 'us', 'ns', 'ps', 'fs']
else:
raise SyntaxError("Specified quantity must be equal to 'distance'"\
@@ -301,7 +301,7 @@
uq = self.quan(j, good_u)
if uq <= v:
return uq
- else:
+ else:
return good_u
def has_key(self, key):
@@ -600,7 +600,7 @@
def find_field_values_at_point(self, fields, coords):
"""
Returns the values [field1, field2,...] of the fields at the given
- coordinates. Returns a list of field values in the same order as
+ coordinates. Returns a list of field values in the same order as
the input *fields*.
"""
return self.point(coords)[fields]
@@ -608,7 +608,7 @@
def find_field_values_at_points(self, fields, coords):
"""
Returns the values [field1, field2,...] of the fields at the given
- [(x1, y1, z2), (x2, y2, z2),...] points. Returns a list of field
+ [(x1, y1, z2), (x2, y2, z2),...] points. Returns a list of field
values in the same order as the input *fields*.
This is quite slow right now as it creates a new data object for each
@@ -788,8 +788,7 @@
input_array : iterable
A tuple, list, or array to attach units to
- input_units : String unit specification, unit symbol object, or astropy
- units object
+ input_units : String unit specification, unit symbol or astropy object
The units of the array. Powers must be specified using python syntax
(cm**3, not cm^3).
dtype : string or NumPy dtype object
@@ -816,6 +815,7 @@
1.00010449]) Mpc
"""
+
if self._arr is not None:
return self._arr
self._arr = functools.partial(YTArray, registry = self.unit_registry)
@@ -834,8 +834,7 @@
input_scalar : an integer or floating point scalar
The scalar to attach units to
- input_units : String unit specification, unit symbol object, or astropy
- units
+ input_units : String unit specification, unit symbol or astropy object
The units of the quantity. Powers must be specified using python
syntax (cm**3, not cm^3).
dtype : string or NumPy dtype object
@@ -862,6 +861,7 @@
1.543e+25 cm
"""
+
if self._quan is not None:
return self._quan
self._quan = functools.partial(YTQuantity, registry=self.unit_registry)
@@ -969,12 +969,12 @@
return ("deposit", field_name)
def add_gradient_fields(self, input_field):
- """Add gradient fields.
+ """Add gradient fields.
Creates four new grid-based fields that represent the components of
the gradient of an existing field, plus an extra field for the magnitude
- of the gradient. Currently only supported in Cartesian geometries. The
- gradient is computed using second-order centered differences.
+ of the gradient. Currently only supported in Cartesian geometries. The
+ gradient is computed using second-order centered differences.
Parameters
----------
@@ -986,14 +986,14 @@
Returns
-------
A list of field name tuples for the newly created fields.
-
+
Examples
--------
>>> grad_fields = ds.add_gradient_fields(("gas","temperature"))
>>> print(grad_fields)
- [('gas', 'temperature_gradient_x'),
- ('gas', 'temperature_gradient_y'),
- ('gas', 'temperature_gradient_z'),
+ [('gas', 'temperature_gradient_x'),
+ ('gas', 'temperature_gradient_y'),
+ ('gas', 'temperature_gradient_z'),
('gas', 'temperature_gradient_magnitude')]
"""
self.index
https://bitbucket.org/yt_analysis/yt/commits/402611ab1ecb/
Changeset: 402611ab1ecb
Branch: yt
User: xarthisius
Date: 2015-07-23 19:34:12+00:00
Summary: Fix section ordering
Affected #: 1 file
diff -r a6d7f254a5ba0d7809de3a71a0431f15b9ab640b -r 402611ab1ecb1d7c87eead6905431e4597fcfc86 doc/source/reference/changelog.rst
--- a/doc/source/reference/changelog.rst
+++ b/doc/source/reference/changelog.rst
@@ -19,7 +19,7 @@
Major changes:
-++++++++++++++
+^^^^^^^^^^^^^^
* The RADMC-3D export analysis module has been updated. `PR 1358 <https://bitbucket.org/yt_analysis/yt/pull-request/1358>`_, `PR 1332 <https://bitbucket.org/yt_analysis/yt/pull-request/1332>`_.
@@ -41,7 +41,7 @@
* The documentation has been reorganized and has seen substantial improvements. `PR 1383 <https://bitbucket.org/yt_analysis/yt/pull-request/1383>`_, `PR 1373 <https://bitbucket.org/yt_analysis/yt/pull-request/1373>`_, `PR 1364 <https://bitbucket.org/yt_analysis/yt/pull-request/1364>`_, `PR 1351 <https://bitbucket.org/yt_analysis/yt/pull-request/1351>`_, `PR 1345 <https://bitbucket.org/yt_analysis/yt/pull-request/1345>`_. `PR 1333 <https://bitbucket.org/yt_analysis/yt/pull-request/1333>`_, `PR 1342 <https://bitbucket.org/yt_analysis/yt/pull-request/1342>`_, `PR 1338 <https://bitbucket.org/yt_analysis/yt/pull-request/1338>`_, `PR 1330 <https://bitbucket.org/yt_analysis/yt/pull-request/1330>`_, `PR 1326 <https://bitbucket.org/yt_analysis/yt/pull-request/1326>`_, `PR 1323 <https://bitbucket.org/yt_analysis/yt/pull-request/1323>`_, `PR 1315 <https://bitbucket.org/yt_analysis/yt/pull-request/1315>`_, `PR 1305 <https://bitbucket.org/yt_analysis/yt/pull-request/1305>`_, `PR 1289 <https://bitbucket.org/yt_analysis/yt/pull-request/1289>`_, `PR 1276 <https://bitbucket.org/yt_analysis/yt/pull-request/1276>`_.
Minor or bugfix changes:
-++++++++++++++++++++++++
+^^^^^^^^^^^^^^^^^^^^^^^^
* The Ampere unit now accepts SI prefixes. `PR 1393 <https://bitbucket.org/yt_analysis/yt/pull-request/1393>`_.
@@ -156,6 +156,7 @@
representation of unstructured mesh datasets.
Highlighted changes in yt 3.0:
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
* Units now permeate the code base, enabling self-consistent unit
transformations of all arrays and quantities returned by yt.
@@ -204,6 +205,7 @@
series. Below are the itemized, aggregate changes since version 2.5.
Major changes:
+^^^^^^^^^^^^^^
* yt is now licensed under the 3-clause BSD license.
* HEALPix has been removed for the time being, as a result of licensing
@@ -227,6 +229,7 @@
* ProjectionPlot now accepts a data_source keyword argument
Minor or bugfix changes:
+^^^^^^^^^^^^^^^^^^^^^^^^
* Fix for volume rendering on the command line
* map_to_colormap will no longer return out-of-bounds errors
@@ -307,7 +310,7 @@
merged with the IPython notebook in a future release.
Install Script Changes:
-~~~~~~~~~~~~~~~~~~~~~~~
+^^^^^^^^^^^^^^^^^^^^^^^
* SciPy can now be installed
* Rockstar can now be installed
@@ -326,7 +329,7 @@
We've also improved support for installing on OSX, Ubuntu and OpenSUSE.
Most Visible Improvements
-~~~~~~~~~~~~~~~~~~~~~~~~~
+^^^^^^^^^^^^^^^^^^^^^^^^^
* Nearly 200 pull requests and over 1000 changesets have been merged since yt
2.4 was release on August 2nd, 2012.
@@ -409,7 +412,7 @@
`download it here <http://yt-project.org/files/yt24.ipynb>`_.
Most Visible Improvements
-~~~~~~~~~~~~~~~~~~~~~~~~~
+^^^^^^^^^^^^^^^^^^^^^^^^^
* Threaded volume renderer, completely refactored from the ground up for
speed and parallelism.
@@ -432,7 +435,7 @@
plot collections right from the yt command line!
Other Changes
-~~~~~~~~~~~~~
+^^^^^^^^^^^^^
* :class:`~yt.visualization.plot_window.ProjectionPlot` and
:class:`~yt.visualization.plot_window.SlicePlot` supplant the functionality
https://bitbucket.org/yt_analysis/yt/commits/f568faff791b/
Changeset: f568faff791b
Branch: yt
User: xarthisius
Date: 2015-07-23 19:35:41+00:00
Summary: Remove duplicate target
Affected #: 1 file
diff -r 402611ab1ecb1d7c87eead6905431e4597fcfc86 -r f568faff791b3094e55792b7db3d7f189a573176 doc/source/visualizing/colormaps/index.rst
--- a/doc/source/visualizing/colormaps/index.rst
+++ b/doc/source/visualizing/colormaps/index.rst
@@ -8,7 +8,7 @@
visualization functions usually allow you to specify a colormap with the
``cmap`` flag.
-.. _palettable:
+.. _install-palettable:
Palettable and ColorBrewer2
~~~~~~~~~~~~~~~~~~~~~~~~~~~
https://bitbucket.org/yt_analysis/yt/commits/bd55f563e2f7/
Changeset: bd55f563e2f7
Branch: yt
User: xarthisius
Date: 2015-07-23 19:38:32+00:00
Summary: Escape asterisks, add code-block directive
Affected #: 1 file
diff -r f568faff791b3094e55792b7db3d7f189a573176 -r bd55f563e2f7fe6c83faa8a6454cbd3512ed2cf3 doc/source/visualizing/plots.rst
--- a/doc/source/visualizing/plots.rst
+++ b/doc/source/visualizing/plots.rst
@@ -1224,18 +1224,18 @@
ds = yt.load("GasSloshing/sloshing_nomag2_hdf5_plt_cnt_0100")
slc = yt.SlicePlot(ds, "z", ["kT","density"], width=(500.0,"kpc"))
slc.save()
-
+
which will yield PNG plots with the filenames
.. code-block:: bash
- $ ls *.png
+ $ ls \*.png
sloshing_nomag2_hdf5_plt_cnt_0100_Slice_z_density.png
sloshing_nomag2_hdf5_plt_cnt_0100_Slice_z_kT.png
which has a general form of
-.. code-block::
+.. code-block:: bash
[dataset name]_[plot type]_[axis]_[field name].[suffix]
@@ -1256,7 +1256,7 @@
.. code-block:: bash
- $ ls *.png
+ $ ls \*.png
bananas_Slice_z_kT.png
bananas_Slice_z_density.png
https://bitbucket.org/yt_analysis/yt/commits/dcf3ad46296d/
Changeset: dcf3ad46296d
Branch: yt
User: xarthisius
Date: 2015-07-23 21:19:49+00:00
Summary: Use inline link for marching cubes, instead of creating duplicate references
Affected #: 2 files
diff -r bd55f563e2f7fe6c83faa8a6454cbd3512ed2cf3 -r dcf3ad46296da7df8ad77a2501e09d6bc7e429a4 yt/data_objects/construction_data_containers.py
--- a/yt/data_objects/construction_data_containers.py
+++ b/yt/data_objects/construction_data_containers.py
@@ -961,15 +961,15 @@
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
+ This object simply returns the vertices of all the triangles calculated by
+ the `marching cubes <http://en.wikipedia.org/wiki/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.
+ <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
----------
@@ -981,11 +981,6 @@
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
@@ -1070,11 +1065,12 @@
def calculate_flux(self, field_x, field_y, field_z, fluxing_field = None):
r"""This calculates the flux over the surface.
- This function will conduct marching cubes on all the cells in a given
- data container (grid-by-grid), and then for each identified triangular
- segment of an isocontour in a given cell, calculate the gradient (i.e.,
- normal) in the isocontoured field, interpolate the local value of the
- "fluxing" field, the area of the triangle, and then return:
+ This function will conduct `marching cubes
+ <http://en.wikipedia.org/wiki/Marching_cubes>`_ on all the cells in a
+ given data container (grid-by-grid), and then for each identified
+ triangular segment of an isocontour in a given cell, calculate the
+ gradient (i.e., normal) in the isocontoured field, interpolate the local
+ value of the "fluxing" field, the area of the triangle, and then return:
area * local_flux_value * (n dot v)
diff -r bd55f563e2f7fe6c83faa8a6454cbd3512ed2cf3 -r dcf3ad46296da7df8ad77a2501e09d6bc7e429a4 yt/data_objects/data_containers.py
--- a/yt/data_objects/data_containers.py
+++ b/yt/data_objects/data_containers.py
@@ -1025,9 +1025,10 @@
Triangles in that isocontour.
This function 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
+ calculated by the `marching cubes
+ <http://en.wikipedia.org/wiki/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>`_.)
@@ -1058,11 +1059,6 @@
contain the values of the field specified at the center of each
triangle.
- 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
@@ -1123,11 +1119,12 @@
consideration of global connectedness, and calculates the flux over
those contours.
- This function will conduct marching cubes on all the cells in a given
- data container (grid-by-grid), and then for each identified triangular
- segment of an isocontour in a given cell, calculate the gradient (i.e.,
- normal) in the isocontoured field, interpolate the local value of the
- "fluxing" field, the area of the triangle, and then return:
+ This function will conduct `marching cubes
+ <http://en.wikipedia.org/wiki/Marching_cubes>`_ on all the cells in a
+ given data container (grid-by-grid), and then for each identified
+ triangular segment of an isocontour in a given cell, calculate the
+ gradient (i.e., normal) in the isocontoured field, interpolate the local
+ value of the "fluxing" field, the area of the triangle, and then return:
area * local_flux_value * (n dot v)
@@ -1165,11 +1162,6 @@
The summed flux. Note that it is not currently scaled; this is
simply the code-unit area times the fields.
- 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
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