Skip to content

Releases: yt-project/yt

yt 4.1.0

07 Oct 14:11
f8efdf6
Compare
Choose a tag to compare

Summary

This is the first feature release in the yt 4.x series.
It contains about a year of work by many contributors, with many new features and improvements to the code base. It is also the first release to officially support Python 3.11
Some deprecations from yt < 4 are now expired, some minor backwards incompatibilities are expected. Anything broken on purpose in this version should correspond to a warning in yt 4.0.x, anything beyond that should be considered a regression; please report any unexpected breaking change.

How to upgrade

To upgrade from PyPI, run

python -m pip install --upgrade yt

or, with conda

conda update --channel conda-forge yt

Note that binaries for Python 3.11 are only available via pip.

🌟 Highlights

Newly supported data formats

yt 4.1 ships with 3 brand new frontends !

Improved loading for "ambiguous" data formats

yt.load sometimes raises YTAmbiguousDataType when more than one data format appears to be valid. Ideally this should never happen, but in some cases it is very frequent, in particular with BoxLib data, for which we support many hard-to-distinguish flavours.
In order to mitigate this issue, yt.load now accepts a hint keyword argument. For instance

yt.load("det_x_plt00000", hint="castro")

Stretched grid support

yt now has experimental support for "stretched" grid schemes (grids with arbitrarily varying cell width).
It is currently not compatible with AMR.

The following contains a non-exhaustive list of changes

🐛 Bug fixes

#2538 Combining set_zlim and set_unit methods doesn't work as expected (fixed in #3849, by @neutrinoceros )
#3901 Cannot plot data containing both finite and infinite values and use set_zlim (fixed in #3849, by @neutrinoceros)
#3986 Restore and fix flexible linear threshold guessing in symmetric logarithmic plots, by @chrishavlin (issue #3944)
#4021 Fix multiple issues with magnetic field derived fields definitions, by @neutrinoceros
#4075 Fix scaling in off-axis projections of filtered gas particles, by @jzuhone
#4098 Correcting deceptive typo in an error message, by @chummels
#4149 Fix a bug in the computation of metallicity for the generation of X-ray emission fields, by @geoyuqiu

🚀 New features

#3346 Allow to set units from config file, by @cphyc
#3421 Allow stream frontends to accept callables, by @matthewturk
#3443 Directly open compressed files1, by @cphyc
#3640 Add swap_axes, flip_horizontal and flip_vertical plot modifier methods, by @chrishavlin
#3666 Implement hint keyword argument for yt.load to help lifting ambiguities in data formats, by @neutrinoceros (issues #3510 by @mameehan5 and #3005 by @zingale)
#3686 Allow 'factor' argument in plot annotation methods to accept 2-tuples to distinguish x/y resolutions, by @neutrinoceros
#3756 Expose FRB filtering API, by @cphyc and @neutrinoceros
#3812 Allow for different normalizations of magnetic fields in CGS2, by @jzuhone (issue #3471 by @forrestglines)
#3822 Add support for varying colors in quiver annotations, by @neutrinoceros
#3940 Add "min" method to ProjectionPlot, by @rjfarber
#3489 yt.ProjectionPlot can now perform off-axis projections3, by @neutrinoceros (also #3723 and #3737)
#3817 Add support for VelocityCallback and MagFieldCallBack in spherical coordinates, by @neutrinoceros
#3989 Add support for projecting a field's standard deviation, by @jzuhone
#4063 Add data_source argument to covering grid, by @chrishavlin
#4119 Allow passing a dataset as a data source to ParticlePhasePlot, by @neutrinoceros
#4121 Add public API render methods to PlotContainer and FixedResolutionBuffer, by @neutrinoceros
#4142 ENH: add API to switch raytracing engine at runtime, by @neutrinoceros

experimental features

#2567 First cut at showing multiple transfer functions on VR, by @zingale
#2998 Enable variable cell widths for grid datasets #2998, by @matthewturk
#3849 Add ability to use colorbar norms other than linear, log and symlog, by @neutrinoceros (issue #3840)

♻️ Optimisations and refactors

Performance optimisations

#2416 Stop preallocating particles, by @matthewturk and @chrishavlin, issue #2383 by @zhafen
#3439 Cache _determine_fields for a given dataset by @Xarthisius
#3469 Optimise memory layout for particle oct container, by @themousepotato
#4029 Only compute field suggestions if YTFieldNotFound isn't caught, by @neutrinoceros
#3935 Import optional dependencies lazily4, by @neutrinoceros
#4025 Optimise startup time, by @neutrinoceros
#4037 First steps toward utilizing the octree infrastructure as an engine for block-structured data, by @BolunThompson
#4071 Optimise some grid selection operations by skipping unnecessary symbolic unit computations, by @yipihey
#4079 Optimise radius calculation, by @yipihey (+ #4091 by @brittonsmith)

User experience and developer experience improvements

