Jammy2211 / PyAutoGalaxy

PyAutoGalaxy: Open-Source Multiwavelength Galaxy Structure & Morphology
https://pyautogalaxy.readthedocs.io/
MIT License
26 stars 13 forks source link

Feature/data offset #171

Closed Jammy2211 closed 2 months ago

Jammy2211 commented 2 months ago

Extends the DatasetModel object added in https://github.com/Jammy2211/PyAutoArray/pull/101 to include a grid_offset parameter.

This parameter accounts for (y,x) offsets between two datasets. It is subtracted from one dataset so as to shift the grids associated with it, which are used to perform calculations which fit the dataset, to align with another dataset.

The DatasetModel can be passed into a FitImaging or FitInterferometer object with a grid_offset and the shift will be applied before computing the model-image and log likelihood.

In the projects PyAutoGalaxy and PyAutoLens the grid_offset (y,x) values can be treated free parameters fitted for as part of a model-fit.

This means offsets between datasets (e.g. due to pointing errors) can be properly accounted for and marginalized over.

The following example scripts show examples of this for PyAutoGalaxy and PyAutoLens:

https://github.com/Jammy2211/autogalaxy_workspace/blob/main/scripts/multi/modeling/features/dataset_offsets.py https://github.com/Jammy2211/autolens_workspace/blob/main/scripts/multi/modeling/features/dataset_offsets.py