bertini.tracking.observers.double¶
Observers built to watch a pure-double precision tracker
- class bertini.tracking.observers.double.CallbackObserver((object)arg1)¶
Bases:
CustomObserverObserver that routes events to registered Python callables.
The event type passed to
on()may be an event class, a tuple of classes, or simply the event’s name as a string (resolved against this observer’s own precision):obs = CallbackObserver() obs.on("TrackingStarted", lambda e: print("tracking started")) obs.on("PrecisionChanged", lambda e: print(e.previous(), "->", e.next())) tracker.add_observer(obs) tracker.track_path(...) tracker.remove_observer(obs)
- Observe(event)¶
- __init__((object)arg1) None¶
- on(event_type, callback)¶
Register callback for events of event_type.
event_type may be an event class, a tuple of classes, or the event name as a string. Returns self for chaining.
- class bertini.tracking.observers.double.CustomObserver((object)arg1)¶
Bases:
AnyAbstractObserver- __init__((object)arg1) None¶
- class bertini.tracking.observers.double.FailedStep¶
Bases:
TrackingEventRaises an exception This class cannot be instantiated from Python
- __init__()¶
Raises an exception This class cannot be instantiated from Python
- class bertini.tracking.observers.double.FirstPrecisionRecorder((object)arg1)¶
Bases:
CustomObserver- __init__((object)arg1) None¶
- class bertini.tracking.observers.double.GoryDetailLogger((object)arg1)¶
Bases:
CustomObserver- __init__((object)arg1) None¶
- class bertini.tracking.observers.double.InfinitePathTruncation¶
Bases:
TrackingEventRaises an exception This class cannot be instantiated from Python
- __init__()¶
Raises an exception This class cannot be instantiated from Python
- class bertini.tracking.observers.double.PathCollectionObserver((object)arg1)¶
Bases:
CustomObserverA meta-observer: collects every path of a multi-path run.
Attach one of these to a tracker (e.g.
zd.get_tracker()) before a solve. Each time the tracker starts a path it spins up a freshPathDataCollector, attaches it, and – when the path ends – harvests it intoseriesand detaches it. Attaching/detaching happens from insideObserveand relies on the observable deferring those mutations until the current notification finishes.After the run,
seriesis a list of finishedPathDataCollectorobjects, one per path, in the order the tracker ran them:a = PathCollectionObserver() zd.get_tracker().add_observer(a) zd.solve() for path in a.series: t, z = path.times(), path.points() ...
- Observe(event)¶
- __init__((object)arg1) None¶
- class bertini.tracking.observers.double.PathDataCollector((object)arg1)¶
Bases:
CustomObserverCollects one tracked path into a time series, for plotting.
Attach to a tracker; on every successful step it records the time, the space point, and a few step diagnostics. Because an adaptive-precision tracker hands back arbitrary-precision (mpfr) numbers – which do not pack into a single numpy array – every value is cast to a plain python
complex/floatas it is collected (double precision is plenty for a picture). The collected data is offered as several typed numpy arrays (or, optionally, a pandas DataFrame):b = PathDataCollector() tracker.add_observer(b) tracker.track_path(...) tracker.remove_observer(b) t = b.times() # complex, shape (n_steps,) z = b.points() # complex, shape (n_steps, n_vars) dgn = b.diagnostics() # float, shape (n_steps, 4): |t|, cond, prec, stepsize
- DIAGNOSTIC_COLUMNS = ('abs_t', 'condition_number', 'precision', 'stepsize')¶
- Observe(event)¶
- __init__((object)arg1) None¶
- as_dataframe()¶
Return the whole path as a pandas DataFrame with named columns.
Requires pandas (
pip install pandas). Columns:t(complex), onez{i}(complex) per variable, then the diagnostic columns.
- diagnostics()¶
- points()¶
- times()¶
- class bertini.tracking.observers.double.PrecisionChanged¶
Bases:
TrackingEventRaises an exception This class cannot be instantiated from Python
- __init__()¶
Raises an exception This class cannot be instantiated from Python
- next((PrecisionChanged)arg1) int¶
- previous((PrecisionChanged)arg1) int¶
- class bertini.tracking.observers.double.PrecisionDecreased¶
Bases:
PrecisionChangedRaises an exception This class cannot be instantiated from Python
- __init__()¶
Raises an exception This class cannot be instantiated from Python
- class bertini.tracking.observers.double.PrecisionIncreased¶
Bases:
PrecisionChangedRaises an exception This class cannot be instantiated from Python
- __init__()¶
Raises an exception This class cannot be instantiated from Python
- class bertini.tracking.observers.double.StepsizeDecreased¶
Bases:
TrackingEventRaises an exception This class cannot be instantiated from Python
- __init__()¶
Raises an exception This class cannot be instantiated from Python
- class bertini.tracking.observers.double.StepsizeIncreased¶
Bases:
TrackingEventRaises an exception This class cannot be instantiated from Python
- __init__()¶
Raises an exception This class cannot be instantiated from Python
- class bertini.tracking.observers.double.SuccessfulStep¶
Bases:
TrackingEventRaises an exception This class cannot be instantiated from Python
- __init__()¶
Raises an exception This class cannot be instantiated from Python
- class bertini.tracking.observers.double.TrackingEnded¶
Bases:
TrackingEventRaises an exception This class cannot be instantiated from Python
- __init__()¶
Raises an exception This class cannot be instantiated from Python
- class bertini.tracking.observers.double.TrackingEvent¶
Bases:
AnyEventRaises an exception This class cannot be instantiated from Python
- __init__()¶
Raises an exception This class cannot be instantiated from Python
- tracker((TrackingEvent)arg1) bertini._pybertini.tracking.DoublePrecisionTracker¶
- class bertini.tracking.observers.double.TrackingStarted¶
Bases:
TrackingEventRaises an exception This class cannot be instantiated from Python
- __init__()¶
Raises an exception This class cannot be instantiated from Python