#3065 Make Scene.save less verbose, by @neutrinoceros
#3436 Improve clarity of error message for region slicing with 2D dataset, by @neutrinoceros
#3495 Warn in case a Dataset subclass is redefined, by @neutrinoceros
#3519 Improve user input validation for PLViewerMPL._setup_origin, by @neutrinoceros
#3525 Allow direct dataset instantiation using the user path '~' glyph, consistently with yt.load, by @neutrinoceros
#3527 Improve formatting for YTUnidentifiedDataType exception, by @neutrinoceros
#3621 Improve verbosity of yt.enable_parallelism in case of error, by @neutrinoceros

Quality improvements and refactors

#3526 Particle reader cleanup, by @matthewturk
#3546 Setup basic type checking and fix existing type errors, by @neutrinoceros
#3617 Factorise coordinate handler, by @cphyc
#3624 Factorise code in halo containers, by @cphyc
#3626 Decouple yt.config from initialisation5, by @neutrinoceros
#3772 Avoid storing relative paths in Dataset attributes, by @neutrinoceros
#3920 Improve formatting consistency in YTException error messages, by @neutrinoceros
#3957 Refactor plot callbacks registration, by @neutrinoceros (issue #3945)
#3998 Update to fields used in Enzo answer testing, by @jwise77
#4116 Avoid subclassing builtin dict, by @neutrinoceros
#4057 Cleanup dead attribute Dataset.file_style, by @neutrinoceros
#4125 Stop using deprecated np.int, by @neutrinoceros
#4143 Updating Firefly-dependent areas to match API changes and PyPI packaging, by @mtryan83

📚 Documentation

#3395 and #3412 Avoid using pylab in docs, by @neutrinoceros
#3608 Document how Dataset._is_valid works, by @neutrinoceros (issue #1018 by @ngoldbaum)
#3627 Remove a false statement from yt.funcs.rootonly's docstring, by @neutrinoceros (issue #2054 by @DTHaydon)
#3642 Fix a broken example (change of api in the Athena frontend), by @neutrinoceros (issue #3641)
#3813 Update contribution guidelines, by @neutrinoceros (issue #2554 by @munkm)
#3926 Update broken link to re-licensing blog post, by @tracykteal
#3982 Fix broken annotate_particles example, by @chrishavlin (issue #3968 by @neutrinoceros)
#4080 Document plot callbacks extensibility, by @neutrinoceros (issue #4072)
#4124 Update instructions and redirections for installing cartopy, by @neutrinoceros
#4148 Add more info to magnetic fields documentation, by @jzuhone

🤖 Frontends

Frontend-specific improvements and bug fixes

[AMRVAC]
#3508 Optimise reading speed, by @neutrinoceros

[AREPO]
#3815 Add three new derived fields, by @jzuhone
#3258 New fields for Arepo and Gadget frontends, by @jzuhone
#4120 Add Arepo stellar photometric fields , by @jzuhone

[BoxLib]
#3515 Add a missing close statement, by @mameehan5
#4112 allow reading of 1D particle data, by @dpgrote

[Enzo-E]
#3914 Update Enzo-E particle mass/density distinction, by @brittonsmith
#4097 Store the Enzo-E version number in parameters attribute of EnzoEDataset, by @mabruzzo
#4099 Improved Enzo-E frontend's determination of fluid properties, by @mabruzzo

[Gadget]
#3258 New fields for Arepo and Gadget frontends, by @jzuhone
#3455 Make sure we add the Parameters group to hvals if it's present, by @jzuhone

[GAMER]
#4070 Use lookback time in cosmological simulation, by @koarakawaii

[RAMSES]
#3332 Allow user customization of RAMSES field loading, by @cphyc

💣 Deprecations

Expired deprecations and known-breaking changes

#3240 Deprecation cycle (4.0 -> 4.1), by @neutrinoceros
#3957 Deprecate dict argument plot_args in annotate_* methods where a **kwargs is sufficient, by @neutrinoceros
#3970 Turn ambiguous fields warnings into errors[^8], by @neutrinoceros (issues #3416, and #3235 by @cphyc)

#4142 changed the default ray tracing engine from "embree" to "yt" (builtin engine). Previous versions of yt would switch to embree at startup if pyembree was installed. This version requires that embree be explicitly required, either with configuration file:

[yt]
ray_tracing_engine = "embree"

or at runtime

from yt.visualization.volume_rendering.api import set_raytracing_engine
set_...
  1. this feature requires ratarmount as an optional dependency to yt, currently only Linux is supported, see #3749

  2. at the moment this is only used in Athena and Athena++ frontends

  3. yt.SlicePlot is now a class (previously it was a function). Instantiating OffAxisProjectionPlot (resp OffAxisSlicePlot) directly is now unnecessary (but still supported)

  4. with the exception of netCDF4, which is still imported at startup time if available

  5. a consequence of this patch is that yt will no longer create configuration files on startup if it can't find one

Read more

yt 4.0.5

11 Aug 19:35
5bacf12
Compare
Choose a tag to compare

Summary

This is the fifth bugfix release in the 4.0.x series.
This release fixes a critical bug with SPH particle selection in bounding boxes.

This release contains no new deprecation or removal and should be fully backward compatible, we recommend all users to upgrade.

