I have been testing the MIRI SGD notebook and running into issues when generating the KLIP reference. This is related to uncorrected nan's in the SGD reference images, possibly due to saturation artifacts, that cause the code to crash.
slope = r['2d']['detector']
reg = analysis.register_to_target(slope,target_slope,rescale_reference=True)
sgd_reg.append(reg)
sgd_reg = np.array(sgd_reg)
slope = r['2d']['detector']
slope_mean_sub = slope - np.nanmean(slope)
slope_mean_sub[np.isnan(slope_mean_sub)] = 0
reg = analysis.register_to_target(slope_mean_sub,target_slope,rescale_reference=True)
sgd_reg.append(reg)
This does result in the central PSF artifact not getting completely removed in the target-reference but that could be corrected by drawing a mask on the central 0.1-0.2 arcsec.