(energy)
| 965 | n_sel_start = data_sel_indices[0] |
| 966 | |
| 967 | def _energy_to_index(energy): |
| 968 | # 'y' is truncated array, and energy axis is aligned with the full array |
| 969 | n_index = int(round((energy - e_offset) / e_linear)) - n_sel_start |
| 970 | n_index = int(np.clip(n_index, a_min=0, a_max=n_pts - 1)) |
| 971 | return n_index |
| 972 | |
| 973 | roi_data = np.zeros(shape=(ny, nx, len(roi_bands))) |
| 974 | for n, band in enumerate(roi_bands): |