tidal package#

TIDAL: Tensor Integration and Derivation for Any Lagrangian.

A symbolic physics pipeline for deriving PDEs from Lagrangians using xAct/Mathematica and simulating them with native solvers (SUNDIALS IDA/CVODE, leapfrog, scipy) and numpy spatial operators.

This package provides: - symbolic: Lagrangian-to-PDE pipeline (symbolic computation layer) - cli: Command-line interface for derivation, simulation, and measurement - measurement: Post-hoc analysis (energy, conversion, dispersion, mixing)

tidal.has_tex_support()[source]#

Check if TeX support is available for high-quality plotting.

Return type:

bool

Subpackages#

Submodules#

tidal.banner module#

TIDAL CLI Banner — nabla + ripple rings with colour gradients.

Algorithmically rasterized from the TIDAL SVG logo using half-block characters (▀ ▄ █) for universal terminal compatibility.

Usage:

from tidal.banner import print_banner print_banner() # default ocean theme print_banner(theme=”sunset”) # warm gradient print_banner(theme=”plain”) # no colour (safe for pipes / CI)

Themes: “ocean”, “ice”, “sunset”, “neon”, “plain”

tidal.banner.get_banner(theme='ocean', layout='auto', version=None)[source]#

Return the TIDAL ASCII banner as a string.

Parameters:
  • theme (str) – One of “ocean”, “ice”, “sunset”, “neon”, “plain”.

  • layout (str) – “compact” — icon left, text right (needs ~52 cols) “stacked” — icon on top, text below (needs ~38 cols) “minimal” — small icon + small text (needs ~20 cols) “auto” — pick based on terminal width

  • version (str | None) – If provided, appended as a tagline below the art.

Return type:

str

tidal.banner.print_banner(theme='ocean', layout='auto', version=None, file=None)[source]#

Print the TIDAL banner to file (default: sys.stderr).

Parameters:
Return type:

None

tidal.plot_pgf module#

tidal.plot_pgf.check_tex_available()[source]#

Check if LaTeX executables are available on the system.

Return type:

bool

tidal.plot_pgf.enable_pgf(texsystem='pdflatex', *, serif=True, base_size=10, fallback_on_error=True)[source]#

Enable PGF backend for matplotlib with LaTeX rendering.

If LaTeX or PGF backend is not available, falls back to standard matplotlib settings with similar font configuration.

Args:

texsystem: LaTeX system to use (pdflatex, xelatex, or lualatex) serif: Whether to use serif fonts base_size: Base font size fallback_on_error: Whether to fall back to standard matplotlib on error

Raises:

RuntimeError – If PGF backend, LaTeX system, or PDF converter is not available and fallback_on_error is False.

Parameters:
  • texsystem (Literal['pdflatex', 'xelatex', 'lualatex'])

  • serif (bool)

  • base_size (int)

  • fallback_on_error (bool)

Return type:

None