def world_to_pixel(header, axis, value):
    """
    Calculate the pixel value for the provided world value using the WCS
    keywords on the specific axis. The axis must be linear.
    :param header: The FITS header describing the zxes.
    :param axis:  The number of the target axis.
    :param value: The world value to be converted.
    :return: The pixel value.
    """
    ax = str(axis)
    return int(header['CRPIX' + ax] + (value - header['CRVAL' + ax]) / header[
        'CDELT' + ax])