1.0.0
Release 1.0.0 brings many breaking changes.
Be sure to read these release notes carefully before upgrading, as much of the code using pyhdtoolkit will need to be adapted.
Breaking Changes
All plotting functionality has been regrouped into
plotting. The plotting classes previously found inplottershave been turned each into a single module inplotting.The
plottersmodule has been completely removed.The
helpersmodule has been renamed toutilsfor consistency.The
utilsmodule has been merged intoutils.The
DynamicAperturefunctionality has been completely removed.The
defaultsmodule has been removed, and its functionality transferred in the relevant (new) places.
Enhancements
The machine layout plotting functionality has been made public api in a dedicated module,
layout.A new module has been added to the
cpymadtools,setup, with functions to conveniently set up aMadxinstance for either the Run 2 or Run 3 of theLHC, also as a context manager.A new module has been added in
plotting,layout, to make public the API to plot a machine’s element onto an axis.A new module has been added in
utils,logging, to host the logging setup functionality that was previously indefaults.A new module has been added in
plotting,styles, with various useful styles definitions and the functionality to install them locally.New function in
lhc,add_markers_around_lhc_ip, to do exactly that, for high granularity of calculations around the IP point.New function in
lhc,get_sizes_at_ip, to compute horizontal and vertical beam sizes at a given IP throughRipkenparameters, which will be accurate in the presence of coupling.New function in
utils,get_lhc_ips_positions, to get adictof different IP elements and theirScoordinates.New function in
utils,draw_ip_locations, to highlight the positions of given IPs onto the current axis as vertical lines, potentially also writing out their names.The element plotting functionality handled by
plot_machine_layoutnow determines reasonable defaultylimitsif none were provided. This allowed removing hardcoded default values of these limits, and should help get a good looking plot for any machine by default.The
make_lhc_beamsfunction can now handle thebvflag in case the user is trying to set up for tracking with B2 (which needs loading lhcb4 and a different bv flag).The
config_loggerfunction, now inlogging, now accepts custom formats and three default formats are provided in the module.
Maintenance
Documentation has been updated for all new APIs. Refer to the gallery for example uses.
Tests have been adapted.
See v1.0.0 release notes on GitHub and the full changes since v0.21.0.