Skip to content

Add app modules for ALSU SR commissioning#27

Open
thellert wants to merge 11 commits intokparasch:developfrom
als-apg:feature/new-app-modules
Open

Add app modules for ALSU SR commissioning#27
thellert wants to merge 11 commits intokparasch:developfrom
als-apg:feature/new-app-modules

Conversation

@thellert
Copy link
Copy Markdown

Summary

  • Add dynamic aperture, LOCO, and multipoles application modules with tests, needed for ALSU storage ring commissioning simulations
  • Multipoles module includes bug fixes (accumulation via +=, truncated random), new parameters (main_order, main_component, zero_orders), numpy array input, and read_multipole_table for parsing MATLAB-format multipole files

Dependencies

This branch is based on feature/test-suite (the comprehensive unit test branch) and should merge after that branch.

Test plan

  • pytest tests/apps/test_multipoles.py -v — 32 tests pass
  • pytest tests/ -x — full suite: 371 passed, 10 xfailed, 0 failures

thellert and others added 11 commits March 16, 2026 17:36
Check for 'name' key in level_conf dict instead of in level_conf['name'] string,
which was always checking if the substring 'name' existed in the value.
Replace at.load_mat with at.load_lattice, which dispatches to the correct
loader based on file extension (.mat, .m, .seq, .lte, etc.). Add loader_kwargs
field for passing format-specific options through the config.
- Add gain_corrections_x/y fields (initialized to ones) as multiplicative
  corrections applied in capture_orbit, capture_injection, and capture_kick
- Parse n_particles as int from injection config
- Allow capture_injection to optionally return transmission array
Add extra="forbid" to the 14 remaining models that used the default
extra="ignore", which silently discards unknown kwargs. This fixes a
real bug where BBAAnalysis(total_rejections=...) silently lost data.

- Add total_rejections field to BBAAnalysis (was passed but discarded)
- Update deprecated outputs_plane -> output_planes in c_minus.py
- AbstractInterface intentionally excluded (subclassed externally)
- codes.py: Fix DispersionCode.DONE value collision with HORIZONTAL
- response.py: Replace np.concat with np.concatenate
- response_matrix.py: Fix disable_all_outputs_but copy-paste bug, fix MICADO UnboundLocalError
- bpm_system.py: Fix reconstruct_true_orbit gain inversion
- tune.py: Store tune_response_matrix on self
- tuning_core.py: Guard wiggle_last_corrector against UnboundLocalError
- bba.py: Fix reject_bpm_outlier np.abs usage, add total_rejections field
- bpm_system_conf.py: Fix config pattern matching
- general.py: Prevent scale_error_table from mutating input arrays
- rf_conf.py: Fix 'frequncy' typo
- injection.py: Fix injection tracking
- magnetsettings.py: Fix add_individually_powered indentation logic
- rdt.py: Fix fjklm phase wrapping
Tests cover all core modules (configuration, core, tuning, apps, utils)
with 53 test files providing structural and behavioral coverage.
New application modules needed for ALSU storage ring commissioning
simulations. Multipoles module includes bug fixes (accumulation,
truncated random), new parameters (main_order, main_component,
zero_orders), numpy array input support, and read_multipole_table
for parsing MATLAB-format multipole files.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants