Xtrack version 0.104.2
Changes
- Added new generic transform elements:
Rotation,Translation, andTimeDelay.Rotationusing radians to specify angles. - Refactor survey behavior: shifts and rotations are propagated through the element-level
_propagate_surveymethod instead of survey-levelref_shift_*/ref_rot_*columns, which are removed. Line.attr['ks']generalized to include ownks, parentks, and the average ofks_profile[0]/ks_profile[1].- Fix in Multipole fringe: normal/skew fringe strengths scaled by particle
chi. - Radiation-analysis Twiss reuses the already computed closed orbit when recomputing the R matrix for damping rates.
- Fix: Composer placement with
from_anchor='center'/'centre'for thin-element groups. Environment.place(..., at='string')is now interpreted asat=0, from_='string'when'string'is an element name.Line.extend(...)accepts either a lineLineor a list of strings.Line.get_table(),SurveyTable, and Twiss strengths output include aprototypecolumn.Viewdelegates__iter__and__contains__to the viewed object.- Added
Line.xcollandEnvironment.xcollfacades that delegate toxcollif installed. - Added
Environment.xfieldsfacade for beam-beam helper operations. RFMultipolesupports radian fieldsphase,phase_n, andphase_s; tracking sums them with legacy degree fields where both exist.LossLocationRefinementrecognizes the newRotationandTranslationelements.
Deprecations
compute_*methods and functions deprecated in favour ofget_*
Line.compute_R_matrix(...)->Line.get_R_matrix(...),
xtrack.twiss.compute_R_matrix(...)->xtrack.twiss.get_R_matrix(...),
Line.compute_T_matrix(...)->Line.get_T_matrix(...),
xtrack.twiss.compute_T_matrix_line(...)->xtrack.twiss.get_T_matrix_line(...),
xtrack.linear_normal_form.compute_linear_normal_form(...)->xtrack.linear_normal_form.get_linear_normal_form(...),
xtrack.survey.compute_survey(...)->xtrack.survey.get_survey(...).
ApertureModel.compute_max_aperture_sigma_bisection(...)->get_max_aperture_sigma_bisection(...),
compute_max_aperture_sigma_rays(...)->get_max_aperture_sigma_rays(...),
compute_max_aperture_sigma_exact(...)->get_max_aperture_sigma_exact(...),
compute_beam_envelopes_at_sigma(...)->get_beam_envelopes_at_sigma(...).- Legacy transform elements are deprecated:
XYShift->Translation,
ZetaShift->TimeDelay,
XRotation->Rotation(rot_x_rad=...),
YRotation->Rotation(rot_y_rad=...),
SRotation->Rotation(rot_s_rad=...). - Degree-based RF phase fields are deprecated in favour of radian-based fields:
Cavity.lag->Cavity.phase,
CrabCavity.lag->CrabCavity.phase,
RFMultipole.lag->RFMultipole.phase,
RFMultipole.pn->RFMultipole.phase_n,
RFMultipole.ps->RFMultipole.phase_s. Builderdeprecated in favour ofComposer:
Line.builder->Line.composer,
Environment.new_builder(...)->Environment.new_line(..., compose=True),
Builder/xtrack.builder->Composer/xtrack.composer.- Legacy line-inspection APIs are deprecated in favour of table-based access:
Line.to_pandas(...)->Line.get_table(...),
Line.get_s_position(...)andLine.get_s_elements(...)->Line.get_table()position columns,
Line.get_elements_of_type(...)->tt = line.get_table(); tt.rows.match(element_type='...'). - Legacy variable-value shortcuts are deprecated in favour of direct item access or
vars.val:
Environment.varval[...]/Environment.vv[...]->Environment[...]orEnvironment.vars.val[...],
Line.varval[...]/Line.vv[...]->Line[...]orLine.vars.val[...]. - Legacy Xcoll and Xfields entry points are deprecated in favour of facade namespaces:
Line.scattering->Line.xcoll.scattering,
Line.collimators->Line.xcoll.collimators,
Environment.install_beambeam_interactions(...)->Environment.xfields.install_beambeam_interactions(...),
Environment.configure_beambeam_interactions(...)->Environment.xfields.configure_beambeam_interactions(...),
Environment.apply_filling_pattern(...)->Environment.xfields.apply_filling_pattern(...). Environment.from_madx(...)is deprecated in favour ofxtrack.load(...); if cpymad is required, useLine.from_madx_sequence(...)and import lines into anEnvironment.- Legacy
Viewinspection helpers are deprecated in favour of.xdepsinspection:
View.get_value(...)->.xdeps.value,
View.get_expr(...)->.xdeps.expr,
View.get_info(...)->.xdeps.info(). - Legacy table fields are deprecated in favour of renamed fields:
SurveyTable.p0->SurveyTable.XYZ,
SurveyTable.W->SurveyTable.E_matrix,
TwissTable.angle_rad->TwissTable.angle.
Full Changelog: v0.104.1...v0.104.2