Skip to content

Release Notes§

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 function ozzy.utils.axis_from_extent to create the axes dataset required for bin_into_grid

Features§

  • 06d0869: Add functions to plot distributions of particle data

    Add ozzy.plot.hist and ozzy.plot.hist_proj to easily plot density distributions (histograms) of particle data, taking advantage of the seaborn functions seaborn.histplot and seaborn.jointplot.

    Previously it would have been necessary to bin the data first, and then plot, e.g.:

    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()
    
    While now the following code is enough:
    import ozzy as oz
    import ozzy.plot as oplt
    ds = oz.Dataset(..., pic_data_type='part')
    oplt.hist(ds, x="x2", y="p2")
    

  • 7c39207: Add functions to plot distributions of particle data

    Add ozzy.plot.hist and ozzy.plot.hist_proj to easily plot density distributions (histograms) of particle data, taking advantage of the seaborn functions seaborn.histplot and seaborn.jointplot.

    Previously it would have been necessary to bin the data first, and then plot, e.g.:

    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()
    
    While now the following code is enough:
    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: Change ozzy.plot defaults to display a plot grid

Version 1.0.9§

Released 28-01-2025

Bug Fixes§

  • a3cfe10: One argument of set_attr_if_exists was missing its default value, which was throwing an error e.g. when ds.ozzy.save was 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 using open_compare with 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 on conda-forge) and update package dependencies (especially makedocs-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 for backend.parse_data that was being called from ozzy.open_compare and 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 by bin_into_grid when called on a data object that didn't contain a 't' coordinate

  • 776a1a2: Fix missing-argument error when trying to read beamfile.bin files

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 the open functions 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 in bin_into_grid and reorder dimensions after binning (for chunking and performance)

  • 9674d63: Fix bug where open_compare was printing out "reading files" even when it had found no files

Documentation§

  • 28e05c2: Change template for automatic changelog generation

  • d91795b: Add plot_func argument to movie docstring

  • 2a97bb6: Add release notes to website, create custom changelog template

Features§

  • 10abc79: Publish package on pypi with as ozzy-pic

  • 361f9c0: Add function to get beam emittance

  • 0d2020a: Add function to get beam emittance

  • 1ac93ae: Add function to create an interactive animation using hvplot

  • 3540a8e: Make movie more customisable by having a function argument that can edit the plot at each frame

  • dd58a21: Add co-moving variables such as x1_box to particle data as well

Performance Improvements§

  • e67f696: Reorder and rechunk dimensions of data after binning in bin_into_grid

Refactoring§

  • 0e98bbb: Harmonize the metadata of lcode particle data (momentum) to standard names and units, update docs and tests

    The 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 (True by 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: Replace statistics.parts_into_grid with dataset method bin_into_grid

    Replace statistics.parts_into_grid with a Dataset method called bin_into_grid accessible to particle data (pic_data_type = 'part').

    Breaking change: statistics.parts_into_grid does not work anymore

    Please replace the function statistics.parts_into_grid with the ds.ozzy.bin_into_grid method. As an example, the following code

    import 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")
    
    should be replaced by

    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§

Version 0.1.4§

Released 18-09-2024

Bug Fixes§

Features§

  • de9520c: Scaffolding for emittance method

Refactoring§

  • 506f060: Replace ~ with not

  • 9ce2c8a: Utils function to set attributes if they exist

Version 0.1.3§

Released 17-09-2024

Bug Fixes§

Version 0.1.2§

Released 17-09-2024

Bug Fixes§

  • d48785c: Change units of density in parts_into_grid

Refactoring§

  • 0bd8cc1: Change norm. units of q in particle data

  • 1c5d48e: Add axisym argument to get_phase_space

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§