Release Notes§
Version 2.1.4§
Released 16-07-2026
Bug Fixes§
47b5c34: Fix bug that raised an exception when a record was empty
Refactoring§
-
ff743e9: Add argumentcompat = 'no_conflicts'explicitly toxarray.mergecalls due tofuturewarningAccording to an xarray
FutureWarning, a future version of xarray will usecompat = 'override'as the default forxarray.merge.
Version 2.1.3§
Released 16-07-2026
Bug Fixes§
-
79edd1b: Several changes to make sure thatozzy.open_seriesandozzy.open_comparework with theopenpmdbackend -
8df975a: Workaround for openpmd-viewer issue #443 -
490f2d9: Foresee particle quantities that may not have themacroweightedattribute -
f003e3c: Bug for species with id information
Refactoring§
-
7d1d6af: Make look-up of simulation files more readableThe
find_quantsfunction inbackend_interfaceuses a regex pattern that should be defined at the top of each backend module to find groups of files belonging to a certain PIC code. The regex patterns for each backend have been modified such that each capturing group in the pattern is now named: "name", "number", "file_ending". This makes the code infind_quantsmore readable and less prone to bugs. -
0496273: Remove error handling for a missingtol-colorspackage, since it is now available on conda-forgeThe package
tol-colorsis a dependency of ozzy, but it used to be available only on PyPI. This means that it couldn't be specified as a requirement for the ozzy distribution on conda-forge. This is now resolved.
Version 2.1.2§
Released 14-07-2026
Bug Fixes§
7487756: Fix bug in part of backend that handles species data
Refactoring§
-
0e2447a: Updatenew_datasetfunction such that it's compatible with latest changes toxarray.dataset()In version v2026.04.0, the
Datasetconstructor stopped accepting aDatasetas thedata_varsargument.
Version 2.1.1§
Released 24-06-2026
Bug Fixes§
-
3783f30: Add error handling when some packages are missingA warning is now printed when one of
tol_colors,hvplotorIPythonpackages are not installed. Since (tol_colorsis not yet available on conda-forge)[https://github.com/conda-forge/staged-recipes/pull/29265], it is not installed by default in ozzy's conda-forge distribution (i.e. when ozzy is installed viacondaormamba). The dependencieshvplotandIPythonare not installed by default in ozzy's PyPI distribution (i.e. viapip).Note for developers: When installing ozzy via
poetry,hvplotandIPythonare also not installed by default. These dependencies are part of the optional group"interactive". To include them, runpoetry install -E interactiveinstead of the basicpoetry install.
Version 2.1.0§
Released 23-06-2026
Bug Fixes§
-
6d88b1a: Adddata_varsargument explicitly to xarrayopen_datasetandopen_mfdatasetfunctionsReceived
FutureWarningfrom xarray regarding thedata_varsargument. -
896223b: Makeupack_attrfunction accept more types of hdf5 attributes
Documentation§
-
08a4315: Update acknowledgment and license information to reflect the fact that paul tol's color schemes are not bundled directly with ozzy anymore -
dd47d78: Add openpmd examples to "reading files" section of user guide -
61e5207: Add openpmd examples toopenandopen_seriesdocstrings -
5391613: Update some details in user guide -
4b98ad1: Include link to xarray dataset documentation -
2f199d3: Include link to xarray dataset documentation -
4df715a: Update with information about openpmd backend -
2224d8a: Correct docstring forfilesargument ofozzy.open_series
Features§
-
b973357: Makeozzy.open_comparecompatible with openpmd filesThe
open_comparefunction assumes that each output quantity from a simulation code is associated with a set of files. openPMD files usually contain multiple quantities ("records") in a single set of files. This implementation tries to get around this, although it's probably not the best solution. -
ec070da: Implement openpmd backendozzy should now be able to read openPMD files in HDF5 format.
-
db425d0: Add quantity definitions for electric field and charge density -
4b0d0fc: Add very basic support for physical unit conversionStart a submodule to handle physical units with pint. At the moment, this feature is only used to parse the unit metadata in OpenPMD files. It might be interesting to extend unit support to other parts of ozzy.
-
4262909: Add helper function to find items in hdf5 files
Refactoring§
-
8ac8bb7: Importtol_colorsas a package instead of bundling the code directlyA Python implementation of Paul Tol's color schemes is now available as a package.
-
4e55913: Useimportlib.resources.as_fileto read csv file with lcode file endings -
96d198b: Stop requiring anumpy.ndarrayinunpack_attrfunction
Version 2.0.5§
Released 22-01-2026
Bug Fixes§
ba1e991: Fix some bugs related to thebinsargument in thehistandhist_projfunctions ofozzy.plotand addbinrangeandbinwidtharguments
Version 2.0.4§
Released 11-11-2025
Bug Fixes§
1ddd4af: Badly formulated if-statement in emittance functions
Version 2.0.3§
Released 11-11-2025
Bug Fixes§
577afa7: Improve handling of variable labels in ´get_emittance´
Documentation§
-
176bc05: Formatting issue in one of documentation pages -
928cb92: Add icon to mark external links, and open these links in new tab by default -
6e285d2: Add information about backend-specific arguments in theozzyopen functions
Refactoring§
-
3131e16: Change how emittance is handled for axisymmetric geometry inget_slice_emittance, update docstring -
afb8ca4: Change how emittance is handled for axisymmetric inget_emittance, update docstring
Version 2.0.2§
Released 06-11-2025
Bug Fixes§
1e3d55d: Bug that was preventing lcode files likeemaxf.datto be read
Documentation§
c966cd4: Correct typo in docstring oflcode_backends.convert_q
Refactoring§
-
70da7e3: Add argument toxarray.concatandxarray.mergecalls due to xarrayfuturewarningAdd the argument
join="outer"explicitly when callxarray.concatto avoid getting an error in the future, when xarray changes the default value ofjoinfrom"outer"to"exact". See warning:FutureWarning: In a future version of xarray the default value for join will change from join='outer' to join='exact'.
Version 2.0.1§
Released 05-09-2025
Bug Fixes§
bcd0bf6: Bug in helper functionozzy.utils.prep_file_inputwas preventing ozzy from finding files to open, raisingfilenotfounderror
Version 2.0.0§
Released 29-08-2025
Bug Fixes§
-
6404186: Fix bug inbin_into_grid(andget_phase_space, which depends on it) for axisymmetric dataThis bug was possibly producing incorrect results when
bin_into_gridorget_phase_spacewere called on an axisymmetric particle dataset, and where all of these conditions were met:-
r_varwas provided as an argument (other thanNone) -
for
get_phase_space, the argumentaxisymwas set toTrue -
the radial variable
r_varwas not part of either theaxes_ds(forbin_into_grid) orvars(forget_phase_space) argument
-
Documentation§
-
4ff3d2e: Restructure the "data object methods" section of the code reference and other small updates -
6cec2a7: Improve example ofconvert_qmethod
Features§
-
7855a10: Add function to get the weighted median of some variable in a particle datasetParticle data from PIC codes is often weighted (often in the form of an individual macroparticle "charge"), which means that the calculation of a median value is not as straightforward as for other discrete and unweighted data. This method ensures that a median value can be calculated correctly, taking the macroparticle weights into account.
This function can be called as a particle method, e.g.
part_ds.ozzy.get_weighted_mean, wherepart_dsis an ozzy particle Dataset object (i.e., with attributepic_data_type = "part").
Refactoring§
-
cb5973f: Make all arguments for variable names consistentSome functions have input arguments where the name of a certain variable can be specificied. The naming for this type of argument has been made consistent across the code. For example, the arguments
time_dimortvarhave been renamed tot_var.Breaking change:
TypeErrormay be raised when some functions are called using the old argument namesPlease make sure to update your scripts with the new arguments (e.g.
w_varinstead ofwvar). -
f668c5d: Add hidden method_contains_datavarsto ozzy dataset objects to simplify input validation in other parts of the codeGiven a list of variable names, this method checks whether each variable exists in the Dataset as a data variable and raises a
KeyErrorif it doesn't. This is useful when implementing new functions that require some data variables as input (for exampleget_emittanceorget_energy_spectrum).
Version 1.3.4§
Released 26-08-2025
Bug Fixes§
-
d3403f1: Turn offsavefig.transparentin defaultrcparamswhen using themoviefunctionEach frame was previously being saved with a transparent background, which meant that the movies produced with
ozzy.plot.moviewere superimposing all of the frames.
Version 1.3.3§
Released 29-07-2025
Bug Fixes§
3675499: Correct a bug inget_energy_spectrum
Version 1.3.2§
Released 29-07-2025
Bug Fixes§
6effaee: Correct a couple of bugs in the calculation of the normalized emittance
Version 1.3.1§
Released 23-07-2025
Bug Fixes§
-
8a02447: Error when trying to save the output ofget_slice_emittanceorget_energy_spectrumThese particle methods use a special binning and grouping function (
flox.xarray.xarray_reduce) for increased efficiency. However, this function creates a coordinate for the binned variable with the data typepandas.Interval, which makes it impossible to save the data withds.ozzy.save. The binned coordinate is now converted into a normalnumpyarray, using the midpoints of each interval element.
Documentation§
3242468: Add docstring to new utility functionconvert_interval_to_mid
Refactoring§
-
4fc223d: Add timing information to several particle methodsThe particle methods get_phase_space, get_emittance, get_slice_emittance, get_energy_spectrum now print the time taken to complete.
-
ef3420f: Add timing information to several particle methodsThe particle methods
get_phase_space,get_emittance,get_slice_emittance,get_energy_spectrumnow print the time taken to complete.
Version 1.3.0§
Released 16-07-2025
Bug Fixes§
-
2f8993b: Use absolute value of weight variable forozzy.plot.histandozzy.plot.hist_projThe weighting variable in data objects is often a charge (e.g.
do['q']), which means that it has a charge sign. This would show up in histograms as negative counts. -
ade7881: Accept filenames for beamfiles (and plasma and fields files) with more flexible patternsNow accepts the regex filename pattern
"beamfile\w*\.bin"instead of"beamfile.bin". The same applies toplasma.binandfields.binfiles.Before:
✅
beamfile.bin❌
beamfile_changed.bin❌
beamfile2.binNow:
✅
beamfile.bin✅
beamfile_changed.bin✅
beamfile2.bin -
cdf5a87: Bug inbin_into_gridwhere the time dimension was hardcoded as"t"
Documentation§
-
411f68d: Hide toc sidebar in homepage of documentation while keeping the marginsSolution adopted from this StackOverflow answer.
-
8e3538f: Update changelog manually
Features§
-
cfa8949: Add energy spectrum calculationAdd
get_energy_spectrummethod to particle datasets, which calculates energy histograms with proper binning and attribute handling. See documentation for examples of usage. -
a542991: Add method to get the slice emittanceget_slice_emittanceIncludes some changes to the
get_emittancemethod and its documentation. It is now possible to choose between the normalized and geometric emittance, for example.
Refactoring§
-
10eef35: The output ofget_slice_emittancenow adopts any label and units attributes provided withaxis_ds -
4d876ca: Add utility function to insert string at a given index -
fb3cc12: Addtime_dimandweight_vararguments inget_phase_spaceThe function
get_phase_spacecallsbin_into_grid, which was setting some defaults for thetime_dimandweight_vararguments. This is not the case anymore. -
f0e45a7: Addtime_dimandweight_vararguments inget_phase_spaceThe function
get_phase_spacecallsbin_into_grid, which was setting some defaults for thetime_dimandweight_vararguments. This is not the case anymore.
Version 1.2.10§
Released 23-06-2025
Bug Fixes§
-
3953907: Use absolute value of weight variable forozzy.plot.histandozzy.plot.hist_projThe weighting variable in data objects is often a charge (e.g.
do['q']), which means that it has a charge sign. This would show up in histograms as negative counts.
Documentation§
0e9829a: Update changelog manually
Version 1.2.9§
Released 20-06-2025
Bug Fixes§
-
f25affb: Accept filenames for beamfiles (and plasma and fields files) with more flexible patternsNow accepts the regex filename pattern
"beamfile\w*\.bin"instead of"beamfile.bin". The same applies toplasma.binandfields.binfiles.Before:
✅
beamfile.bin❌
beamfile_changed.bin❌
beamfile2.binNow:
✅
beamfile.bin✅
beamfile_changed.bin✅
beamfile2.bin
Version 1.2.8§
Released 20-06-2025
Bug Fixes§
4cc2da9: Bug inbin_into_gridwhere the time dimension was hardcoded as"t"
Version 1.2.7§
Released 23-05-2025
Bug Fixes§
-
741f0af: Ability to use paul tol's reversed colormaps by appending'_r' -
d5bcdcb: Assigndtypeto concatenated data before chunking
Version 1.2.6§
Released 08-05-2025
Bug Fixes§
-
d5d84f2: Make sure that raw files containing no particles at all can still be assigned times and concatenated -
824cfed: Bug for raw files with no particle tag data
Version 1.2.5§
Released 30-04-2025
Bug Fixes§
08ad9a6: Fix bug that was causing an error whenhistorhist_projwere called withweight_var = none
Version 1.2.4§
Released 30-04-2025
Bug Fixes§
89eac7e: Change algorithm so that spatially averaged (savg) grid data can be read
Refactoring§
-
83b988e: Tweaked some parameters inlocal_maxima_and_zero_crossingsto improve peak and zero finding -
0ff220f: Better formatting of progress bar invphi_from_fit -
a899159: Minor improvements to thevphi_from_fitfunction
Version 1.2.3§
Released 14-04-2025
Bug Fixes§
92a2ed0: Bug inozzy.plot.histandozzy.plot.hist_projfor weighted data
Version 1.2.2§
Released 09-04-2025
Bug Fixes§
1319ddf: Typo was preventingozzy.statisticsfrom being imported
Version 1.2.1§
Released 09-04-2025
Bug Fixes§
57daddd: Bug inlocal_maxima_and_zero_crossings
Documentation§
f4700b4: Correct typos in docstring forozzy.fields.local_maxima_and_zero_crossings
Version 1.2.0§
Released 03-04-2025
Features§
454aeee: Add function to find local field maxima and zero crossings
Version 1.1.2§
Released 17-02-2025
Bug Fixes§
46d59fc: Trigger new release to publish python-3.13-compatible update to pypi
Version 1.1.1§
Released 17-02-2025
Bug Fixes§
6066a3f: Update package dependencies so that package works with python 3.13
Version 1.1.0§
Released 17-02-2025
Documentation§
a156af7: Instruct users to use the functionozzy.utils.axis_from_extentto create the axes dataset required forbin_into_grid
Features§
-
7c39207: Add functions to plot distributions of particle dataAdd
ozzy.plot.histandozzy.plot.hist_projto easily plot density distributions (histograms) of particle data, taking advantage of the seaborn functionsseaborn.histplotandseaborn.jointplot.Previously it would have been necessary to bin the data first, and then plot, e.g.:
While now the following code is enough:import ozzy as oz import ozzy.plot as oplt # A particle data Dataset ds = oz.Dataset(..., pic_data_type="part") ds_ps = ds.ozzy.get_phase_space(["p2", "x2"]) ds_ps["rho"].plot()import ozzy as oz import ozzy.plot as oplt ds = oz.Dataset(..., pic_data_type='part') oplt.hist(ds, x="x2", y="p2")
Refactoring§
703dfd3: Changeozzy.plotdefaults to display a plot grid
Version 1.0.9§
Released 28-01-2025
Bug Fixes§
a3cfe10: One argument ofset_attr_if_existswas missing its default value, which was throwing an error e.g. whends.ozzy.savewas called
Version 1.0.8§
Released 24-01-2025
Bug Fixes§
83329ef: Fft method was throwing error due to data being a chunked dask array
Documentation§
85a5f71: Small formatting corrections
Version 1.0.7§
Released 26-11-2024
Bug Fixes§
48d0b14: Fix bug that would throw error when usingopen_comparewith multiple backends and with backend-specific keyword arguments
Documentation§
-
25b11d8: Disable instant loading since this causes the feedback widget to only show after reloading the page -
e2c93ce: Update installation instructions (now available onconda-forge) and update package dependencies (especiallymakedocs-material)
Version 1.0.6§
Released 13-11-2024
Bug Fixes§
65c7549: Expression with double quotes inside double quotes was throwing an error for python 3.10
Version 1.0.5§
Released 13-11-2024
Bug Fixes§
2c5fa8e: Remove obsolete argument forbackend.parse_datathat was being called fromozzy.open_compareand raising an error
Documentation§
60afa7d: Fix some broken links after update
Version 1.0.4§
Released 12-11-2024
Bug Fixes§
-
5cd488c: Fix error thrown bybin_into_gridwhen called on a data object that didn't contain a't'coordinate -
776a1a2: Fix missing-argument error when trying to readbeamfile.binfiles
Documentation§
-
b43f5dc: Update documentation -
6c726a5: Update "installation" and "getting started" page -
1bf9a95: Change heading formatting of changelog template
Refactoring§
825b7ab: Change how backend-specific arguments are passed from theopenfunctions to each backend (easier to extend)
Version 1.0.3§
Released 04-11-2024
Documentation§
1c50582: Correct changelog template
Version 1.0.2§
Released 04-11-2024
Documentation§
2d1afe0: Update installation instructions
Version 1.0.1§
Released 04-11-2024
Bug Fixes§
-
0e0f1f2: Fix attribute assignment inbin_into_gridand reorder dimensions after binning (for chunking and performance) -
9674d63: Fix bug whereopen_comparewas printing out "reading files" even when it had found no files
Documentation§
-
28e05c2: Change template for automatic changelog generation -
d91795b: Addplot_funcargument tomoviedocstring -
2a97bb6: Add release notes to website, create custom changelog template
Features§
-
10abc79: Publish package on pypi with asozzy-pic -
0d2020a: Add function to get beam emittance -
1ac93ae: Add function to create an interactive animation usinghvplot -
3540a8e: Makemoviemore customisable by having a function argument that can edit the plot at each frame -
dd58a21: Add co-moving variables such asx1_boxto particle data as well
Performance Improvements§
e67f696: Reorder and rechunk dimensions of data after binning inbin_into_grid
Refactoring§
-
0e98bbb: Harmonize the metadata of lcode particle data (momentum) to standard names and units, update docs and testsThe third momentum component in LCODE particle data corresponds to either \(p_z\) in Cartesian geometry or the angular momentum \(L\) in axisymmetric/cylindrical geometry. This is now taken into account via the boolean parameter
axisym(Trueby default). In cylindrical geometry the third momentum component is renamed and a new'p3'variable is added to the dataset, corresponding to \(p_\theta = L / r\).In addition, all momenta in LCODE particle data are normalised to \(m_e \ c\). The units are now converted to \(m_\mathrm{sp} \ c\), using the charge-to-mass ratio in the data and the new argument
abs_q(absolute value of the normalised bunch particle charge). -
d7da0c8: Replacestatistics.parts_into_gridwith dataset methodbin_into_gridReplace
statistics.parts_into_gridwith a Dataset method calledbin_into_gridaccessible to particle data (pic_data_type = 'part').Breaking change:
statistics.parts_into_griddoes not work anymorePlease replace the function
statistics.parts_into_gridwith theds.ozzy.bin_into_gridmethod. As an example, the following codeshould be replaced byimport ozzy as oz import ozzy.statistics as stats import numpy as np particles = oz.Dataset( { "x1": ("pid", np.random.uniform(0, 10, 10000)), "x2": ("pid", np.random.uniform(0, 5, 10000)), "q": ("pid", np.ones(10000)), }, coords={"pid": np.arange(10000)}, attrs={"pic_data_type": "part"} ) axes = oz.Dataset( coords={ "x1": np.linspace(0, 10, 101), "x2": np.linspace(0, 5, 51), }, attrs={"pic_data_type": "grid"} ) binned = stats.parts_into_grid(particles, axes, r_var="x2") grid_data_axisym = particles.ozzy.bin_into_grid(axes, r_var="x2")import ozzy as oz import numpy as np ... binned = particles.ozzy.bin_into_grid(axes, r_var="x2") -
5840bc4: Make str_exists argument of get_attr_if_exists optional -
5d53830: Use helper functions to handle dataarray attributes whenever possible
Version 0.2.1§
Released 21-10-2024
Bug Fixes§
0c2bb5f: Error is now raised when an invalid n0 argument is passed to convert_q
Documentation§
-
426b187: Add feedback widget across pages -
7877d0e: Try to add umami analytics in different way -
3e62f7b: Add umami analytics for documentation website -
ae7b7b3: Add black as project dependency for better formatting of code signatures in documentation -
0bd401b: Debug and small corrections -
29be6fd: Change main blurb, include install instructions with git and poetry
Refactoring§
a2d20bc: Add two helper functions to set dataarray attributes depending on whether they already exist or not, + unit tests for these functions
Version 0.2.0§
Released 15-10-2024
Features§
b4b61c7: Save movies of ozzy plots
Version 0.1.7§
Released 07-10-2024
Bug Fixes§
-
6fcd37d: Get_phase_space bug fixes- no error when limits are set automatically and all quantity values are zero
- make sure that axisymmetric geometry is taken into account correctly when the radius variable isn't being binned directly
-
c12f766: Correct units of particle momenta
Version 0.1.6§
Released 30-09-2024
Bug Fixes§
96a7340: Units in parts_into_grid are now fetched from raw_ds argument
Version 0.1.5§
Released 23-09-2024
Performance Improvements§
d4d08a5: Improve concatenation of tb files along time
Refactoring§
1816b9b: Add commented todo's
Version 0.1.4§
Released 18-09-2024
Bug Fixes§
6e84664: Change momentum units
Features§
de9520c: Scaffolding for emittance method
Refactoring§
Version 0.1.3§
Released 17-09-2024
Bug Fixes§
022b0c4: Change momentum units
Version 0.1.2§
Released 17-09-2024
Bug Fixes§
d48785c: Change units of density in parts_into_grid
Refactoring§
Version 0.1.1§
Released 13-08-2024
Bug Fixes§
fed8f27: Automatic extent calculation for phase space even when min = max
Documentation§
1ef5d22: Include zenodo reference
Refactoring§
2d79f50: Utils function to set attributes if they exist
Version 0.1.0§
Released 16-07-2024
Features§
109e196: Set up cd of ozzy releases
Version 0.0.1§
Released 16-07-2024
Bug Fixes§
8e5fabd: Use correct function to register colormap
Version 0.0.0§
Released 16-07-2024
Documentation§
-
62db369: Write plotting section -
9fb57d8: Write reading-files -
892ed52: Add file save to quick example in getting started -
7c1fbd0: Finish key concepts -
7272683: Work on getting started -
079304f: Work on getting started -
2d96a10: Key concepts -
afd1953: Write pages for each backend -
db3cd72: Work on getting started -
c566890: Formatting + start getting started -
1ce0289: Activate section permalinks -
eb042d1: Activate git date plugin -
1401ba4: Small changes -
df428f2: Solve bugs -
3481bfb: Try to solve snippets issue -
4eb3b32: Try to solve snippets issue -
8cab692: Try to solve snippets issue -
0ecd710: Finish license and about