setup_light = al.SetupLightParametric() """ Mass: The `MassProfile` used to model the lens `Galaxy`'s mass. This is changed in the SLaM Mass pipeline that follows. Our experience with lens modeling has shown the `EllipticalIsothermal` profile is the simpliest model to fit that provide a good fit to the majority of strong lenses. For this runner the `SetupMassProfile` customizes: - That the mass of the lens `Galaxy` is fitted using an `EllipticalIsothermal`. - That there is not `ExternalShear` in the mass model (this lens was not simulated with shear and we do not include it in the mass model). - That the mass profile centre is (0.0, 0.0) (this assumption will be relaxed in the SLaM Mass Pipeline. """ setup_mass = al.SetupMassTotal(mass_prior_model=al.mp.EllipticalIsothermal) """We combine the `SetupSource`, `SetupLight` and `SetupMass` above to create the SLaM parametric Source Pipeline.""" pipeline_source_parametric = al.SLaMPipelineSourceParametric( setup_mass=setup_mass, setup_light=setup_light, setup_source=setup_source) """ __SLaMPipelineLight__ The `SLaMPipelineLightParametric` pipeline fits the model for the lens `Galaxy`'s bulge + disk light model. A full description of all options can be found ? and ?. The model used to represent the lens `Galaxy`'s light is input into `SLaMPipelineLightParametric` below and this runner uses an `EllipticalSersic` + `EllipticalExponential` bulge-disk model in this example. For this runner the `SLaMPipelineLightParametric` customizes:
__SLaMPipelineSourceParametric__ The parametric source pipeline aims to initialize a robust model for the source galaxy using `LightProfile` objects. _SLaMPipelineSourceParametric_ determines the source model used by the parametric source pipeline. A full description of all options can be found ? and ?. By default, this assumes an `EllipticalIsothermal` profile for the lens `Galaxy`'s mass. Our experience with lens modeling has shown they are the simpliest models that provide a good fit to the majority of strong lenses. For this runner the `SLaMPipelineSourceParametric` customizes: - The `MassProfile` fitted by the pipeline (and the following `SLaMPipelineSourceInversion`. - If there is an `ExternalShear` in the mass model or not. """ setup_mass = al.SetupMassTotal(mass_prior_model=al.mp.EllipticalIsothermal, with_shear=True) setup_source = al.SetupSourceParametric( bulge_prior_model=al.lp.EllipticalSersic, disk_prior_model=None, envelope_prior_model=None, ) pipeline_source_parametric = al.SLaMPipelineSourceParametric( setup_mass=setup_mass, setup_source=setup_source) """ __SLaMPipelineMassTotal__ The `SLaMPipelineMassTotal` pipeline fits the model for the lens `Galaxy`'s total mass distribution. A full description of all options can be found ? and ?.
def test__shear_from_previous_pipeline(self): setup_mass = al.SetupMassTotal(with_shear=False) pipeline_mass = al.SLaMPipelineMass(setup_mass=setup_mass) assert pipeline_mass.shear_from_result(result=None) == None
align_bulge_disk_centre=False, align_bulge_disk_elliptical_comps=False, light_centre=None, ) """ This pipeline also uses a `SetupMass`, which customizes: - The `MassProfile` used to fit the lens's total mass distribution. - If there is an `ExternalShear` in the mass model or not (this lens was not simulated with shear and we do not include it in the mass model).. - If the centre of the `MassProfile` is aligned with the centre of the `LightProfile`'s. """ setup_mass = al.SetupMassTotal( mass_prior_model=al.mp.EllipticalPowerLaw, with_shear=False, align_bulge_mass_centre=False, ) """ Next, we create a `SetupSourceInversion` which customizes: - The `Pixelization` used by the `Inversion` in phase 3 of the pipeline. - The `Regularization` scheme used by the `Inversion` in phase 3 of the pipeline. """ setup_source = al.SetupSourceInversion( pixelization_prior_model=al.pix.VoronoiMagnification, regularization_prior_model=al.reg.Constant, ) """ _Pipeline Tagging_
The parametric source pipeline aims to initialize a robust model for the source galaxy using _LightProfile_ objects. _SLaMPipelineSourceParametric_ determines the source model used by the parametric source pipeline. A full description of all options can be found ? and ?. By default, this assumes an _EllipticalIsothermal_ profile for the lens galaxy's mass. Our experience with lens modeling has shown they are the simpliest models that provide a good fit to the majority of strong lenses. For this runner the _SLaMPipelineSourceParametric_ customizes: - If there is an _ExternalShear_ in the mass model or not. """ setup_mass = al.SetupMassTotal(mass_prior_model=al.mp.EllipticalIsothermal, with_shear=True, mass_centre=(0.0, 0.0)) setup_source = al.SetupSourceParametric() pipeline_source_parametric = al.SLaMPipelineSourceParametric( setup_mass=setup_mass, setup_source=setup_source) # %% """ __SLaMPipelineSourceInversion__ The Source inversion pipeline aims to initialize a robust model for the source galaxy using an _Inversion_. _SLaMPipelineSourceInversion_ determines the _Inversion_ used by the inversion source pipeline. A full description of all options can be found ? and ?.
print(setup_source.disk_prior_model) print(setup_source.disk_prior_model.cls) # %% """ The lens mass model is customized using the `SetupMassTotal` object, which customizes: - The `MassProfile` fitted by the pipeline. - If there is an `ExternalShear` in the mass model or not (this lens was not simulated with shear and we do not include it in the mass model). - If the centre of the lens mass profile is manually input and fixed for modeling. """ # %% setup_mass = al.SetupMassTotal(mass_prior_model=al.mp.EllipticalPowerLaw, with_shear=False, mass_centre=None) # %% """ There is also a `SetupMassLightDark` object, which customizes lens mass models which decompose the lens's mass distribution into stellar and dark matter. More information on these models can be found in the `autolens_workspace/examples` and `autolens_workspace/transdimensional` folders. """ # %% """ _Pipeline Tagging_ The `Setup` objects are input into a `SetupPipeline` object, which is passed into the pipeline and used to customize the analysis depending on the setup. This includes tagging the output path of a pipeline. For example, if `with_shear`