def convert1Dindices_fromcroppedarray(data_array_shape,
    indices1D_croppedarray, removedges=0):
    """
    convert 1D indices from raveled array
    coming from an array ((data_array_shape) ) which edges have been removed

    in corresponding indices of 1d array
    TODO: give example
    """
    nbrow, nbcol = data_array_shape
    offset = removedges * (nbcol + 1)
    original_index = offset + indices1D_croppedarray / (nbcol - 2 * removedges
        ) + indices1D_croppedarray % (nbcol - 2 * removedges)
    return original_index
