1.2.0
Release 1.2.0 brings some new features and dependency changes.
Changes
- The - pyhdtoolkit.plotting.envelopefunctions- plot_envelopeand- plot_stay_clearhave been removed. They are replaced by a new one,- plot_beam_envelope, which handles all enveloppe calculations directly from the- MAD-Xinstance. Documentation and examples have been updated.
Enhancements
- The - pyhdtoolkit.plotting.aperturemodule has a new function,- plot_physical_apertures, to try and plot the physical apertures of elements on the given axis.
- The - pyhdtoolkit.plotting.utilsmodule has a new function,- draw_confidence_ellipse, to plot the covariance ellipse of two arrays.
- The - pyhdtoolkit.plotting.layout.plot_machine_layoutfunction (and those relying on it) can now plot octupole patches.
- The - pyhdtoolkit.plotting.layout.plot_machine_layoutfunction (and those relying on it) can now handle single values given for ylimits of different elements in the machine layout. For instance now- k1l_lim=5e-2is valid and equivalent to- k1l_lim=(-5e-2, 5e-2).
- An experimental utility function was added to split a complex-valued columns from a dataframe into two real-valued ones. It might join the public API in a future release, and is for now available as - split_complex_columns.
- An experimental utility function was added to add noise to the - LHCIR BPMs in a given dataframe column. It might join the public API in a future release, and is for now available as- add_noise_to_ir_bpms.
- An experimental utility function was added to add noise to the - LHCarc BPMs in a given dataframe column. It might join the public API in a future release, and is for now available as- add_noise_to_arc_bpms.
- The functions in the - pyhdtoolkit.cpymadtools.ptcmodule can now be given values for the- PTCuniverse creation and called commands parameters through keyword arguments. The documentation has been updated with information on the available parameters.
Bug Fixes
- The - pyhdtoolkit.plotting.layout.plot_machine_layoutfunction now only adds a legend for element patches of a certain type if at least one element was drawn.
- The - pyhdtoolkit.plotting.layout.plot_machine_layoutfunction now tries to properly determine legend locations based on which elements were drawn.
Documentation
- The documentation generated by - Sphinxshould now properly display short type hints instead of the full expanded ones.
- Some example pages have been updated to use the minimal requirement of provided args for the functions in - matching.
- Some typos that were left in a few docstrings have been corrected. 
Maintenance
- The - madxargument is now positional only in all APIs involving it (APIs in- cpymadtoolsand- plotting).
- The - numpydependency is now capped at version- <1.24.0, as when using this new version some- matplotlibfunctions are broken.
- Various type hints from the - typingmodule, such as- Dictor- List, have been superseeded by the default, now-standard builtins (such as- dictor- list).
See v1.2.0 release notes on GitHub and the full changes since v1.1.1.