# `spiral-input` — PHercParis4

Annotations of the spiral (winding) structure of scroll **PHercParis4**
(Scroll 1), together with machine-derived guidance (surface tracks and volume
predictions), used as inputs for fitting a global winding solution.

In cross-section, a scroll is a single papyrus sheet wound into a spiral around
a central axis (the *umbilicus*). The annotations here record which parts of
the surface belong to the same wrap (*winding*) of the sheet, and how windings
relate to one another, so that a global solution for the sheet's path through
the volume can be fit and evaluated.

## Contents

| Path | Description |
| --- | --- |
| `verified_patches/` | Manually verified surface patches. Each patch is a grid-topology quad mesh sampled on the papyrus surface (~27,399 items). |
| `unverified_patches/` | Candidate surface patches not yet manually verified (~203,900 items). |
| `tracks/` | Surface tracks: machine-extracted skeleton curves through a binarized surface prediction, cut on regularly spaced horizontal and vertical slabs (created with `extract_surface_tracks.py`). Stored as a Python `dbm` database of `(z, y, x)` point sequences, plus a packed `.vctracks/` store. |
| `fibers/` | Fiber annotations. |
| `outer_shell/` | Geometry of the scroll's outer shell. |
| `lasagna_inputs/` | Volume data consumed by the fitting pipeline. |
| `umbilicus.json` | The scroll's central axis: points defining the spiral center as a function of `z` (depth). |
| `same_windings.json` | Same-winding annotations — which annotations lie on the same wrap of the sheet. |
| `relative_windings.json` | Relative winding relationships (how many wraps apart two annotations are). |
| `abs_winding.json` | Absolute winding-number annotations. |

**Total:** ~49.6 GB across ~905,000 files.

## Conventions

- Coordinates are in **9.6 µm voxels**, level 2 of the 2.4 µm volume `20260411134726-2.400um-0.2m-78keV-masked.zarr`
  (multiply by 4 for that volume's level-0 voxels), matching `"voxel_size_um": 9.6` in a fit's input manifest.
  Checked for `verified_patches/`, `outer_shell/`, `umbilicus.json`, `same_windings.json`, `relative_windings.json`
  and `abs_winding.json`.
- Exception: `eval_fibers/` are in level-0 (2.4 µm) voxels, as their `vc_open_data_*` fields state.
- Axis order: `umbilicus.json` uses `x`/`y`/`z` keys; points in the winding files are `[x, y, z]`; patches are
  tifxyz meshes with separate `x`, `y`, `z` images.

## Fitting with this dataset

`fit_spiral.py` does not scan this directory. Ingest the geometry (patches, winding
JSONs, fibers, tracks, outer shell) into an object store once with `vc_object_ingest`
(see the spiral-fitting README, "One-time dataset ingest"), then write an input manifest
beside the files, e.g. `spiral-inputs.json`:

```json
{
  "schema_version": 1,
  "volume_uuid": "<the --volume-uuid used for the ingest>",
  "scroll": {"name": "PHercParis4", "voxel_size_um": 9.6, "spiral_outward_sense": "CW"},
  "umbilicus": {"path": "umbilicus.json"},
  "lasagna": {"manifest": "lasagna_inputs/<name>.lasagna.json"}
}
```

and run `python fit_spiral.py --inputs spiral-inputs.json --object-store <store>.vcobj`.
Relative paths resolve against the manifest's directory. A `spiral-scroll.json`, if
present, is no longer read; its facts belong in the manifest's `scroll` block.

## License

See <https://dl.ash2txt.org/LICENSE.txt>.
