Pull request #1866: PIPE-3109: avoid access to out of bounds array elements in frequency array.
Merge in PIPE/pipeline from PIPE-3109-hsd_imaging-missed_line-plot-was-failed-to-generate-due-to-indexerror to main
* commit '310618f9b22a578b65ed06daa4f9ca0a8d5e8a85': PIPE-3109 a fix to channel range to take into account of edges. PIPE-3109: avoid access to out of bounds array elements in frequency array.
PIPE-3109: avoid access to out of bounds array elements in frequency array.
The min/max channel IDs calculated from channelmap_range (which holds a list of center channel ID and width) can point the indices outside of valid channel range (i.e., 0 to nchan-1) of the spw. This fix is to limit min/max channel IDs of line ranges within valid channel range and avoid IndexError.