Releases: fsoubelet/PyhDToolkit
Release 0.11.0
Release 0.11.0 brings the following:
Added:
- A
cpymadtools.utils
module with convenience functions forcpymad.mad.Madx
objects, for now containing a single functionget_table_tfs
which turns an internalMAD-X
table into a `TfsDataFrame. - The
get_amplitude_detuning
andget_rdts
functions in thecpymadtools.ptc
module now contain extensive docstrings detailing their inner workings as well as parameters used in internalMAD-X
commands. - Both functions above now have a
fringe
argument defaulting toFalse
in order to enable fringe field calculations. - Both functions above now transmit keyword arguments to respectively
ptc_normal
andptc_twiss
.
Release 0.10.0
Release 0.10.0 brings the following:
Added:
- The
track_single_particle
function in thecpymadtools.track
module can now take a sequence defining observation points as argument. - The
track_single_particle
function in thecpymadtools.track
module can now take keyword arguments to be transmitted to theTRACK
command inMAD-X
.
Changed:
- The
track_single_particle
function in thecpymadtools.track
module now defaults initial tracking coordinates to all 0. - The
track_single_particle
function in thecpymadtools.track
module now returns a dictionary, with one keys per defined observation point and as a value the corresponding track table. The special case whereONETABLE
s given toTRACK
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
Release 0.9.2 brings the following:
Added:
- A
match_no_coupling_through_ripkens
function in thecpymadtools.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 formatplotlib
, which is sometimes where it will look when runningplt.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 thecpymadtools.latwiss
module now uses clearer markers to indicate the machine survey, properly matches the colormaps of the plotted dipoles and the colorbar when usingshow_elements=True
and lets the user config handlesavefig
options.
Release 0.9.1
Release 0.9.1 brings the following:
Added:
- An
install_mpl_style
function in theutils.defaults
module to create aphd.mplstyle
file inmatplotlib
's stylelib directory, making the style callable throughplt.style.use("phd")
.
Changed:
- The
PLOT_PARAMS
dictionary inutils.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
Release 0.9.0 brings the following:
Added:
- A
misalign_lhc_ir_quadrupoles
function in thecpymadtools.errors
module to conveniently applyEALIGN
to IR quadrupoles. - A
misalign_lhc_triplets
function in thecpymadtools.errors
, convenience wrapper around the aforementioned one for triplets. - A
correct_lhc_orbit
function in thecpymadtools.orbit
module to perform orbit correction usingMCB.*
elements in the LHC. - A
vary_independent_ir_quadrupoles
function in thecpymadtools.special
to conveniently send thevary
commands for the desired quadrupoles in the IRs. - A
tune
module incpymadtools
with currently amake_footprint_table
function that creates aDYNAP
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 inmatch_tunes_and_chromaticities
now defaults to True, to reflect the LHC scenario as of Run III. - The
get_ips_twiss
andget_ir_twiss
functions have been moved fromcpymadtools.special
tocpymadtools.twiss
.
Fixed:
- Fixed an issue in
plot_latwiss
where the function would sometimes mishandle thexlimits
argument. - Fixed a mistake in
apply_lhc_rigidity_waist_shift_knob
where theside
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
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
asFalse
, which compensates the effect of the default slicing styleTEAPOT
.
Release 0.8.4
Changes:
- The machine layout plotting in
plot_latwiss
has been exported to its own function. It is a private function.
Added:
- An
xoffset
variable toplot_latwiss
, allowing to center the plot on a specific element.
Release 0.8.3
Added:
- A function in
cpymadtools.twiss
to export the entire twiss table to aTfsDataFrame
.
Release 0.8.2
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 toutils.defaults
. - The
get_pattern_twiss
default argument values now select the entire twiss table. plot_latwiss
changed the parameterplot_sextupoles
tok2l_lim
, creating a dedicated axis for sextupole patches in the layout.
Fixed:
get_pattern_twiss
now properly capitalizes variable names in the returnedTfsDataFrame
.plot_latwiss
now only draws elements in the desired area whenxlimits
is provided, for a drastic speedup on big machines.
Removed:
- The
plotting.settings
module has been removed. plot_latwiss
doesn't force thepdf
format when saving the figure anymore.
Release 0.8.1
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.