@@ -43,6 +43,7 @@ def visualize(
4343 paths : af .DirectoryPaths ,
4444 instance : af .ModelInstance ,
4545 during_analysis : bool ,
46+ quick_update : bool = False ,
4647 ):
4748 """
4849 Outputs images of the maximum log likelihood model inferred by the model-fit. This function is called
@@ -75,28 +76,30 @@ def visualize(
7576 """
7677 fit = analysis .fit_from (instance = instance )
7778
78- PlotterInterface = PlotterInterfaceInterferometer (
79+ plotter_interface = PlotterInterfaceInterferometer (
7980 image_path = paths .image_path , title_prefix = analysis .title_prefix
8081 )
81- PlotterInterface .interferometer (dataset = analysis .interferometer )
82+
83+ try :
84+ plotter_interface .fit_interferometer (
85+ fit = fit , quick_update = quick_update ,
86+ )
87+ except exc .InversionException :
88+ pass
89+
90+ if quick_update :
91+ return
8292
8393 galaxies = fit .galaxies_linear_light_profiles_to_light_profiles
8494
85- PlotterInterface .galaxies (
95+ plotter_interface .galaxies (
8696 galaxies = galaxies ,
8797 grid = fit .grids .lp ,
8898 )
8999
90- try :
91- PlotterInterface .fit_interferometer (
92- fit = fit ,
93- )
94- except exc .InversionException :
95- pass
96-
97100 if fit .inversion is not None :
98101 try :
99- PlotterInterface .inversion (
102+ plotter_interface .inversion (
100103 inversion = fit .inversion ,
101104 )
102105 except IndexError :
0 commit comments