top-down todo list of tasks:
----------------------------

todo (small tasks):
- record lost particles in mtable (actually stored in mflow).
- check policy of option.debug vs command info or debug.
- review C errors (raise segfault, backtrace?), use callback and jit flush.
- review slices indexes (and positions) for backtracking (+ entry & exit).
- review vector specialization in mtable, replace by table and col mth tovector?
- improve speed of mtables (still need proxy lambda specialization for speed).
- redo map diagonal blocks from beta0 block in bet2map (unique solution exists?).
- check why profiler allows faster runs by 30%.
- check angle vs k0l in multipole element (might need another kickh)
- patch for fast table copy (and more), recheck object model performance.
- check object models performances (after improvement of maps speed).
- review windows version.

todo (signficant tasks):
- fix etap, alphap and gammatr
- Malte's cfmultipole and/or PTC getmatrix.                                     **
- aperture n1 estimate (with Tobias).                                           **
- command for field errors from tables or files.
- command for misalignment errors from tables or files.
- improve speed of maps (alloc+intrf 70%, method 4 vs 2, chrom vs HO, skip t).
- improve speed of objects (copy on creation, fast copy?).
- module for managing particle vs damap and their attributes
- true rbend.                                                                   *
- curved quadrupole (eh*k0l) (?).
- focusing sbend (?).
- fast tracking (GPU, Threads).                                                 **

todo (extra features):
- readline (rlfe, linenoise), feasible?.
- look at Ceres solvers (Google, C++, GitHub), http://ceres-solver.org
- look at proposed optimiser at http://plato.asu.edu/sub/nonlsq.html.
- look at http://www.swmath.org

done:
- documentation migrated to SphinxDoc (latex, pdf, online).
- implement uncouple chrom from damap 2nd order.
- high order normal form.                                                       **
- improve MADX converter to handle mult. line def. and mult. def. per line.
- MADX converter rewritten
- read damap
- ptcorder option when writting gtpsa
- add pb dir to gtpsa convert to (re)move canonical variables.
- beam beam 4D.
- dispersion in 6D
- fixed synch_1 to synch_8 for backtracking.
- fixed synch_1 and 5, added synch_6 and 8.
- clear attempt for cachemethod and objalt.
- replace reshapeto_ by append_ to vector/matrix in mtable.
- detect the need for cofind in twiss and remove the attribute.
- update beta0 to ease its creation from vector of coordinates.
- update cofind and twiss to use nocopy, par2vec and vec2par.
- add nocopy in track to use damaps inplace.
- search for reference closed orbit in track.
- truncate GTPSA at order 1 in cofind, allow to reuse compatible damap.
- handle correctly damaps with knobs in cofind and twiss.
- radiation in twiss and cofind.
- implement multipole solenoid kick.
- implement beam beam 4D.
- implement solenoid fringe field.
- implement non-linear elliptic lens.
- remove method 'init', elements track are now methods.
- implement alternate object model.
- extract jacobian from damap from matrix of monomials for matching
- simplify delegation of binary operator right side for Cplx, Mtrx and GTPSA.
- support for user-defined knobs.
- fix abs (R & C), arg (C), add hypot (R & C) and atan2 (R).
- radiation + photon tracking.
- fix e1, e2 side effects.
- fix integer part of q3.
- review phase advance for backtracking.
- review index_of of mtable vs sequence.
- review _data key (pointer) vs __data key (string) in sequence and mtable.
- update maps for permanent vs error in misalignment.
- command for misalignment errors in sequences.
- remove Y scheme in seq:share method to behave like MADX
- use info and debug, remove mapdump.
- review and cleanup show.
- split track and survey from elements methods :track and :survey.
- Add strategy levels to jacobian reduction.
- Broyden jacobian matrix speed-up.
- Levenberg-marquardt algorithm.
- Jacobian algorithm.
- automatic jacobian matrix computation.
- better exec flow in match command.
- split nlopt from match command, make nlopt lib work properly.
- orbit correction command.
- add madx random number generators for compatibility (ealign).
- add remove col, remove row, remove vec to matrix module.
- add flags enabled, fuse layout and layangle to playout.
- unify flags between object & elements, sequence and mtable.
- start documentation on Overleaf.
- orbit correction algorithms (+new pcacnd).
- implement synchrotron integrals.
- implement Montague functions.
- override element in sequence from MADX env if it already exists.
- split load of MADX env into smaller chunks to avoid the 65536 limit.
- convert element name, from and refpos to upper case when in MADX.
- publish sequence when in MADX.
- auto-convert identifiers to lower case in MADX.
- add grad automatic computation to match.
- review twiss scheme for damap and beta0 blocks.
- move beta0 block management from twiss to track.
- add identity to beta0 blocks.
- add coordinate to map2bet and bet2map, update interface.
- restore backward tracking and track.mad tests.
- check if codiff is smaller than cotol and adjust.
- make interaction mode more user friendly.
- fix alfap, etap, gammtr, calculation.
- rename fnone to fnil.
- new policy of actions (track, survey) to fix twiss.
- stabilise blocks of R.
- fill summary table.
- check that user beta0 block contains enough init data (i.e. mu).
- make cummulated twiss calculation independent of save and mtable.
