Skip to content

Commit 7cf55a4

Browse files
committed
Fix indexing when setting IQR with astropy tables.
1 parent 4139edd commit 7cf55a4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

decasu/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ def compute_visit_iqr_and_optics_scale(config, table):
187187
i1a = rev[rev[ind]: rev[ind + 1]]
188188
isfinite = np.isfinite(table[config.fwhm_field][i1a]) & (table[config.fwhm_field][i1a] > 0.0)
189189
if np.any(isfinite):
190-
five, lo, hi = np.percentile(table[config.fwhm_field][i1a][isfinite], [5.0, 25.0, 75.0])
191-
table[f"{config.fwhm_field}_iqr"][i1a][isfinite] = hi - lo
190+
five, lo, hi = np.percentile(table[config.fwhm_field][i1a[isfinite]], [5.0, 25.0, 75.0])
191+
table[f"{config.fwhm_field}_iqr"][i1a[isfinite]] = hi - lo
192192

193193
table[f"{config.fwhm_field}_optics_scale"][i1a] = table[f"{config.fwhm_field}"][i1a] / five

0 commit comments

Comments
 (0)