Skip to content

Add BBA measurement script to scripts repo#181

Merged
fernandohds564 merged 30 commits intomasterfrom
add-meas-scripts
Sep 23, 2025
Merged

Add BBA measurement script to scripts repo#181
fernandohds564 merged 30 commits intomasterfrom
add-meas-scripts

Conversation

@vellosok75
Copy link
Copy Markdown
Contributor

@vellosok75 vellosok75 commented Jul 17, 2025

Script to launch BBA measurements. Includes:

  • continuation of measurements from previous unfinished measurements
  • BPM selection: mutual support for space-separated list of BPMs names or BPMs names regexp patterns, or text file with BPMs names for setting bpms2dobba

These new functionalities depend on having the list bpms2dobba saved in the BBA data file. This change is implemented in lnls-fac/apsuite#301

See the helper
image

This PR also includes changes in other measurement scripts (loco fitting & setting strengths, BPM acquisitions)

  • formatting: back to single quotes, use of ruff standard for imports
  • renaming: following the sirius-script-si prefix, now comes the experiment keyword eg: sirius-script-si-loco-run-fitting.py, sirius-script-si-loco-set-strengths.py. This facilitates auto-completion.

The different changes are separated by commits so it's easy to review them individually.

- now incorporating support for continuing failed/stopped previous measurments
- support for list of BPMs names, txt file with BPMs names and regexp with BPMs names patterns for selecting `bpms2dobba`
- more explicit workflow
- added some TODOs comments
- handles some exceptions exitnig execution
Copy link
Copy Markdown
Contributor

@xresende xresende left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo "filenamein" in function helper

@VitorSouzaLNLS
Copy link
Copy Markdown
Contributor

VitorSouzaLNLS commented Jul 28, 2025

typo "filenamein" in function helper

Some spaces and line breaks were missing. After commit "FIX: Line breaks" it should now be fixed.

- bpms2dobba: now accepts space-separated list of BPMs names or regexp patterns, filename or "all"
- print-setup arg: to print the required setup prior to running
- print-bpms arg: to print the indices and names of BPMs (can be handy during operations), without launching the measurement
- added documentation
-get_bpms_for_bba`: dedicated function to handle BPM selection from either user's input or previous progress
- preserves the ordering from the previous measurement.
- works if bpms2dobba from previous meas was arbitrarily ordered
@vellosok75 vellosok75 requested a review from xresende August 13, 2025 11:41
- `bba_configure` func content moved to `main`
- funcs appearing in `main` show first, funcs used by them come later
- reordering of script args
- new script args: -r, --run-meas; -t, --timeout; --sofb_maxcorriter
- intercept ctrl+C & kill to guarantee meas.stop() is called prior to exiting
- if fname included file extension, logic was broken
- new measurement now continues from previous one
- new data is added to the same file from previours progress
- changed arg `--ignore-previous` to `resume-meas`
- new arg overrides any other arg and uses same params from previous meas
- minor aesthetic changes
- if fname is not speciefied, use default value based on date
- use all bpms if bpms2dobba not given
- minor changes in help
- replace `print-all-bpms` flag by `print-bpms-quads` to include also the quads associated to the BPMs
- now using single-quotes
- relevant keyword (bpm, bba, loco) first
- back to single quotes
- ruff pattern for imports
@vellosok75 vellosok75 marked this pull request as ready for review September 18, 2025 16:38
- accept master's state, with the use of `use6dtrack` flag
fernandohds564 and others added 2 commits September 23, 2025 16:00
if --resume-meas was not passed and fname coincided with an existing
file, data from this file would be overwritten
Now, an error is raised, educating the user
@fernandohds564 fernandohds564 merged commit 92b88c5 into master Sep 23, 2025
@fernandohds564 fernandohds564 deleted the add-meas-scripts branch September 23, 2025 19:09
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.

5 participants