Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial Lists. #1

Open
52 of 87 tasks
DavidSagan opened this issue Jun 17, 2023 · 0 comments
Open
52 of 87 tasks

Initial Lists. #1

DavidSagan opened this issue Jun 17, 2023 · 0 comments
Assignees

Comments

@DavidSagan
Copy link
Member

DavidSagan commented Jun 17, 2023

These are not systematic lists. Will add to them as the project matures.

  • Use Jet to look at type stability of code

Parsing ToDo:

  • Document WallSection struct.
  • Combine BeamLine and LatBranch!?? What name to use?
  • reverse
  • reflection
  • Replacement line. Is any programming needed?
  • List line. Does anyone use this?
  • for show_beamline show number of elements, orientation, etc for each line item.
  • For each latele element in show lords.
  • Superimpose. Implement no_superimpose switch
  • Multipass.
  • forking.
  • girder
  • Merge_elements: Thought: New lord/slave status where slave has array of lords like em_field ("Union" Lord/slave?)
  • Implement combine_consecutive_elements
  • Structure of: Orbit / Twiss & Transfer matrix / Higher order maps (with spin)
  • lattice_bookkeeper. Also update latele ix_ele attribute.
  • element finder function.
  • Digested file?
  • Radians for all angle units everything!? Yes.
  • Mark parameters where rad/2pi values should also be shown (EG RF phases).
  • ele attribute stale flags and attribute: set_attrib(ele::Union{String, LatEle, Vector{LatEle}}, who::String, value)
  • Element iterators: in-branch and entire-lattice paths
  • "Global" parameter struct -> put in lat.
  • Implement control lords
  • Integrate Julia regex into eles_finder: "r@" prefix, + "alias::"/"description::"/"type::" for these string fields.
  • Extend show commands to handle Ele vectors.
  • All warning messages handled by bmad_warning function. (not implemented.)
  • Need copy constructor for Ele, Branch, Lat?
  • Modify beamline() to take an optional end_ele element to replace the default.
  • Have shortened show_ele version where zero values are not shown.
  • Make show_ele not show irrelevant parameters. EG pc_ref_exit when pc does not change.
  • Default species positron (same as old Bmad) or not set (force user to set).
  • settable field in ele_param_by_ele_type has plenty of wrong values (most things are set to settable).
  • Implement auto_scale -> auto_amp, auto_phase; fint => fint1/2; hgap => hgap1/2 ???
  • Check that changes in ref energy and length properly handled for BendGroup, multipoles, RF, etc.
  • Need to have superimpose! handle superposition of a fork which results in a new branch with multipass elements. One idea is to save multipass chain info in each element in a "private" structure which does not get printed.
  • units function does not cover multipoles which it should.
  • Handling of element parameters like AmpVsTimeGroup that may or may not be present.
  • Automatic show two column even if show_column2 not populated for a given group.
  • Make routine to remove list of elements.
  • Superimpose with #N: Counting in a given branch needs to include superimposed elements.
  • Check Superimpose bookkeeping when parameters are changed.
  • Check Multipass bookkeeping when parameters are changed. Especially bends.

Element attributes:

  • Attribute registry with: units, dependent/independent, settable, and mandatory (must be present) info. Question: Do private attributes need to be handled?
  • Dependent attribute bookkeeping.
  • Bookkeeping when lattice is constructed but not before.
  • Online parameter listing given element type. See: Base.propertynames.
  • How to handle mapping of attribute when attribute name (EG: r_floor) does not match group field (EG .r)
  • Need bend_field_master logical.
  • Setting attributes before and after lattice construction.
  • Element show should hide private flags by default.
  • Multipole scaling?
  • Implement integratedN and EintegratedN for multipoles.
  • What to do with the offset_tot, etc element parameters. Two possibilities: Put in separate struct from Alignment Group or put in AlignmentGroup and have the show_ele code print values in a compact fashion.
  • Have tilt in AlignmentGroup not displayed for Bend elements.
  • Make sure patch tilt is not confused with multipole tilt.
  • Old roll attribute replaced by tilt. Is this a good thing?

Other:

  • Modify show routines to handle custom attributes. Esspecially show_lat and show_branch.
  • Go over all error messages and make sure they convey all needed information.
  • Possible problem with copy(ele::Ele) is that ele.pdict[.XXX] where XXX is a complex structure will not be totally disjoint for all sub-parameters. This should be documented. One way to handle this is for everything in ele.pdict to be registered and appropriate copy constructors for complex structures defined. But this is more bookkeeping overhead.
  • Make sure :changed dict is empty after bookkeeping.
  • Superimpose: Full test coverage for all the code.
  • Right now if show(ele) encounters an unknown parameter group, a line is printed saying the group cannot be displayed. Change this and have show(ele) try to print something.
  • Implement function to replace an element in the lattice with a copy of another element. Error if replacing superimpose or multipass.
  • Implement function to remove a list of elements in the ring.

Questions:

  • Where to put lord branch? lat.lord or separate branches by type? Put all branches in an ordereddict?
  • Multipass: What suffix to use? "!mpN" where N is pass number
  • Superimpose: What suffix to use? "!sN" where N is integer
  • Currently, beginning and end elements in a branch are never reversed. Is this what is wanted? No.
  • How to handle absolute vs relative time tracking?
  • Revamp show_ele to not display param descriptions but rather have two column output (EG display rad & rad/2pi).
  • Does split_ele calculate the correct lengths when splitting a bend element?

Projects ToDo:

  • Plotting
  • DA (Matt)
  • Normal form / analysis.
  • Tracking with GPU/parallel options.
  • Integration of ML / backwards differentiation with tracking.
  • particle species / fundamental constants.
  • Documentation including julia hints.
  • Regression testing.
  • Translator from/to Fortran Bmad, MAD, etc.
  • Interface to xraylib.
  • Extend https://github.com/sp94/CubicSplines.jl, super_recipes (cf. https://github.com/JuliaNLSolvers/Optim.jl/tree/master), etc.
  • Get quaternion.jl to work with dual numbers.

Documentation:

  • How to customize a Lattice: Custom element types, custom switches (either new switch group or extend existing goup), custom parameters, custom tracking, etc.
  • Differences between new and old: lattice parameters, absolute/relative time tracking, etc.
@DavidSagan DavidSagan self-assigned this Aug 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant