Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions autolens/aggregator/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,10 @@
from autogalaxy.aggregator.ellipse.fit_ellipse import FitEllipseAgg

from autolens.aggregator.subhalo import SubhaloAgg

from autolens.aggregator.subplot import SubplotDataset as subplot_dataset
from autolens.aggregator.subplot import SubplotTracer as subplot_tracer
from autolens.aggregator.subplot import SubplotFit as subplot_fit
from autolens.aggregator.subplot import SubplotFitLog10 as subplot_fit_log10
from autolens.aggregator.subplot import FITSTracer as fits_tracer
from autolens.aggregator.subplot import FITSFit as fits_fits
1 change: 0 additions & 1 deletion autolens/aggregator/fit_imaging.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ def _fit_imaging_from(
dataset_model_list,
adapt_images_list,
):

fit_dataset_list.append(
FitImaging(
dataset=dataset,
Expand Down
1 change: 0 additions & 1 deletion autolens/aggregator/fit_interferometer.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ def _fit_interferometer_from(
dataset_model_list,
adapt_images_list,
):

fit_dataset_list.append(
FitInterferometer(
dataset=dataset,
Expand Down
100 changes: 100 additions & 0 deletions autolens/aggregator/subplot.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
from enum import Enum


class FITSTracer(Enum):
"""
The HDUs that can be extracted from the fit.fits file.
"""

convergence = "CONVERGENCE"
potential = "POTENTIAL"
deflections_y = "DEFLECTIONS_Y"
deflections_x = "DEFLECTIONS_X"


class FITSFit(Enum):
"""
The HDUs that can be extracted from the fit.fits file.
"""

model_image = "MODEL_IMAGE"
residual_map = "RESIDUAL_MAP"
normalized_residual_map = "NORMALIZED_RESIDUAL_MAP"
chi_squared_map = "CHI_SQUARED_MAP"


class SubplotDataset(Enum):
"""
The subplots that can be extracted from the subplot_fit image.

The values correspond to the position of the subplot in the 4x3 grid.
"""

data = (0, 0)
data_log_10 = (1, 0)
noise_map = (2, 0)
psf = (0, 1)
psf_log_10 = (1, 1)
signal_to_noise_map = (2, 1)
over_sample_size_lp = (0, 2)
over_sample_size_pixelization = (1, 2)


class SubplotTracer(Enum):
"""
The subplots that can be extracted from the subplot_tracer image.

The values correspond to the position of the subplot in the 3x3 grid.
"""

image = (0, 0)
source_image = (1, 0)
source_plane_image = (2, 0)
lens_light_image = (1, 0)
convergence = (1, 1)
potential = (1, 2)
magnification = (0, 2)
deflections_y = (1, 2)
deflections_x = (2, 2)


class SubplotFit(Enum):
"""
The subplots that can be extracted from the subplot_fit image.

The values correspond to the position of the subplot in the 4x3 grid.
"""

data = (0, 0)
data_source_scale = (1, 0)
signal_to_noise_map = (2, 0)
model_image = (3, 0)
lens_light_model = (1, 0)
lens_light_subtracted_image = (1, 1)
source_model_image = (1, 2)
source_plane_image_zoom = (1, 3)
normalized_residual_map = (2, 0)
normalized_residual_map_one_sigma = (2, 1)
chi_squared_map = (2, 2)
source_plane_image = (2, 3)


class SubplotFitLog10(Enum):
"""
The subplots that can be extracted from the subplot_fit image.

The values correspond to the position of the subplot in the 4x3 grid.
"""

data = (0, 0)
data_source_scale = (1, 0)
signal_to_noise_map = (2, 0)
model_image = (3, 0)
lens_light_model = (1, 0)
lens_light_subtracted_image = (1, 1)
source_model_image = (1, 2)
source_plane_image_zoom = (1, 3)
normalized_residual_map = (2, 0)
normalized_residual_map_one_sigma = (2, 1)
chi_squared_map = (2, 2)
source_plane_image = (2, 3)
2 changes: 1 addition & 1 deletion autolens/analysis/positions.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def log_likelihood_function_positions_overwrite(

def output_positions_info(self, output_path: str, tracer: Tracer):
"""
Outputs a `positions.info` file which summarizes the positions penalty term for a model fit, including:
Outputs a `positions.info` file which summarises the positions penalty term for a model fit, including:

- The arc second coordinates of the lensed source multiple images used for the model-fit.
- The radial distance of these coordinates from (0.0, 0.0).
Expand Down
Loading