diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 0000000..81ced30 --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,52 @@ +# API reference: one DocC archive per module (the .docc catalogs under Sources/), merged into one static site and +# published to GitHub Pages at https://mac4dstem.github.io/SpectroKit/documentation/ on every tag. +# On a pull request the site is built and uploaded as an artifact only, so a broken catalog fails before the tag. +# +# No swift-docc-plugin: the kit takes no package dependencies (CLAUDE.md). `xcodebuild docbuild` builds the archives +# from the package's own schemes; `docc merge` (Xcode 16+) joins them. Needs Pages enabled with source "GitHub Actions" +# (repository Settings > Pages). Copied from CuboKit's pattern; the module list is read from the .docc catalogs. +name: Docs + +on: + push: + tags: ['*'] + pull_request: + paths: ['Sources/**/*.docc/**', '.github/workflows/docs.yml', 'tools/build-docs.sh'] + workflow_dispatch: + +permissions: + contents: read + pages: write + id-token: write + +concurrency: + group: docs-${{ github.ref }} + cancel-in-progress: true + +jobs: + build: + runs-on: macos-latest + timeout-minutes: 60 + steps: + - uses: actions/checkout@v4 + - name: Select the newest Xcode + run: | + xcode=$(ls -d /Applications/Xcode*.app | sort -V | tail -1) + sudo xcode-select -s "$xcode" + xcodebuild -version + - name: Build the site + run: tools/build-docs.sh .docs-site /SpectroKit + - uses: actions/upload-pages-artifact@v3 + with: + path: .docs-site + + deploy: + needs: build + if: startsWith(github.ref, 'refs/tags/') + runs-on: ubuntu-latest + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + steps: + - id: deployment + uses: actions/deploy-pages@v4 diff --git a/.gitignore b/.gitignore index 12906ae..0dceb23 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ .DS_Store .build/ .swiftpm/ +.docs-site/ diff --git a/Tests/Fixtures/README.md b/Tests/Fixtures/README.md new file mode 100644 index 0000000..703cc0c --- /dev/null +++ b/Tests/Fixtures/README.md @@ -0,0 +1,265 @@ +# Test fixtures + +One row per committed fixture file under `Tests/*/Fixtures/`: size, the script under `tools/` that names it (the generator or its +pin script; a few scripts write a whole directory; a script found only by file-name prefix, tool-folder name or test module is marked so), and a note where the origin is not the kit's own pinned reference. 186 files. + +Licence: every fixture is generated from this kit's own code and the pinned Python reference (see `CLAUDE.md`, Reference) and ships under the kit's GPL-3.0-or-later licence, except the rows marked *third party*. Nothing here is the owner's data: the committed text fixtures carry no owner path or name (checked by search), and real datasets are read from `$MACEM_DATA` and never copied into the repo. + +## Third party + +3 files, listed in the table below with the note *third party*. Keep their licence line when the files move. + +## Needs an origin line + +59 fixtures that no script under `tools/` names. They may be written by a directory-level script, by hand, or copied from an earlier kit; a Mac session with the pin scripts fills in the origin and removes the file from this list. + +- `SpectroEELSTests/Fixtures/eels16-fl-add-zlp-crop.f64` +- `SpectroEELSTests/Fixtures/eels16-fl-add-zlp.f64` +- `SpectroEELSTests/Fixtures/eels16-fl-crop.f64` +- `SpectroEELSTests/Fixtures/eels16-fl-default.f64` +- `SpectroEELSTests/Fixtures/eels16-fr-default.f64` +- `SpectroEELSTests/Fixtures/eels16-fr-fixed-threshold-6.f64` +- `SpectroEELSTests/Fixtures/eels16-fr-fwhm-1.5.f64` +- `SpectroEELSTests/Fixtures/eels16-fr-no-extrap-cl.f64` +- `SpectroEELSTests/Fixtures/eels16-fr-no-extrap-ll.f64` +- `SpectroEELSTests/Fixtures/eels16-fr-no-extrap.f64` +- `SpectroEELSTests/Fixtures/eels16-pl-binned-w20-e100-fixneg.f64` +- `SpectroEELSTests/Fixtures/eels16-pl-binned-w20-e100.f64` +- `SpectroEELSTests/Fixtures/eels16-pl-binned-w20-e1024.f64` +- `SpectroEELSTests/Fixtures/eels16-pl-binned-w50-e100.f64` +- `SpectroEELSTests/Fixtures/eels16-pl-exact-binned-w20-e100-fixneg.f64` +- `SpectroEELSTests/Fixtures/eels16-pl-exact-binned-w20-e100.f64` +- `SpectroEELSTests/Fixtures/eels16-pl-exact-binned-w20-e1024.f64` +- `SpectroEELSTests/Fixtures/eels16-pl-exact-binned-w50-e100.f64` +- `SpectroEELSTests/Fixtures/eels16-pl-exact-unbinned-w20-e100-fixneg.f64` +- `SpectroEELSTests/Fixtures/eels16-pl-exact-unbinned-w20-e100.f64` +- `SpectroEELSTests/Fixtures/eels16-pl-exact-unbinned-w20-e1024.f64` +- `SpectroEELSTests/Fixtures/eels16-pl-exact-unbinned-w50-e100.f64` +- `SpectroEELSTests/Fixtures/eels16-pl-input-binned.f64` +- `SpectroEELSTests/Fixtures/eels16-pl-input-unbinned.f64` +- `SpectroEELSTests/Fixtures/eels16-pl-unbinned-w20-e100-fixneg.f64` +- `SpectroEELSTests/Fixtures/eels16-pl-unbinned-w20-e100.f64` +- `SpectroEELSTests/Fixtures/eels16-pl-unbinned-w20-e1024.f64` +- `SpectroEELSTests/Fixtures/eels16-pl-unbinned-w50-e100.f64` +- `SpectroEELSTests/Fixtures/eels16-plural-core.f64` +- `SpectroEELSTests/Fixtures/eels16-plural-edge.f64` +- `SpectroEELSTests/Fixtures/eels16-plural-ll.f64` +- `SpectroEELSTests/Fixtures/eels16-plural-single-broadened.f64` +- `SpectroEELSTests/Fixtures/eels16-plural-single.f64` +- `SpectroEELSTests/Fixtures/eels16-plural-zlp.f64` +- `SpectroEELSTests/Fixtures/eels16-taper-both.f64` +- `SpectroEELSTests/Fixtures/eels16-taper-channels25.f64` +- `SpectroEELSTests/Fixtures/eels16-taper-input.f64` +- `SpectroEELSTests/Fixtures/eels16-taper-left-ch40-off5.f64` +- `SpectroEELSTests/Fixtures/eels16-taper-left.f64` +- `SpectroEELSTests/Fixtures/eels16-taper-offset10.f64` +- `SpectroEELSTests/Fixtures/eels16-taper-right.f64` +- `SpectroEELSTests/Fixtures/eels16-zlp-align-also-align-core.f64` +- `SpectroEELSTests/Fixtures/eels16-zlp-align-also-align.f64` +- `SpectroEELSTests/Fixtures/eels16-zlp-align-default.f64` +- `SpectroEELSTests/Fixtures/eels16-zlp-align-interp-ip3.f64` +- `SpectroEELSTests/Fixtures/eels16-zlp-align-mask.f64` +- `SpectroEELSTests/Fixtures/eels16-zlp-align-no-calibrate.f64` +- `SpectroEELSTests/Fixtures/eels16-zlp-align-no-crop-no-calibrate.f64` +- `SpectroEELSTests/Fixtures/eels16-zlp-align-no-crop.f64` +- `SpectroEELSTests/Fixtures/eels16-zlp-align-no-subpixel.f64` +- `SpectroEELSTests/Fixtures/eels16-zlp-align-signal-range.f64` +- `SpectroEELSTests/Fixtures/eels16-zlp-align-spike-no-range.f64` +- `SpectroEELSTests/Fixtures/eels16-zlp-align-spike-range.f64` +- `SpectroEELSTests/Fixtures/eels16-zlp-core.f64` +- `SpectroEELSTests/Fixtures/eels16-zlp-ll-spike.f64` +- `SpectroEELSTests/Fixtures/eels16-zlp-ll.f64` +- `SpectroEELSTests/Fixtures/eels16-zlp-shift1d-crop.f64` +- `SpectroEELSTests/Fixtures/eels16-zlp-shift1d-input.f64` +- `SpectroEELSTests/Fixtures/eels16-zlp-shift1d-nocrop.f64` + +## All fixtures + +| File | Size | Generated by | Note | +|---|---|---|---| +| `SpectroCoreTests/Fixtures/demo-edx-tiny.dm4` | 119.9 KB | `tools/ci-parity/expand-golden.sh`, `tools/edx-stages/make_velox_streams.py` (module only) | | +| `SpectroCoreTests/Fixtures/demo-edx-tiny.truth.json` | 362.3 KB | `tools/ci-parity/expand-golden.sh`, `tools/edx-stages/make_velox_streams.py` (module only) | | +| `SpectroCoreTests/Fixtures/eds-absorption-truth.json` | 75.0 KB | `tools/ci-parity/expand-golden.sh`, `tools/edx-stages/make_velox_streams.py` (module only) | | +| `SpectroCoreTests/Fixtures/eds-fit-exspy-7185a4d1.json` | 151.9 KB | `tools/ci-parity/expand-golden.sh`, `tools/edx-stages/make_velox_streams.py` (module only) | | +| `SpectroCoreTests/Fixtures/eds-pins-exspy-7185a4d1.json` | 69.0 KB | `tools/ci-parity/expand-golden.sh`, `tools/edx-stages/make_velox_streams.py` (module only) | | +| `SpectroCoreTests/Fixtures/eds-proposer-sim.json` | 97.9 KB | `tools/ci-parity/expand-golden.sh`, `tools/edx-stages/make_velox_streams.py` (module only) | | +| `SpectroCoreTests/Fixtures/eds-quant-pins-exspy-7185a4d1.json` | 29.8 KB | `tools/ci-parity/expand-golden.sh`, `tools/edx-stages/make_velox_streams.py` (module only) | | +| `SpectroCoreTests/Fixtures/eds-realistic-l-sim.json` | 38.1 KB | `tools/ci-parity/expand-golden.sh`, `tools/edx-stages/make_velox_streams.py` (module only) | | +| `SpectroCoreTests/Fixtures/eds-unlisted-sim.json` | 30.3 KB | `tools/ci-parity/expand-golden.sh`, `tools/edx-stages/make_velox_streams.py` (module only) | | +| `SpectroCoreTests/Fixtures/eds-weakline-sim.json` | 369.4 KB | `tools/ci-parity/expand-golden.sh`, `tools/edx-stages/make_velox_streams.py` (module only) | | +| `SpectroCoreTests/Fixtures/qshape3.mac4dstem.h5` | 10.5 KB | `tools/ci-parity/expand-golden.sh`, `tools/edx-stages/make_velox_streams.py` (module only) | | +| `SpectroCoreTests/Fixtures/registration-pins.json` | 38.2 KB | `tools/ci-parity/expand-golden.sh`, `tools/edx-stages/make_velox_streams.py` (module only) | | +| `SpectroCoreTests/Fixtures/spectro-golden/demo-edx-tiny-dm4.arrays.f64` | 41.9 KB | `tools/ci-parity/expand-golden.sh` | | +| `SpectroCoreTests/Fixtures/spectro-golden/demo-edx-tiny-dm4.arrays.json` | 9.0 KB | `tools/ci-parity/expand-golden.sh` | | +| `SpectroCoreTests/Fixtures/spectro-golden/demo-edx-tiny-dm4.txt` | 135.7 KB | `tools/ci-parity/expand-golden.sh` | | +| `SpectroCoreTests/Fixtures/spectro-golden/demo-spectrum-fixture.txt` | 93.0 KB | `tools/ci-parity/expand-golden.sh` | | +| `SpectroCoreTests/Fixtures/spectro-golden/eds-proposer-sim.arrays.f64` | 93.4 KB | `tools/ci-parity/expand-golden.sh` | | +| `SpectroCoreTests/Fixtures/spectro-golden/eds-proposer-sim.arrays.json` | 7.9 KB | `tools/ci-parity/expand-golden.sh` | | +| `SpectroCoreTests/Fixtures/spectro-golden/eds-proposer-sim.txt` | 111.0 KB | `tools/ci-parity/expand-golden.sh` | | +| `SpectroCoreTests/Fixtures/spectro-golden/eds-realistic-l-sim.arrays.f64` | 312.0 KB | `tools/ci-parity/expand-golden.sh` | | +| `SpectroCoreTests/Fixtures/spectro-golden/eds-realistic-l-sim.arrays.json` | 10.2 KB | `tools/ci-parity/expand-golden.sh` | | +| `SpectroCoreTests/Fixtures/spectro-golden/eds-realistic-l-sim.txt` | 163.6 KB | `tools/ci-parity/expand-golden.sh` | | +| `SpectroCoreTests/Fixtures/spectro-golden/eds-unlisted-sim.arrays.f64` | 176.9 KB | `tools/ci-parity/expand-golden.sh` | | +| `SpectroCoreTests/Fixtures/spectro-golden/eds-unlisted-sim.arrays.json` | 15.5 KB | `tools/ci-parity/expand-golden.sh` | | +| `SpectroCoreTests/Fixtures/spectro-golden/eds-unlisted-sim.txt` | 246.7 KB | `tools/ci-parity/expand-golden.sh` | | +| `SpectroCoreTests/Fixtures/spectro-golden/eds-weakline-sim.arrays.f64` | 314.2 KB | `tools/ci-parity/expand-golden.sh` | | +| `SpectroCoreTests/Fixtures/spectro-golden/eds-weakline-sim.arrays.json` | 2.0 KB | `tools/ci-parity/expand-golden.sh` | | +| `SpectroCoreTests/Fixtures/spectro-golden/eds-weakline-sim.txt` | 29.8 KB | `tools/ci-parity/expand-golden.sh` | | +| `SpectroCoreTests/Fixtures/spectro-golden/velox-tiny.arrays.f64` | 0 B | `tools/ci-parity/expand-golden.sh` | | +| `SpectroCoreTests/Fixtures/spectro-golden/velox-tiny.arrays.json` | 127 B | `tools/ci-parity/expand-golden.sh` | | +| `SpectroCoreTests/Fixtures/spectro-golden/velox-tiny.txt` | 15.5 KB | `tools/edx-stages/make_velox_streams.py` | | +| `SpectroCoreTests/Fixtures/velox-tiny.emd` | 42.6 KB | `tools/edx-stages/make_velox_streams.py` | | +| `SpectroEDXTests/Fixtures/edx-axis-e2.f64` | 98.2 KB | `tools/edx-stages/pins.py` | | +| `SpectroEDXTests/Fixtures/edx-calibration-counts.u32` | 288.0 KB | `tools/edx-stages/make_planted.py`, `tools/edx-stages/pins.py` | | +| `SpectroEDXTests/Fixtures/edx-calibration.json` | 93.0 KB | `tools/edx-stages/make_planted.py`, `tools/edx-stages/pins.py` | | +| `SpectroEDXTests/Fixtures/edx-pins-intensity.f64` | 205.3 KB | `tools/edx-stages/pins.py` | | +| `SpectroEDXTests/Fixtures/edx-planted-means.f64` | 3.5 MB | `tools/edx-stages/make_planted.py`, `tools/edx-stages/pins.py` | | +| `SpectroEDXTests/Fixtures/edx-planted-resid.i16` | 8.0 MB | `tools/edx-stages/make_planted.py`, `tools/edx-stages/pins.py` | | +| `SpectroEDXTests/Fixtures/edx-planted-truth.json` | 145.9 KB | `tools/edx-stages/make_planted.py` | | +| `SpectroEDXTests/Fixtures/edx-planted.json` | 212.6 KB | `tools/edx-stages/make_planted.py`, `tools/edx-stages/pins.py` | | +| `SpectroEDXTests/Fixtures/edx-quant-maps-exspy.json` | 70.7 KB | `tools/edx-quant-maps/pins.py` | | +| `SpectroEDXTests/Fixtures/pins.json` | 1.9 MB | `tools/edx-stages/pins.py`, `tools/eels-edge/pins.py`, `tools/eels-task16/pins.py` +2 | | +| `SpectroEDXTests/Fixtures/public/SI_empty selection.emd` | 1.9 MB | none found | third party: RosettaSciIO public test data (GPL-3.0-or-later), copied unchanged | +| `SpectroEDXTests/Fixtures/public/Test SI 16x16 215 kx.emd` | 1.9 MB | none found | third party: RosettaSciIO public test data (GPL-3.0-or-later), copied unchanged | +| `SpectroEDXTests/Fixtures/public/fei_emd_si.emd` | 932.9 KB | none found | third party: RosettaSciIO public test data (GPL-3.0-or-later), copied unchanged | +| `SpectroEDXTests/Fixtures/velox-stream-1stream-1frame.emd` | 48.4 KB | `tools/edx-stages/make_velox_streams.py`, `tools/edx-stages/pins.py` (name prefix) | | +| `SpectroEDXTests/Fixtures/velox-stream-1stream-3frames.emd` | 201.8 KB | `tools/edx-stages/make_velox_streams.py`, `tools/edx-stages/pins.py` (name prefix) | | +| `SpectroEDXTests/Fixtures/velox-stream-4streams-2frames.emd` | 103.1 KB | `tools/edx-stages/make_velox_streams.py`, `tools/edx-stages/pins.py` (name prefix) | | +| `SpectroEDXTests/Fixtures/velox-stream-axis-decoy.emd` | 48.4 KB | `tools/edx-stages/make_velox_streams.py`, `tools/edx-stages/pins.py` (name prefix) | | +| `SpectroEDXTests/Fixtures/velox-stream-axis-order.emd` | 48.4 KB | `tools/edx-stages/make_velox_streams.py`, `tools/edx-stages/pins.py` (name prefix) | | +| `SpectroEDXTests/Fixtures/velox-stream-unterminated.emd` | 48.4 KB | `tools/edx-stages/make_velox_streams.py`, `tools/edx-stages/pins.py` (name prefix) | | +| `SpectroEDXTests/Fixtures/velox-streams-truth.json` | 78.7 KB | `tools/edx-stages/make_velox_streams.py`, `tools/edx-stages/pins.py` | | +| `SpectroEDXTests/Fixtures/xray-lines-exspy-7185a4d1.json` | 37.0 KB | `tools/edx-lines/pins.py` | | +| `SpectroEELSTests/Fixtures/edge-core-R-ps03-noiseless.f64` | 234.4 KB | `tools/eels-edge/extract_gos.py`, `tools/eels-edge/make_planted.py`, `tools/eels-edge/pins.py` (tool folder name) | | +| `SpectroEELSTests/Fixtures/edge-core-R-ps03-noisy.f64` | 234.4 KB | `tools/eels-edge/extract_gos.py`, `tools/eels-edge/make_planted.py`, `tools/eels-edge/pins.py` (tool folder name) | | +| `SpectroEELSTests/Fixtures/edge-core-R-ps07-noiseless.f64` | 234.4 KB | `tools/eels-edge/extract_gos.py`, `tools/eels-edge/make_planted.py`, `tools/eels-edge/pins.py` (tool folder name) | | +| `SpectroEELSTests/Fixtures/edge-core-R-ps07-noisy.f64` | 234.4 KB | `tools/eels-edge/extract_gos.py`, `tools/eels-edge/make_planted.py`, `tools/eels-edge/pins.py` (tool folder name) | | +| `SpectroEELSTests/Fixtures/edge-core-R-ps13-noiseless.f64` | 234.4 KB | `tools/eels-edge/extract_gos.py`, `tools/eels-edge/make_planted.py`, `tools/eels-edge/pins.py` (tool folder name) | | +| `SpectroEELSTests/Fixtures/edge-core-R-ps13-noisy.f64` | 234.4 KB | `tools/eels-edge/extract_gos.py`, `tools/eels-edge/make_planted.py`, `tools/eels-edge/pins.py` (tool folder name) | | +| `SpectroEELSTests/Fixtures/edge-core-R-ss-noiseless.f64` | 234.4 KB | `tools/eels-edge/extract_gos.py`, `tools/eels-edge/make_planted.py`, `tools/eels-edge/pins.py` (tool folder name) | | +| `SpectroEELSTests/Fixtures/edge-core-R-ss-noisy.f64` | 234.4 KB | `tools/eels-edge/extract_gos.py`, `tools/eels-edge/make_planted.py`, `tools/eels-edge/pins.py` (tool folder name) | | +| `SpectroEELSTests/Fixtures/edge-core-ps03-noiseless.f64` | 234.4 KB | `tools/eels-edge/extract_gos.py`, `tools/eels-edge/make_planted.py`, `tools/eels-edge/pins.py` (tool folder name) | | +| `SpectroEELSTests/Fixtures/edge-core-ps03-noisy.f64` | 234.4 KB | `tools/eels-edge/extract_gos.py`, `tools/eels-edge/make_planted.py`, `tools/eels-edge/pins.py` (tool folder name) | | +| `SpectroEELSTests/Fixtures/edge-core-ps07-noiseless.f64` | 234.4 KB | `tools/eels-edge/extract_gos.py`, `tools/eels-edge/make_planted.py`, `tools/eels-edge/pins.py` (tool folder name) | | +| `SpectroEELSTests/Fixtures/edge-core-ps07-noisy.f64` | 234.4 KB | `tools/eels-edge/extract_gos.py`, `tools/eels-edge/make_planted.py`, `tools/eels-edge/pins.py` (tool folder name) | | +| `SpectroEELSTests/Fixtures/edge-core-ps13-noiseless.f64` | 234.4 KB | `tools/eels-edge/extract_gos.py`, `tools/eels-edge/make_planted.py`, `tools/eels-edge/pins.py` (tool folder name) | | +| `SpectroEELSTests/Fixtures/edge-core-ps13-noisy.f64` | 234.4 KB | `tools/eels-edge/extract_gos.py`, `tools/eels-edge/make_planted.py`, `tools/eels-edge/pins.py` (tool folder name) | | +| `SpectroEELSTests/Fixtures/edge-core-ss-noiseless.f64` | 234.4 KB | `tools/eels-edge/extract_gos.py`, `tools/eels-edge/make_planted.py`, `tools/eels-edge/pins.py` (tool folder name) | | +| `SpectroEELSTests/Fixtures/edge-core-ss-noisy.f64` | 234.4 KB | `tools/eels-edge/extract_gos.py`, `tools/eels-edge/make_planted.py`, `tools/eels-edge/pins.py` (tool folder name) | | +| `SpectroEELSTests/Fixtures/edge-low-R-ps03-noiseless.f64` | 398.4 KB | `tools/eels-edge/extract_gos.py`, `tools/eels-edge/make_planted.py`, `tools/eels-edge/pins.py` (tool folder name) | | +| `SpectroEELSTests/Fixtures/edge-low-R-ps03-noisy.f64` | 398.4 KB | `tools/eels-edge/extract_gos.py`, `tools/eels-edge/make_planted.py`, `tools/eels-edge/pins.py` (tool folder name) | | +| `SpectroEELSTests/Fixtures/edge-low-R-ps07-noiseless.f64` | 398.4 KB | `tools/eels-edge/extract_gos.py`, `tools/eels-edge/make_planted.py`, `tools/eels-edge/pins.py` (tool folder name) | | +| `SpectroEELSTests/Fixtures/edge-low-R-ps07-noisy.f64` | 398.4 KB | `tools/eels-edge/extract_gos.py`, `tools/eels-edge/make_planted.py`, `tools/eels-edge/pins.py` (tool folder name) | | +| `SpectroEELSTests/Fixtures/edge-low-R-ps13-noiseless.f64` | 398.4 KB | `tools/eels-edge/extract_gos.py`, `tools/eels-edge/make_planted.py`, `tools/eels-edge/pins.py` (tool folder name) | | +| `SpectroEELSTests/Fixtures/edge-low-R-ps13-noisy.f64` | 398.4 KB | `tools/eels-edge/extract_gos.py`, `tools/eels-edge/make_planted.py`, `tools/eels-edge/pins.py` (tool folder name) | | +| `SpectroEELSTests/Fixtures/edge-low-R-ss-noiseless.f64` | 398.4 KB | `tools/eels-edge/extract_gos.py`, `tools/eels-edge/make_planted.py`, `tools/eels-edge/pins.py` (tool folder name) | | +| `SpectroEELSTests/Fixtures/edge-low-R-ss-noisy.f64` | 398.4 KB | `tools/eels-edge/extract_gos.py`, `tools/eels-edge/make_planted.py`, `tools/eels-edge/pins.py` (tool folder name) | | +| `SpectroEELSTests/Fixtures/edge-low-ps03-noiseless.f64` | 398.4 KB | `tools/eels-edge/extract_gos.py`, `tools/eels-edge/make_planted.py`, `tools/eels-edge/pins.py` (tool folder name) | | +| `SpectroEELSTests/Fixtures/edge-low-ps03-noisy.f64` | 398.4 KB | `tools/eels-edge/extract_gos.py`, `tools/eels-edge/make_planted.py`, `tools/eels-edge/pins.py` (tool folder name) | | +| `SpectroEELSTests/Fixtures/edge-low-ps07-noiseless.f64` | 398.4 KB | `tools/eels-edge/extract_gos.py`, `tools/eels-edge/make_planted.py`, `tools/eels-edge/pins.py` (tool folder name) | | +| `SpectroEELSTests/Fixtures/edge-low-ps07-noisy.f64` | 398.4 KB | `tools/eels-edge/extract_gos.py`, `tools/eels-edge/make_planted.py`, `tools/eels-edge/pins.py` (tool folder name) | | +| `SpectroEELSTests/Fixtures/edge-low-ps13-noiseless.f64` | 398.4 KB | `tools/eels-edge/extract_gos.py`, `tools/eels-edge/make_planted.py`, `tools/eels-edge/pins.py` (tool folder name) | | +| `SpectroEELSTests/Fixtures/edge-low-ps13-noisy.f64` | 398.4 KB | `tools/eels-edge/extract_gos.py`, `tools/eels-edge/make_planted.py`, `tools/eels-edge/pins.py` (tool folder name) | | +| `SpectroEELSTests/Fixtures/edge-low-ss-noiseless.f64` | 398.4 KB | `tools/eels-edge/extract_gos.py`, `tools/eels-edge/make_planted.py`, `tools/eels-edge/pins.py` (tool folder name) | | +| `SpectroEELSTests/Fixtures/edge-low-ss-noisy.f64` | 398.4 KB | `tools/eels-edge/extract_gos.py`, `tools/eels-edge/make_planted.py`, `tools/eels-edge/pins.py` (tool folder name) | | +| `SpectroEELSTests/Fixtures/edge-pins.json` | 18.5 MB | `tools/eels-edge/pins.py` | | +| `SpectroEELSTests/Fixtures/edge-planted-R.json` | 4.9 KB | `tools/eels-edge/make_planted.py`, `tools/eels-edge/pins.py` | | +| `SpectroEELSTests/Fixtures/edge-planted-truth-R.json` | 308.9 KB | `tools/eels-edge/make_planted.py` | | +| `SpectroEELSTests/Fixtures/edge-planted-truth.json` | 308.8 KB | `tools/eels-edge/make_planted.py`, `tools/eels-edge/pins.py` | | +| `SpectroEELSTests/Fixtures/edge-planted.json` | 4.9 KB | `tools/eels-edge/make_planted.py`, `tools/eels-edge/pins.py` | | +| `SpectroEELSTests/Fixtures/edge-sigma-CK.f64` | 15.9 KB | `tools/eels-edge/make_planted.py`, `tools/eels-edge/pins.py` | | +| `SpectroEELSTests/Fixtures/edge-sigma-CK.json` | 1008 B | `tools/eels-edge/make_planted.py`, `tools/eels-edge/pins.py` | | +| `SpectroEELSTests/Fixtures/eels16-fl-add-zlp-crop.f64` | 147.0 KB | none found | | +| `SpectroEELSTests/Fixtures/eels16-fl-add-zlp.f64` | 150.0 KB | none found | | +| `SpectroEELSTests/Fixtures/eels16-fl-crop.f64` | 147.0 KB | none found | | +| `SpectroEELSTests/Fixtures/eels16-fl-default.f64` | 150.0 KB | none found | | +| `SpectroEELSTests/Fixtures/eels16-fr-default.f64` | 28.1 KB | none found | | +| `SpectroEELSTests/Fixtures/eels16-fr-fixed-threshold-6.f64` | 28.1 KB | none found | | +| `SpectroEELSTests/Fixtures/eels16-fr-fwhm-1.5.f64` | 28.1 KB | none found | | +| `SpectroEELSTests/Fixtures/eels16-fr-no-extrap-cl.f64` | 28.1 KB | none found | | +| `SpectroEELSTests/Fixtures/eels16-fr-no-extrap-ll.f64` | 28.1 KB | none found | | +| `SpectroEELSTests/Fixtures/eels16-fr-no-extrap.f64` | 28.1 KB | none found | | +| `SpectroEELSTests/Fixtures/eels16-pins.json` | 88.2 KB | `tools/eels-task16/pins.py` | | +| `SpectroEELSTests/Fixtures/eels16-pl-binned-w20-e100-fixneg.f64` | 14.1 KB | none found | | +| `SpectroEELSTests/Fixtures/eels16-pl-binned-w20-e100.f64` | 14.1 KB | none found | | +| `SpectroEELSTests/Fixtures/eels16-pl-binned-w20-e1024.f64` | 57.4 KB | none found | | +| `SpectroEELSTests/Fixtures/eels16-pl-binned-w50-e100.f64` | 14.1 KB | none found | | +| `SpectroEELSTests/Fixtures/eels16-pl-exact-binned-w20-e100-fixneg.f64` | 4.7 KB | none found | | +| `SpectroEELSTests/Fixtures/eels16-pl-exact-binned-w20-e100.f64` | 4.7 KB | none found | | +| `SpectroEELSTests/Fixtures/eels16-pl-exact-binned-w20-e1024.f64` | 48.0 KB | none found | | +| `SpectroEELSTests/Fixtures/eels16-pl-exact-binned-w50-e100.f64` | 4.7 KB | none found | | +| `SpectroEELSTests/Fixtures/eels16-pl-exact-unbinned-w20-e100-fixneg.f64` | 4.7 KB | none found | | +| `SpectroEELSTests/Fixtures/eels16-pl-exact-unbinned-w20-e100.f64` | 4.7 KB | none found | | +| `SpectroEELSTests/Fixtures/eels16-pl-exact-unbinned-w20-e1024.f64` | 48.0 KB | none found | | +| `SpectroEELSTests/Fixtures/eels16-pl-exact-unbinned-w50-e100.f64` | 4.7 KB | none found | | +| `SpectroEELSTests/Fixtures/eels16-pl-input-binned.f64` | 9.4 KB | none found | | +| `SpectroEELSTests/Fixtures/eels16-pl-input-unbinned.f64` | 9.4 KB | none found | | +| `SpectroEELSTests/Fixtures/eels16-pl-unbinned-w20-e100-fixneg.f64` | 14.1 KB | none found | | +| `SpectroEELSTests/Fixtures/eels16-pl-unbinned-w20-e100.f64` | 14.1 KB | none found | | +| `SpectroEELSTests/Fixtures/eels16-pl-unbinned-w20-e1024.f64` | 57.4 KB | none found | | +| `SpectroEELSTests/Fixtures/eels16-pl-unbinned-w50-e100.f64` | 14.1 KB | none found | | +| `SpectroEELSTests/Fixtures/eels16-plural-core.f64` | 28.1 KB | none found | | +| `SpectroEELSTests/Fixtures/eels16-plural-edge.f64` | 28.1 KB | none found | | +| `SpectroEELSTests/Fixtures/eels16-plural-ll.f64` | 150.0 KB | none found | | +| `SpectroEELSTests/Fixtures/eels16-plural-single-broadened.f64` | 150.0 KB | none found | | +| `SpectroEELSTests/Fixtures/eels16-plural-single.f64` | 150.0 KB | none found | | +| `SpectroEELSTests/Fixtures/eels16-plural-zlp.f64` | 150.0 KB | none found | | +| `SpectroEELSTests/Fixtures/eels16-taper-both.f64` | 4.7 KB | none found | | +| `SpectroEELSTests/Fixtures/eels16-taper-channels25.f64` | 4.7 KB | none found | | +| `SpectroEELSTests/Fixtures/eels16-taper-input.f64` | 4.7 KB | none found | | +| `SpectroEELSTests/Fixtures/eels16-taper-left-ch40-off5.f64` | 4.7 KB | none found | | +| `SpectroEELSTests/Fixtures/eels16-taper-left.f64` | 4.7 KB | none found | | +| `SpectroEELSTests/Fixtures/eels16-taper-offset10.f64` | 4.7 KB | none found | | +| `SpectroEELSTests/Fixtures/eels16-taper-right.f64` | 4.7 KB | none found | | +| `SpectroEELSTests/Fixtures/eels16-zlp-align-also-align-core.f64` | 27.4 KB | none found | | +| `SpectroEELSTests/Fixtures/eels16-zlp-align-also-align.f64` | 53.2 KB | none found | | +| `SpectroEELSTests/Fixtures/eels16-zlp-align-default.f64` | 53.2 KB | none found | | +| `SpectroEELSTests/Fixtures/eels16-zlp-align-interp-ip3.f64` | 53.2 KB | none found | | +| `SpectroEELSTests/Fixtures/eels16-zlp-align-mask.f64` | 53.2 KB | none found | | +| `SpectroEELSTests/Fixtures/eels16-zlp-align-no-calibrate.f64` | 53.2 KB | none found | | +| `SpectroEELSTests/Fixtures/eels16-zlp-align-no-crop-no-calibrate.f64` | 56.2 KB | none found | | +| `SpectroEELSTests/Fixtures/eels16-zlp-align-no-crop.f64` | 56.2 KB | none found | | +| `SpectroEELSTests/Fixtures/eels16-zlp-align-no-subpixel.f64` | 53.4 KB | none found | | +| `SpectroEELSTests/Fixtures/eels16-zlp-align-signal-range.f64` | 53.2 KB | none found | | +| `SpectroEELSTests/Fixtures/eels16-zlp-align-spike-no-range.f64` | 56.2 KB | none found | | +| `SpectroEELSTests/Fixtures/eels16-zlp-align-spike-range.f64` | 53.2 KB | none found | | +| `SpectroEELSTests/Fixtures/eels16-zlp-core.f64` | 28.1 KB | none found | | +| `SpectroEELSTests/Fixtures/eels16-zlp-ll-spike.f64` | 56.2 KB | none found | | +| `SpectroEELSTests/Fixtures/eels16-zlp-ll.f64` | 56.2 KB | none found | | +| `SpectroEELSTests/Fixtures/eels16-zlp-shift1d-crop.f64` | 1.1 KB | none found | | +| `SpectroEELSTests/Fixtures/eels16-zlp-shift1d-input.f64` | 1.2 KB | none found | | +| `SpectroEELSTests/Fixtures/eels16-zlp-shift1d-nocrop.f64` | 1.2 KB | none found | | +| `SpectroEELSTests/Fixtures/exspy-linescan-ll.f64` | 136.0 KB | `tools/eels-thickness/pins.py` | | +| `SpectroEELSTests/Fixtures/exspy-linescan-ll.json` | 1.8 KB | `tools/eels-thickness/pins.py` | | +| `SpectroEELSTests/Fixtures/exspy-linescan-zlp.f64` | 136.0 KB | `tools/eels-thickness/pins.py` | | +| `SpectroEELSTests/Fixtures/exspy-linescan-zlp.json` | 1.8 KB | `tools/eels-thickness/pins.py` | | +| `SpectroEELSTests/Fixtures/pins.json` | 93.0 KB | `tools/edx-stages/pins.py`, `tools/eels-edge/pins.py`, `tools/eels-task16/pins.py` +2 | | +| `SpectroEELSTests/Fixtures/planted-noiseless.f64` | 265.6 KB | `tools/eels-edge/make_planted.py`, `tools/eels-thickness/make_planted.py`, `tools/eels-thickness/pins.py` | | +| `SpectroEELSTests/Fixtures/planted-noiseless.json` | 1.2 KB | `tools/eels-thickness/make_planted.py` | | +| `SpectroEELSTests/Fixtures/planted-noisy.f64` | 265.6 KB | `tools/eels-thickness/make_planted.py`, `tools/eels-thickness/pins.py` | | +| `SpectroEELSTests/Fixtures/planted-noisy.json` | 1.5 KB | `tools/eels-thickness/make_planted.py` | | +| `SpectroEELSTests/Fixtures/planted-truth.json` | 70.6 KB | `tools/edx-stages/make_planted.py`, `tools/eels-edge/make_planted.py`, `tools/eels-edge/pins.py` +2 | | +| `SpectroEELSTests/Fixtures/portable-thresholds.json` | 41.3 KB | `tools/eels-thickness/make_portable_thresholds.py` | | +| `SpectroEELSTests/Fixtures/refuter/B1_negative_counts/data.f64` | 105.5 KB | `tools/eels-thickness/make_portable_thresholds.py`, `tools/eels-thickness/refuter_cases.py`, `tools/eels-thickness/refuter_cases_random.py` | | +| `SpectroEELSTests/Fixtures/refuter/B1_negative_counts/exspy.json` | 1.4 KB | `tools/edx-quant-maps/pins.py`, `tools/eels-thickness/make_portable_thresholds.py`, `tools/eels-thickness/refuter_cases.py` +1 | | +| `SpectroEELSTests/Fixtures/refuter/B1_negative_counts/spec.json` | 247 B | `tools/eels-thickness/make_portable_thresholds.py`, `tools/eels-thickness/refuter_cases.py`, `tools/eels-thickness/refuter_cases_random.py` | | +| `SpectroEELSTests/Fixtures/refuter/B3_flat_and_ramp/data.f64` | 9.4 KB | `tools/eels-thickness/make_portable_thresholds.py`, `tools/eels-thickness/refuter_cases.py`, `tools/eels-thickness/refuter_cases_random.py` | | +| `SpectroEELSTests/Fixtures/refuter/B3_flat_and_ramp/exspy.json` | 520 B | `tools/edx-quant-maps/pins.py`, `tools/eels-thickness/make_portable_thresholds.py`, `tools/eels-thickness/refuter_cases.py` +1 | | +| `SpectroEELSTests/Fixtures/refuter/B3_flat_and_ramp/spec.json` | 243 B | `tools/eels-thickness/make_portable_thresholds.py`, `tools/eels-thickness/refuter_cases.py`, `tools/eels-thickness/refuter_cases_random.py` | | +| `SpectroEELSTests/Fixtures/refuter/B5_ramps/data.f64` | 14.1 KB | `tools/eels-thickness/make_portable_thresholds.py`, `tools/eels-thickness/refuter_cases.py`, `tools/eels-thickness/refuter_cases_random.py` | | +| `SpectroEELSTests/Fixtures/refuter/B5_ramps/exspy.json` | 803 B | `tools/edx-quant-maps/pins.py`, `tools/eels-thickness/make_portable_thresholds.py`, `tools/eels-thickness/refuter_cases.py` +1 | | +| `SpectroEELSTests/Fixtures/refuter/B5_ramps/spec.json` | 235 B | `tools/eels-thickness/make_portable_thresholds.py`, `tools/eels-thickness/refuter_cases.py`, `tools/eels-thickness/refuter_cases_random.py` | | +| `SpectroEELSTests/Fixtures/refuter/R22/data.f64` | 6.1 KB | `tools/eels-thickness/make_portable_thresholds.py`, `tools/eels-thickness/refuter_cases.py`, `tools/eels-thickness/refuter_cases_random.py` | | +| `SpectroEELSTests/Fixtures/refuter/R22/exspy.json` | 2.7 KB | `tools/edx-quant-maps/pins.py`, `tools/eels-thickness/make_portable_thresholds.py`, `tools/eels-thickness/refuter_cases.py` +1 | | +| `SpectroEELSTests/Fixtures/refuter/R22/spec.json` | 348 B | `tools/eels-thickness/make_portable_thresholds.py`, `tools/eels-thickness/refuter_cases.py`, `tools/eels-thickness/refuter_cases_random.py` | | +| `SpectroEELSTests/Fixtures/refuter/R26/data.f64` | 2.8 KB | `tools/eels-thickness/make_portable_thresholds.py`, `tools/eels-thickness/refuter_cases.py`, `tools/eels-thickness/refuter_cases_random.py` | | +| `SpectroEELSTests/Fixtures/refuter/R26/exspy.json` | 1.4 KB | `tools/edx-quant-maps/pins.py`, `tools/eels-thickness/make_portable_thresholds.py`, `tools/eels-thickness/refuter_cases.py` +1 | | +| `SpectroEELSTests/Fixtures/refuter/R26/spec.json` | 349 B | `tools/eels-thickness/make_portable_thresholds.py`, `tools/eels-thickness/refuter_cases.py`, `tools/eels-thickness/refuter_cases_random.py` | | +| `SpectroEELSTests/Fixtures/refuter/R52/data.f64` | 10.2 KB | `tools/eels-thickness/make_portable_thresholds.py`, `tools/eels-thickness/refuter_cases.py`, `tools/eels-thickness/refuter_cases_random.py` | | +| `SpectroEELSTests/Fixtures/refuter/R52/exspy.json` | 3.9 KB | `tools/edx-quant-maps/pins.py`, `tools/eels-thickness/make_portable_thresholds.py`, `tools/eels-thickness/refuter_cases.py` +1 | | +| `SpectroEELSTests/Fixtures/refuter/R52/spec.json` | 349 B | `tools/eels-thickness/make_portable_thresholds.py`, `tools/eels-thickness/refuter_cases.py`, `tools/eels-thickness/refuter_cases_random.py` | | +| `SpectroEELSTests/Fixtures/refuter/R58/data.f64` | 5.4 KB | `tools/eels-thickness/make_portable_thresholds.py`, `tools/eels-thickness/refuter_cases.py`, `tools/eels-thickness/refuter_cases_random.py` | | +| `SpectroEELSTests/Fixtures/refuter/R58/exspy.json` | 2.2 KB | `tools/edx-quant-maps/pins.py`, `tools/eels-thickness/make_portable_thresholds.py`, `tools/eels-thickness/refuter_cases.py` +1 | | +| `SpectroEELSTests/Fixtures/refuter/R58/spec.json` | 349 B | `tools/eels-thickness/make_portable_thresholds.py`, `tools/eels-thickness/refuter_cases.py`, `tools/eels-thickness/refuter_cases_random.py` | | +| `SpectroEELSTests/Fixtures/sg-parity.f64` | 1.7 MB | `tools/eels-thickness/make_sg_parity.py` | | +| `SpectroEELSTests/Fixtures/sg-parity.json` | 57.6 KB | `tools/eels-thickness/make_sg_parity.py` | | diff --git a/tools/build-docs.sh b/tools/build-docs.sh new file mode 100755 index 0000000..f43f8c7 --- /dev/null +++ b/tools/build-docs.sh @@ -0,0 +1,26 @@ +#!/bin/bash +# Builds the DocC site for every module with a .docc catalog and merges it into one static site. +# tools/build-docs.sh [] e.g. tools/build-docs.sh .docs-site /SpectroKit +# macOS with Xcode 16 or later. Output is gitignored (.docs-site). +set -euo pipefail +cd "$(dirname "$0")/.." +out="${1:?output dir}" +base="${2:-}" +derived="$(mktemp -d)" +trap 'rm -rf "$derived"' EXIT + +modules=$(find Sources -maxdepth 2 -name '*.docc' -exec basename {} .docc \; | sort) +archives=() +for m in $modules; do + xcodebuild docbuild -scheme "$m" -destination 'generic/platform=macOS' -derivedDataPath "$derived" >"$derived/$m.log" 2>&1 \ + || { tail -30 "$derived/$m.log"; echo "docbuild failed for $m"; exit 1; } + archives+=("$(find "$derived/Build/Products" -name "$m.doccarchive" -maxdepth 3 | head -1)") +done + +merged="$derived/SpectroKit.doccarchive" +xcrun docc merge "${archives[@]}" --output-path "$merged" +rm -rf "$out" +xcrun docc process-archive transform-for-static-hosting "$merged" --output-path "$out" ${base:+--hosting-base-path "$base"} +# the site root has no page of its own: send it to the merged documentation landing page +printf '' "${base}" > "$out/index.html" +echo "built $out ($(echo "$modules" | wc -l | tr -d ' ') modules)"