Skip to content

0.7.3

Choose a tag to compare

@jank324 jank324 released this 11 Jun 16:19
· 882 commits to master since this release
452bf98

🚨 Breaking Changes

  • The default resolution of all plotting functions on Segment is now None, i.e. element-wise. For most lattices this will only result in faster plotting, but note that it is possible that your plots look slightly different, especially if your lattice is short or has few elements. (see #459) (@jank324, @Hespe)
  • Cheetah now requires torch>=2.3 (see #461) (@jank324)
  • Combine the num_grid_points_{x,y,tau} arguments of SpaceChargeKick into the grid_shape tuple. Fixes the cloning of SpaceChargeKick. In addition, the grid_extend_* properties were renamed to grid_extent_* (see #418) (@Hespe, @jank324)
  • Warning messages, which were previously just printed are now produced using the warnings module, brining with it all the features of the latter. (see #450) (@Hespe, @jank324)

🚀 Features

  • Add KQUAD and CSRCSBEND element names to Elegant converter (see #409) (@amylizzle)
  • Add Sextupole to Bmad, Elegant, and Ocelot converters (see #430) (@Hespe)
  • Implement convenience method for quickly setting attributes for all elements of a type in a Segment (see #431) (@jank324)
  • Add a method to ParticleBeam that lets you subsample a particle beam with fewer particles and the same distribution (see #432, #465) (@jank324)
  • Segment now has new functions beam_along_segment_generator and get_beam_attrs_along_segment for easily retrieving beam objects and their properties. The plot functions have been refactored to use these, and two functions plot_beam_attrs and plot_beam_attrs_over_lattice were added for straightforward plotting of different beam attributes in a single line of code. (see #436, #440) (@jank324, @amylizzle)
  • Beam subclasses now track their s position along the beamline (see #436) (@jank324)
  • There is a warning now when converting elements from Elegant or Bmad that have names which are invalid for use with the segment.element_name syntax, and add a convenience method for explicitly converting these names to valid Python variable names. (see #411) (@amylizzle, @jank324)
  • Rotation matrices are no longer computed twice for forward and backward phase space rotations (see #452) (@Hespe)

🐛 Bug fixes

  • Fix issue where Dipole with tracking_method="bmadx" and angle=0.0 would output NaN values as a result of a division by zero (see #434) (@jank324)
  • Fix issue in CI space-charge tests (incorrect beam duration in non-relativistic case) (see #446) (@RemiLehe)
  • Fix issue that passing tensors with requires_grad=True does not result in gradient tracked particles when using ParticleBeam.from_parameters initialization (see #445) (@cr-xu)
  • Fix import of CustomTransferMap from Elegant. The affine phase-space component was previously not carried through (see #455) (@Hespe)
  • Provide more default values for parameters in the Elegant conversion, where elements without length l for example broke the converter. (see #442) (@cr-xu)
  • Functions using Sextupole.split and Sextupole.plot no longer raise an error (see #453) (@Hespe)

🐆 Other

  • Bmad is no longer actively run in the test workflows, and comparisons to Bmad are now done on static pre-computed results from Bmad. This also removes the use of Anaconda in the test workflow. (see #429, #431) (@jank324)
  • The PyTorch pin to <=2.6 was removed, as the issue with abort trap: 6 was caused by Bmad is no longer actively used in the test workflow (see #429, #431) (@jank324)
  • There was a temporary pin snowballstemmer<3.0 for the docs build because of an issue with the latest release. It has since been unpinned again because the release was yanked. Refer to sphinx-doc/sphinx#13533 and snowballstem/snowball#229. (see #436, #438) (@jank324)
  • Assert that the last row of a predefined transfer map is always correct when creating a CustomTransferMap element (see #462) (@jank324, @Hespe)
  • Minimum compatible versions were defined for all dependencies, and tests were added to ensure that the minimum versions are compatible with Cheetah. (see #463) (@Hespe, @jank324)
  • Add a pytest marker for running tests on all subclasses of Element. The marker automatically detects if an MWE has not yet been defined for a subclass and alerts the developer through a test failure. (see #418) (@Hespe, @jank324)

🌟 First Time Contributors

  • Copilot 🤖