Skip to content
Open
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
4 changes: 3 additions & 1 deletion scripts/imaging/modeling_visualization_jit.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@
import jax.numpy as jnp
import numpy as np

from autoconf.test_mode import with_test_mode_segment

import autofit as af
import autolens as al

Expand Down Expand Up @@ -304,7 +306,7 @@
# The Nautilus output goes to output/<path_prefix>/<name>/<hash>/image/
# The quick-update visualizer writes fit.png (via subplot_fit function)
# to that image folder during each quick update.
output_search_root = Path("output") / output_root / "mge_linear"
output_search_root = with_test_mode_segment(Path("output")) / output_root / "mge_linear"
produced_pngs = list(output_search_root.rglob("fit.png"))
print(f"fit.png files produced: {len(produced_pngs)}")
for p in produced_pngs:
Expand Down
4 changes: 3 additions & 1 deletion scripts/imaging/modeling_visualization_jit_delaunay.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@
import jax.numpy as jnp
import numpy as np

from autoconf.test_mode import with_test_mode_segment

import autofit as af
import autolens as al

Expand Down Expand Up @@ -348,7 +350,7 @@ def _assert_likelihood_sanity(label, analysis, model):
print("Running Nautilus ...")
result = search.fit(model=model, analysis=analysis_live)

output_search_root = Path("output") / output_root / "delaunay"
output_search_root = with_test_mode_segment(Path("output")) / output_root / "delaunay"
produced_pngs = list(output_search_root.rglob("fit.png"))
print(f"fit.png files produced: {len(produced_pngs)}")
for p in produced_pngs:
Expand Down
4 changes: 3 additions & 1 deletion scripts/imaging/modeling_visualization_jit_rectangular.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@
import jax.numpy as jnp
import numpy as np

from autoconf.test_mode import with_test_mode_segment

import autofit as af
import autolens as al

Expand Down Expand Up @@ -336,7 +338,7 @@ def _assert_likelihood_sanity(label, analysis, model):
print("Running Nautilus ...")
result = search.fit(model=model, analysis=analysis_live)

output_search_root = Path("output") / output_root / "rectangular"
output_search_root = with_test_mode_segment(Path("output")) / output_root / "rectangular"
produced_pngs = list(output_search_root.rglob("fit.png"))
print(f"fit.png files produced: {len(produced_pngs)}")
for p in produced_pngs:
Expand Down
4 changes: 3 additions & 1 deletion scripts/interferometer/modeling_visualization_jit.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@
import jax.numpy as jnp
import numpy as np

from autoconf.test_mode import with_test_mode_segment

import autofit as af
import autolens as al

Expand Down Expand Up @@ -294,7 +296,7 @@
# the previous run's cached samples.csv and skips live sampling — so the
# quick-update visualizer never fires, _jitted_fit_from is never set, and
# the assertion below would fail on every rerun. Force a fresh run.
output_search_root = Path("output") / output_root / "mge_linear"
output_search_root = with_test_mode_segment(Path("output")) / output_root / "mge_linear"
if output_search_root.exists():
shutil.rmtree(output_search_root)

Expand Down
4 changes: 3 additions & 1 deletion scripts/point_source/modeling_visualization_jit.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@
import jax
import jax.numpy as jnp

from autoconf.test_mode import with_test_mode_segment

import autofit as af
import autolens as al

Expand Down Expand Up @@ -245,7 +247,7 @@
# Also clean the autofit search output so Nautilus performs live sampling
# instead of resuming from a cached samples.csv — without this the
# quick-update visualizer never fires on reruns.
output_search_root = Path("output") / output_root / "point_image_plane"
output_search_root = with_test_mode_segment(Path("output")) / output_root / "point_image_plane"
if output_search_root.exists():
shutil.rmtree(output_search_root)

Expand Down
Loading