autolens.twins.compare_to_data#

compare_to_data(twin, dataset, parent=None)[source]#

Delta chi^2_data = chi^2(twin | data) - chi^2(parent | data): two al.FitImaging of the observed dataset, one with each tracer. Positive means the observed data disfavour the twin relative to the parent.

This is a different number from TwinComparison.delta_chi_squared_image (which is noise free and compares the two models with each other, not with the data).

Parameters:
  • twin – The transformed twin.

  • dataset (Imaging) – The masked observed al.Imaging (e.g. ObservationSetup. dataset_from_fit_directory(fit_path)).

  • parent – The twin to compare against; defaults to the reference (twin.reference.tracer).

Raises:

NotImplementedError – If either tracer has a pixelized source.