diff --git a/src/stcal/ramp_fitting/ols_fit.py b/src/stcal/ramp_fitting/ols_fit.py index cd4ba404e..38d680d7a 100644 --- a/src/stcal/ramp_fitting/ols_fit.py +++ b/src/stcal/ramp_fitting/ols_fit.py @@ -677,10 +677,10 @@ def ols_ramp_fit_single( if ramp_data.drop_frames1 is None: ramp_data.drop_frames1 = 0 - dbg_print(" ---------------- Entering C Code ----------------") + print(" ---------------- Entering C Code ----------------") image_info, integ_info, opt_info = ols_slope_fitter( ramp_data, gain_2d, readnoise_2d, weighting, save_opt) - dbg_print(" ---------------- Return C Code ----------------") + print(" ---------------- Return C Code ----------------") c_end = time.time() print("=" * 80) @@ -691,10 +691,10 @@ def ols_ramp_fit_single( p_start = time.time() print("\n"); - dbg_print(" ---------------- Entering Python Code ----------------") + print(" ---------------- Entering Python Code ----------------") image_info, integ_info, opt_info = ols_ramp_fit_single_python( ramp_data, buffsize, save_opt, readnoise_2d, gain_2d, weighting) - dbg_print(" ---------------- Return Python Code ----------------") + print(" ---------------- Return Python Code ----------------") # XXX end python time p_end = time.time() @@ -810,9 +810,9 @@ def c_python_time_comparison(c_start, c_end, p_start, p_end): c_diff = c_end - c_start p_diff = p_end - p_start c_div_p = c_diff / p_diff * 100. - dbg_print(f"{c_diff = }") - dbg_print(f"{p_diff = }") - dbg_print(f"{c_div_p = :.4f}%") + print(f"{c_diff = }") + print(f"{p_diff = }") + print(f"{c_div_p = :.4f}%") def discard_miri_groups(ramp_data): @@ -1250,13 +1250,6 @@ def ramp_fit_compute_variances(ramp_data, gain_2d, readnoise_2d, fit_slopes_ans) var_p4[num_int, :, med_rates <= 0.] = 0. var_both4[num_int, :, :, :] = var_r4[num_int, :, :, :] + var_p4[num_int, :, :, :] - ''' - if num_int == 0: - print("=" * 80) - dbg_print(f"var_both4 = integration 0\n{var_both4[0, :, 0, 0]}") - print("=" * 80) - ''' - inv_var_both4[num_int, :, :, :] = 1. / var_both4[num_int, :, :, :] # Want to retain values in the 4D arrays only for the segments that each @@ -1315,12 +1308,6 @@ def ramp_fit_compute_variances(ramp_data, gain_2d, readnoise_2d, fit_slopes_ans) ramp_data.groupdq = groupdq ramp_data.pixeldq = inpixeldq - ''' - print("=" * 80) - dbg_print(f"var_both4 = integration 0\n{var_both4[0, :, 0, 0]}") - print("=" * 80) - ''' - return var_p3, var_r3, var_p4, var_r4, var_both4, var_both3, inv_var_both4, \ s_inv_var_p3, s_inv_var_r3, s_inv_var_both3 @@ -2695,14 +2682,6 @@ def fit_next_segment_long_end_of_ramp( if len(g_pix) > 0: inv_var[g_pix] += 1.0 / variance[g_pix] - ''' - print("=" * 80) - dbg_print(f"{ramp_data.current_integ = }") - dbg_print(f"{variance = }") - dbg_print(f"{inv_var = }") - print("=" * 80) - ''' - # Append results to arrays opt_res.append_arr(num_seg, g_pix, intercept, slope, sig_intercept, sig_slope, inv_var, save_opt) @@ -3166,15 +3145,6 @@ def fit_double_read(mask_2d, wh_pix_2r, data_masked, slope_s, intercept_s, sig_slope_s[pixel_ff] = np.sqrt(2) * rn sig_intercept_s[pixel_ff] = np.sqrt(2) * rn - ''' - if len(wh_pix_2r[0]) > 0: - print("=" * 80) - dbg_print(f"{mask_2d[:, 0] = }") - dbg_print(f"{rn = }") - dbg_print(f"{variance_s = }") - print("=" * 80) - ''' - return slope_s, intercept_s, variance_s, sig_slope_s, sig_intercept_s