How an LTspice / ngspice `.raw` file maps onto this model. This is the check that §5's axis generalisation and §6.5's runs actually earn their keep.
| SPICE raw | Logb | |||||
|---|---|---|---|---|---|---|
| `Title:`, `Date:`, `Command:` | file META keys | |||||
| `Plotname: Transient Analysis` | stream META `sim.analysis` = `transient` \ | `ac` \ | `dc` \ | `noise` \ | `op` \ | `tf` |
| `Flags: real` | `float` fields | |||||
| `Flags: complex` | `complex` fields (§6.3) | |||||
| `Flags: double` | field `bit_width` 64 vs 32 — per field, so the mixed case is free | |||||
| `Flags: fastaccess` | `filter=transpose` on the DATA frame (§8) | |||||
| `Flags: log` | `axis_mode=2`, implicit log (§5.3) — `ratio = 10^(1/points_per_decade)`, zero bytes per record. An importer may also write the axis explicitly, which is what LTspice hands it | |||||
| `Flags: stepped` | one RUN frame per step (§6.5) | |||||
| `No. Variables:` | `field_count` | |||||
| `No. Points:` | not needed — frames are self-delimiting | |||||
| `Offset:` | folded into `axis_base` | |||||
| simulator timestep resolution | `axis_exp` — ngspice's internal time is `double` seconds; an importer picks the exponent that holds the run exactly (§5.1) | |||||
| `Variables:` block, first variable | the axis: `time`→`axis_kind=time`, `frequency`→`axis_kind=frequency`, a swept source→`axis_kind=other` with `axis_unit` | |||||
| `Variables:` block, rest | fields; the type column (`voltage`, `device_current`) → `unit` plus field META | |||||
| the netlist | ATTACH frame | |||||
| the run boundaries | explicit (§6.5), not inferred |
Notes on the quirks, which are the importer's problem and not the format's:
other variable is `f32`. Per-field `bit_width` expresses this directly, so it stops being a special case.
read. An importer normalises this away; nothing about it survives into Logb.
outright. It maps to `codec=zstd` on write and is a decode problem on import.
Streaming is the bonus. ngspice currently writes the raw file at the end of a run, because the header states `No. Points:` up front and so cannot be written until the count is known. Under Logb a simulator emits DATA frames as it solves, and a long transient analysis becomes watchable while it runs. That falls out of rule 1 without being designed for.