File size: 1,434 Bytes
c7c67ef | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | # tools/
Small cross-branch comparison utilities for cosmicfishpie, moved here from an
untracked `shared-tools/` directory that lived alongside the git worktrees on
a development machine (not part of the cosmicfishpie repo itself, since it
compares *across* branches rather than living inside one).
## compare_photo_fisher.sh / compare_photo_fisher.py
Run the same photometric Fisher computation (WL+GCph, symbolic backend,
`Euclid-Photometric-ISTF-Pessimistic`, LCDM) in two cosmicfishpie git
worktrees, then:
- compare the resulting Fisher matrix, its inverse, and parameter names for
numerical equivalence, and
- report a wall-clock / compute-time speedup between the two.
Usage:
```bash
./compare_photo_fisher.sh [branch-a] [branch-b] # defaults: main perf-v2
```
Assumes each branch is checked out as a sibling git worktree named
`cosmicfishpie-<branch>` next to this repo (e.g. `cosmicfishpie-main`,
`cosmicfishpie-perf-v2`, `cosmicfishpie-symbolic_overhaul`). Override the
root with `WORKTREE_ROOT=/path/to/worktrees`, or point a single label at an
arbitrary path with `WORKTREE_<LABEL>=/path` (e.g. `WORKTREE_MAIN=/path`).
This complements, but does not replace, the in-repo comparison scripts under
`cosmicfishpie/scripts/` (`compare_fishers_in_dir.py`,
`compare_reference_fishers.py`, `plot_compare_fishers.py`,
`scripts/validation/...`), which operate within a single checkout rather than
across two worktrees.
|