def rd2pix(header, center):
    """Convert ra dec coordinate into pixel coordinates
    """
    ra, dec = center
    # x0
    cdelt2 = header['CDELT2']
    crpix2 = header['CRPIX2']
    crval2 = header['CRVAL2']
    x0 = (dec - crval2) / cdelt2 + crpix2
    # Y0
    cdelt1 = header['CDELT1']
    crpix1 = header['CRPIX1']
    crval1 = header['CRVAL1']
    y0 = (ra - crval1) / cdelt1 + crpix1
    return x0, y0