def basex_core_transform(rawdata, A):
    """
    Internal function that does the actual BASEX transform.
    It requires that the transform matrix be passed.

    Parameters
    ----------
    rawdata : m × n numpy array
        right half (with the axis) of the input image.
    A : n × n numpy array
        2D array given by the transform-calculation function

    Returns
    -------
    IM : m × n numpy array
        the Abel-transformed image
    """

    # Note that our images are stored with matrix rows corresponding to
    # horizontal image lines. This is consistent with the Matlab and C++
    # BASEX implementations, but is the opposite to the article notation.
    # Thus all matrices are transposed and multiplied backwards with
    # respect to the article.
    # The vertical transform is not applied, since without regularization
    # its overall effect is an identity transform.

    # transform the image
    return rawdata.dot(A)