Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ everything else. Producers with several sub-datasets write one pair per sub-fold
(`multi_dataset` per band, the datacube per channel, `cluster` per point-source plane). Many
of these figures are the galaxy-scale plots and look poor on point / cluster / weak data —
bespoke figures are a follow-up through the Eyes dashboard. `cluster` calls the two
`PlotterPoint` methods directly instead of `VisualizerPoint`: the visualizer's critical-curve
pre-pass costs ~100 s on the 15-galaxy multi-plane lens and the point fit subplot never draws
the curves (the PNGs are byte-identical).
`PlotterPoint` methods directly instead of `VisualizerPoint`, skipping the untracked tracer and
galaxy figures; the "Fit Positions" panel still draws the critical curves, which cost ~2 min per
dataset on the 15-galaxy multi-plane lens (the PNGs match the visualizer's).

**What is tracked.** PNG figures under `scripts/<domain>/images/**`, `GALLERY.md` and
`gallery/viz_manifest.yaml`. The FITS /
Expand Down
32 changes: 16 additions & 16 deletions gallery/viz_manifest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,26 +14,26 @@ figures:
producer: scripts/cluster/visualization.py
domain: cluster
source: point_0
bytes: 33388
sha256: b49c895cb752c02fe77c56bc0f5850f261b65b4422fda42f08dcb1a968974995
bytes: 39187
sha256: 65b2b421786401373253a058a997f953beee6818b5bd492e93a69e4e86f046b0
- file: scripts/cluster/images/visualization/point_0/fit.png
producer: scripts/cluster/visualization.py
domain: cluster
source: point_0
bytes: 34546
sha256: b5fdd8c2f4242a15b26cc4d517ddc521845b4539679eb0ce48383cbf7a338b0c
bytes: 68264
sha256: c330570f6373ef9055c8d4dd5b7be3fa8b3f096cdb0117d2aec4b3d5987e43fa
- file: scripts/cluster/images/visualization/point_1/dataset.png
producer: scripts/cluster/visualization.py
domain: cluster
source: point_1
bytes: 23417
sha256: 02bf29263d691355b438037ac8cdb239637c5c9bcc14f1f903bf9a9a61bb778d
bytes: 36831
sha256: 41adea0870d20e15d7b52c040d364f74f81fa2952119e25c4dd52d12032a470f
- file: scripts/cluster/images/visualization/point_1/fit.png
producer: scripts/cluster/visualization.py
domain: cluster
source: point_1
bytes: 24592
sha256: c3c4eead8a0bbd536a4a20db89b8e6a4e32292ace3345cfaea65ce6a167a19eb
bytes: 65979
sha256: aaea68e094f6ff3d142c9a24cb92e750781b43b7768c82f3ff527356150c0f35
- file: scripts/group/images/visualization/dataset.png
producer: scripts/group/visualization.py
domain: group
Expand Down Expand Up @@ -362,14 +362,14 @@ figures:
producer: scripts/point_source_image_chi_squared/visualization.py
domain: point_source_image_chi_squared
source: ''
bytes: 27586
sha256: bcfe90b921dd5b206f457859b22598f89daf1cf75d53a41cf7c668bed8d2ad28
bytes: 38680
sha256: ad0e575bc1d7aded073a16481b3acdfa3e964364acb01dd3d98d9663e7b9a534
- file: scripts/point_source_image_chi_squared/images/visualization/fit.png
producer: scripts/point_source_image_chi_squared/visualization.py
domain: point_source_image_chi_squared
source: ''
bytes: 28952
sha256: 6b52412bb75eab16a3dc4ae4e0a4925d5f23c2ff7ed8bb9a6199f406f201cfed
bytes: 59950
sha256: dcf7b7a60281c49244264678c6c15ab0a5636be9c66fd4e555bba2b9fdecab40
- file: scripts/point_source_image_chi_squared/images/visualization/fit_image_with_points.png
producer: scripts/point_source_image_chi_squared/visualization.py
domain: point_source_image_chi_squared
Expand All @@ -386,14 +386,14 @@ figures:
producer: scripts/point_source_source_chi_squared/visualization.py
domain: point_source_source_chi_squared
source: ''
bytes: 27586
sha256: bcfe90b921dd5b206f457859b22598f89daf1cf75d53a41cf7c668bed8d2ad28
bytes: 38680
sha256: ad0e575bc1d7aded073a16481b3acdfa3e964364acb01dd3d98d9663e7b9a534
- file: scripts/point_source_source_chi_squared/images/visualization/fit.png
producer: scripts/point_source_source_chi_squared/visualization.py
domain: point_source_source_chi_squared
source: ''
bytes: 28823
sha256: caf49de216f6f80553e6c79b03231fd51ee626bd5939dd6864489e56a134320c
bytes: 60925
sha256: b9af86e928d6a1e395cc81aca38cffc7b94bb5b3af82484180d37f989b245472
- file: scripts/point_source_source_chi_squared/images/visualization/fit_image_with_points.png
producer: scripts/point_source_source_chi_squared/visualization.py
domain: point_source_source_chi_squared
Expand Down
Binary file modified scripts/cluster/images/visualization/point_0/dataset.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified scripts/cluster/images/visualization/point_0/fit.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified scripts/cluster/images/visualization/point_1/dataset.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified scripts/cluster/images/visualization/point_1/fit.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 7 additions & 11 deletions scripts/cluster/visualization.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
point_0/dataset.png, point_0/fit.png <- PlotterPoint.dataset_point, PlotterPoint.fit_point
point_1/dataset.png, point_1/fit.png

**Plotter, not Visualizer.** ``VisualizerPoint.visualize`` computes the tracer's critical curves
and caustics on a 100x100 grid over the dataset extent before plotting, which for this 15-galaxy
multi-plane lens costs ~100 s per run (measured 35 s + 67 s) — and the point-source fit subplot
does not draw those curves. So this producer calls the same two ``PlotterPoint`` methods the
visualizer calls (``dataset_point`` in ``visualize_before_fit``; ``fit_point(quick_update=True)``
in ``visualize``) with empty curve lists, writing byte-for-byte the figures the visualizer would.
**Plotter, not Visualizer.** ``VisualizerPoint.visualize`` also renders the tracer and galaxy
figures this repo does not track, so this producer calls the same two ``PlotterPoint`` methods the
visualizer calls (``dataset_point(solver=...)`` in ``visualize_before_fit``;
``fit_point(quick_update=True)`` in ``visualize``), writing the figures the visualizer would. The
"Fit Positions" panel draws the tracer's critical curves, which ``fit_point`` computes on a 100x100
grid covering the solver grid: for this 15-galaxy multi-plane lens that costs ~2 min per dataset.

The point plotter writes ``dataset_point.png`` (renamed to ``dataset.png``); every other file
the visualizer writes is deleted.
Expand Down Expand Up @@ -120,14 +120,10 @@ def _repo_root() -> Path:

t0 = time.perf_counter()
plotter = PlotterPoint(image_path=paths.image_path, title_prefix=analysis.title_prefix)
plotter.dataset_point(dataset=analysis.dataset)
plotter.dataset_point(dataset=analysis.dataset, solver=analysis.solver)
plotter.fit_point(
fit=analysis.fit_for_visualization(instance=instance),
quick_update=True,
image_plane_lines=[],
image_plane_line_colors=[],
source_plane_lines=[],
source_plane_line_colors=[],
)
keep_dataset_and_fit(point_path, dataset_png="dataset_point.png")
print(f"visualize [{dataset.name}]: {time.perf_counter() - t0:.1f}s")
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading