Skip to content

pyflightstream.post.field_frames (stable)

Generated from the docstrings at build time: every one of the 5 names in the public definitions (the module declares no __all__) of pyflightstream.post.field_frames has an entry below. The names a guide or an example uses come first; the others follow under Advanced.

Coordinate and velocity transforms whose native conventions are explicit.

Advanced

pyflightstream.post.field_frames.FramePose dataclass

FramePose(
    origin_native: ndarray,
    basis: ndarray,
    initial_basis: ndarray,
    angular_velocity_reference: ndarray,
    center_native: ndarray,
)

A frame's native-unit placement and physical angular velocity at one STEP.

pyflightstream.post.field_frames.VELOCITY_EVIDENCE module-attribute

VELOCITY_EVIDENCE: dict[
    tuple[str, str, str, str], tuple[float, dict[str, str]]
] = {
    ("26.124", "8172026", "unsteady-fluid-plot", "METER"): (
        1.0,
        _FLUID_METER,
    ),
    (
        "26.124",
        "8172026",
        "unsteady-fluid-plot",
        "MILLIMETER",
    ): (1.0, _FLUID_MILLIMETER),
    ("26.124", "8172026", "steady-probe", "METER"): (
        1.0,
        _STEADY_PROBE,
    ),
    ("26.124", "8172026", "steady-probe", "MILLIMETER"): (
        0.001,
        _STEADY_PROBE,
    ),
    ("26.124", "8242026", "unsteady-fluid-plot", "METER"): (
        1.0,
        _linux_velocity_evidence(_FLUID_METER),
    ),
    (
        "26.124",
        "8242026",
        "unsteady-fluid-plot",
        "MILLIMETER",
    ): (1.0, _linux_velocity_evidence(_FLUID_MILLIMETER)),
    ("26.124", "8242026", "steady-probe", "METER"): (
        1.0,
        _linux_velocity_evidence(_STEADY_PROBE),
    ),
    ("26.124", "8242026", "steady-probe", "MILLIMETER"): (
        0.001,
        _linux_velocity_evidence(_STEADY_PROBE),
    ),
}

pyflightstream.post.field_frames.field_in_reference

field_in_reference(
    points_native: Any,
    velocity: Any,
    motion_record: Mapping[str, Any],
    *,
    step: float | None,
    native_to_m: float,
    velocity_proof: Mapping[str, Any],
    solver_identity: Mapping[str, Any],
    export_kind: str,
) -> tuple[np.ndarray, np.ndarray]

Return global SI positions and absolute velocity using proved conventions.

Parameters:

Name Type Description Default
points_native Any

Original local sample coordinates as an N by 3 array.

required
velocity Any

Exported velocity components in the units bound by velocity_proof.

required
motion_record Mapping[str, Any]

Recorded fixed or resolved constant-rotation frame trajectory.

required
step float | None

Actual STEP of these samples, not their row offset.

required
native_to_m float

Separately established coordinate conversion to metres.

required
velocity_proof Mapping[str, Any]

Exact export-kind and executable-bound component/velocity conventions.

required
solver_identity Mapping[str, Any]

The executable hash and build recorded for this run.

required
export_kind str

Native export family, for example unsteady-fluid-plot or steady-probe.

required

Returns:

Type Description
tuple of numpy.ndarray

Reference-frame positions in metres and absolute velocity in m/s.

Raises:

Type Description
ProductError

If the coordinate conversion is not positive, the arrays are not matching finite N by 3 arrays, or the frame, STEP or velocity proof does not support the conversion.

pyflightstream.post.field_frames.frame_pose

frame_pose(
    motion_record: Mapping[str, Any],
    *,
    step: float | None,
    solver_identity: Mapping[str, Any],
) -> FramePose

Resolve fixed or proved constant-rotation placement at an actual STEP.

Parameters:

Name Type Description Default
motion_record Mapping[str, Any]

The resolved frame ledger; unknown geometry or timing is refused.

required
step float | None

Actual exported STEP, required for a rotating frame.

required
solver_identity Mapping[str, Any]

The run's fs_exe_sha256 and fs_build, checked against timing evidence.

required

Returns:

Type Description
FramePose

Native-unit origin and basis columns, with angular velocity in rad/s.

Raises:

Type Description
ProductError

If the frame ledger is not resolved as known, has no geometry evidence, or carries a malformed origin or axis vector.

pyflightstream.post.field_frames.native_velocity_proof

native_velocity_proof(
    motion_record: Mapping[str, Any],
    *,
    solver_identity: Mapping[str, Any],
    export_kind: str,
) -> dict[str, Any]

Return the convention measured for this export, unit and solver version (FR-153).

A row of VELOCITY_EVIDENCE naming the run's own build proves it. A run of a measured solver version and unit on another build gets the convention measured on the registered build, with proven False and both builds named, so its field is written with a warning rather than withheld. Another version, unit or export kind, and a run that recorded no executable digest or build, are refused: there is no evidence at all.

Parameters:

Name Type Description Default
motion_record Mapping[str, Any]

The recorded frame ledger; its solver_version and length_unit select the measured convention.

required
solver_identity Mapping[str, Any]

The run's fs_exe_sha256 and fs_build.

required
export_kind str

Native export family, for example steady-probe.

required

Returns:

Type Description
dict

The velocity convention: state, executable identity, units, scale to metres per second, component basis and the evidence; with the measured and run builds and proven False when it is borrowed.

Raises:

Type Description
ProductError

If no measured convention exists for the export, build and unit.