Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Extends the
DatasetModel
object added in Jammy2211/PyAutoArray#101 to include agrid_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 aFitImaging
orFitInterferometer
object with agrid_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