Skip to content

Releases: fsoubelet/PyhDToolkit

Release 0.11.0

22 Jul 10:29
67e953f
Compare
Choose a tag to compare

Release 0.11.0 brings the following:

Added:

  • A cpymadtools.utils module with convenience functions for cpymad.mad.Madx objects, for now containing a single function get_table_tfs which turns an internal MAD-X table into a `TfsDataFrame.
  • The get_amplitude_detuning and get_rdts functions in the cpymadtools.ptc module now contain extensive docstrings detailing their inner workings as well as parameters used in internal MAD-X commands.
  • Both functions above now have a fringe argument defaulting to False in order to enable fringe field calculations.
  • Both functions above now transmit keyword arguments to respectively ptc_normal and ptc_twiss.

Release 0.10.0

28 Jun 17:17
a4793a7
Compare
Choose a tag to compare

Release 0.10.0 brings the following:

Added:

  • The track_single_particle function in the cpymadtools.track module can now take a sequence defining observation points as argument.
  • The track_single_particle function in the cpymadtools.track module can now take keyword arguments to be transmitted to the TRACK command in MAD-X.

Changed:

  • The track_single_particle function in the cpymadtools.track module now defaults initial tracking coordinates to all 0.
  • The track_single_particle function in the cpymadtools.track module now returns a dictionary, with one keys per defined observation point and as a value the corresponding track table. The special case where ONETABLE s given to TRACK as a keyword argument is handled, and then a single entry taken from the appropriate table with be found in the returned dictionary.

Tests have been added.

Release 0.9.2

07 Jun 16:18
5e42b02
Compare
Choose a tag to compare

Release 0.9.2 brings the following:

Added:

  • A match_no_coupling_through_ripkens function in the cpymadtools.special module as a 0-coupling matching routine through cross-term Ripken parameters at a given location.

Fixed:

  • The install_mpl_style function now installs the .mplstyle file also in the site-packages location for matplotlib, which is sometimes where it will look when running plt.style.use("phd").
  • The closest tune approach routine now properly makes use of madx.batch() to restore settings.

  • The plotting functions in the cpymadtools.latwiss module have updated LaTeX-compatible labels.

  • The plot_survey function in the cpymadtools.latwiss module now uses clearer markers to indicate the machine survey, properly matches the colormaps of the plotted dipoles and the colorbar when using show_elements=True and lets the user config handle savefig options.

Release 0.9.1

07 May 21:15
aad22f1
Compare
Choose a tag to compare

Release 0.9.1 brings the following:

Added:

  • An install_mpl_style function in the utils.defaults module to create a phd.mplstyle file in matplotlib's stylelib directory, making the style callable through plt.style.use("phd").

Changed:

  • The PLOT_PARAMS dictionary in utils.defaults has been updated.

Removed:

  • The numba library's used has been removed, easing the package's dependencies.

Additional dependencies are pydantic, rich and pendulum. The llvmlite dependency is also added explicitely, though it is a dependency of numba and the version constraint is here to guarantee pyhdtoolkit will build on Python 3.9.
Tests now include Python 3.9.

Release 0.9.0

25 Apr 18:02
cc48041
Compare
Choose a tag to compare

Release 0.9.0 brings the following:

Added:

  • A misalign_lhc_ir_quadrupoles function in the cpymadtools.errors module to conveniently apply EALIGN to IR quadrupoles.
  • A misalign_lhc_triplets function in the cpymadtools.errors, convenience wrapper around the aforementioned one for triplets.
  • A correct_lhc_orbit function in the cpymadtools.orbit module to perform orbit correction using MCB.* elements in the LHC.
  • A vary_independent_ir_quadrupoles function in the cpymadtools.special to conveniently send the vary commands for the desired quadrupoles in the IRs.
  • A tune module in cpymadtools with currently a make_footprint_table function that creates a DYNAP setup according to parameters and returns the generated table.
  • An utils.htc_monitor module with functionality to query the HTCondor queue, process the returned data and nicely display it. To be ran directly, but different functionality can be imported.

Changed:

  • The telescopic_squeeze parameter in match_tunes_and_chromaticities now defaults to True, to reflect the LHC scenario as of Run III.
  • The get_ips_twiss and get_ir_twiss functions have been moved from cpymadtools.special to cpymadtools.twiss.

Fixed:

  • Fixed an issue in plot_latwiss where the function would sometimes mishandle the xlimits argument.
  • Fixed a mistake in apply_lhc_rigidity_waist_shift_knob where the side argument would be ignored if uppercase.

Additional dependencies are pydantic, rich and pendulum. The llvmlite dependency is also added explicitely, though it is a dependency of numba and the version constraint is here to guarantee pyhdtoolkit will build on Python 3.9.
Tests now include Python 3.9.

Release 0.8.5

23 Mar 19:12
36c4399
Compare
Choose a tag to compare

Release 0.8.5 brings minor fixes and changes.

Fixed:

  • The match _tunes_and_chromaticities now properly behaves if some of the targets are set to 0.

Changed:

  • The default behavior in lattice slicing is changed to have makedipedge as False, which compensates the effect of the default slicing style TEAPOT.

Release 0.8.4

04 Mar 21:21
ad234fe
Compare
Choose a tag to compare

Changes:

  • The machine layout plotting in plot_latwiss has been exported to its own function. It is a private function.

Added:

  • An xoffset variable to plot_latwiss, allowing to center the plot on a specific element.

Release 0.8.3

03 Mar 19:50
bb16aa9
Compare
Choose a tag to compare

Added:

  • A function in cpymadtools.twiss to export the entire twiss table to a TfsDataFrame.

Release 0.8.2

02 Mar 13:06
59a0565
Compare
Choose a tag to compare

Release 0.8.2 brings some fixes QoL additions.

Added:

  • A maths.utils module with convenience functions related to magnitude.
  • An optics.ripken module with functions to calculate beam size according to Lebedev and Bogacz's formalism.
  • A convenience logging setup function in utils.defaults.
  • plot_latwiss now adds a legend for different elements in the layout.
  • plot_latwiss can now optionally plot BPM patches.
  • plot_latwiss now accepts kwargs that will be transmitted to the layout plotting function.
  • QoL information in various docstrings.

Changed:

  • The PLOT_PARAMS have been moved to utils.defaults.
  • The get_pattern_twiss default argument values now select the entire twiss table.
  • plot_latwiss changed the parameter plot_sextupoles to k2l_lim, creating a dedicated axis for sextupole patches in the layout.

Fixed:

  • get_pattern_twiss now properly capitalizes variable names in the returned TfsDataFrame.
  • plot_latwiss now only draws elements in the desired area when xlimits is provided, for a drastic speedup on big machines.

Removed:

  • The plotting.settings module has been removed.
  • plot_latwiss doesn't force the pdf format when saving the figure anymore.

Release 0.8.1

19 Feb 08:33
1ec6e88
Compare
Choose a tag to compare

Release 0.8.1 brings a very minor fix.

Fixed:

  • Fixed inacurrate logging statements during tunes and chromaticities matching.

Removed:

  • Removed the unused scripts folder as well as the scripts' dependencies.