示例#1
0
    def __init__(
            self,
            dataset,
            positions: grid_2d_irregular.Grid2DIrregular = None,
            hyper_result=None,
            cosmology=cosmo.Planck15,
            settings_pixelization=pix.SettingsPixelization(),
            settings_inversion=inv.SettingsInversion(),
            settings_lens=settings.SettingsLens(),
            preloads=pload.Preloads(),
    ):

        super().__init__(
            dataset=dataset,
            positions=positions,
            hyper_result=hyper_result,
            cosmology=cosmology,
            settings_pixelization=settings_pixelization,
            settings_inversion=settings_inversion,
            settings_lens=settings_lens,
            preloads=preloads,
        )

        if self.hyper_result is not None:

            self.set_hyper_dataset(result=self.hyper_result)

        else:

            self.hyper_galaxy_visibilities_path_dict = None
            self.hyper_model_visibilities = None
示例#2
0
    def __init__(
            self,
            dataset,
            positions: grid_2d_irregular.Grid2DIrregular = None,
            hyper_result=None,
            cosmology=cosmo.Planck15,
            settings_pixelization=pix.SettingsPixelization(),
            settings_inversion=inv.SettingsInversion(),
            settings_lens=settings.SettingsLens(),
            preloads=pload.Preloads(),
    ):
        """

        Parameters
        ----------
        dataset
        positions : grid_2d_irregular.Grid2DIrregular
            Image-pixel coordinates in arc-seconds of bright regions of the lensed source that will map close to one
            another in the source-plane(s) for an accurate mass model, which can be used to discard unphysical mass
            models during model-fitting.
        cosmology
        settings_pixelization
        settings_inversion
        settings_lens
        preloads
        """

        super().__init__(
            dataset=dataset,
            hyper_result=hyper_result,
            cosmology=cosmology,
            settings_pixelization=settings_pixelization,
            settings_inversion=settings_inversion,
            preloads=preloads,
        )

        AnalysisLensing.__init__(self=self,
                                 settings_lens=settings_lens,
                                 cosmology=cosmology)

        self.positions = positions

        self.settings_lens = settings_lens
示例#3
0
    def __init__(
            self,
            point_dict: ps.PointDict,
            solver: psolve.PositionsSolver,
            imaging=None,
            cosmology=cosmo.Planck15,
            settings_lens=settings.SettingsLens(),
    ):
        """
        The analysis performed for model-fitting a point-source dataset, for example fitting the point-sources of a
        multiply imaged lensed quasar or supernovae of many source galaxies of a galaxy cluster.

        The analysis brings together the data, model and non-linear search in the classes `log_likelihood_function`,
        which is called by every iteration of the non-linear search to compute a likelihood value which samples
        parameter space.

        Parameters
        ----------
        point_dict : ps.PointDict
            A dictionary containing the full point source dictionary that is used for model-fitting.
        solver : psolve.PositionsSolver
            The object which is used to determine the image-plane of source-plane positions of a model (via a `Tracer`).
        imaging : Imaging
            The imaging of the point-source dataset, which is not used for model-fitting but can be used for
            visualization.
        cosmology : astropy.cosmology
            The cosmology of the ray-tracing calculation.
        settings_lens : settings.SettingsLens()
            Settings which control how the model-fit is performed.
        """

        super().__init__(settings_lens=settings_lens, cosmology=cosmology)

        AnalysisLensing.__init__(self=self,
                                 settings_lens=settings_lens,
                                 cosmology=cosmology)

        self.point_dict = point_dict

        self.solver = solver
        self.imaging = imaging
示例#4
0
    def __init__(self,
                 settings_lens=settings.SettingsLens(),
                 cosmology=cosmo.Planck15):

        self.cosmology = cosmology
        self.settings_lens = settings_lens