def calc_chunks(nLORs, n_chunks):
  """ calculate indices to split an array of length nLORs into n_chunks chunks

      example: splitting an array of length 10 into 3 chunks returns [0,4,7,10]
  """
  rem  = nLORs % n_chunks
  div  = (nLORs // n_chunks)

  chunks = [0]

  for i in range(n_chunks):
    if i < rem: 
      nLORs_chunck = div + 1
    else:
      nLORs_chunck = div

    chunks.append(chunks[i] + nLORs_chunck) 

  return chunks