How to upgrade

To upgrade from PyPI, run

python -m pip install --upgrade yt

or, with conda

conda update --channel conda-forge yt

Changes

Requirements

Python 3.6 to 3.10 is supported. The next feature release, yt 4.1, will require Python 3.7 or newer.

yt 4.0.4

27 May 17:59
5b9fe93
Compare
Choose a tag to compare

Summary

This is the fourth bugfix release in the 4.0.x series.
This release fixes a critical incompatibility with the upcoming release of Matplotlib (3.6). This should have no immediate effect but allow yt to be installed alongside Matplotlib 3.6.
It is our first release to be distributed for Mac ARM (M1) on PyPI.

This release contains no new deprecation or removal and should be fully backward compatible, we recommend all users to upgrade.

How to upgrade

To upgrade from PyPI, run

python -m pip install --upgrade yt

or, with conda

conda update --channel conda-forge yt

Changes

Requirements

Python 3.6 to 3.10 is supported. The next feature release, yt 4.1, will require Python 3.7 or newer.

yt 4.0.3

17 Apr 08:12
d4a45eb
Compare
Choose a tag to compare

Summary

This is the third bugfix release in the 4.0.x series.
This release fixes a critical bug in particle indexing, as well as many small 2D visualisation bugs. It also contains a couple frontend specific bugfixes, most notably for RAMSES.
It is our first release to be distributed for Mac ARM (M1) on conda-forge.

This release contains no new deprecation or removal and should be fully backward compatible, we recommend all users to upgrade.

How to upgrade

To upgrade from PyPI, run

python -m pip install --upgrade yt

or, with conda

conda update --channel conda-forge yt

Changes are categorised below.

Particle Indexing

Fix a bug in bitmap index for particle datasets #3788 by @langmm . This was the result of some checks of the number of refined zones in the bitmap index being set to higher than it should be.

This bug was responsible for some particle data files not being selected correctly, which manifested e.g. as "holes" in SlicePlots, and were first identified with AREPO data (see issue #3672 by @jzuhone)

2D Plotting

Symlog colorbars (used for plotting data with negative values)

We made some adjustments in how yt internally chooses to use symlog over log norms for 2D plots.

Plotting non-cartesian data

Misc

Frontend specific patches

Flash

OWLS

RAMSES

Requirements

Python 3.6 to 3.10 is supported. The next feature release, yt 4.1, will require Python 3.7 or newer.

Some small adjustments to yt's dependencies were done for this release, and listed here to the intention of downstream packagers

  • The unmaintained toml package isn't required anymore, yt now require tomli and tomli_w instead (issue #3830 by @henryiii)
  • pyyaml and IPython were previously declared as hard requirements when they are in fact not strictly necessary. pyaml is now used in tests instead of pyyaml, and IPython is now considered an optional dependency.
  • jinja2 is now pinned in docs builds (#3860 by @Xarthisius)

yt 4.0.2

04 Feb 20:57
ec7cd67
Compare
Choose a tag to compare

Summary

This is the second bugfix release in the 4.0.x series.
Most notably, this release fixes a number of compatibility issues with recent versions of Matplotlib (3.4 and 3.5). It is also the first release to officially support Python 3.10.

This release contains no new deprecation or removal and should be fully backward compatible, we recommend all users to upgrade.

How to upgrade

To upgrade via PyPI, run

python -m pip install --upgrade yt

or via conda-forge

conda update --channel conda-forge yt

Most impactful changes are categorised below. See the 4.0.2 milestone for a an comprehensive view of the release's content.

Matplotlib compatibility

typesetting issues

colorbar layout in plots using (sym)log norms

2D Plotting

Documentation

Frontend specific patches

Gadget

  • Make sure we add the Parameters group to hvals if it's present #3455 by @jzuhone
  • BUG: Take into account endianness when reading Gadget binary files #3688 by @cphyc (issue #3676 by @olebole)

Athena

These changes should actually not affect Athena users, they are only meant to open the design space for new frontends supporting vtk files (issue #3001)

  • BUG: implement AthenaDataset._is_valid #3424 by @neutrinoceros
  • ENH: loosen header matching for Athena vtk files to allow compatibility with single variable 'vtk outputs' #3490 by @neutrinoceros

GDF

Misc

Python 3.10 support

yt 4.0.2 is the first release for which we provide wheels for Python 3.10
We note that part of our test suite has yet to be ported from nosetest to pytest. Because nosetest isn't compatible with Python 3.10 (and has been unmaintained for years), this means that we currently run only a (large) subset of our tests with Python 3.10
In the unlikely event of a regression, please fill in a bug report

Requirements

For posterity, it may be worth noting that some of yt's minimal requirements were adjusted for this release:

  • IPython 2.0 or newer is now required (previously 1.0)
  • Matplotlib 2.1 or newer is now required (previously 2.0.2)
  • cmyt (ColorMaps from yt) is a new small dependency that was extracted from yt's main code base, this should have no impact on yt users.

Python 3.6 is still supported for this release. The next feature release, yt 4.1, will require Python 3.7 or newer.