# CelerisLab/common/streakline/__init__.py
"""
Streakline — continuous-release particle-based flow visualization.

A post-processing sub-package under ``common/``.  The ``Streakline`` class is a
passive consumer: users call ``observe()`` in their own simulation loop,
controlling body actions, checkpointing, or other modules independently.

Usage::

    from CelerisLab.common.streakline import Streakline, ReleaseConfig, IntegratorConfig

    streak = Streakline(release_points=..., nx=nx, ny=ny, ...)
    streak.observe(ux=macro["ux"], uy=macro["uy"], step=step)
    streak.render("output.png")
"""

from ._config import (
    ReleaseConfig,
    IntegratorConfig,
    FlowFrame,
    CylinderSpec,
    build_release_points,
)
from ._streakline import Streakline
from ._integrate import (
    advance_between_frames as advance_particles_between_frames,
    bilinear_sample,
    inject_particles,
    particles_valid_mask,
)
from ._render import render_density, gaussian_blur2d

# configure_compute_threads is imported lazily (in _streakline.py) to avoid
# circular dependency between common.pathline and common.streakline.

# Backward-compat aliases
render_streakline_density = render_density

__all__ = [
    "Streakline",
    "ReleaseConfig",
    "IntegratorConfig",
    "FlowFrame",
    "CylinderSpec",
    "build_release_points",
    "advance_particles_between_frames",
    "render_streakline_density",
]
