Beispiel #1
0
    def __init__(self, image_path):

        self.plotter = lensing_plotters.Plotter(
            output=mat_objs.Output(path=image_path, format="png"))
        self.sub_plotter = lensing_plotters.SubPlotter(
            output=mat_objs.Output(path=image_path +
                                   "subplots/", format="png"))
        self.include = lensing_plotters.Include()

        self.plot_ray_tracing_all_at_end_png = plot_setting(
            "ray_tracing", "all_at_end_png")
        self.plot_ray_tracing_all_at_end_fits = plot_setting(
            "ray_tracing", "all_at_end_fits")
        self.plot_subplot_ray_tracing = plot_setting("ray_tracing",
                                                     "subplot_ray_tracing")
        self.plot_ray_tracing_profile_image = plot_setting(
            "ray_tracing", "profile_image")
        self.plot_ray_tracing_source_plane = plot_setting(
            "ray_tracing", "source_plane_image")
        self.plot_ray_tracing_convergence = plot_setting(
            "ray_tracing", "convergence")
        self.plot_ray_tracing_potential = plot_setting("ray_tracing",
                                                       "potential")
        self.plot_ray_tracing_deflections = plot_setting(
            "ray_tracing", "deflections")
        self.plot_ray_tracing_magnification = plot_setting(
            "ray_tracing", "magnification")
Beispiel #2
0
    def __init__(self, image_path):

        self.plotter = gaussian_plotters.Plotter(
            output=mat_objs.Output(path=image_path, format="png")
        )
        self.sub_plotter = gaussian_plotters.SubPlotter(
            output=mat_objs.Output(path=image_path + "subplots/", format="png")
        )
        self.include = gaussian_plotters.Include()
 def sub_plotter_from_paths(paths: af.Paths, subfolders=None):
     if subfolders is None:
         return lensing_plotters.SubPlotter(
             output=mat_objs.Output(path=paths.image_path, format="png")
         )
     return lensing_plotters.SubPlotter(
         output=mat_objs.Output(
             path=path.join(paths.image_path, subfolders), format="png"
         )
     )
Beispiel #4
0
    def __init__(
        self,
        units=None,
        figure=None,
        cmap=None,
        cb=None,
        ticks=None,
        labels=None,
        legend=None,
        output=None,
        origin_scatterer=None,
        mask_scatterer=None,
        border_scatterer=None,
        grid_scatterer=None,
        positions_scatterer=None,
        index_scatterer=None,
        pixelization_grid_scatterer=None,
        liner=None,
        voronoi_drawer=None,
    ):

        if isinstance(self, Plotter):
            from_subplot_config = False
        else:
            from_subplot_config = True

        self.units = units if units is not None else mat_objs.Units()

        self.figure = (figure if figure is not None else mat_objs.Figure(
            from_subplot_config=from_subplot_config))

        self.cmap = (cmap if cmap is not None else mat_objs.ColorMap(
            from_subplot_config=from_subplot_config))

        self.cb = (cb if cb is not None else mat_objs.ColorBar(
            from_subplot_config=from_subplot_config))

        self.ticks = (ticks if ticks is not None else mat_objs.Ticks(
            from_subplot_config=from_subplot_config))

        self.labels = (labels if labels is not None else mat_objs.Labels(
            from_subplot_config=from_subplot_config))

        self.legend = (legend if legend is not None else mat_objs.Legend(
            from_subplot_config=from_subplot_config))

        self.output = (output if output is not None else mat_objs.Output(
            bypass=isinstance(self, SubPlotter)))

        self.origin_scatterer = (origin_scatterer if origin_scatterer
                                 is not None else mat_objs.OriginScatterer(
                                     from_subplot_config=from_subplot_config))
        self.mask_scatterer = (mask_scatterer if mask_scatterer is not None
                               else mat_objs.MaskScatterer(
                                   from_subplot_config=from_subplot_config))
        self.border_scatterer = (border_scatterer if border_scatterer
                                 is not None else mat_objs.BorderScatterer(
                                     from_subplot_config=from_subplot_config))
        self.grid_scatterer = (grid_scatterer if grid_scatterer is not None
                               else mat_objs.GridScatterer(
                                   from_subplot_config=from_subplot_config))
        self.positions_scatterer = (
            positions_scatterer if positions_scatterer is not None else
            mat_objs.PositionsScatterer(
                from_subplot_config=from_subplot_config))
        self.index_scatterer = (index_scatterer if index_scatterer is not None
                                else mat_objs.IndexScatterer(
                                    from_subplot_config=from_subplot_config))
        self.pixelization_grid_scatterer = (
            pixelization_grid_scatterer if pixelization_grid_scatterer
            is not None else mat_objs.PixelizationGridScatterer(
                from_subplot_config=from_subplot_config))

        self.liner = (liner if liner is not None else mat_objs.Liner(
            section="liner", from_subplot_config=from_subplot_config))

        self.voronoi_drawer = (voronoi_drawer if voronoi_drawer is not None
                               else mat_objs.VoronoiDrawer(
                                   from_subplot_config=from_subplot_config))