RAnEnExtra::pixelsSplitByY divide pixels according to cuts on along the y axis.

pixelsSplitByY(
  pixels,
  ycuts,
  xgrids.total,
  ygrids.total,
  start = 1,
  flag.sort = T
)

Arguments

pixels

a vector of indices of pixels that will get divided

ycuts

a vector of integers specifing the y locations that will be cut. The range of the cut will be defined as [ycuts[i], ycuts[i+1]).

xgrids.total

total number of x.

ygrids.total

total number of y.

start

the counting start of pixels.

flag.sort

a bool specifing whether to sort the cut pixels or not

Value

a list of vectors with the separate pixels.

Details

cut.pixels.along.y cuts the pixels into separate sets based on the cutting points specified in ycuts and the y coordinates of each pixel. The start counting index of pixels should be specified in the argument start. Note that ycuts should be counted from 1