diff --git a/experiment/figures/52/three_separations.png b/experiment/figures/52/three_separations.png index 04076830b..0e9122e0b 100644 Binary files a/experiment/figures/52/three_separations.png and b/experiment/figures/52/three_separations.png differ diff --git a/experiment/figures/52/toy_centroid_residual.png b/experiment/figures/52/toy_centroid_residual.png index a7a02b99d..d3c28fe9f 100644 Binary files a/experiment/figures/52/toy_centroid_residual.png and b/experiment/figures/52/toy_centroid_residual.png differ diff --git a/experiment/figures/52/toy_detection_prob.png b/experiment/figures/52/toy_detection_prob.png index 5654c67fa..f3d09a6b4 100644 Binary files a/experiment/figures/52/toy_detection_prob.png and b/experiment/figures/52/toy_detection_prob.png differ diff --git a/experiment/figures/52/toy_residuals.png b/experiment/figures/52/toy_residuals.png index 8399d49c5..9b553114b 100644 Binary files a/experiment/figures/52/toy_residuals.png and b/experiment/figures/52/toy_residuals.png differ diff --git a/experiment/scripts/figures/toy_figures.py b/experiment/scripts/figures/toy_figures.py index 0023af2e8..34e1a2e69 100644 --- a/experiment/scripts/figures/toy_figures.py +++ b/experiment/scripts/figures/toy_figures.py @@ -1,5 +1,6 @@ import matplotlib.pyplot as plt import numpy as np +import pytorch_lightning as pl import torch from einops import rearrange from matplotlib.figure import Figure @@ -69,6 +70,9 @@ def separations_to_plot(self) -> list[int]: return [5, 10, 15] def compute_data(self, detection: DetectionEncoder, deblender: GalaxyEncoder): + # match previous noise realization that used a different seed + pl.seed_everything(43) + # first, decide image size slen = 55 bp = detection.bp @@ -165,7 +169,7 @@ def compute_data(self, detection: DetectionEncoder, deblender: GalaxyEncoder): assert recon_ptiles.shape[-1] == recon_ptiles.shape[-2] == ptile_slen recon = reconstruct_image_from_ptiles(recon_ptiles, tile_slen) recon = recon.detach().cpu() - residuals = (recon - images) / torch.sqrt(bg) + residuals = (recon - images) / np.sqrt(bg) # now we need to obtain pred. plocs, prob. of detection in tile and std. of plocs # for each source