diff --git a/config/build/env_vars.yaml b/config/build/env_vars.yaml index bf40d72..2db8e7f 100644 --- a/config/build/env_vars.yaml +++ b/config/build/env_vars.yaml @@ -21,12 +21,10 @@ defaults: MPLCONFIGDIR: "/tmp/matplotlib" # Writable config dir for matplotlib overrides: - # Non-simulator scripts that load committed FITS data need full-size - # datasets to avoid shape mismatch with pre-existing 100x100 data. - - pattern: "howtogalaxy/" - unset: [PYAUTO_SMALL_DATASETS] - - pattern: "guides/" - unset: [PYAUTO_SMALL_DATASETS] + # (Removed the dead `howtogalaxy/` + `guides/` PYAUTO_SMALL_DATASETS-unset + # workarounds: they matched no files here, and the tutorials now use + # `ag.util.dataset.should_simulate` which deletes + re-simulates stale data + # under the cap, so the chapters run correctly at 16x16.) # guides/results/start_here.py must produce real samples so the example # scripts that read from `output/results_folder` afterwards # (data_fitting, queries, models, samples_via_aggregator) find a diff --git a/notebooks/chapter_1_introduction/tutorial_0_visualization.ipynb b/notebooks/chapter_1_introduction/tutorial_0_visualization.ipynb index cc0cfbd..7e94a04 100644 --- a/notebooks/chapter_1_introduction/tutorial_0_visualization.ipynb +++ b/notebooks/chapter_1_introduction/tutorial_0_visualization.ipynb @@ -128,7 +128,7 @@ "cell_type": "code", "metadata": {}, "source": [ - "if not dataset_path.exists():\n", + "if ag.util.dataset.should_simulate(str(dataset_path)):\n", " import subprocess\n", " import sys\n", "\n", diff --git a/notebooks/chapter_1_introduction/tutorial_3_fitting.ipynb b/notebooks/chapter_1_introduction/tutorial_3_fitting.ipynb index 84d6443..e99e74a 100644 --- a/notebooks/chapter_1_introduction/tutorial_3_fitting.ipynb +++ b/notebooks/chapter_1_introduction/tutorial_3_fitting.ipynb @@ -118,20 +118,21 @@ "source": [ "__Dataset Auto-Simulation__\n", "\n", - "If the dataset does not already exist on your system, it will be created by running the corresponding\n", - "simulator script. This ensures that all example scripts can be run without manually simulating data first." + "The `howtogalaxy` dataset is the one built up and saved in tutorial 2 (`tutorial_2_data.py`). If it\n", + "does not already exist on your system, it is created by running that script. This ensures every\n", + "example script can be run without manually simulating data first." ] }, { "cell_type": "code", "metadata": {}, "source": [ - "if not dataset_path.exists():\n", + "if ag.util.dataset.should_simulate(str(dataset_path)):\n", " import subprocess\n", " import sys\n", "\n", " subprocess.run(\n", - " [sys.executable, \"scripts/simulators/simple.py\"],\n", + " [sys.executable, \"scripts/chapter_1_introduction/tutorial_2_data.py\"],\n", " check=True,\n", " )\n", "\n", @@ -984,6 +985,15 @@ "dataset_name = \"simple\"\n", "dataset_path = Path(\"dataset\") / \"imaging\" / dataset_name\n", "\n", + "if ag.util.dataset.should_simulate(str(dataset_path)):\n", + " import subprocess\n", + " import sys\n", + "\n", + " subprocess.run(\n", + " [sys.executable, \"scripts/simulators/simple.py\"],\n", + " check=True,\n", + " )\n", + "\n", "dataset = ag.Imaging.from_fits(\n", " data_path=dataset_path / \"data.fits\",\n", " psf_path=dataset_path / \"psf.fits\",\n", diff --git a/notebooks/chapter_2_modeling/tutorial_1_non_linear_search.ipynb b/notebooks/chapter_2_modeling/tutorial_1_non_linear_search.ipynb index 201b606..901f9e2 100644 --- a/notebooks/chapter_2_modeling/tutorial_1_non_linear_search.ipynb +++ b/notebooks/chapter_2_modeling/tutorial_1_non_linear_search.ipynb @@ -284,7 +284,7 @@ "cell_type": "code", "metadata": {}, "source": [ - "if not dataset_path.exists():\n", + "if ag.util.dataset.should_simulate(str(dataset_path)):\n", " import subprocess\n", " import sys\n", "\n", diff --git a/notebooks/chapter_2_modeling/tutorial_2_practicalities.ipynb b/notebooks/chapter_2_modeling/tutorial_2_practicalities.ipynb index d6a4ac9..d8f2b1d 100644 --- a/notebooks/chapter_2_modeling/tutorial_2_practicalities.ipynb +++ b/notebooks/chapter_2_modeling/tutorial_2_practicalities.ipynb @@ -152,7 +152,7 @@ "cell_type": "code", "metadata": {}, "source": [ - "if not dataset_path.exists():\n", + "if ag.util.dataset.should_simulate(str(dataset_path)):\n", " import subprocess\n", " import sys\n", "\n", diff --git a/notebooks/chapter_2_modeling/tutorial_3_realism_and_complexity.ipynb b/notebooks/chapter_2_modeling/tutorial_3_realism_and_complexity.ipynb index d1351cb..e0bc470 100644 --- a/notebooks/chapter_2_modeling/tutorial_3_realism_and_complexity.ipynb +++ b/notebooks/chapter_2_modeling/tutorial_3_realism_and_complexity.ipynb @@ -119,7 +119,7 @@ "cell_type": "code", "metadata": {}, "source": [ - "if not dataset_path.exists():\n", + "if ag.util.dataset.should_simulate(str(dataset_path)):\n", " import subprocess\n", " import sys\n", "\n", diff --git a/notebooks/chapter_2_modeling/tutorial_4_dealing_with_failure.ipynb b/notebooks/chapter_2_modeling/tutorial_4_dealing_with_failure.ipynb index 0a3b665..6a5b67a 100644 --- a/notebooks/chapter_2_modeling/tutorial_4_dealing_with_failure.ipynb +++ b/notebooks/chapter_2_modeling/tutorial_4_dealing_with_failure.ipynb @@ -120,7 +120,7 @@ "cell_type": "code", "metadata": {}, "source": [ - "if not dataset_path.exists():\n", + "if ag.util.dataset.should_simulate(str(dataset_path)):\n", " import subprocess\n", " import sys\n", "\n", diff --git a/notebooks/chapter_2_modeling/tutorial_5_linear_profiles.ipynb b/notebooks/chapter_2_modeling/tutorial_5_linear_profiles.ipynb index dac3b49..be60c29 100644 --- a/notebooks/chapter_2_modeling/tutorial_5_linear_profiles.ipynb +++ b/notebooks/chapter_2_modeling/tutorial_5_linear_profiles.ipynb @@ -134,7 +134,7 @@ "cell_type": "code", "metadata": {}, "source": [ - "if not dataset_path.exists():\n", + "if ag.util.dataset.should_simulate(str(dataset_path)):\n", " import subprocess\n", " import sys\n", "\n", diff --git a/notebooks/chapter_2_modeling/tutorial_6_masking.ipynb b/notebooks/chapter_2_modeling/tutorial_6_masking.ipynb index 0f6a37b..5dfa8ad 100644 --- a/notebooks/chapter_2_modeling/tutorial_6_masking.ipynb +++ b/notebooks/chapter_2_modeling/tutorial_6_masking.ipynb @@ -107,7 +107,7 @@ "cell_type": "code", "metadata": {}, "source": [ - "if not dataset_path.exists():\n", + "if ag.util.dataset.should_simulate(str(dataset_path)):\n", " import subprocess\n", " import sys\n", "\n", diff --git a/notebooks/chapter_2_modeling/tutorial_7_results.ipynb b/notebooks/chapter_2_modeling/tutorial_7_results.ipynb index 7f1a846..8ae9c50 100644 --- a/notebooks/chapter_2_modeling/tutorial_7_results.ipynb +++ b/notebooks/chapter_2_modeling/tutorial_7_results.ipynb @@ -105,7 +105,7 @@ "cell_type": "code", "metadata": {}, "source": [ - "if not dataset_path.exists():\n", + "if ag.util.dataset.should_simulate(str(dataset_path)):\n", " import subprocess\n", " import sys\n", "\n", diff --git a/notebooks/chapter_3_search_chaining/tutorial_1_search_chaining.ipynb b/notebooks/chapter_3_search_chaining/tutorial_1_search_chaining.ipynb index a3a2a47..2da6756 100644 --- a/notebooks/chapter_3_search_chaining/tutorial_1_search_chaining.ipynb +++ b/notebooks/chapter_3_search_chaining/tutorial_1_search_chaining.ipynb @@ -140,7 +140,7 @@ "cell_type": "code", "metadata": {}, "source": [ - "if not dataset_path.exists():\n", + "if ag.util.dataset.should_simulate(str(dataset_path)):\n", " import subprocess\n", " import sys\n", "\n", diff --git a/notebooks/chapter_3_search_chaining/tutorial_2_prior_passing.ipynb b/notebooks/chapter_3_search_chaining/tutorial_2_prior_passing.ipynb index 18a23b6..22abd14 100644 --- a/notebooks/chapter_3_search_chaining/tutorial_2_prior_passing.ipynb +++ b/notebooks/chapter_3_search_chaining/tutorial_2_prior_passing.ipynb @@ -119,7 +119,7 @@ "cell_type": "code", "metadata": {}, "source": [ - "if not dataset_path.exists():\n", + "if ag.util.dataset.should_simulate(str(dataset_path)):\n", " import subprocess\n", " import sys\n", "\n", diff --git a/notebooks/chapter_3_search_chaining/tutorial_3_x2_galaxies.ipynb b/notebooks/chapter_3_search_chaining/tutorial_3_x2_galaxies.ipynb index bf171e5..640756e 100644 --- a/notebooks/chapter_3_search_chaining/tutorial_3_x2_galaxies.ipynb +++ b/notebooks/chapter_3_search_chaining/tutorial_3_x2_galaxies.ipynb @@ -122,7 +122,7 @@ "cell_type": "code", "metadata": {}, "source": [ - "if not dataset_path.exists():\n", + "if ag.util.dataset.should_simulate(str(dataset_path)):\n", " import subprocess\n", " import sys\n", "\n", diff --git a/notebooks/chapter_4_pixelizations/tutorial_2_mappers.ipynb b/notebooks/chapter_4_pixelizations/tutorial_2_mappers.ipynb index ad26608..ca3d1f6 100644 --- a/notebooks/chapter_4_pixelizations/tutorial_2_mappers.ipynb +++ b/notebooks/chapter_4_pixelizations/tutorial_2_mappers.ipynb @@ -109,7 +109,7 @@ "cell_type": "code", "metadata": {}, "source": [ - "if not dataset_path.exists():\n", + "if ag.util.dataset.should_simulate(str(dataset_path)):\n", " import subprocess\n", " import sys\n", "\n", diff --git a/notebooks/chapter_4_pixelizations/tutorial_3_inversions.ipynb b/notebooks/chapter_4_pixelizations/tutorial_3_inversions.ipynb index f150ce3..4eb9ae8 100644 --- a/notebooks/chapter_4_pixelizations/tutorial_3_inversions.ipynb +++ b/notebooks/chapter_4_pixelizations/tutorial_3_inversions.ipynb @@ -113,7 +113,7 @@ "cell_type": "code", "metadata": {}, "source": [ - "if not dataset_path.exists():\n", + "if ag.util.dataset.should_simulate(str(dataset_path)):\n", " import subprocess\n", " import sys\n", "\n", diff --git a/notebooks/chapter_4_pixelizations/tutorial_4_bayesian_regularization.ipynb b/notebooks/chapter_4_pixelizations/tutorial_4_bayesian_regularization.ipynb index 384a8f1..fbb889e 100644 --- a/notebooks/chapter_4_pixelizations/tutorial_4_bayesian_regularization.ipynb +++ b/notebooks/chapter_4_pixelizations/tutorial_4_bayesian_regularization.ipynb @@ -117,7 +117,7 @@ "cell_type": "code", "metadata": {}, "source": [ - "if not dataset_path.exists():\n", + "if ag.util.dataset.should_simulate(str(dataset_path)):\n", " import subprocess\n", " import sys\n", "\n", diff --git a/notebooks/chapter_4_pixelizations/tutorial_5_model_fit.ipynb b/notebooks/chapter_4_pixelizations/tutorial_5_model_fit.ipynb index 73683f8..5db0e09 100644 --- a/notebooks/chapter_4_pixelizations/tutorial_5_model_fit.ipynb +++ b/notebooks/chapter_4_pixelizations/tutorial_5_model_fit.ipynb @@ -123,7 +123,7 @@ "cell_type": "code", "metadata": {}, "source": [ - "if not dataset_path.exists():\n", + "if ag.util.dataset.should_simulate(str(dataset_path)):\n", " import subprocess\n", " import sys\n", "\n", diff --git a/notebooks/chapter_optional/tutorial_searches.ipynb b/notebooks/chapter_optional/tutorial_searches.ipynb index 1ead558..d28cb5e 100644 --- a/notebooks/chapter_optional/tutorial_searches.ipynb +++ b/notebooks/chapter_optional/tutorial_searches.ipynb @@ -110,7 +110,7 @@ "cell_type": "code", "metadata": {}, "source": [ - "if not dataset_path.exists():\n", + "if ag.util.dataset.should_simulate(str(dataset_path)):\n", " import subprocess\n", " import sys\n", "\n", diff --git a/scripts/chapter_1_introduction/tutorial_0_visualization.py b/scripts/chapter_1_introduction/tutorial_0_visualization.py index 9ccb622..7f4e8b2 100644 --- a/scripts/chapter_1_introduction/tutorial_0_visualization.py +++ b/scripts/chapter_1_introduction/tutorial_0_visualization.py @@ -48,7 +48,7 @@ If the dataset does not already exist on your system, it will be created by running the corresponding simulator script. This ensures that all example scripts can be run without manually simulating data first. """ -if not dataset_path.exists(): +if ag.util.dataset.should_simulate(str(dataset_path)): import subprocess import sys diff --git a/scripts/chapter_1_introduction/tutorial_3_fitting.py b/scripts/chapter_1_introduction/tutorial_3_fitting.py index e4973b1..d73b7f7 100644 --- a/scripts/chapter_1_introduction/tutorial_3_fitting.py +++ b/scripts/chapter_1_introduction/tutorial_3_fitting.py @@ -54,15 +54,16 @@ """ __Dataset Auto-Simulation__ -If the dataset does not already exist on your system, it will be created by running the corresponding -simulator script. This ensures that all example scripts can be run without manually simulating data first. +The `howtogalaxy` dataset is the one built up and saved in tutorial 2 (`tutorial_2_data.py`). If it +does not already exist on your system, it is created by running that script. This ensures every +example script can be run without manually simulating data first. """ -if not dataset_path.exists(): +if ag.util.dataset.should_simulate(str(dataset_path)): import subprocess import sys subprocess.run( - [sys.executable, "scripts/simulators/simple.py"], + [sys.executable, "scripts/chapter_1_introduction/tutorial_2_data.py"], check=True, ) @@ -574,6 +575,15 @@ dataset_name = "simple" dataset_path = Path("dataset") / "imaging" / dataset_name +if ag.util.dataset.should_simulate(str(dataset_path)): + import subprocess + import sys + + subprocess.run( + [sys.executable, "scripts/simulators/simple.py"], + check=True, + ) + dataset = ag.Imaging.from_fits( data_path=dataset_path / "data.fits", psf_path=dataset_path / "psf.fits", diff --git a/scripts/chapter_2_modeling/tutorial_1_non_linear_search.py b/scripts/chapter_2_modeling/tutorial_1_non_linear_search.py index 84cd917..6339dae 100644 --- a/scripts/chapter_2_modeling/tutorial_1_non_linear_search.py +++ b/scripts/chapter_2_modeling/tutorial_1_non_linear_search.py @@ -204,7 +204,7 @@ If the dataset does not already exist on your system, it will be created by running the corresponding simulator script. This ensures that all example scripts can be run without manually simulating data first. """ -if not dataset_path.exists(): +if ag.util.dataset.should_simulate(str(dataset_path)): import subprocess import sys diff --git a/scripts/chapter_2_modeling/tutorial_2_practicalities.py b/scripts/chapter_2_modeling/tutorial_2_practicalities.py index b75f538..1b5dce0 100644 --- a/scripts/chapter_2_modeling/tutorial_2_practicalities.py +++ b/scripts/chapter_2_modeling/tutorial_2_practicalities.py @@ -72,7 +72,7 @@ If the dataset does not already exist on your system, it will be created by running the corresponding simulator script. This ensures that all example scripts can be run without manually simulating data first. """ -if not dataset_path.exists(): +if ag.util.dataset.should_simulate(str(dataset_path)): import subprocess import sys diff --git a/scripts/chapter_2_modeling/tutorial_3_realism_and_complexity.py b/scripts/chapter_2_modeling/tutorial_3_realism_and_complexity.py index 04841b3..b998cb6 100644 --- a/scripts/chapter_2_modeling/tutorial_3_realism_and_complexity.py +++ b/scripts/chapter_2_modeling/tutorial_3_realism_and_complexity.py @@ -50,7 +50,7 @@ If the dataset does not already exist on your system, it will be created by running the corresponding simulator script. This ensures that all example scripts can be run without manually simulating data first. """ -if not dataset_path.exists(): +if ag.util.dataset.should_simulate(str(dataset_path)): import subprocess import sys diff --git a/scripts/chapter_2_modeling/tutorial_4_dealing_with_failure.py b/scripts/chapter_2_modeling/tutorial_4_dealing_with_failure.py index 9c3eb94..4814fe9 100644 --- a/scripts/chapter_2_modeling/tutorial_4_dealing_with_failure.py +++ b/scripts/chapter_2_modeling/tutorial_4_dealing_with_failure.py @@ -51,7 +51,7 @@ If the dataset does not already exist on your system, it will be created by running the corresponding simulator script. This ensures that all example scripts can be run without manually simulating data first. """ -if not dataset_path.exists(): +if ag.util.dataset.should_simulate(str(dataset_path)): import subprocess import sys diff --git a/scripts/chapter_2_modeling/tutorial_5_linear_profiles.py b/scripts/chapter_2_modeling/tutorial_5_linear_profiles.py index fef276d..d620887 100644 --- a/scripts/chapter_2_modeling/tutorial_5_linear_profiles.py +++ b/scripts/chapter_2_modeling/tutorial_5_linear_profiles.py @@ -65,7 +65,7 @@ If the dataset does not already exist on your system, it will be created by running the corresponding simulator script. This ensures that all example scripts can be run without manually simulating data first. """ -if not dataset_path.exists(): +if ag.util.dataset.should_simulate(str(dataset_path)): import subprocess import sys diff --git a/scripts/chapter_2_modeling/tutorial_6_masking.py b/scripts/chapter_2_modeling/tutorial_6_masking.py index f7c193d..0490960 100644 --- a/scripts/chapter_2_modeling/tutorial_6_masking.py +++ b/scripts/chapter_2_modeling/tutorial_6_masking.py @@ -38,7 +38,7 @@ If the dataset does not already exist on your system, it will be created by running the corresponding simulator script. This ensures that all example scripts can be run without manually simulating data first. """ -if not dataset_path.exists(): +if ag.util.dataset.should_simulate(str(dataset_path)): import subprocess import sys diff --git a/scripts/chapter_2_modeling/tutorial_7_results.py b/scripts/chapter_2_modeling/tutorial_7_results.py index b6f9904..d890ad6 100644 --- a/scripts/chapter_2_modeling/tutorial_7_results.py +++ b/scripts/chapter_2_modeling/tutorial_7_results.py @@ -36,7 +36,7 @@ If the dataset does not already exist on your system, it will be created by running the corresponding simulator script. This ensures that all example scripts can be run without manually simulating data first. """ -if not dataset_path.exists(): +if ag.util.dataset.should_simulate(str(dataset_path)): import subprocess import sys diff --git a/scripts/chapter_3_search_chaining/tutorial_1_search_chaining.py b/scripts/chapter_3_search_chaining/tutorial_1_search_chaining.py index 3bef85f..797c49e 100644 --- a/scripts/chapter_3_search_chaining/tutorial_1_search_chaining.py +++ b/scripts/chapter_3_search_chaining/tutorial_1_search_chaining.py @@ -71,7 +71,7 @@ If the dataset does not already exist on your system, it will be created by running the corresponding simulator script. This ensures that all example scripts can be run without manually simulating data first. """ -if not dataset_path.exists(): +if ag.util.dataset.should_simulate(str(dataset_path)): import subprocess import sys diff --git a/scripts/chapter_3_search_chaining/tutorial_2_prior_passing.py b/scripts/chapter_3_search_chaining/tutorial_2_prior_passing.py index a6e9e67..945c1d3 100644 --- a/scripts/chapter_3_search_chaining/tutorial_2_prior_passing.py +++ b/scripts/chapter_3_search_chaining/tutorial_2_prior_passing.py @@ -50,7 +50,7 @@ If the dataset does not already exist on your system, it will be created by running the corresponding simulator script. This ensures that all example scripts can be run without manually simulating data first. """ -if not dataset_path.exists(): +if ag.util.dataset.should_simulate(str(dataset_path)): import subprocess import sys diff --git a/scripts/chapter_3_search_chaining/tutorial_3_x2_galaxies.py b/scripts/chapter_3_search_chaining/tutorial_3_x2_galaxies.py index 11c00b6..87a1d5f 100644 --- a/scripts/chapter_3_search_chaining/tutorial_3_x2_galaxies.py +++ b/scripts/chapter_3_search_chaining/tutorial_3_x2_galaxies.py @@ -53,7 +53,7 @@ If the dataset does not already exist on your system, it will be created by running the corresponding simulator script. This ensures that all example scripts can be run without manually simulating data first. """ -if not dataset_path.exists(): +if ag.util.dataset.should_simulate(str(dataset_path)): import subprocess import sys diff --git a/scripts/chapter_4_pixelizations/tutorial_2_mappers.py b/scripts/chapter_4_pixelizations/tutorial_2_mappers.py index abc75df..1889c8a 100644 --- a/scripts/chapter_4_pixelizations/tutorial_2_mappers.py +++ b/scripts/chapter_4_pixelizations/tutorial_2_mappers.py @@ -40,7 +40,7 @@ If the dataset does not already exist on your system, it will be created by running the corresponding simulator script. This ensures that all example scripts can be run without manually simulating data first. """ -if not dataset_path.exists(): +if ag.util.dataset.should_simulate(str(dataset_path)): import subprocess import sys diff --git a/scripts/chapter_4_pixelizations/tutorial_3_inversions.py b/scripts/chapter_4_pixelizations/tutorial_3_inversions.py index c77f11a..53ab9b3 100644 --- a/scripts/chapter_4_pixelizations/tutorial_3_inversions.py +++ b/scripts/chapter_4_pixelizations/tutorial_3_inversions.py @@ -44,7 +44,7 @@ If the dataset does not already exist on your system, it will be created by running the corresponding simulator script. This ensures that all example scripts can be run without manually simulating data first. """ -if not dataset_path.exists(): +if ag.util.dataset.should_simulate(str(dataset_path)): import subprocess import sys diff --git a/scripts/chapter_4_pixelizations/tutorial_4_bayesian_regularization.py b/scripts/chapter_4_pixelizations/tutorial_4_bayesian_regularization.py index 3ee34e7..dfbe672 100644 --- a/scripts/chapter_4_pixelizations/tutorial_4_bayesian_regularization.py +++ b/scripts/chapter_4_pixelizations/tutorial_4_bayesian_regularization.py @@ -48,7 +48,7 @@ If the dataset does not already exist on your system, it will be created by running the corresponding simulator script. This ensures that all example scripts can be run without manually simulating data first. """ -if not dataset_path.exists(): +if ag.util.dataset.should_simulate(str(dataset_path)): import subprocess import sys diff --git a/scripts/chapter_4_pixelizations/tutorial_5_model_fit.py b/scripts/chapter_4_pixelizations/tutorial_5_model_fit.py index 5e10b1a..ea5a76b 100644 --- a/scripts/chapter_4_pixelizations/tutorial_5_model_fit.py +++ b/scripts/chapter_4_pixelizations/tutorial_5_model_fit.py @@ -54,7 +54,7 @@ If the dataset does not already exist on your system, it will be created by running the corresponding simulator script. This ensures that all example scripts can be run without manually simulating data first. """ -if not dataset_path.exists(): +if ag.util.dataset.should_simulate(str(dataset_path)): import subprocess import sys diff --git a/scripts/chapter_optional/tutorial_searches.py b/scripts/chapter_optional/tutorial_searches.py index 2263895..40fbe1a 100644 --- a/scripts/chapter_optional/tutorial_searches.py +++ b/scripts/chapter_optional/tutorial_searches.py @@ -41,7 +41,7 @@ If the dataset does not already exist on your system, it will be created by running the corresponding simulator script. This ensures that all example scripts can be run without manually simulating data first. """ -if not dataset_path.exists(): +if ag.util.dataset.should_simulate(str(dataset_path)): import subprocess import sys diff --git a/workspace_index.json b/workspace_index.json index 263f26c..2d37dd2 100644 --- a/workspace_index.json +++ b/workspace_index.json @@ -58,7 +58,9 @@ "Model Fitting", "Wrap Up" ], - "cross_refs": [], + "cross_refs": [ + "tutorial_2_data.py" + ], "notebook": "notebooks/chapter_1_introduction/tutorial_3_fitting.ipynb", "path": "scripts/chapter_1_introduction/tutorial_3_fitting.py", "summary": "In previous tutorials, we used light profiles to create simulated images of galaxies and visualized how these images would appear when captured by a CCD detector on a telescope like the Hubble Space Telescope.",