ChronaxisUser manual中文
On this pageMembersPlanFragmentPlanFragment.to_dictSource locations

chronaxis.PlanFragment

Import this object from chronaxis. This page covers directly public members and necessary construction/context protocols. See the Chinese implementation reference for internals. Return to the public API index. Check required parameters, defaults, returns, and exceptions before calling.

Members

PlanFragment

A preset-generated set of derived values, rules, windows, calculations, and pairings. Merge it into a full plan for execution. It contains no real samples and reads no files itself. Generated IDs must still be unique against user-defined IDs.

python
PlanFragment(derived: tuple[chronaxis.core.expression.DerivedDefinition, ...] = (), rules: tuple[chronaxis.planning.preset_models.PresetRule, ...] = (), windows: tuple[chronaxis.core.windows.WindowSpec, ...] = (), calculations: tuple[chronaxis.planning.preset_models.PresetCalculation, ...] = (), sequences: tuple[chronaxis.planning.sequences.SequencePlan, ...] = ()) -> None

The linked lower-level types are Chinese implementation references.

Name Type Required Default Purpose, choices, and effect
derived tuple[DerivedDefinition, ...] No () Generated derived definitions; empty means none.
rules tuple[PresetRule, ...] No () Generated detection rules; empty means none.
windows tuple[WindowSpec, ...] No () Generated event windows; empty means none.
calculations tuple[PresetCalculation, ...] No () Generated calculation definitions; empty means none.
sequences tuple[SequencePlan, ...] No () Generated pairings. Nonempty values become a sequences list in to_dict(); no pairings means empty.

PlanFragment.to_dict

Serialize typed definitions to copies using the current configuration format; omit an empty sequences key.

python
PlanFragment.to_dict()

No explicit parameters; reads the immutable generated declarations. Returns a dict that can be merged into input for AnalysisPlan.from_dict. It contains no invented sources or execution results. No proactively raised exceptions are documented; build_preset constructs these instances.

Source locations

Chronaxis user manual · Offline edition