adcox / pika

https://adcox.github.io/pika/
MIT License
0 stars 0 forks source link

Segment sequence from propagation #14

Open adcox opened 1 month ago

adcox commented 1 month ago

Add a class method to Segment that creates a sequence of segments from a propagated arc. The default behavior is a single segment that starts and ends at the propagation time limits, but the user can specify more than two indices at which to "break" the propagation. Origin and terminal control points are automatically created.

Segment.fromProp(propSol)    # --> single segment
Segment.fromProp(propSol, indices=[0, 100, 200, -1])    # --> three segments
Segment.fromProp(propSol, tof=2.3, shareTOFVar=True)    # --> multiple segments that share a single TOF variable
adcox commented 1 month ago

Or maybe a separate class/tool, a "discretizer", that offers many options to turn an arc into a discrete set of control points connected by segments. Other options could include adding control points at specific types of propagator events (e.g., apses)