Quick DMR and Corner Plotting Function

Quick DMR and Corner Plotting Function#

The following cells will make a DMR (data, model, residual) plot and a corner plot for your data. The function will also return some key information for your lensing system. Compress your COOLEST files into a .tar.gz file before using. An example COOLEST file is included (database/dmr_corner/coolest.tar.gz).

If using a .tar.gz that does not contain a chains file, dmr_corner will not generate a corner plot.

from coolest.api import plot_util as plut
plut.dmr_corner('database/dmr_corner/coolest.tar.gz', 'database/dmr_corner/outputs')
WARNING:root:Outer limit of integration exceeds FoV; effective radius may not be accurate.
INFO:root:Picked center from profile 'PEMD'
WARNING:root:Found NaN values in image prior to convolution; they have been replaced by zeros.
WARNING:root:Found NaN values in image prior to convolution; they have been replaced by zeros.
../_images/794ebaeebf49f5f843c5990cf5ca0c0fe09ab1e0805558b4c5e454481cbfd060.png
{'r_eff_source': 0.4097656249999994,
 'einstein_radius': 1.5499999999999883,
 'lensing_entities': ['MassField', 'Galaxy', 'Galaxy'],
 'source_light_model': ['IrregularGrid'],
 'dmr_plot': 'database/dmr_corner/outputs/dmr_plot.png',
 'free_parameters': ['1-galaxy-mass-0-PEMD-gamma',
  '1-galaxy-mass-0-PEMD-theta_E',
  '1-galaxy-mass-0-PEMD-q',
  '1-galaxy-mass-0-PEMD-phi',
  '1-galaxy-mass-0-PEMD-center_x',
  '0-massfield-mass-0-ExternalShear-gamma_ext',
  '0-massfield-mass-0-ExternalShear-phi_ext'],
 'corner_plot': 'database/dmr_corner/outputs/corner_plot.png'}