Time Base

Shipping
time_base

Time-ramp source: value at each sample equals its timestamp

Signature

Outputs

  • timeSignal

Parameters

KeyTypeDefaultNotes
start_timefloat0.0s
durationfloat1.0s
sample_ratefloat1000.0Hz

Description

Time Base is a pure source node that emits a time-ramp signal: the value of each sample is equal to its own timestamp. It produces a uniformly sampled Signal on the time output whose values run from start_time to start_time + duration, and whose sample spacing is . It has no inputs.

The three parameters fully determine the output. sample_rate (in Hz) sets the number of samples per second, duration (in s) sets the total span, and start_time (in s) offsets the origin. The signal length is , and sample has value and timestamp .

Unit-wise the output carries the physical unit seconds on both its values and its timestamp axis; downstream nodes that multiply or divide against it therefore compose units correctly (e.g. a slope in V/s times time yields V). The ramp is exact and noiseless, so its uncertainty (sigma) is zero — it introduces no measurement error into a pipeline.

Time Base is stateless: every evaluation regenerates the full ramp deterministically from its parameters, with no dependence on prior graph ticks.

Mathematics

Examples

A one-second ramp at 1 kHz

With start_time = 0, duration = 1.0, sample_rate = 1000, the node emits samples with values s. Feeding this into a trigonometry or signal_generator stage lets you synthesize any explicit function of time.

time_base(start=0, dur=1, fs=1000) -> [0.000, 0.001, ..., 0.999] s

Driving an analytic waveform via formula

Wire time into a formula node evaluating sin(2*pi*50*t) to build a 50 Hz sine from first principles, guaranteeing the phase reference matches the exact sample timestamps rather than an implicit index. The unit of t being s makes dimensionless as required.

Applications

  • Providing an explicit independent variable $t$ for symbolic/analytic signal synthesis in **formula** and **trigonometry** pipelines.
  • Generating a controlled time axis for parametric sweeps, chirps, and envelope schedules where the ramp is scaled or offset before use.
  • Building test and reference signals with an exact, unit-tagged time base for verifying filter, resampling, or integration nodes.
  • Serving as the horizontal axis reference when plotting or exporting synthesized data at a known, reproducible sample rate.

Neat

The output is the rare signal where values and timestamps are identical, so passing it through **derivative** yields a constant $1$ (dimensionless s/s) and through **integral** yields $t^2/2$ — a built-in check of those operators.

Because the ramp is analytically exact, it carries zero sigma: it is a noiseless reference against which uncertainty-propagating nodes downstream can be isolated and audited.

Known issues

Sample count uses a floor of $\text{duration} \cdot \text{sample\_rate}$; non-integer products (e.g. duration 0.15 s at 1000 Hz) drop the fractional sample, so the emitted signal may end just short of `start_time + duration`.

`duration` is clamped at a minimum of 0.001 s and `sample_rate` at 1.0 Hz; requesting smaller values is coerced to these bounds rather than producing an empty or sub-sample signal.

See also

sourcetimeramptimebasesamplingstateless