normalize the ccs representation

    Parameters
    ----------
    compIM: 2d array
        The CCS image in CCS representation
    ccsnorm: 2d array
        The normalization matrix in ccs representation

    Returns
    -------
    compIM: 2d array
        The normalized CCS image

    Notes
    -----
    (basically an element wise division for CCS)
    Should probably not be used from outside

def ccs_normalize(compIM, ccsnorm):
    """ normalize the ccs representation

    Parameters
    ----------
    compIM: 2d array
        The CCS image in CCS representation
    ccsnorm: 2d array
        The normalization matrix in ccs representation

    Returns
    -------
    compIM: 2d array
        The normalized CCS image

    Notes
    -----
    (basically an element wise division for CCS)
    Should probably not be used from outside
    """
    compIM = np.asarray(compIM)
    ccsnorm = np.asarray(ccsnorm)
    ys = ccsnorm.shape[0]
    xs = ccsnorm.shape[1]
    # start with first column
    ccsnorm[2::2, 0] = ccsnorm[1:ys - 1:2, 0]
    # continue with middle columns
    ccsnorm[:, 2::2] = ccsnorm[:, 1:xs - 1:2]
    # finish whith last row if even
    if xs % 2 is 0:
        ccsnorm[2::2, xs - 1] = ccsnorm[1:ys - 1:2, xs - 1]
    # solve problem with 0/0
    ccsnorm[ccsnorm == 0] = np.nextafter(0., 1., dtype = ccsnorm.dtype)

    res = compIM / ccsnorm
    return res