diff --git a/prototypes/b1938_lens_fit.py b/prototypes/b1938_lens_fit.py index b507140..5a3f78f 100644 --- a/prototypes/b1938_lens_fit.py +++ b/prototypes/b1938_lens_fit.py @@ -124,12 +124,18 @@ def main(): redshift=Z_LENS, bulge=af.Model(al.lp.Sersic), mass=lens_mass, + ) + field = af.Model( + al.MassField, + redshift=Z_LENS, shear=af.Model(al.mp.ExternalShear), ) source = af.Model( al.Galaxy, redshift=Z_SOURCE, bulge=af.Model(al.lp.SersicCore) ) - model = af.Collection(galaxies=af.Collection(lens=lens, source=source)) + model = af.Collection( + galaxies=af.Collection(lens=lens, source=source), fields=field + ) search = af.Nautilus( path_prefix="b1938_keck_acceptance", diff --git a/prototypes/slacs1430_parity_fit.py b/prototypes/slacs1430_parity_fit.py index e19d723..320ca6b 100644 --- a/prototypes/slacs1430_parity_fit.py +++ b/prototypes/slacs1430_parity_fit.py @@ -135,6 +135,10 @@ def main(key: str): redshift=Z_LENS, bulge=lens_bulge, mass=lens_mass, + ) + field = af.Model( + al.MassField, + redshift=Z_LENS, shear=af.Model(al.mp.ExternalShear), ) @@ -153,7 +157,9 @@ def main(key: str): source_bulge = af.Model(al.lp_basis.Basis, profile_list=src_gaussians) source = af.Model(al.Galaxy, redshift=Z_SOURCE, bulge=source_bulge) - model = af.Collection(galaxies=af.Collection(lens=lens, source=source)) + model = af.Collection( + galaxies=af.Collection(lens=lens, source=source), fields=field + ) positions_yx = json.loads((LEGACY_DIR / "positions.json").read_text()) if key != "legacy": @@ -199,8 +205,8 @@ def mass_param(getter, sigma): ell = np.hypot(e1, e2) q = (1 - ell) / (1 + ell) pa = float(np.degrees(np.arctan2(e2, e1)) / 2.0) % 180.0 - g1 = float(mp.galaxies.lens.shear.gamma_1) - g2 = float(mp.galaxies.lens.shear.gamma_2) + g1 = float(mp.fields.shear.gamma_1) + g2 = float(mp.fields.shear.gamma_2) summary = { "dataset": key,