Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import autofit as af
from autoarray.exc import InversionException
from autofit.exc import FitException
from autogalaxy.galaxy import galaxy as g
from autogalaxy.pipeline.phase.dataset import analysis as ag_analysis
from autolens.fit import fit
from autolens.pipeline import visualizer
from autolens.pipeline.phase.dataset import analysis as analysis_dataset
class Analysis(ag_analysis.Analysis, analysis_dataset.Analysis):
def __init__(
self,
masked_interferometer,
cosmology,
image_path=None,
results=None,
log_likelihood_cap=None,
):
super(Analysis, self).__init__(
cosmology=cosmology, results=results, log_likelihood_cap=log_likelihood_cap
)
self.visualizer = visualizer.PhaseInterferometerVisualizer(
masked_dataset=masked_interferometer, image_path=image_path
)
super(Analysis, self).__init__(
cosmology=cosmology, results=results, log_likelihood_cap=log_likelihood_cap
)
self.visualizer = visualizer.PhaseInterferometerVisualizer(
masked_dataset=masked_interferometer, image_path=image_path
)
self.visualizer.visualize_hyper_images(
hyper_galaxy_image_path_dict=self.hyper_galaxy_image_path_dict,
hyper_model_image=self.hyper_model_image,
)
self.masked_dataset = masked_interferometer
result = ag_analysis.last_result_with_use_as_hyper_dataset(results=results)
if result is not None:
self.hyper_galaxy_visibilities_path_dict = (
result.hyper_galaxy_visibilities_path_dict
)
self.hyper_model_visibilities = result.hyper_model_visibilities
else:
self.hyper_galaxy_visibilities_path_dict = None
self.hyper_model_visibilities = None
from autoconf import conf
from autoarray.operators.inversion import pixelizations as pix
from autoarray.exc import InversionException, GridException
from autofit.exc import FitException
from autogalaxy.pipeline.phase.dataset import analysis as ag_analysis
from autolens.fit import fit
from autolens.pipeline import visualizer
from autolens.pipeline.phase.dataset import analysis as analysis_dataset
import copy
class Analysis(ag_analysis.Analysis, analysis_dataset.Analysis):
def __init__(
self,
masked_imaging,
cosmology,
image_path=None,
results=None,
log_likelihood_cap=None,
):
super().__init__(
cosmology=cosmology, results=results, log_likelihood_cap=log_likelihood_cap
)
self.visualizer = visualizer.PhaseImagingVisualizer(
masked_dataset=masked_imaging, image_path=image_path, results=results
)