@@ -2,29 +2,38 @@ Once https://github.com/PyAutoLabs/PyAutoLens/issues/480 is fixed (PointSolver
22magnification filter must use ` plane_redshift ` , not the tracer's last plane),
33revisit ` @autolens_workspace/scripts/point_source/features/multiple_sources/ ` .
44
5- The simulator and modeling scripts there are already written in their intended
6- "double Einstein cross" form — source_0 (z=1.0) has its own ` Isothermal ` mass
7- profile that lenses source_1 (z=2.0) on top of the foreground lens at z=0.5.
8- They were authored under autolens_workspace issue # 97 but cannot run end-to-end
9- on the current PyAutoLens release because of # 480 , so both scripts were entered
10- into ` config/build/no_run.yaml ` .
5+ First, let's fix https://github.com/PyAutoLabs/PyAutoLens/issues/480 . I want
6+ you to first validate that the cause of the issue described there is
7+ actually right. I'm a bit unsure I totally buy it, so do some explicit
8+ tests which more directly remove the mass profile but also edit the
9+ ` magnification_threshold ` setting. I'm happy to be convinced, but need a bit
10+ more confirmation .
1111
12- This task closes the loop once #480 lands:
12+ When that workspace example was first written (autolens_workspace issue #97 ),
13+ the upstream PointSolver bug made it impossible to simulate or fit a configuration
14+ where the intermediate source itself acts as a deflector for the further source.
15+ To unblock the multi/factor-graph tutorial, the example was simplified so the
16+ only deflector is the foreground lens — both source galaxies are point-only at
17+ different redshifts, no source-plane mass profile.
1318
14- 1 . Remove these two entries from ` autolens_workspace/config/build/no_run.yaml ` :
15- - ` point_source/features/multiple_sources/simulator `
16- - ` point_source/features/multiple_sources/modeling `
17- 2 . Run ` python scripts/point_source/features/multiple_sources/simulator.py `
18- end-to-end (no ` PYAUTO_* ` overrides) and confirm both ` point_dataset_0.json `
19- and ` point_dataset_1.json ` are written with >=4 positions each.
20- 3 . Run ` PYAUTO_TEST_MODE=2 python scripts/point_source/features/multiple_sources/modeling.py `
21- end-to-end and confirm the likelihood evaluation succeeds without the
22- "PointSolver finds 0 positions" failure mode.
23- 4 . Remove the ` __Currently Blocked By PyAutoLens #480__ ` notice from both
24- scripts' module docstrings.
25- 5 . Regenerate notebooks via ` /generate_and_merge ` .
19+ This task restores the original "double Einstein cross" intent now that the
20+ PointSolver bug is fixed:
2621
27- If the simulator or modeling needs tweaks to match the post-fix solver behaviour
28- (e.g. slightly different prior bounds, repositioning source centres), that's an
29- acceptable scope expansion — but do not weaken the example back to a single-lens
30- configuration.
22+ 1 . Update ` simulator.py ` so source_0 (z=1.0) regains its ` Isothermal ` mass profile
23+ at (0.02, 0.03) with ` einstein_radius=0.2 ` and a small ellipticity. Source_0
24+ should now genuinely lens source_1 in addition to the foreground lens.
25+ 2 . Verify the simulator still runs end-to-end with a single tracer
26+ ` [lens, source_0_with_mass, source_1] ` and that ` solver.solve(plane_redshift=1.0) `
27+ returns >=4 image-plane positions for source_0.
28+ 3 . Update ` modeling.py ` so the model includes source_0's mass:
29+ - ` source_0 = af.Model(al.Galaxy, redshift=1.0, mass=al.mp.Isothermal, point_0=al.ps.Point) `
30+ The lens model dimensionality goes from N=9 to N=14.
31+ 4 . Decide whether the ` AnalysisFactor ` for source_0's dataset should fit using
32+ the full multi-plane model or a sub-model excluding source_1. With #480 fixed,
33+ the full multi-plane model should fit cleanly and is preferred — both factors
34+ share ` lens ` and ` source_0.mass ` priors, the factor graph sums log-likelihoods.
35+ 5 . Re-run end-to-end with ` PYAUTO_TEST_MODE=2 ` (no ` PYAUTO_SMALL_DATASETS ` ) to
36+ confirm the simulator and modeling both work, then regenerate notebooks.
37+ 6 . Update the script docstrings and the folder/feature README to mention the
38+ lensing-of-lens richness again, and remove any "simplified to work around
39+ PyAutoLens #480 " comments.
0 commit comments