Skip to content

Commit

Permalink
fix: remove trailing whitespace everywhere
Browse files Browse the repository at this point in the history
  • Loading branch information
convert-repo authored and neutrinoceros committed Jan 1, 2021
1 parent e9dddf0 commit 12068b7
Show file tree
Hide file tree
Showing 111 changed files with 1,285 additions and 1,285 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ using:-->
* Operating System:
* Python Version:
* yt version:
* Other Libraries (if applicable):
* Other Libraries (if applicable):

<!--Please tell us how you installed yt and python e.g., from source,
pip, conda. If you installed from conda, please specify which channel you used
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ defaults:
run:
shell: bash

env:
env:
HOMEBREW_NO_AUTO_UPDATE: 1

jobs:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/style-checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
run: |
black --version
black --check --diff yt/ doc/
isort:
name: isort
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -820,7 +820,7 @@ Source code style guide
return value of a function, do not store it in a variable.
* Add tests for new functionality. When fixing a bug, consider adding a test to
prevent the bug from recurring.
* Use f-strings for string-formatting (https://www.python.org/dev/peps/pep-0498/), except
* Use f-strings for string-formatting (https://www.python.org/dev/peps/pep-0498/), except
in logging function where the recommended syntax is
``mylog.info("Something %s", "value")``.

Expand Down
2 changes: 1 addition & 1 deletion COPYING.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ The yt Development Team is the set of all contributors to the yt project. This
includes all of the yt subprojects.

The core team that coordinates development on BitBucket can be found here:
http://bitbucket.org/yt_analysis/
http://bitbucket.org/yt_analysis/


Our Copyright Policy
Expand Down
6 changes: 3 additions & 3 deletions CREDITS
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
yt is a group effort.

Contributors:
Contributors:
Tom Abel ([email protected])
Gabriel Altay ([email protected])
Kenza Arraki ([email protected])
Expand Down Expand Up @@ -128,7 +128,7 @@ Contributors:
John ZuHone ([email protected])

The PasteBin interface code (as well as the PasteBin itself)
was written by the Pocoo collective (pocoo.org).
developed by Oliver Hahn.
was written by the Pocoo collective (pocoo.org).
developed by Oliver Hahn.

Thanks to everyone for all your contributions!
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,9 @@ We have some community and documentation resources available.

## Powered by NumFOCUS

yt is a fiscally sponsored project of [NumFOCUS](https://numfocus.org/).
yt is a fiscally sponsored project of [NumFOCUS](https://numfocus.org/).
If you're interested in
supporting the active maintenance and development of this project, consider
[donating to the project](https://numfocus.salsalabs.org/donate-to-yt/index.html).
[donating to the project](https://numfocus.salsalabs.org/donate-to-yt/index.html).


8 changes: 4 additions & 4 deletions doc/install_script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# If you would like to customize the yt installation, then please edit
# the following options.

# If you do not have a working compiler environment, use the following
# If you do not have a working compiler environment, use the following
# configuration:

INST_YT_SOURCE=0 # Should yt itself be installed from source?
Expand Down Expand Up @@ -533,7 +533,7 @@ if [ $INST_YT_SOURCE -eq 1 ]
then
log_cmd ${GIT_EXE} clone https://github.com/yt-project/yt_conda ${DEST_DIR}/src/yt_conda
fi

if [ $INST_EMBREE -eq 1 ]
then
echo "Installing Embree"
Expand All @@ -553,7 +553,7 @@ then
else
ln -s ${DEST_DIR}/lib/libembree.so.2 ${DEST_DIR}/lib/libembree.so
fi

echo "Installing pyembree from source"
( ${GETFILE} "$PYEMBREE_URL" 2>&1 ) 1>> ${LOG_FILE} || do_exit
log_cmd unzip ${DEST_DIR}/src/master.zip
Expand Down Expand Up @@ -625,7 +625,7 @@ echo
echo " https://mail.python.org/archives/list/[email protected]/"
echo
echo "You must now prepend the following folder to your PATH environment variable:"
echo
echo
echo " $DEST_DIR/bin"
echo
echo "On Bash-style shells you can copy/paste the following command to "
Expand Down
44 changes: 22 additions & 22 deletions doc/source/analyzing/astropy_integrations.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,46 +10,46 @@ given documentation links.
Round-Trip Unit Conversions Between yt and AstroPy
--------------------------------------------------

AstroPy has a `symbolic units implementation <https://docs.astropy.org/en/stable/units/>`_
similar to that in yt. For this reason, we have implemented "round-trip"
conversions between :class:`~yt.units.yt_array.YTArray` objects
and AstroPy's :class:`~astropy.units.Quantity` objects. These are implemented
in the :meth:`~yt.units.yt_array.YTArray.from_astropy` and
AstroPy has a `symbolic units implementation <https://docs.astropy.org/en/stable/units/>`_
similar to that in yt. For this reason, we have implemented "round-trip"
conversions between :class:`~yt.units.yt_array.YTArray` objects
and AstroPy's :class:`~astropy.units.Quantity` objects. These are implemented
in the :meth:`~yt.units.yt_array.YTArray.from_astropy` and
:meth:`~yt.units.yt_array.YTArray.to_astropy` methods. See
:ref:`fields_and_unit_conversion` for more information.

FITS Image File Reading and Writing
-----------------------------------

Reading and writing FITS files is supported in yt using
Reading and writing FITS files is supported in yt using
`AstroPy's FITS file handling. <https://docs.astropy.org/en/stable/io/fits/>`_

yt has basic support for reading two and three-dimensional image data from FITS
files. Some limited ability to parse certain types of data (e.g., spectral cubes,
images with sky coordinates, images written using the
:class:`~yt.visualization.fits_image.FITSImageData` class described below) is
possible. See :ref:`loading-fits-data` for more information.
images with sky coordinates, images written using the
:class:`~yt.visualization.fits_image.FITSImageData` class described below) is
possible. See :ref:`loading-fits-data` for more information.

Fixed-resolution two-dimensional images generated from datasets using yt (such as
slices or projections) and fixed-resolution three-dimensional grids can be written
to FITS files using yt's :class:`~yt.visualization.fits_image.FITSImageData` class
and its subclasses. Multiple images can be combined into a single file, operations
can be performed on the images and their coordinates, etc. See :ref:`writing_fits_images`
for more information.
Fixed-resolution two-dimensional images generated from datasets using yt (such as
slices or projections) and fixed-resolution three-dimensional grids can be written
to FITS files using yt's :class:`~yt.visualization.fits_image.FITSImageData` class
and its subclasses. Multiple images can be combined into a single file, operations
can be performed on the images and their coordinates, etc. See :ref:`writing_fits_images`
for more information.

Converting Field Container and 1D Profile Data to AstroPy Tables
----------------------------------------------------------------

Data in field containers, such as spheres, rectangular regions, rays,
Data in field containers, such as spheres, rectangular regions, rays,
cylinders, etc., are represented as 1D YTArrays. A set of these arrays
can then be exported to an
`AstroPy Table <http://docs.astropy.org/en/stable/table/>`_ object,
specifically a
can then be exported to an
`AstroPy Table <http://docs.astropy.org/en/stable/table/>`_ object,
specifically a
`QTable <http://docs.astropy.org/en/stable/table/mixin_columns.html#quantity-and-qtable>`_.
``QTable`` is unit-aware, and can be manipulated in a number of ways
and written to disk in several formats, including ASCII text or FITS
files. For more details, see :ref:`fields-astropy-export`.
and written to disk in several formats, including ASCII text or FITS
files. For more details, see :ref:`fields-astropy-export`.

Similarly, 1D profile objects can also be exported to AstroPy
Similarly, 1D profile objects can also be exported to AstroPy
``QTable``, optionally writing all of the profile bins or only the ones
which are used. For more details, see :ref:`profile-astropy-export`.
2 changes: 1 addition & 1 deletion doc/source/analyzing/domain_analysis/clump_finding.rst
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ the info item you have defined via the ``info`` attribute of a ``Clump`` object:
clump = leaf_clumps[0]
print(clump.info['mass_weighted_jeans_mass'])
Besides the quantities calculated by default, the following are available:
``center_of_mass`` and ``distance_to_main_clump``.

Expand Down
44 changes: 22 additions & 22 deletions doc/source/analyzing/fields.rst
Original file line number Diff line number Diff line change
Expand Up @@ -396,9 +396,9 @@ within the dataset, as well as their abundances and ionization states. Examples
The naming scheme for the fields starts with prefixes in the form ``MM[_[mp][NN]]``. ``MM``
is the molecule, defined as a concatenation of atomic symbols and numbers, with no spaces or
underscores. The second sequence is only required if ionization states are present in the
dataset, and is of the form ``p`` and ``m`` to indicate "plus" or "minus" respectively,
dataset, and is of the form ``p`` and ``m`` to indicate "plus" or "minus" respectively,
followed by the number. If a given species has no ionization states given, the prefix is
simply ``MM``.
simply ``MM``.

For the examples above, the prefixes would be:

Expand Down Expand Up @@ -534,58 +534,58 @@ as detailed below (see :ref:`field_parameters` for more information).

The relative fields which are currently supported for gas fields are:

* ``("gas", "relative_velocity_{xyz}")``, defined by setting the
* ``("gas", "relative_velocity_{xyz}")``, defined by setting the
``"bulk_velocity"`` field parameter
* ``("gas", "relative_magnetic_field_{xyz}")``, defined by setting the
* ``("gas", "relative_magnetic_field_{xyz}")``, defined by setting the
``"bulk_magnetic_field"`` field parameter

For particle fields, for a given particle type ``ptype``, the relative
For particle fields, for a given particle type ``ptype``, the relative
fields which are supported are:

* ``(ptype, "relative_particle_position")``, defined by setting the
* ``(ptype, "relative_particle_position")``, defined by setting the
``"center"`` field parameter
* ``(ptype, "relative_particle_velocity")``, defined by setting the
* ``(ptype, "relative_particle_velocity")``, defined by setting the
``"bulk_velocity"`` field parameter
* ``(ptype, "relative_particle_position_{xyz}")``, defined by setting the
* ``(ptype, "relative_particle_position_{xyz}")``, defined by setting the
``"center"`` field parameter
* ``(ptype, "relative_particle_velocity_{xyz}")``, defined by setting the
* ``(ptype, "relative_particle_velocity_{xyz}")``, defined by setting the
``"bulk_velocity"`` field parameter

These fields are in use when defining magnitude fields, line-of-sight fields,
etc.. The ``"bulk_{}"`` field parameters are ``[0.0, 0.0, 0.0]`` by default,
and the ``"center"`` field parameter depends on the data container in use.
and the ``"center"`` field parameter depends on the data container in use.

There is currently no mechanism to create new relative fields, but one may be
added at a later time.
added at a later time.

.. _los_fields:

Line of Sight Fields
--------------------

In astrophysics applications, one often wants to know the component of a vector
field along a given line of sight. If you are doing a projection of a vector
field along an axis, or just want to obtain the values of a vector field
component along an axis, you can use a line-of-sight field. For projections,
In astrophysics applications, one often wants to know the component of a vector
field along a given line of sight. If you are doing a projection of a vector
field along an axis, or just want to obtain the values of a vector field
component along an axis, you can use a line-of-sight field. For projections,
this will be handled automatically:

.. code-block:: python
prj = yt.ProjectionPlot(ds, "z", ("gas", "velocity_los"),
prj = yt.ProjectionPlot(ds, "z", ("gas", "velocity_los"),
weight_field=("gas", "density"))
Which, because the axis is ``"z"``, will give you the same result if you had
projected the `"velocity_z"`` field. This also works for off-axis projections:

.. code-block:: python
prj = yt.OffAxisProjectionPlot(ds, [0.1, -0.2, 0.3], ("gas", "velocity_los"),
prj = yt.OffAxisProjectionPlot(ds, [0.1, -0.2, 0.3], ("gas", "velocity_los"),
weight_field=("gas", "density"))
This shows that the projection axis can be along a principle axis of the domain
or an arbitrary off-axis 3-vector (which will be automatically normalized). If
you want to examine a line-of-sight vector within a 3-D data object, set the
This shows that the projection axis can be along a principle axis of the domain
or an arbitrary off-axis 3-vector (which will be automatically normalized). If
you want to examine a line-of-sight vector within a 3-D data object, set the
``"axis"`` field parameter:

.. code-block:: python
Expand All @@ -602,10 +602,10 @@ you want to examine a line-of-sight vector within a 3-D data object, set the

If you need to change the axis of the line of sight on the *same* data container
(sphere, box, cylinder, or whatever), you will need to delete the field using
``del dd["velocity_los"]`` and re-generate it.
``del dd["velocity_los"]`` and re-generate it.

At this time, this functionality is enabled for the velocity and magnetic vector
fields, ``("gas", "velocity_los")`` and ``("gas", "magnetic_field_los")``. The
fields, ``("gas", "velocity_los")`` and ``("gas", "magnetic_field_los")``. The
following fields built into yt make use of these line-of-sight fields:

* ``("gas", "sz_kinetic")`` uses ``("gas", "velocity_los")``
Expand Down
10 changes: 5 additions & 5 deletions doc/source/analyzing/filtering.rst
Original file line number Diff line number Diff line change
Expand Up @@ -110,14 +110,14 @@ The following exclude and include functions are supported:
- :func:`~yt.data_objects.data_containers.YTSelectionContainer3D.include_inside` - Only include values inside closed interval
- :func:`~yt.data_objects.data_containers.YTSelectionContainer3D.exclude_inside` - Exclude values inside closed interval
- :func:`~yt.data_objects.data_containers.YTSelectionContainer3D.include_outside` - Only include values outside closed interval
- :func:`~yt.data_objects.data_containers.YTSelectionContainer3D.exclude_outside` - Exclude values outside closed interval
- :func:`~yt.data_objects.data_containers.YTSelectionContainer3D.exclude_outside` - Exclude values outside closed interval
- :func:`~yt.data_objects.data_containers.YTSelectionContainer3D.exclude_nan` - Exclude NaN values
- :func:`~yt.data_objects.data_containers.YTSelectionContainer3D.include_above` - Only include values above given value
- :func:`~yt.data_objects.data_containers.YTSelectionContainer3D.exclude_above` - Exclude values above given value
- :func:`~yt.data_objects.data_containers.YTSelectionContainer3D.include_below` - Only include values below given balue
- :func:`~yt.data_objects.data_containers.YTSelectionContainer3D.exclude_below` - Exclude values below given value


Cut regions can also operate on particle fields, but a single cut region object
cannot operate on both particle fields and mesh fields at the same time.

Expand Down Expand Up @@ -190,7 +190,7 @@ our dataset ``ds`` and treat them as any other particle field. In addition,
it created some ``deposit`` fields, where the particles were deposited on to
the grid as mesh fields.

We can create additional filters building on top of the filters we have.
We can create additional filters building on top of the filters we have.
For example, we can identify the young stars based on their age, which is
the difference between current time and their creation_time.

Expand All @@ -204,11 +204,11 @@ the difference between current time and their creation_time.
yt.add_particle_filter("young_stars", function=young_stars,
filtered_type='stars', requires=["creation_time"])
If we properly define all the filters using the decorator ``yt.particle_filter``
If we properly define all the filters using the decorator ``yt.particle_filter``
or the function ``yt.add_particle_filter`` in advance. We can add the filter
we need to the dataset. If the ``filtered_type`` is already defined but not
added to the dataset, it will automatically add the filter first. For example,
if we add the ``young_stars`` filter, which is filtered from ``stars``,
if we add the ``young_stars`` filter, which is filtered from ``stars``,
to the dataset, it will also add ``stars`` filter to the dataset.

.. code-block:: python
Expand Down
Loading

0 comments on commit 12068b7

Please sign in to comment.