Modify envelope tracker - #141
Open
austin-hoover wants to merge 16 commits into
Open
austin-hoover wants to merge 16 commits into
austin-hoover wants to merge 16 commits into
Conversation
…boration#80) * Add test script for tune calculation node * Use correct column order for tune diagnostic * Test collecting phase information from bunch * Track number of turns and sum of previous particle phases * Revert "Track number of turns and sum of previous particle phases" This reverts commit c3ce40e. * Initial version of BunchTuneAnalysis4D * Fix typos * Try adding BunchTuneAnalysis4D to orbit.core module * Keep BunchTuneAnalysis4D in same file as BunchTuneAnalysis * Update test_tune.py * Add test_tune_4d.py * Rename test_tune_4d.py to test_tune_4d_uncoupled.py This test will compute tunes in an uncoupled lattice. * Delete file * Implement setMatrixElement method * Add example test_tune_4d_uncoupled.py This example tests the BunchTuneAnalysis4D class in an uncoupled lattice. * Change function names * Add comments * Add comments * Use built-in TeapotTuneAnalysisNode * Update documentation * Add getData method to tune analysis nodes This method returns a dictionary of phase, tune, and action for each plane for a single particle in the bunch. * Fix type on examples * Add setActive method to TeapotTuneAnalysis4DNode * Unify BunchTuneAnalysis and BunchTuneAnalysis4D * Unify BunchTuneAnalysis and BunchTuneAnalysis4D python classes * Update tune example * Add setActive function to TeapotTuneAnalysisNode * Check tunes against transfer matrix * Add option to start FODO lattice at quad or drift center * Fix fill fraction argument in make_lattice * Improve make_lattice helper function * Remove unused imports * Add test using 4 x 4 normalization matrix from eigenvectors * Add 4D coupled tune analysis example * tune_node.getData(bunch) returns data for all particles * Accidentally committed output files * Update tests * Format * Change tunemap labels to use 1/2 instead of x/y xOldPhase -> phase_1 yOldPhase -> phase_2 xOldTune -> tune_1 yOldTune -> tune_2 xAction -> action_1 yAction -> action_2 * Change labeling from x/y to 1/2 * Change function name to setNormMatrixFromTwiss * Update examples * Change C++ function name assignTwiss -> setNormMatrixFromTwiss * Create orbit.diagnostics.eig module * Add function setNormMatrixFromTransferMatrix * Start working on setNormMatrixFromCov * Update examples to include SNS ring * Update test_sns_4d.py * Don't print * Address issue with setNormMatrixFromCov when eps1=eps2 * Add check if sigma is coupled * Accidentally deleted method * Add flag to reset particle phase attributes when normalization matrix changes
* Clean up meson files. - tabs -> 2 spaces per style guide - foreach loop for the extension modules - clean up cpp_args - migrate c++ standard specification to project() - global project argument for `-DUSE_MPI` - Removed `-fPIC`. Meson handles this for us. - set default buildtype to 'release' in project() - can be overridden with `meson setup ... -Dbuildtype=debug` - Add `-march=native` global project argument, conditionally. - Since we don't distribute binaries and expect users to compile pyo3 for themselves, I don't see a reason not to include this flag as it can only help performance. At worst, it does nothing. * Also enable link time optimization
This branch has not been deployed
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.
Envelopenow storesSyncParticlerather than bunch. AddedgetCharge()method toSyncParticle.orbit.utils.matrix.py.getMatrix(sync_part: SyncParticle, part_index: int) -> np.ndarrayto eachAccNodesubclass.NotImplementError.None.orbit.envelope.EnvelopeTrackerand added envelope tracking routines toorbit.lattice.AccLattice, such asAccLattice.trackEnvelope(envelope: Envelope, index_start: int = 0, index_stop: int = None, history: bool = False). There are additional methods for faster tracking in rings with static elements (by storing transfer matrices rather than recomputing on each turn.Envelope.to_bunch(size: int, dist: str) -> Bunchto generate bunch from envelope. Also addedbunchargument toEnvelopeconstructor to construct envelope directly from bunch./tests/py/orbit/test_env.py) and examples (/examples/Envelope). I think everything is working as before.