Hmm, question, as it seems that it takes vector argument. Does this means this can be used to test whether offset is out of range in I[#ind,offset] or in i[#ind,offset]? Both have different offset limits when spectrum>1. The size of vector argument should be what used to test the limit. If it is 1, then if it greater than max_x, then -1. If it is 2, then if it is greater than the bottom right corner, then -1. And so forth.