TbT data measurement & analysis classes #269
Draft
vellosok75 wants to merge 146 commits intomasterfrom
Draft
Conversation
murilobalves
requested changes
Apr 15, 2024
…ams, and add checking of strengths
…eated initialization of parameters
fernandohds564
requested changes
Apr 17, 2024
- changes `pingers2kick` according to the kick values set
- `pingers2kick` set by user manually, undoing the second-to-last commit; - default kicks to 0; - stop using pingers calibrations during meas - pingers calibration factors now class constants in analysis class - avoid initialization of `SOFBFactory` during params & meas classes instantiation
-`set_magnets_state` now exits soon after failing - flags for the meas flow control are returned by `prepare_timing` and `prepare_magnets`, instead of manipulating a class var - stopping the meas externally counts as `meas_finished_ok = False`
…nts, do_pulse_evg)
…threaded_tbt_meas
- `get_magnets_strengths` return strengths even if pingers are off - pingers are turned-on on `set_magnets_state` as called by `prepare_magnets` only if indicated in `pingers2kick` - bugfixes related to absent dict keys in `state` dict of `set_magnets_state` - fix access to the magnets strengths in the str method of analysis class
- PCA is applied both planes always - `plot_modal_analysis` reuses code from PCA function - stetic improvements to `plot_modal_analysis` - now highlighting singular values of each plane, fixes hor. & ver. signals spatio-temp. -modes - new structure for `linear_optics_analysis`: choose a method and proceed - this way, PCA function is more modular. It solely calculates PCA analysis stuff. - still missing propagate this to ICA analysis and harmonic analysis
- standardize event related properties: event_mode, event_delay, etc. - use delay raw instead of delays - avoid changing `evg.nr_pulse` if not necessary
- default `do_pulse_evg` to False - init state properties and function to update init states - propagate changes from AcqBPMsSginals to standardize "event" properties
- generalized framework for modal analysis to be also applied to ICA - automatic detection of sin/cos modes - now also storing sin/cos spatial/temporal modes in `pca_data` - `plot_modal_analysis` now also indicates sin/cos temporal/spatial modes - WIP: refactor of ICA
- refactor ICA analysis for stacked hor/ver. planes analysis, by default, as in PCA. - include alternative to view ICA temporal/spatial modes in `plot_modal_analysis` Obs: ICA via FastICA is failing to separate signals, and this workflow is failing. SOBI is "working" (seems only to perform PCA), but not understood.
- comment import from unfinished work in mathphys - dummy docstrings to properties to remove ruff's complaints
- standardize how hormonic analysis is called (include calc_optitcs arg) - remove SOBI (unfinished work) as ICA method
- instead of relative phase error
- plot only the relevant plane info (hor/ver) in `linear_optics_analysis` - change ylabel in sum singal plots
Contributor
|
@vellosok75, what is missing here for merge? |
Contributor
Author
The Measurement class is ready. We’ve been using it a lot and you and I already reviewed the code together earlier this year. The Analysis class, however, is still rough. I’d like to clean it up before it goes to review. To support this, I’ve started preparing a tutorial notebook that demonstrates the analysis functionalities. This should both facilitate the review and help guide the cleanup. I plan to finish it soon and then mark the PR as ready for review. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
WORK IN PROGRESS: module for measuring and analyzing linear optics from turn-by-turn BPM acquisitions.
The measurement script has been tested online and works well. Only linear optics analysis is available for now (beta beating and phase advance errors), as probed by either sinusoidal fitting, PCA or ICA. Equilibrium parameters fitting (energy spread and emittances) is not yet implemented.