diff --git a/doc/source/analyzing/astropy_integrations.rst b/doc/source/analyzing/astropy_integrations.rst index 28026361af7..f7ac4e0c49d 100644 --- a/doc/source/analyzing/astropy_integrations.rst +++ b/doc/source/analyzing/astropy_integrations.rst @@ -15,8 +15,7 @@ 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. +:meth:`~yt.units.yt_array.YTArray.to_astropy` methods. FITS Image File Reading and Writing ----------------------------------- @@ -48,7 +47,7 @@ specifically a `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`. +files. Similarly, 1D profile objects can also be exported to AstroPy ``QTable``, optionally writing all of the profile bins or only the ones diff --git a/doc/source/analyzing/domain_analysis/index.rst b/doc/source/analyzing/domain_analysis/index.rst index bce7fc2d9ce..3b9c9ec2aa8 100644 --- a/doc/source/analyzing/domain_analysis/index.rst +++ b/doc/source/analyzing/domain_analysis/index.rst @@ -62,9 +62,7 @@ not kept up to date as yt evolved. Tools in here are looking for a new owner and a new home. If you find something in here that you'd like to bring back to life, either by adding it to :ref:`yt-astro` or as part of your own package, you are welcome -to it! If you'd like any help, let us know! See -:ref:`yt_attic:attic_modules` for a list of inventory of the -attic. +to it! If you'd like any help, let us know! Extensions ---------- diff --git a/doc/source/analyzing/units.rst b/doc/source/analyzing/units.rst index 957b64d36a3..2b4ef466dae 100644 --- a/doc/source/analyzing/units.rst +++ b/doc/source/analyzing/units.rst @@ -160,6 +160,9 @@ about the dataset's code unit system and can convert data into it. Unit objects from ``unyt`` or ``yt.units`` will not know about any particular dataset's unit system. + +.. cosmological-units:: + Comoving units for Cosmological Simulations ------------------------------------------- diff --git a/doc/source/developing/creating_frontend.rst b/doc/source/developing/creating_frontend.rst index 61f12e11fb8..db0f3e317ba 100644 --- a/doc/source/developing/creating_frontend.rst +++ b/doc/source/developing/creating_frontend.rst @@ -39,7 +39,6 @@ To get started * make a new directory in ``yt/frontends`` with the name of your code and add the name into ``yt/frontends/api.py:_frontends`` (in alphabetical order). - * copy the contents of the ``yt/frontends/_skeleton`` directory, and replace every occurence of ``Skeleton`` with your frontend's name (preserving case). This adds a lot of boilerplate for the required classes and methods that are needed. diff --git a/doc/source/index.rst b/doc/source/index.rst index bd2f9b81750..15805469457 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -188,6 +188,7 @@ Table of Contents intro/index installing yt Quickstart + yt4differences yt3differences cookbook/index visualizing/index diff --git a/doc/source/reference/api/api.rst b/doc/source/reference/api/api.rst index 32bcfe64d73..6b91085f465 100644 --- a/doc/source/reference/api/api.rst +++ b/doc/source/reference/api/api.rst @@ -103,7 +103,7 @@ geometric. ~yt.data_objects.selection_objects.object_collection.YTDataCollection ~yt.data_objects.selection_objects.spheroids.YTSphere ~yt.data_objects.selection_objects.spheroids.YTEllipsoid - ~yt.data_objects.selection_objects.cur_region.YTCutRegion + ~yt.data_objects.selection_objects.cut_region.YTCutRegion ~yt.data_objects.index_subobjects.grid_patch.AMRGridPatch ~yt.data_objects.index_subobjects.octree_subset.OctreeSubset ~yt.data_objects.index_subobjects.particle_container.ParticleContainer @@ -157,27 +157,16 @@ These objects generate an "index" into multiresolution data. Units ----- -These classes and functions enable yt's symbolic unit handling system. +yt's symbolic unit handling system is now based on the external library unyt. In +complement, Dataset objects support the following methods to build arrays and +scalars with physical dimensions. .. autosummary:: yt.data_objects.static_output.Dataset.arr yt.data_objects.static_output.Dataset.quan - ~yt.units.unit_object.define_unit - ~yt.units.unit_object.Unit - ~yt.units.unit_registry.UnitRegistry - ~yt.units.unit_systems.UnitSystem - ~yt.units.yt_array.YTArray - ~yt.units.yt_array.YTQuantity - ~yt.units.yt_array.uconcatenate - ~yt.units.yt_array.uintersect1d - ~yt.units.yt_array.uunion1d - ~yt.units.yt_array.unorm - ~yt.units.yt_array.udot - ~yt.units.yt_array.uvstack - ~yt.units.yt_array.uhstack - ~yt.units.yt_array.ustack - ~yt.units.yt_array.display_ytarray + + Frontends --------- @@ -531,11 +520,11 @@ Field Functions ~yt.fields.field_info_container.FieldInfoContainer.add_field ~yt.data_objects.static_output.Dataset.add_field - ~yt.data_objects.static_outputs.add_deposited_particle_field - ~yt.data_objects.static_outputs.add_mesh_sampling_particle_field - ~yt.data_objects.static_outputs.add_smoothed_particle_field - ~yt.data_objects.static_outputs.add_gradient_fields - ~yt.frontends.stream.data_structures.add_SPH_fields + ~yt.data_objects.static_output.Dataset.add_deposited_particle_field + ~yt.data_objects.static_output.Dataset.add_mesh_sampling_particle_field + ~yt.data_objects.static_output.Dataset.add_smoothed_particle_field + ~yt.data_objects.static_output.Dataset.add_gradient_fields + ~yt.frontends.stream.data_structures.StreamParticleDataset.add_SPH_fields Particle Filters ---------------- @@ -797,7 +786,7 @@ Miscellaneous Types .. autosummary:: - ~yt.config.YTConfigParser + ~yt.config.YTConfig ~yt.utilities.parameter_file_storage.ParameterFileStore ~yt.utilities.parallel_tools.parallel_analysis_interface.ObjectIterator ~yt.utilities.parallel_tools.parallel_analysis_interface.ParallelAnalysisInterface @@ -819,7 +808,6 @@ Cosmology Calculator ~yt.utilities.cosmology.Cosmology.angular_scale ~yt.utilities.cosmology.Cosmology.luminosity_distance ~yt.utilities.cosmology.Cosmology.lookback_time - ~yt.utilities.cosmology.Cosmology.hubble_time ~yt.utilities.cosmology.Cosmology.critical_density ~yt.utilities.cosmology.Cosmology.hubble_parameter ~yt.utilities.cosmology.Cosmology.expansion_factor @@ -858,8 +846,6 @@ These are for the pytest infrastructure: .. autosummary:: - ~conftest.tempdir - ~conftest.answer_file ~conftest.hashing ~yt.utilities.answer_testing.answer_tests.grid_hierarchy ~yt.utilities.answer_testing.answer_tests.parentage_relationships @@ -867,8 +853,6 @@ These are for the pytest infrastructure: ~yt.utilities.answer_testing.answer_tests.projection_values ~yt.utilities.answer_testing.answer_tests.field_values ~yt.utilities.answer_testing.answer_tests.pixelized_projection_values - ~yt.utilities.answer_testing.answer_tests.simulated_halo_mass_function - ~yt.utilities.answer_testing.answer_tests.analytic_halo_mass_function ~yt.utilities.answer_testing.answer_tests.small_patch_amr ~yt.utilities.answer_testing.answer_tests.big_patch_amr ~yt.utilities.answer_testing.answer_tests.generic_array @@ -878,6 +862,5 @@ These are for the pytest infrastructure: ~yt.utilities.answer_testing.answer_tests.phase_plot_attribute ~yt.utilities.answer_testing.answer_tests.generic_image ~yt.utilities.answer_testing.answer_tests.axial_pixelization - ~yt.utilities.answer_testing.answer_tests.light_cone_projection ~yt.utilities.answer_testing.answer_tests.extract_connected_sets ~yt.utilities.answer_testing.answer_tests.VR_image_comparison diff --git a/doc/source/reference/changelog.rst b/doc/source/reference/changelog.rst index 73a00467703..4594c7e00c9 100644 --- a/doc/source/reference/changelog.rst +++ b/doc/source/reference/changelog.rst @@ -39,8 +39,8 @@ Major Changes and New Features ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -- New frontend support for the code AMRVAC. Many thanks to Clement Robert - and Niels Claes who were major contributors to this initiative. Relevant PRs include: +- New frontend support for the code AMRVAC. Many thanks to Clément Robert +and Niels Claes who were major contributors to this initiative. Relevant PRs include: - Initial PR to support AMRVAC native data files `PR 2321 `__. - added support for dust fields and derived fields diff --git a/doc/source/reference/configuration.rst b/doc/source/reference/configuration.rst index 0f6aa2f6fb4..7578c73e096 100644 --- a/doc/source/reference/configuration.rst +++ b/doc/source/reference/configuration.rst @@ -14,7 +14,9 @@ The Configuration The configuration is stored in simple text files (in the `toml `_ format). The files allow to set internal yt variables to custom default values to be used in future sessions. -The configuration can either be stored :ref:`globally` or :ref:`locally`. +The configuration can either be stored :ref:`globally` or :ref:`locally`. + +.. global-conf:: Global Configuration ^^^^^^^^^^^^^^^^^^^^ @@ -45,6 +47,8 @@ options from the configuration file, e.g.: $ yt config rm yt maximum_stored_datasets +.. local-conf:: + Local Configuration ^^^^^^^^^^^^^^^^^^^ diff --git a/doc/source/reference/demeshening.rst b/doc/source/reference/demeshening.rst index 9a6ab30c89e..0391b5387fc 100644 --- a/doc/source/reference/demeshening.rst +++ b/doc/source/reference/demeshening.rst @@ -9,7 +9,7 @@ an octree (the structure of which was determined by particle number density), in yt-4.0 this system was overhauled to utilize a `bitmap index`_ based on a space-filling curve, using a `enhanced word-aligned -hybrid` boolean array as their +hybrid`_ boolean array as their backend. .. note:: diff --git a/doc/source/visualizing/plots.rst b/doc/source/visualizing/plots.rst index faac964a2c4..33f2f9e2426 100644 --- a/doc/source/visualizing/plots.rst +++ b/doc/source/visualizing/plots.rst @@ -553,10 +553,10 @@ Two workaround methods are available for plotting non-SPH particles with off-axi projections. 1. :ref:`smooth-non-sph` - this method involves extracting particle data to be - reloaded with :ref:`~yt.loaders.load_particles` and using the - :ref:`~yt.frontends.stream.data_structures.add_SPH_fields` function to - create smoothing lengths. This works well for relatively small datasets, - but is not parallelized and may take too long for larger data. + reloaded with :meth:`~yt.loaders.load_particles` and using the + :meth:`~yt.frontends.stream.data_structures.StreamParticleDataset.add_SPH_fields` + function to create smoothing lengths. This works well for relatively small + datasets, but is not parallelized and may take too long for larger data. 2. Plot from a saved :class:`~yt.data_objects.construction_data_containers.YTCoveringGrid`, diff --git a/doc/source/yt4differences.rst b/doc/source/yt4differences.rst index 7b0547d9491..bdb30b77682 100644 --- a/doc/source/yt4differences.rst +++ b/doc/source/yt4differences.rst @@ -72,7 +72,7 @@ The list below is arranged in order of most to least important changes. field was actually a field for kinetic energy density, and so it has been renamed to ``"gas", "kinetic_energy_density"``. The old name still exists as an alias as of yt v4.0.0, but it will be removed in yt v4.1.0. See - :ref:`deprecated_field_names` below for more information. + next item below for more information. Other examples include ``"gas", "specific_thermal_energy"`` for thermal energy per unit mass, and ``("gas", "momentum_density_x")`` for the x-axis component of momentum density. See :ref:`efields` for more information. diff --git a/yt/loaders.py b/yt/loaders.py index b9ebd8dc985..0467e2ac1c4 100644 --- a/yt/loaders.py +++ b/yt/loaders.py @@ -1308,16 +1308,16 @@ def flatten(l): def load_sample( fn: Optional[str] = None, *, progressbar: bool = True, timeout=None, **kwargs ): - """ + r""" Load sample data with yt. - This is a simple wrapper around `yt.load` to include fetching + This is a simple wrapper around :func:`~yt.loaders.load` to include fetching data with pooch from remote source. The data registry table can be retrieved and visualized using - `yt.sample_data.api.get_data_registry_table()`. + :func:`~yt.sample_data.api.get_data_registry_table`. The `filename` column contains usable keys that can be passed - as the first positional argument to `load_sample`. + as the first positional argument to load_sample. Some data samples contain series of datasets. It may be required to supply the relative path to a specific dataset. @@ -1338,7 +1338,7 @@ def load_sample( Notes ----- - This function is experimental as of yt 4.0.0, do not rely on its exact behaviour. - - Any additional keyword argument is passed down to `yt.load`. + - Any additional keyword argument is passed down to :func:`~yt.loaders.load`. - In case of collision with predefined keyword arguments as set in the data registry, the ones passed to this function take priority. - Datasets with slashes '/' in their names can safely be used even on Windows.