[yt-svn] commit/yt: 3 new changesets
commits-noreply at bitbucket.org
commits-noreply at bitbucket.org
Mon Mar 13 12:27:35 PDT 2017
3 new commits in yt:
https://bitbucket.org/yt_analysis/yt/commits/45185f8de38e/
Changeset: 45185f8de38e
Branch: yt
User: brittonsmith
Date: 2017-03-03 23:09:37+00:00
Summary: Updating docstring.
Affected #: 1 file
diff -r 3eca2ae80ab14a48b643d3055d7d3c0933fa77ae -r 45185f8de38eb5d2d186414fc7fd1867362ccdc6 yt/analysis_modules/halo_analysis/halo_catalog.py
--- a/yt/analysis_modules/halo_analysis/halo_catalog.py
+++ b/yt/analysis_modules/halo_analysis/halo_catalog.py
@@ -72,11 +72,11 @@
--------
>>> # create profiles or overdensity vs. radius for each halo and save to disk
- >>> from yt.mods import *
+ >>> import yt
>>> from yt.analysis_modules.halo_analysis.api import *
- >>> data_ds = load("DD0064/DD0064")
- >>> halos_ds = load("rockstar_halos/halos_64.0.bin",
- ... output_dir="halo_catalogs/catalog_0064")
+ >>> data_ds = yt.load("DD0064/DD0064")
+ >>> halos_ds = yt.load("rockstar_halos/halos_64.0.bin",
+ ... output_dir="halo_catalogs/catalog_0064")
>>> hc = HaloCatalog(data_ds=data_ds, halos_ds=halos_ds)
>>> # filter out halos with mass < 1e13 Msun
>>> hc.add_filter("quantity_value", "particle_mass", ">", 1e13, "Msun")
@@ -91,7 +91,7 @@
>>> hc.create()
>>> # load in the saved halo catalog and all the profile data
- >>> halos_ds = load("halo_catalogs/catalog_0064/catalog_0064.0.h5")
+ >>> halos_ds = yt.load("halo_catalogs/catalog_0064/catalog_0064.0.h5")
>>> hc = HaloCatalog(halos_ds=halos_ds,
output_dir="halo_catalogs/catalog_0064")
>>> hc.add_callback("load_profiles", output_dir="profiles")
https://bitbucket.org/yt_analysis/yt/commits/c325ba44105d/
Changeset: c325ba44105d
Branch: yt
User: brittonsmith
Date: 2017-03-03 23:27:54+00:00
Summary: Adding discussion of loading halo catalog datasets.
Affected #: 2 files
diff -r 45185f8de38eb5d2d186414fc7fd1867362ccdc6 -r c325ba44105d349b1697fcd6c16faf3efb969c48 doc/source/analyzing/analysis_modules/halo_catalogs.rst
--- a/doc/source/analyzing/analysis_modules/halo_catalogs.rst
+++ b/doc/source/analyzing/analysis_modules/halo_catalogs.rst
@@ -481,7 +481,9 @@
A :class:`~yt.analysis_modules.halo_analysis.halo_catalog.HaloCatalog`
saved to disk can be reloaded as a yt dataset with the
-standard call to ``yt.load``. Any side data, such as profiles, can be reloaded
+standard call to ``yt.load``. See :ref:`halocatalog` for a demonstration
+of loading and working only with the catalog.
+Any side data, such as profiles, can be reloaded
with a ``load_profiles`` callback and a call to
:func:`~yt.analysis_modules.halo_analysis.halo_catalog.HaloCatalog.load`.
diff -r 45185f8de38eb5d2d186414fc7fd1867362ccdc6 -r c325ba44105d349b1697fcd6c16faf3efb969c48 doc/source/examining/loading_data.rst
--- a/doc/source/examining/loading_data.rst
+++ b/doc/source/examining/loading_data.rst
@@ -1458,7 +1458,8 @@
If you have access to both the halo catalog and the simulation snapshot from
the same redshift, additional analysis can be performed for each halo using
-:ref:`halo_catalog`.
+:ref:`halo_catalog`. The resulting product can be reloaded in a similar manner
+to the other halo catalogs shown here.
.. _rockstar:
@@ -1600,6 +1601,39 @@
# The halo mass
print(ad["FOF", "particle_mass"])
+.. _halocatalog:
+
+HaloCatalog
+^^^^^^^^^^^
+
+These are catalogs produced by the analysis discussed in :ref:`halo_catalog`.
+In the case where multiple files were produced, one need only provide the path
+to a single one of them. The field type for all fields is "halos". The fields
+available here are similar to other catalogs. Any addition
+:ref:`halo_catalog_quantities` will also be accessible as fields.
+
++-------------------+---------------------------+
+| HaloCatalog field | yt field name |
++===================+===========================+
+| halo id | particle_identifier |
++-------------------+---------------------------+
+| virial mass | particle_mass |
++-------------------+---------------------------+
+| virial radius | virial_radius |
++-------------------+---------------------------+
+| halo position | particle_position_(x,y,z) |
++-------------------+---------------------------+
+| halo velocity | particle_velocity_(x,y,z) |
++-------------------+---------------------------+
+
+.. code-block:: python
+
+ import yt
+ ds = yt.load("catalogs/catalog.0.h5")
+ ad = ds.all_data()
+ # The halo mass
+ print(ad["halos", "particle_mass"])
+
.. _loading-openpmd-data:
openPMD Data
https://bitbucket.org/yt_analysis/yt/commits/f3015d6048eb/
Changeset: f3015d6048eb
Branch: yt
User: ngoldbaum
Date: 2017-03-13 19:27:28+00:00
Summary: Merged in brittonsmith/yt (pull request #2535)
Minor HaloCatalog docs additions
Approved-by: Kacper Kowalik
Approved-by: Nathan Goldbaum
Affected #: 3 files
diff -r 207d62a0039957c5adb7e07fe7d0bcf73ab3e8c7 -r f3015d6048eb7cd636f07151284643db38cec6fc doc/source/analyzing/analysis_modules/halo_catalogs.rst
--- a/doc/source/analyzing/analysis_modules/halo_catalogs.rst
+++ b/doc/source/analyzing/analysis_modules/halo_catalogs.rst
@@ -481,7 +481,9 @@
A :class:`~yt.analysis_modules.halo_analysis.halo_catalog.HaloCatalog`
saved to disk can be reloaded as a yt dataset with the
-standard call to ``yt.load``. Any side data, such as profiles, can be reloaded
+standard call to ``yt.load``. See :ref:`halocatalog` for a demonstration
+of loading and working only with the catalog.
+Any side data, such as profiles, can be reloaded
with a ``load_profiles`` callback and a call to
:func:`~yt.analysis_modules.halo_analysis.halo_catalog.HaloCatalog.load`.
diff -r 207d62a0039957c5adb7e07fe7d0bcf73ab3e8c7 -r f3015d6048eb7cd636f07151284643db38cec6fc doc/source/examining/loading_data.rst
--- a/doc/source/examining/loading_data.rst
+++ b/doc/source/examining/loading_data.rst
@@ -1458,7 +1458,8 @@
If you have access to both the halo catalog and the simulation snapshot from
the same redshift, additional analysis can be performed for each halo using
-:ref:`halo_catalog`.
+:ref:`halo_catalog`. The resulting product can be reloaded in a similar manner
+to the other halo catalogs shown here.
.. _rockstar:
@@ -1600,6 +1601,39 @@
# The halo mass
print(ad["FOF", "particle_mass"])
+.. _halocatalog:
+
+HaloCatalog
+^^^^^^^^^^^
+
+These are catalogs produced by the analysis discussed in :ref:`halo_catalog`.
+In the case where multiple files were produced, one need only provide the path
+to a single one of them. The field type for all fields is "halos". The fields
+available here are similar to other catalogs. Any addition
+:ref:`halo_catalog_quantities` will also be accessible as fields.
+
++-------------------+---------------------------+
+| HaloCatalog field | yt field name |
++===================+===========================+
+| halo id | particle_identifier |
++-------------------+---------------------------+
+| virial mass | particle_mass |
++-------------------+---------------------------+
+| virial radius | virial_radius |
++-------------------+---------------------------+
+| halo position | particle_position_(x,y,z) |
++-------------------+---------------------------+
+| halo velocity | particle_velocity_(x,y,z) |
++-------------------+---------------------------+
+
+.. code-block:: python
+
+ import yt
+ ds = yt.load("catalogs/catalog.0.h5")
+ ad = ds.all_data()
+ # The halo mass
+ print(ad["halos", "particle_mass"])
+
.. _loading-openpmd-data:
openPMD Data
diff -r 207d62a0039957c5adb7e07fe7d0bcf73ab3e8c7 -r f3015d6048eb7cd636f07151284643db38cec6fc yt/analysis_modules/halo_analysis/halo_catalog.py
--- a/yt/analysis_modules/halo_analysis/halo_catalog.py
+++ b/yt/analysis_modules/halo_analysis/halo_catalog.py
@@ -72,11 +72,11 @@
--------
>>> # create profiles or overdensity vs. radius for each halo and save to disk
- >>> from yt.mods import *
+ >>> import yt
>>> from yt.analysis_modules.halo_analysis.api import *
- >>> data_ds = load("DD0064/DD0064")
- >>> halos_ds = load("rockstar_halos/halos_64.0.bin",
- ... output_dir="halo_catalogs/catalog_0064")
+ >>> data_ds = yt.load("DD0064/DD0064")
+ >>> halos_ds = yt.load("rockstar_halos/halos_64.0.bin",
+ ... output_dir="halo_catalogs/catalog_0064")
>>> hc = HaloCatalog(data_ds=data_ds, halos_ds=halos_ds)
>>> # filter out halos with mass < 1e13 Msun
>>> hc.add_filter("quantity_value", "particle_mass", ">", 1e13, "Msun")
@@ -91,7 +91,7 @@
>>> hc.create()
>>> # load in the saved halo catalog and all the profile data
- >>> halos_ds = load("halo_catalogs/catalog_0064/catalog_0064.0.h5")
+ >>> halos_ds = yt.load("halo_catalogs/catalog_0064/catalog_0064.0.h5")
>>> hc = HaloCatalog(halos_ds=halos_ds,
output_dir="halo_catalogs/catalog_0064")
>>> hc.add_callback("load_profiles", output_dir="profiles")
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