fs_dev.demo.python_demo_script_cum_avg#
FalconSmith Demonstration#
End-to-end demonstration of deterministic multi-language scientific workflows using FalconSmith.
This script demonstrates how Python, native C++, and Rust components can operate together inside a single reproducible engineering system while remaining exposed through a clean and stable Python API.
Overview#
The workflow intentionally combines multiple layers of the stack:
Python orchestration
Native file reading
NumPy array preparation
Native numerical processing
Interactive Python visualization
The purpose of the demo is not algorithmic complexity, but to demonstrate operational consistency across languages and tooling.
Demonstrated Concepts#
The demonstration shows:
Native C++ and Rust modules exposed as normal Python imports
Deterministic native module exposure through FalconSmith
Unified Python-facing APIs independent of implementation language
Native scientific processing integrated with NumPy workflows
Automatic handling of native/Python interoperability
Structured engineering workflows with reproducible execution
Interactive visualization of scientific measurement data
Dataset#
The input dataset contains time-series temperature measurements from multiple spatially distributed probes.
The header section includes:
Measurement metadata
Probe positions
Dataset descriptions
Probe geometry is extracted directly from the header information and used for spatial visualization.
Workflow#
The demo executes the following sequence:
- Raw text preprocessing
Preserve metadata/header lines
Convert numeric rows to CSV-compatible format
- Native data loading
Read structured scientific data using a native reader
Either C++ or Rust implementations may be used
- Metadata extraction
Parse probe positions from dataset headers
- Numerical preparation
Arrange probe data into NumPy matrices
- Native numerical computation
Compute cumulative averages using a compiled native function
- Interactive visualization
- Display synchronized:
temporal evolution
spatial probe geometry
temperature distributions
Native Reader Switching#
One purpose of the demonstration is to show that implementation language becomes largely transparent at the orchestration level.
The following readers can be swapped with a single line change:
- read_ascii_csv
Native C++ implementation
- read_ascii_csv_rs
Native Rust implementation
The remainder of the workflow remains unchanged.
This demonstrates how FalconSmith maintains stable Python-facing interfaces independently of the underlying native implementation.
Scientific Processing#
The cumulative averaging operation is performed using a compiled native numerical function:
cumulative_average(…)
The function processes the full probe matrix and returns:
T_avg(t)
for each probe over time.
The purpose is to demonstrate:
Native numerical acceleration
Python/native interoperability
Stable API exposure
Deterministic integration into Python workflows
Interactive Visualization#
The dashboard combines:
- LEFT PANEL
Temporal probe evolution
- RIGHT PANEL
Spatial 3D probe geometry
Keyboard Controls#
- RIGHT ARROW
Advance frames
- LEFT ARROW
Go backward
- HOME
Jump to first frame
- END
Jump to last frame
- Q / ESC
Exit dashboard
FalconSmith Concepts Demonstrated#
This demo intentionally exercises several FalconSmith subsystems:
- Environment
Controlled Python/runtime/toolchain execution
- Native Integration
C++ and Rust interoperability through stable Python APIs
- Exposure System
Deterministic native exposure trees
- Namespace Generation
Stable Python import structures
- Documentation Integration
Native docstrings integrated into Python documentation
- Operational Tooling
forge smithery forge tree forge docs forge doctor
- Verification
Deterministic execution validated through testing workflows
Purpose of the Demonstration#
The primary goal is to demonstrate that:
Multi-language scientific systems can behave deterministically
Native and Python layers can remain structurally synchronized
Engineering workflows can remain reproducible
Complex infrastructure can still feel operationally simple
The emphasis is therefore on:
consistency reproducibility interoperability operational stability
rather than on the complexity of the numerical algorithm itself.
Notes#
This script is intentionally designed for live demonstration and presentation purposes.
The workflow prioritizes:
readability
structural clarity
cross-language visibility
deterministic operational behavior
over maximum numerical sophistication.
Functions#
fs_dev.demo.python_demo_script_cum_avg.run_demo()
Function Reference#
run_demo#
- run_demo()#
Execute the FalconSmith demonstration workflow.
The demo combines:
native data readers
NumPy orchestration
native numerical processing
interactive visualization
to demonstrate deterministic multi-language scientific workflows using FalconSmith.